Verification resource allocation method and device, equipment, medium and product

By maintaining a list of preset controllers in the software RAID and generating a random number index matching verification calculation controller, the problem of software RAID lacks flexibility when selecting XOR computing controllers is solved, and the verification resources are flexibly allocated according to performance requirements and overall performance is improved.

CN120029557AActive Publication Date: 2025-05-23SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202510511272.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-23
Publication Date
2025-05-23
Estimated Expiration
2045-04-23

AI Technical Summary

Technical Problem

Software RAID lacks flexibility when selecting XOR computing controllers, resulting in insufficient system adaptability and robustness, making it difficult to flexibly adjust verification resources according to performance requirements, resulting in insufficient performance or waste of resources.

Method used

By maintaining a preset controller list locally on the target host, storing the verification computing capability information of each verification computing controller, generating a random number index matching the appropriate verification computing controller, and determining whether its capabilities meet the task requirements. If not, traversing the list will search for a controller that meets the needs.

Benefits of technology

It realizes flexible allocation of verification resources according to the performance requirements of verification calculation tasks, improves overall performance, and avoids controller load imbalance and resource waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120029557A_ABST
    Figure CN120029557A_ABST
Patent Text Reader

Abstract

The invention discloses a verification resource allocation method and device, equipment, a medium and a product, relates to the technical field of data storage, is applied to a target host, and comprises the following steps: generating a target random number when a verification calculation task is obtained, and obtaining a matched first verification calculation controller from a preset controller list by taking the target random number as an index value; the preset controller list stores check calculation capability information of each current check calculation controller, and each check calculation controller is hardware equipment which is connected with the target host and has a check calculation function; obtaining target verification calculation capability information of the first verification calculation controller, and judging whether the target verification calculation capability information meets the calculation resource requirement of the verification calculation task or not; if yes, executing a check calculation task by using a first check calculation controller; and if not, traversing the preset controller list in sequence until a second check calculation controller meeting the calculation resource requirement is determined, and then executing the check calculation task by using the second check calculation controller.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data storage, and in particular to a verification resource allocation method, device, equipment, medium and product. Background Art

[0002] With the explosive growth of data volume and the continuous improvement of storage performance requirements, data storage technology faces many challenges. As an important data storage solution, RAID (Redundant Array of Independent Disks) technology aims to improve data read and write efficiency, enhance data redundancy and system fault tolerance. Among them, software-hardware hybrid RAID combines the flexibility of software RAID with the high performance advantages of hardware RAID to achieve efficient data storage and access. It uses dedicated hardware to accelerate computing-intensive tasks, and the software is responsible for managing configuration tasks, and it performs well in scalability and cost-effectiveness. However, with the development of technologies such as PCIe (Peripheral Component Interconnect Express, a high-speed serial computer expansion bus standard) and SR-IOV (Single Root I / O Virtualization), multi-function RAID controllers and multi-function SSD solutions have emerged. For example, a multi-function composite RAID controller uses part of its functions as an XOR (Exclusive OR) calculation controller to provide XOR calculation support for software RAID, so that when performing data redundancy check calculations, it is no longer necessary to occupy the bandwidth resources of the CPU (Central Processing Unit) and DRAM (Dynamic Random Access Memory), thereby not only saving precious bandwidth but also significantly improving performance. Typical hardware and software hybrid RAID functional architectures are shown below. Figure 1 as shown in .

[0003] However, taking Figure 1 The solution shown in also has the following problems: software RAID lacks flexibility in selecting an XOR calculation controller. Currently, only a fixed controller can be used. If the controller is removed or fails, the software RAID will not be able to continue to use it, which limits the adaptability and robustness of the system. It also makes it difficult for the software RAID to flexibly adjust according to its own performance requirements and the verification resources of the controller, resulting in insufficient performance or waste of resources, thereby affecting the overall performance and efficiency.

[0004] In summary, how to flexibly allocate corresponding verification resources to verification computing tasks according to their performance requirements to improve overall performance is a problem that needs to be solved. Summary of the invention

[0005] In view of this, the purpose of the present invention is to provide a verification resource allocation method, device, equipment, medium and product, which can flexibly allocate corresponding verification resources to the verification computing task according to the performance requirements to improve the overall performance. The specific scheme is as follows:

[0006] In a first aspect, the present application discloses a verification resource allocation method, which is applied to a target host, comprising: When a verification calculation task is obtained, a target random number is generated, and the target random number is used as an index value to obtain a matching first verification calculation controller from a preset controller list; wherein the preset controller list stores verification calculation capability information of each current verification calculation controller, and each verification calculation controller is a hardware device connected to a target host and having a verification calculation function; Obtaining target verification computing capability information of the first verification computing controller, and determining whether the target verification computing capability information meets the computing resource requirements of the verification computing task; If satisfied, the first verification calculation controller is used to perform the verification calculation task; If not, the preset controller list is traversed in sequence until a second verification calculation controller that meets the computing resource requirements is determined, and the second verification calculation controller is used to perform the verification calculation task.

[0007] Optionally, generate a target random number when obtaining a verification calculation task, including: When the verification calculation task is obtained, a current timestamp is determined, and the current number of controllers in the preset controller list is determined; Generates a target random number based on the current timestamp and the current controller number.

[0008] Optionally, generate a target random number based on the current timestamp and the current controller number, including: The current timestamp is used as a random seed, and the random seed is processed using a preset random number generation function to generate an initial random number; Perform a modulus operation on the initial random number based on the current number of controllers to obtain the target random number.

[0009] Optionally, generate a target random number based on the current timestamp and the current controller number, including: Convert the current timestamp into a corresponding integer value, and perform a sum operation on the integer value and the current controller quantity, so as to use the sum operation result as a random seed; Processing the random seed using a preset random number generation function to generate an initial random number; Perform a modulus operation on the initial random number based on the current number of controllers to obtain the target random number.

[0010] Optionally, the hardware device is a disk array controller or a solid state drive controller; Accordingly, the method further includes: During the startup process of the disk array controller or the solid-state hard disk controller, corresponding controller information is obtained, and based on the controller information, it is determined whether the disk array controller or the solid-state hard disk controller has a verification calculation function; If yes, a disk array controller or a solid-state hard disk controller having a check calculation function is used as a check calculation controller, and check calculation capability information of the check calculation controller is obtained; Each verification calculation controller and the corresponding verification calculation capability information are stored in a preset controller list.

[0011] Optionally, obtaining corresponding controller information, and judging whether the disk array controller or the solid-state drive controller has a verification calculation function based on the controller information, includes: Sending a preset query command to the disk array controller or the solid-state drive controller to obtain corresponding controller information; Get the controller type attribute from the first target byte of the controller information; Determine whether the current attribute value of the controller type attribute is a preset attribute value corresponding to the verification calculation controller; If so, it is determined that the disk array controller or the solid state disk controller has the checksum calculation function; otherwise, it is determined that the disk array controller or the solid state disk controller does not have the checksum calculation function.

[0012] Optionally, verify the computing capacity information as IOPS value; Accordingly, the verification computing capability information of the verification computing controller is obtained, including: The IOPS value of the verification calculation controller is obtained from the second target byte of the controller information.

[0013] Optionally, each verification calculation controller and corresponding verification calculation capability information is stored in a preset controller list, including: Get a list of pre-created preset controllers; The callback function is called to store each verification calculation controller and the corresponding verification calculation capability information into the preset controller list.

[0014] Optionally, the verification resource allocation method of the present application further includes: When an information update command sent by any verification calculation controller is obtained, a preset query command is resent to any verification calculation controller to obtain updated controller information; The preset controller list is updated based on the updated controller information.

[0015] Optionally, the preset controller list is updated based on the updated controller information, including: If it is determined according to the updated controller information that any verification calculation controller does not have the verification calculation function, then any verification calculation controller and the corresponding verification calculation capability information are removed from the preset controller list; If it is determined according to the updated controller information that any verification calculation controller still has the verification calculation function, the verification capability information corresponding to any verification calculation controller in the preset controller list is updated using the updated verification capability information in the updated controller information.

[0016] Optionally, the information update command is a response command to the asynchronous event request command; Accordingly, the process of any verification calculation controller sending an information update command includes: When any verification calculation controller detects that the local verification calculation capability information has changed, it determines whether there is an asynchronous event request command sent by the target host; If so, constructing an information update command based on the preset event type and the preset event information used to characterize the change in the local verification computing capability information; The information update command is sent to the target host as a response command of the asynchronous event request command.

[0017] Optionally, after determining whether there is an asynchronous event request command sent by the target host, the method further includes: If there is no asynchronous event request command sent by the target host and not processed, the preset event information used to represent the change of the local verification computing capability information is stored in the local event queue; When the asynchronous event request command sent by the target host is obtained, the preset event information is taken out from the local event queue, and an information update command is constructed based on the preset event type and the preset event information, and then the information update command is sent to the target host as a response command of the asynchronous event request command.

[0018] Optionally, when an information update command sent by any verification calculation controller is obtained, a preset query command is resent to any verification calculation controller, including: When an information update command sent by any verification calculation controller is obtained, the information update command is parsed to obtain an event type and event information; If the event type of the information update command is a preset event type, and the event information of the information update command is preset event information, then a preset query command is resent to any verification calculation controller.

[0019] Optionally, after traversing the preset controller list, it also includes: If there is no verification calculation controller that meets the computing resource requirements in the preset controller list, the verification calculation task is split into a corresponding number of first subtasks according to the current split granularity; The preset controller list is traversed to determine a third verification calculation controller that meets the computing resource requirements of each first subtask, so as to use the third verification calculation controller to execute the first subtask.

[0020] Optionally, traversing the preset controller list to determine a third verification calculation controller that meets the computing resource requirements of each first subtask includes: Generate a random index according to the timestamp information and the task identification number of each first subtask; The preset controller list is traversed starting from the random index to determine a third verification calculation controller that meets the computing resource requirements of each first subtask.

[0021] Optionally, the verification resource allocation method of the present application further includes: If there is no verification calculation controller that meets the calculation resource requirements of the first subtask in the preset controller list, the current split granularity is increased according to the preset step size to obtain a new current split granularity; Splitting the verification calculation task into a corresponding number of second subtasks according to the new current split granularity, and then traversing the preset controller list to determine a fourth verification calculation controller that meets the computing resource requirements of each second subtask, so as to use the fourth verification calculation controller to execute the second subtask; If there is no verification calculation controller that meets the computing resource requirements of the second subtask in the preset controller list, jump again to the step of increasing the current split granularity according to the preset step size to obtain a new current split granularity.

[0022] In a second aspect, the present application discloses a verification resource allocation device, which is applied to a target host, comprising: A controller matching module, used to generate a target random number when a verification calculation task is obtained, and use the target random number as an index value to obtain a matching first verification calculation controller from a preset controller list; wherein the preset controller list stores the verification calculation capability information of each current verification calculation controller, and each verification calculation controller is a hardware device connected to a target host and having a verification calculation function; A judgment module, used to obtain target verification computing capability information of the first verification computing controller, and judge whether the target verification computing capability information meets the computing resource requirements of the verification computing task; A task execution module, used for executing the verification calculation task by using the first verification calculation controller if the conditions are met; The traversal module is used to traverse the preset controller list in sequence if the requirements are not met until a second verification calculation controller that meets the computing resource requirements is determined, and then use the second verification calculation controller to perform the verification calculation task.

[0023] In a third aspect, the present application discloses an electronic device, including: Memory, used to store computer programs; The processor is used to execute a computer program to implement the steps of the aforementioned disclosed method for verifying resource allocation.

[0024] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the steps of the aforementioned disclosed verification resource allocation method are implemented.

[0025] In a fifth aspect, the present application discloses a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the aforementioned disclosed verification resource allocation method.

[0026] It can be seen that the target host in the present application generates a target random number when obtaining a verification calculation task, and uses the target random number as an index value to obtain a matching first verification calculation controller from a preset controller list; wherein the preset controller list stores the verification calculation capability information of each current verification calculation controller, and each verification calculation controller is a hardware device connected to the target host and having a verification calculation function; the target verification calculation capability information of the first verification calculation controller is obtained, and it is determined whether the target verification calculation capability information meets the computing resource requirements of the verification calculation task; if so, the first verification calculation controller is used to execute the verification calculation task; if not, the preset controller list is traversed in turn until a second verification calculation controller that meets the computing resource requirements is determined, and the second verification calculation controller is used to execute the verification calculation task.

[0027] Beneficial effect: The present application maintains a preset controller list locally on the target host, which stores the verification computing capacity information of each current verification computing controller. The verification computing controller specifically refers to a hardware device connected to the target host and having a verification computing function. When the verification computing task is obtained, the corresponding target random number will be generated first, and the target random number will be used as an index value to obtain the matching first verification computing controller from the preset controller list, that is, the present application does not select the verification computing controller in a fixed order to perform the verification computing task, but adopts a randomized method to select, so as to achieve load balancing of the verification computing controller, avoid the situation where some controllers are under long-term high load while the rest of the controllers are idle, and maximize the use of hardware resources. Further, it is also necessary to obtain the target verification computing capacity information of the selected first verification computing controller, and determine whether the target verification computing capacity information meets the computing resource requirements of the verification computing task, that is, the present application does not directly use the first verification computing controller to perform the verification computing task, but needs to determine whether it has sufficient capacity to meet the needs of the current task. If it meets the requirements, the first verification computing controller can be used to perform the verification computing task. If it is not satisfied, it is necessary to traverse the preset controller list in sequence until the second verification calculation controller that meets the computing resource requirements is determined, and then use the second verification calculation controller to perform the verification calculation task. That is, the present application gives priority to determining whether the matching first verification calculation controller can perform the current task. If not, it traverses the subsequent verification calculation controllers in the list in sequence. Moreover, since the random numbers generated by each verification calculation task are different, the range of controllers traversed subsequently is also different, and load balancing can also be achieved. In this way, the present application can flexibly allocate corresponding verification resources to the verification calculation task according to its performance requirements, thereby improving overall performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0029] Figure 1 It is a schematic diagram of a traditional software-hardware hybrid RAID functional architecture; Figure 2 A flow chart of a verification resource allocation method disclosed in this application; Figure 3 A functional architecture diagram of a verification resource allocation method disclosed in this application; Figure 4A flow chart of a specific verification resource allocation method disclosed in this application; Figure 5 A verification resource allocation flow chart disclosed in this application; Figure 6 A schematic diagram of the structure of a verification resource allocation device disclosed in this application; Figure 7 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION

[0030] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0031] The current typical hardware and software hybrid RAID functional architecture is as follows: Figure 1 As shown in . However, this solution still has the following problems: software RAID lacks flexibility in selecting an XOR calculation controller. Currently, only a fixed controller can be used. If the controller is removed or fails, the software RAID will not be able to continue to use it, which limits the adaptability and robustness of the system. It also makes it difficult for the software RAID to flexibly adjust according to its own performance requirements and the verification resources of the controller, resulting in insufficient performance or waste of resources, thereby affecting the overall performance and efficiency. The embodiments of the present application disclose a verification resource allocation method, device, equipment, medium and product, which can flexibly allocate corresponding verification resources to the verification calculation task according to its performance requirements to improve the overall performance.

[0032] See also Figure 2 As shown, an embodiment of the present application discloses a verification resource allocation method, which is applied to a target host, and the method includes:

[0033] Step S11: When a verification calculation task is obtained, a target random number is generated, and the target random number is used as an index value to obtain a matching first verification calculation controller from a preset controller list; wherein the preset controller list stores the verification calculation capability information of each current verification calculation controller, and each verification calculation controller is a hardware device connected to a target host and having a verification calculation function.

[0034] In this embodiment, a preset controller list is maintained locally on the target host, and the list stores the verification computing capability information of each current verification computing controller. The verification computing controller specifically refers to a hardware device connected to the target host and having a verification computing function. When a verification computing task is obtained, a corresponding target random number is generated first, and the target random number is used as an index value to obtain the matching first verification computing controller from the preset controller list.

[0035] That is, the present application does not select the verification calculation controller to perform the verification calculation task in a fixed order, but adopts a random selection method, so as to achieve load balancing of the verification calculation controller, avoid the situation where some controllers are under long-term high load while the other controllers are idle, and maximize the utilization of hardware resources.

[0036] Among them, it should be pointed out that the hardware device is a disk array controller (RAID controller) or a solid state drive controller (SSD controller); accordingly, the method of the present application also includes: during the startup process of the disk array controller or the solid state drive controller, obtaining the corresponding controller information, and judging whether the disk array controller or the solid state drive controller has a verification calculation function based on the controller information; if so, the disk array controller or the solid state drive controller with the verification calculation function is used as a verification calculation controller, and the verification calculation capacity information of the verification calculation controller is obtained; each verification calculation controller and the corresponding verification calculation capacity information are stored in a preset controller list. That is, during the startup process of the RAID controller or the SSD controller, the host obtains its corresponding controller information, and thus determines whether it has a verification calculation function according to the controller information. It should be noted that the verification calculation function here specifically refers to the XOR (Exclusive OR) function. In traditional hardware RAID, the RAID controller usually has a built-in XOR calculation engine for performing the parity calculation required for modes such as RAID5 / 6; similarly, some high-performance SSD controllers may also integrate an XOR calculation acceleration unit for performing XOR calculations. Therefore, this application needs to determine whether the RAID controller or SSD controller has the function of supporting XOR operation based on the controller information. If it has, these disk array controllers or solid-state hard disk controllers with verification calculation function are used as verification calculation controllers (i.e., XOR controllers), and further obtain the verification calculation capability information of these verification calculation controllers, and then store each verification calculation controller and the corresponding verification calculation capability information in the preset controller list.

[0037] In a specific implementation, the above-mentioned obtaining corresponding controller information and judging whether the disk array controller or the solid-state hard disk controller has the verification calculation function based on the controller information includes: sending a preset query command to the disk array controller or the solid-state hard disk controller to obtain the corresponding controller information; obtaining the controller type attribute from the first target byte of the controller information; judging whether the current attribute value of the controller type attribute is a preset attribute value corresponding to the verification calculation controller; if so, judging that the disk array controller or the solid-state hard disk controller has the verification calculation function, otherwise judging that the disk array controller or the solid-state hard disk controller does not have the verification calculation function.

[0038] First of all, it should be pointed out that this application adds the XOR controller type to the Controller Type attribute represented by the 111th byte of the Identify Controller Data Structure (CNS 01h) of the NVMe (Non-Volatile Memory Express) protocol, as shown in Table 1:

[0039] Table 1 Controller type numerical table

[0040] Among them, Identify is a standardized command (Opcode E2h) defined by the NVMe protocol, which is used to query the static configuration information or dynamic status of NVMe devices (such as SSDs and RAID controllers). The host can obtain detailed parameters of the device through this query command, such as model, firmware version, supported functions, etc.

[0041] The key parameters of the Identify command are: CNS (Controller or Namespace Structure): specifies the query target type. Common values ​​include: 00h: Get Namespace (storage namespace) information; 01h: Get Controller information (i.e. Identify Controller Data Structure); 02h: Get the Active Namespace list.

[0042] Therefore, the target host can obtain the controller information (Identify Controller Data Structure) of the RAID controller or SSD controller by sending an Identify command (CNS=01h) to the RAID controller or SSD controller, and then obtain the controller type attribute (i.e., controller type field) from the 111th byte of the controller information. If the current attribute value of the controller type field is the preset attribute value 4h, then the controller is an XOR controller. This means that the corresponding disk array controller or solid-state hard disk controller has the checksum calculation function. On the contrary, if the current attribute value of the controller type field is not 4h, it is determined that the disk array controller or solid-state hard disk controller does not have the checksum calculation function.

[0043] In a specific implementation, the verification computing capability information is an IOPS value; accordingly, obtaining the verification computing capability information of the verification computing controller includes: obtaining the IOPS value of the verification computing controller from the second target byte of the controller information. IOPS (Input / Output Operations Per Second) is a key indicator for measuring the computing capability of an XOR controller, indicating the number of verification computing tasks that the controller can process per second. In this application, it can specifically indicate the number of parity calculations that the controller can complete per second. If the maximum IOPS of a certain XOR controller is 100,000, it means that it can process up to 100,000 verification calculations per second. Therefore, this application uses IOPS values ​​to represent the verification computing capability information of the verification computing controller.

[0044] Furthermore, the embodiment of the present application adds the maximum IOPS value that can be provided by the XOR controller calculation check in the 107th to 110th bytes of the Controller Data Structure, as shown in Table 2:

[0045] Table 2 Byte description table

[0046] Therefore, when the current attribute value of the controller type field is 4h, the maximum IOPS value that the XOR controller can provide for verification calculation is obtained from bytes 107 to 110 of the IdentifyController Data Structure and saved. If the current attribute value of the controller type is not 4h, there is no need to obtain the maximum IOPS value.

[0047] In a specific implementation, storing each verification calculation controller and the corresponding verification calculation capacity information in a preset controller list includes: obtaining a pre-created preset controller list; calling a callback function to store each verification calculation controller and the corresponding verification calculation capacity information in the preset controller list. That is, the embodiment of the present application will call the callback function to store each verification calculation controller and the corresponding verification calculation capacity information in the preset controller list for use in subsequent software RAID verification resource allocation.

[0048] Furthermore, the above method also includes: when obtaining an information update command sent by any verification calculation controller, re-sending a preset query command to any verification calculation controller to obtain updated controller information; and updating the preset controller list based on the updated controller information. That is, the present application supports the dynamic adjustment of the maximum IOPS value of the verification calculation that can be provided by EP (Endpoint) devices such as RAID controllers or SSD controllers. When a RAID controller or SSD controller fails or actively reduces / increases the calculation verification resources during operation, an information update command can be sent to the host to notify the host to re-obtain the controller information and update the preset controller list, so as to dynamically update its calculation verification capabilities.

[0049] Specifically, the preset controller list is updated based on the updated controller information, including: if it is determined according to the updated controller information that any verification calculation controller does not have the verification calculation function, then any verification calculation controller and the corresponding verification calculation capability information are removed from the preset controller list; if it is determined according to the updated controller information that any verification calculation controller still has the verification calculation function, then the updated verification capability information in the updated controller information is used to update the verification capability information corresponding to any verification calculation controller in the preset controller list.

[0050] That is, there are mainly two situations in the process of updating the preset controller list. One situation is that it is determined according to the updated controller information that any verification calculation controller no longer has the verification calculation function, so any verification calculation controller and the corresponding verification calculation capability information are removed from the preset controller list. The other situation is that it is determined according to the updated controller information that any verification calculation controller still has the verification calculation function, so the updated verification capability information in the updated controller information is used to update the verification capability information corresponding to any verification calculation controller in the preset controller list.

[0051] Specifically, the information update command is a response command to the asynchronous event request command; accordingly, the process of any verification calculation controller sending an information update command includes: when any verification calculation controller detects that the local verification computing capability information has changed, it is determined whether there is an asynchronous event request command sent by the target host; if so, an information update command is constructed based on the preset event type and the preset event information used to characterize the change in the local verification computing capability information; the information update command is used as a response command to the asynchronous event request command and sent to the target host.

[0052] It is understandable that the host will register the callback of the asynchronous event notification of the NVMe device during the initialization process. When the XOR controller device dynamically adjusts the number of verification computing resources, it will first determine whether there is an asynchronous event request command sent by the target host. Among them, the asynchronous event request command specifically refers to the AER (Asynchronous Event Request, an asynchronous event request command defined by the NVMe protocol, a mechanism for the host to register asynchronous event notifications with the storage device) command, that is, the XOR controller will determine whether there is a blocking wait for the AER command. If so, the XOR controller will assemble the response command of the AER command based on the preset event type and the preset event information used to characterize the change in the local verification computing capability information (i.e. Asynchronous Event Notice, AEN, is an asynchronous event response command defined by the NVMe protocol, which is used to notify the host of the occurrence of asynchronous events when asynchronous events occur inside the storage device, and the host performs corresponding processing according to different event types), and interrupt the host to notify the completion of the AEN processing. Through the asynchronous reporting mechanism, the rational use of hardware resources is optimized. When the hardware resources are idle, the verification calculation load capacity is actively increased. Conversely, when the hardware resources are busy, the verification calculation load capacity is actively reduced. This allows the verification calculation capacity to be reasonably supplied according to its own resource conditions to improve the overall performance and fault tolerance of the hybrid RAID.

[0053] That is, the RAID controller or SSD controller generates a checksum calculation attribute change event through the NVMe AER mechanism, and adds the event information of the calculation checksum attribute change to the asynchronous event notification information of the NVMe protocol AER command, as shown in Table 3:

[0054] Table 3 Asynchronous event notification information table

[0055] Furthermore, after determining whether there is currently an asynchronous event request command sent by the target host, it also includes: if there is currently no asynchronous event request command sent by the target host and has not been processed, the preset event information used to characterize the change in the local verification computing capability information is stored in the local event queue; when the asynchronous event request command sent by the target host is obtained, the preset event information is taken out from the local event queue, and an information update command is constructed based on the preset event type and the preset event information, and then the information update command is used as a response command to the asynchronous event request command and sent to the target host. That is, if there is currently no AER command sent by the target host and has not been processed, the preset event information used to characterize the change in the local verification computing capability information is first stored in the local event queue, and subsequently when the asynchronous event request command sent by the target host is obtained, the preset event information is taken out from the local event queue, and an AEN command is constructed based on the preset event type and the preset event information and sent to the target host.

[0056] Specifically, when the host obtains an information update command sent by any verification calculation controller, it re-sends a preset query command to any verification calculation controller, including: when obtaining the information update command sent by any verification calculation controller, parsing the information update command to obtain the event type and event information; if the event type of the information update command is the preset event type, and the event information of the information update command is the preset event information, then re-sending the preset query command to any verification calculation controller.

[0057] That is, after receiving the AEN command, the target host obtains the event type Event Type and event information Event Information through Dword 0. If the event type is determined to be the preset event type Notice and the event information is the preset event information Parity Compute Attribute Changed, the identify command (CNS01h) is sent to the XOR controller again to obtain the controller information again. That is, the controller type field is obtained from the 111th byte of the Identify Controller Data Structure again. If the value of the controller type field is 4h, it is a XOR controller. Then the maximum IOPS number that the XOR controller can provide for verification calculation is obtained from the 107th to 110B bytes and saved. The host then calls the callback function based on the newly obtained controller type and the maximum IOPS for verification calculation to complete the refresh of the XOR controller list information, which will be used in the subsequent software RAID verification resource allocation.

[0058] Further information Figure 3 As shown, Figure 3This is a functional architecture diagram applicable to the method disclosed in the present application. It can be seen from the figure that the present application discloses a composite function pool management method, which relies on the RAID controller and the SSD controller. The present application integrates an XOR engine pool in the host system to realize dynamic management of the XOR function provided by the RAID controller and the SSD controller, and can flexibly allocate verification computing resources to the software RAID according to its performance requirements, thereby optimizing performance and improving efficiency. The XOR engine pool has the following functions:

[0059] (1) XOR registration function: It provides calculation verification registration function for EP devices such as RAID controller or SSD controller connected to the host RC (Root Complex), and serves as the data source for the XOR engine pool scheduling module to provide flexible computing resources for software RAID. During the startup process of the RAID controller or SSD controller, the host obtains the controller information to obtain whether it supports calculation verification and its load capacity.

[0060] (2) The XOR load update asynchronous notification function allows EP devices such as RAID controllers or SSD controllers to dynamically adjust the maximum IOPS value of the verification calculation that can be provided, and also serves as a data source for the XOR engine pool scheduling module to provide flexible computing resources for the software RAID. When a RAID controller or SSD controller fails or actively reduces / increases the computing verification resources during operation, a verification calculation attribute change event is generated through the NVMe AER mechanism, and the host is notified to re-acquire the controller information in order to dynamically update its computing verification capabilities. In other words, the XOR controller can provide feedback on its load status to the software RAID, which enables the software RAID to flexibly adjust task allocation according to the actual load of the controller, thereby improving overall performance and efficiency.

[0061] (3) XOR resource scheduling function: It maintains a preset controller list internally. The list information contains the maximum IOPS value that each XOR controller can provide for calculation and verification. According to the performance requirements of the software RAID, it allocates limited resources to it and provides it to the software RAID in the form of an API (Application Programming Interface) for use when calculating and verifying.

[0062] The initialization process of the XOR engine pool includes the following: 1. Initialization of the host XOR engine pool resources, including XOR controller list resource application and initialization, NVMe driver initialization completion callback registration, etc.; 2. The host completes the allocation of the PCIe multi-function device Bar space and obtains the configuration space and capability list information of the RAID controller or SSD controller; 3. The host sends an identify command (CNS 01h) to the RAID controller or SSD controller to obtain the controller information (Identify Controller Data Structure), and obtains the device type Controller Type field from the 111th byte of the Identify Controller Data Structure. If the Controller Type is 4h, the controller is an XOR controller, and proceed to step 4; otherwise, proceed to step 5. 4. The host obtains the maximum IOPS value that the XOR controller can provide for verification calculation from bytes 107 to 110 of the Identify Controller Data Structure and saves it; 5. The host continues to complete other initialization work of the NVMe device, including queue initialization, interrupt initialization, etc.; if it is an XOR controller type, continue to step 6, otherwise the NVMe device initialization is completed; 6. After the host NVMe initialization is completed, the verification computing capability information of the XOR controller has been obtained, and then the callback function provided during the initialization of the XOR engine pool is called to assign the XOR controller information to the preset controller list managed by the XOR engine pool for use in subsequent software RAID verification resource allocation.

[0063] Step S12: Obtain target verification computing capability information of the first verification computing controller, and determine whether the target verification computing capability information meets the computing resource requirements of the verification computing task.

[0064] In this embodiment, the target verification computing capability information of the selected first verification computing controller is obtained, and it is determined whether the target verification computing capability information meets the computing resource requirements of the verification computing task. That is, this application does not directly use the first verification computing controller to perform the verification computing task, but needs to determine whether it has sufficient capabilities to meet the requirements of the current task.

[0065] Step S13: If satisfied, the first verification calculation controller is used to execute the verification calculation task.

[0066] In this embodiment, if the target verification computing capability information of the first verification computing controller meets the computing resource requirements of the verification computing task, the first verification computing controller can be used to execute the verification computing task.

[0067] Step S14: If not, traverse the preset controller list in sequence until a second verification calculation controller that meets the computing resource requirements is determined, and then use the second verification calculation controller to perform the verification calculation task.

[0068] In this embodiment, if the target verification computing capability information of the first verification computing controller does not meet the computing resource requirements of the verification computing task, it is necessary to traverse the preset controller list in sequence until the second verification computing controller that meets the computing resource requirements is determined, and then use the second verification computing controller to perform the verification computing task. That is, the present application gives priority to determining whether the matching first verification computing controller can execute the current task. If not, the subsequent verification computing controllers in the list are traversed in sequence, and since the random numbers generated by each verification computing task are different, the range of controllers traversed subsequently is also different, and load balancing can also be achieved. In this way, the present application can flexibly allocate corresponding verification resources to the verification computing task according to its performance requirements, thereby improving overall performance.

[0069] It can be seen that the present application maintains a preset controller list locally on the target host, which stores the verification computing capability information of each current verification computing controller. The verification computing controller specifically refers to a hardware device connected to the target host and having a verification computing function. When the verification computing task is obtained, the corresponding target random number will be generated first, and the target random number will be used as an index value to obtain the matching first verification computing controller from the preset controller list, that is, the present application does not select the verification computing controller in a fixed order to perform the verification computing task, but adopts a randomized method to select, so as to achieve load balancing of the verification computing controller, avoid the situation where some controllers are under long-term high load while the rest of the controllers are idle, and maximize the use of hardware resources. Further, it is also necessary to obtain the target verification computing capability information of the selected first verification computing controller, and determine whether the target verification computing capability information meets the computing resource requirements of the verification computing task, that is, the present application does not directly use the first verification computing controller to perform the verification computing task, but needs to determine whether it has sufficient capacity to meet the needs of the current task. If it meets the requirements, the first verification computing controller can be used to perform the verification computing task. If it is not satisfied, it is necessary to traverse the preset controller list in sequence until the second verification calculation controller that meets the computing resource requirements is determined, and then use the second verification calculation controller to perform the verification calculation task. That is, the present application gives priority to determining whether the matching first verification calculation controller can perform the current task. If not, it traverses the subsequent verification calculation controllers in the list in sequence. Moreover, since the random numbers generated by each verification calculation task are different, the range of controllers traversed subsequently is also different, and load balancing can also be achieved. In this way, the present application can flexibly allocate corresponding verification resources to the verification calculation task according to its performance requirements, thereby improving overall performance.

[0070] See also Figure 4 and Figure 5 As shown, the embodiment of the present application discloses a specific verification resource allocation method. Compared with the previous embodiment, this embodiment further illustrates and optimizes the technical solution. Specifically, it includes:

[0071] Step S21: when the verification calculation task is obtained, a current timestamp is determined, and the current number of controllers in a preset controller list is determined, so as to generate a target random number according to the current timestamp and the current number of controllers.

[0072] In this embodiment, when the software RAID needs to perform a data verification calculation task, it will actively submit a verification calculation task with a computing resource requirement to the XOR engine pool, where the computing resource requirement is the IOPS value required for the verification calculation. When the target host obtains the verification calculation task, it will determine the current timestamp and the current number of controllers in the preset controller list to generate a target random number based on the current timestamp and the current number of controllers.

[0073] In a specific implementation, a target random number is generated based on a current timestamp and a current number of controllers, including: using the current timestamp as a random seed, and processing the random seed using a preset random number generation function to generate an initial random number; performing a modulo operation on the initial random number based on the current number of controllers to obtain a target random number. That is, assuming that the current number of controllers is N, the present application can first use the current timestamp as a random seed, and process the random seed using a preset random number generation function to generate an initial random number, and then map the initial random number to 0 to N-1 to obtain a target random number. Specifically, the current number of controllers N can be used to perform a modulo operation on the initial random number to obtain a target random number.

[0074] In another specific implementation, a target random number is generated based on a current timestamp and a current number of controllers, including: converting the current timestamp into a corresponding integer value, and summing the integer value with the current number of controllers to use the summation result as a random seed; processing the random seed using a preset random number generation function to generate an initial random number; performing a modulo operation on the initial random number based on the current number of controllers to obtain a target random number. Similarly, assuming that the current number of controllers is N, the present application can also first convert the current timestamp into a corresponding integer value, and add the integer value to the current number of controllers as a random seed, then process the random seed using a preset random number generation function to generate an initial random number, and finally perform a modulo operation on the initial random number based on the current number of controllers N to obtain a target random number in the range of 0 to N-1.

[0075] Step S22: Use the target random number as an index value to obtain a matching first verification calculation controller from a preset controller list; wherein the preset controller list stores the verification calculation capability information of each current verification calculation controller, and each verification calculation controller is a hardware device connected to the target host and having a verification calculation function.

[0076] In this embodiment, the generated target random number is used as an index value to obtain a matching first verification calculation controller from the preset controller list. It can be understood that since the current number of controllers in the preset controller list is N, its index can be expressed as 0 to N-1, so the corresponding first verification calculation controller can be matched based on the above-calculated target random number.

[0077] Step S23: Obtain target verification computing capability information of the first verification computing controller, and determine whether the target verification computing capability information meets the computing resource requirements of the verification computing task.

[0078] In this embodiment, the target verification computing capability information of the first verification computing controller, ie, the maximum IOPS value, is further obtained from the preset controller list, and it is determined whether the number is greater than or equal to the IOPS value required by the initial software RAID.

[0079] Step S24: If satisfied, the first verification calculation controller is used to execute the verification calculation task.

[0080] In this embodiment, if the maximum IOPS value of the first verification calculation controller is greater than or equal to the IOPS value required by the initial software RAID, the first verification calculation controller is selected as the hardware resource provider for the software RAID calculation verification, that is, the first verification calculation controller is used to perform the verification calculation task.

[0081] Step S25: If not, traverse the preset controller list in sequence until a second verification calculation controller that meets the computing resource requirements is determined, and then use the second verification calculation controller to perform the verification calculation task.

[0082] In this embodiment, if the maximum IOPS value of the first verification calculation controller is less than the IOPS value required by the initial software RAID, the preset controller list is traversed in sequence starting from the first verification calculation controller in order of index, that is, the maximum IOPS values ​​of subsequent verification calculation controllers are obtained in sequence, and it is determined whether they are greater than or equal to the IOPS value required by the software RAID. If there is a second verification calculation controller in the preset controller list that meets the computing resource requirements, the second verification calculation controller is used to perform the verification calculation task.

[0083] Step S26: If there is no verification calculation controller that meets the computing resource requirements in the preset controller list, the verification calculation task is split into a corresponding number of first subtasks according to the current split granularity.

[0084] In this embodiment, if the verification calculation controller that meets the computing resource requirements is still not found after the preset controller list is traversed, the verification calculation task is split into a corresponding number of first subtasks according to the current split granularity and re-matched, that is, the initial required IOPS value is split into multiple smaller IOPS values. The split granularity defaults to 2 / 4 / 6 / … / 2n granularity.

[0085] Step S27: traverse the preset controller list to determine a third verification calculation controller that meets the computing resource requirements of each first subtask, so as to use the third verification calculation controller to execute the first subtask.

[0086] In this embodiment, the preset controller list is traversed again to determine the third verification computing controller that meets the computing resource requirements of each first subtask, so as to use the third verification computing controller to execute the first subtask. For example, assuming that the software RAID requires IOPS=50K, but the largest single controller has IOPS=30K remaining, then the required IOPS=50K is split into 25K+25K according to granularity 2, that is, the computing resource requirement of each first subtask is 25K, and then the two first subtasks are assigned to two verification computing controllers with two maximum IOPS values ​​exceeding 25K.

[0087] In a specific implementation, traversing the preset controller list to determine the third verification calculation controller that meets the computing resource requirements of each first subtask includes: generating a random index based on the timestamp information and task identification number of each first subtask; traversing the preset controller list starting from the random index to determine the third verification calculation controller that meets the computing resource requirements of each first subtask. That is, the present application also needs to re-execute the random index generation and controller matching process for each subtask, specifically, a random index can be generated based on the timestamp information and task identification number of each first subtask, and then traversing the preset controller list starting from the random index to determine the third verification calculation controller that meets the computing resource requirements of each first subtask.

[0088] In addition, the above method also includes: if there is no verification calculation controller in the preset controller list that meets the computing resource requirements of the first subtask, then the current split granularity is increased according to the preset step size to obtain a new current split granularity; the verification calculation task is split into a corresponding number of second subtasks according to the new current split granularity, and then the preset controller list is traversed to determine a fourth verification calculation controller that meets the computing resource requirements of each second subtask, so as to use the fourth verification calculation controller to execute the second subtask; if there is no verification calculation controller in the preset controller list that meets the computing resource requirements of the second subtask, then jump again to the step of increasing the current split granularity according to the preset step size to obtain a new current split granularity.

[0089] That is, if after the verification calculation task is split into a corresponding number of first subtasks according to the current split granularity, there is still no verification calculation controller in the preset controller list that meets the computing resource requirements of the first subtask, then the current split granularity needs to be increased according to the preset step size to obtain a new current split granularity. For example, if the previous current split granularity is 2, it is further increased to 4, and then the verification calculation task is re-split into a corresponding number of second subtasks according to the new current split granularity, and then the preset controller list is traversed again to determine the fourth verification calculation controller that meets the computing resource requirements of each second subtask, so as to use the fourth verification calculation controller to execute the second subtask. If there is no verification calculation controller in the preset controller list that meets the computing resource requirements of the second subtask, then jump again to the step of increasing the current split granularity according to the preset step size to obtain a new current split granularity.

[0090] For example, suppose the software RAID requires IOPS = 60K; List of preset controllers: Verify computing controller A: Remaining IOPS = 20K; Verify computing controller B: Remaining IOPS = 25K; Verify computing controller C: Remaining IOPS = 15K; Verify computing controller D: Remaining IOPS = 15K; First traversal of the list: If no controller meets 60K, the split process is triggered; Split into 2 parts (30K+30K): The first subtask (required IOPS is 30K): No controller meets the requirement, so continue splitting; Split into 4 parts (15K+15K+15K+15K): Second subtask 1 (required IOPS is 15K): assigned to controller A; Second subtask 2 (required IOPS is 15K): assigned to controller B; Second subtask 3 (required IOPS is 15K): assigned to controller C; Second subtask 4 (required IOPS is 15K): assigned to controller D; All subtasks are assigned and the process ends.

[0091] It should be pointed out that when some subtasks are matched successfully but some subtasks are not matched successfully, only the subtasks that are not matched successfully can be split again, or the entire verification calculation task can be split again.

[0092] It can be seen that the present application combines the advantages of hybrid RAID and provides a flexible verification resource allocation mechanism for software RAID, further improving the overall performance and fault tolerance of hybrid RAID; the present application reduces the computing efficiency of the host CPU and improves other processing capabilities of the host system by hardware acceleration of data verification calculations; the present application can also realize the concurrent capability of verification calculations, and through flexible resource allocation, realize the concurrent calculation of data redundancy verification by software RAID, and can call multiple calculation verification controllers at the same time to perform verification calculation tasks.

[0093] See also Figure 6 As shown, the embodiment of the present application discloses a verification resource allocation device, which is applied to a target host, and the device includes: The controller matching module 11 is used to generate a target random number when a verification calculation task is obtained, and use the target random number as an index value to obtain a matching first verification calculation controller from a preset controller list; wherein the preset controller list stores the verification calculation capability information of each current verification calculation controller, and each verification calculation controller is a hardware device connected to a target host and having a verification calculation function; The judgment module 12 is used to obtain the target verification computing capacity information of the first verification computing controller, and judge whether the target verification computing capacity information meets the computing resource requirements of the verification computing task; A task execution module 13, configured to execute the verification calculation task using the first verification calculation controller if the conditions are met; The traversal module 14 is used to traverse the preset controller list in sequence if it is not satisfied, until a second verification calculation controller that meets the computing resource requirements is determined, and then use the second verification calculation controller to perform the verification calculation task.

[0094] It can be seen that the present application maintains a preset controller list locally on the target host, which stores the verification computing capability information of each current verification computing controller. The verification computing controller specifically refers to a hardware device connected to the target host and having a verification computing function. When the verification computing task is obtained, the corresponding target random number will be generated first, and the target random number will be used as an index value to obtain the matching first verification computing controller from the preset controller list, that is, the present application does not select the verification computing controller in a fixed order to perform the verification computing task, but adopts a randomized method to select, so as to achieve load balancing of the verification computing controller, avoid the situation where some controllers are under long-term high load while the rest of the controllers are idle, and maximize the use of hardware resources. Further, it is also necessary to obtain the target verification computing capability information of the selected first verification computing controller, and determine whether the target verification computing capability information meets the computing resource requirements of the verification computing task, that is, the present application does not directly use the first verification computing controller to perform the verification computing task, but needs to determine whether it has sufficient capacity to meet the needs of the current task. If it meets the requirements, the first verification computing controller can be used to perform the verification computing task. If it is not satisfied, it is necessary to traverse the preset controller list in sequence until the second verification calculation controller that meets the computing resource requirements is determined, and then use the second verification calculation controller to perform the verification calculation task. That is, the present application gives priority to determining whether the matching first verification calculation controller can perform the current task. If not, it traverses the subsequent verification calculation controllers in the list in sequence. Moreover, since the random numbers generated by each verification calculation task are different, the range of controllers traversed subsequently is also different, and load balancing can also be achieved. In this way, the present application can flexibly allocate corresponding verification resources to the verification calculation task according to its performance requirements, thereby improving overall performance.

[0095] Since the embodiments of the device part correspond to the above embodiments, please refer to the description of the embodiments of the method part for the embodiments of the device part, and will not be repeated here.

[0096] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Specifically, it may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. Among them, the memory 22 is used to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the verification resource allocation method performed by the electronic device disclosed in any of the aforementioned embodiments.

[0097] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.

[0098] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 can be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 21 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0099] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon include an operating system 221, a computer program 222 and data 223, etc. The storage method can be temporary storage or permanent storage.

[0100] Among them, the operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20, so as to realize the operation and processing of the massive data 223 in the memory 22 by the processor 21, which can be Windows, Unix, Linux, etc. In addition to including a computer program that can be used to complete the verification resource allocation method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks. In addition to data transmitted from an external device received by the electronic device, the data 223 can also include data collected by its own input and output interface 25, etc.

[0101] Furthermore, an embodiment of the present application also discloses a computer-readable storage medium, in which a computer program is stored. When the computer program is loaded and executed by a processor, the steps of the verification resource allocation method disclosed in any of the aforementioned embodiments are implemented.

[0102] An embodiment of the present invention further discloses a computer program product, including a computer program / instruction, which implements the steps of the verification resource allocation method disclosed in any of the aforementioned embodiments when executed by a processor.

[0103] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0104] Those skilled in the art may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0105] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a compact disc read-only memory (CD-ROM), or any other form of storage medium known in the art.

[0106] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0107] The above is a detailed introduction to a verification resource allocation method, device, equipment and storage medium provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A verification resource allocation method, characterized in that: Applied to the target host, including: When a verification calculation task is obtained, a target random number is generated, and the target random number is used as an index value to obtain a matching first verification calculation controller from a preset controller list; wherein the preset controller list stores verification calculation capability information of each current verification calculation controller, and each verification calculation controller is a hardware device connected to the target host and having a verification calculation function; Obtaining target verification computing capability information of the first verification computing controller, and determining whether the target verification computing capability information meets the computing resource requirements of the verification computing task; If satisfied, the verification calculation task is performed using the first verification calculation controller; If not, the preset controller list is traversed in sequence until a second verification calculation controller that meets the computing resource requirement is determined, and the second verification calculation controller is used to perform the verification calculation task.

2. The verification resource allocation method according to claim 1, characterized in that: The generating of a target random number when obtaining a verification calculation task includes: Determining a current timestamp when the verification calculation task is obtained, and determining the current number of controllers in the preset controller list; A target random number is generated according to the current timestamp and the current number of controllers.

3. The verification resource allocation method according to claim 2, characterized in that: The generating a target random number according to the current timestamp and the current number of controllers includes: Using the current timestamp as a random seed, and processing the random seed using a preset random number generation function to generate an initial random number; A modulo operation is performed on the initial random number based on the current number of controllers to obtain a target random number.

4. The verification resource allocation method according to claim 2, characterized in that: The generating a target random number according to the current timestamp and the current number of controllers includes: Convert the current timestamp into a corresponding integer value, and perform a sum operation on the integer value and the current number of controllers, so as to use the sum operation result as a random seed; Processing the random seed using a preset random number generation function to generate an initial random number; A modulo operation is performed on the initial random number based on the current number of controllers to obtain a target random number.

5. The verification resource allocation method according to claim 1, characterized in that: The hardware device is a disk array controller or a solid state hard disk controller; Accordingly, the method further includes: During the startup process of the disk array controller or the solid-state hard disk controller, corresponding controller information is obtained, and based on the controller information, it is determined whether the disk array controller or the solid-state hard disk controller has a verification calculation function; If yes, the disk array controller or the solid state disk controller having the verification calculation function is used as the verification calculation controller, and the verification calculation capability information of the verification calculation controller is obtained; Each of the verification calculation controllers and the corresponding verification calculation capability information are stored in the preset controller list.

6. The method for allocating verification resources according to claim 5, characterized in that: The obtaining of corresponding controller information and judging whether the disk array controller or the solid state drive controller has a verification calculation function based on the controller information includes: Sending a preset query command to the disk array controller or the solid state drive controller to obtain corresponding controller information; Obtain a controller type attribute from the first target byte of the controller information; Determining whether the current attribute value of the controller type attribute is a preset attribute value corresponding to the verification calculation controller; If so, it is determined that the disk array controller or the solid state disk controller has the verification calculation function; otherwise, it is determined that the disk array controller or the solid state disk controller does not have the verification calculation function.

7. The method for allocating verification resources according to claim 6, characterized in that: The verification computing capability information is an IOPS value; Correspondingly, the obtaining of the verification calculation capability information of the verification calculation controller includes: The IOPS value of the verification calculation controller is obtained from the second target byte of the controller information.

8. The method for allocating verification resources according to claim 5, characterized in that: The storing of each of the verification calculation controllers and the corresponding verification calculation capability information into the preset controller list includes: Obtaining the pre-created preset controller list; The callback function is called to store each of the verification calculation controllers and the corresponding verification calculation capability information into the preset controller list.

9. The method for allocating verification resources according to claim 6, characterized in that: Also includes: When an information update command sent by any verification calculation controller is obtained, the preset query command is resent to the any verification calculation controller to obtain updated controller information; The preset controller list is updated based on the updated controller information.

10. The method for allocating verification resources according to claim 9, characterized in that: The updating of the preset controller list based on the updated controller information includes: If it is determined according to the updated controller information that any of the verification calculation controllers does not have the verification calculation function, then removing any of the verification calculation controllers and the corresponding verification calculation capability information from the preset controller list; If it is determined according to the updated controller information that any of the verification calculation controllers still has the verification calculation function, the verification capability information corresponding to any of the verification calculation controllers in the preset controller list is updated using the updated verification capability information in the updated controller information.

11. The method for allocating verification resources according to claim 9, characterized in that: The information update command is a response command to the asynchronous event request command; Correspondingly, the process of any verification calculation controller sending an information update command includes: When any of the verification calculation controllers detects that the local verification calculation capability information has changed, it is determined whether there is an asynchronous event request command sent by the target host; If so, constructing an information update command based on the preset event type and the preset event information used to characterize the change in the local verification computing capability information; The information update command is used as a response command of the asynchronous event request command and sent to the target host.

12. The method for allocating verification resources according to claim 11, characterized in that: After determining whether there is an asynchronous event request command sent by the target host, the method further includes: If there is no asynchronous event request command sent by the target host and not processed, storing the preset event information used to characterize the change of the local verification computing capability information into the local event queue; When the asynchronous event request command sent by the target host is obtained, the preset event information is taken out from the local event queue, and an information update command is constructed based on the preset event type and the preset event information, and then the information update command is used as a response command of the asynchronous event request command and sent to the target host.

13. The method for allocating verification resources according to claim 11, characterized in that: When the information update command sent by any verification calculation controller is obtained, re-sending the preset query command to any verification calculation controller comprises: When an information update command sent by any verification calculation controller is obtained, the information update command is parsed to obtain an event type and event information; If the event type of the information update command is the preset event type, and the event information of the information update command is the preset event information, the preset query command is resent to any verification calculation controller.

14. The method for allocating verification resources according to any one of claims 1 to 13, characterized in that: After traversing the preset controller list, the method further includes: If there is no verification calculation controller that meets the computing resource requirement in the preset controller list, splitting the verification calculation task into a corresponding number of first subtasks according to the current split granularity; The preset controller list is traversed to determine a third verification calculation controller that meets the computing resource requirements of each first subtask, so as to use the third verification calculation controller to execute the first subtask.

15. The method for allocating verification resources according to claim 14, characterized in that: The traversing the preset controller list to determine a third verification calculation controller that meets the computing resource requirements of each of the first subtasks includes: Generate a random index according to the timestamp information and task identification number of each of the first subtasks; The preset controller list is traversed starting from the random index to determine a third verification calculation controller that meets the computing resource requirements of each of the first subtasks.

16. The method for allocating verification resources according to claim 14, characterized in that: Also includes: If there is no verification calculation controller that meets the computing resource requirements of the first subtask in the preset controller list, increasing the current split granularity according to a preset step size to obtain a new current split granularity; Splitting the verification calculation task into a corresponding number of second subtasks according to the new current split granularity, and then traversing the preset controller list to determine a fourth verification calculation controller that meets the computing resource requirements of each second subtask, so as to use the fourth verification calculation controller to execute the second subtask; If there is no verification calculation controller that meets the computing resource requirements of the second subtask in the preset controller list, jump again to the step of increasing the current split granularity according to the preset step size to obtain a new current split granularity.

17. A verification resource allocation device, characterized in that: Applied to the target host, including: A controller matching module, used to generate a target random number when a verification calculation task is obtained, and use the target random number as an index value to obtain a matching first verification calculation controller from a preset controller list; wherein the preset controller list stores the verification calculation capability information of each current verification calculation controller, and each verification calculation controller is a hardware device connected to the target host and having a verification calculation function; A judgment module, used to obtain target verification computing capability information of the first verification computing controller, and judge whether the target verification computing capability information meets the computing resource requirements of the verification computing task; A task execution module, configured to execute the verification calculation task using the first verification calculation controller if the conditions are met; A traversal module is used to traverse the preset controller list in sequence if it is not satisfied, until a second verification calculation controller that meets the computing resource requirement is determined, and then use the second verification calculation controller to perform the verification calculation task.

18. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the steps of the verification resource allocation method according to any one of claims 1 to 16.

19. A computer-readable storage medium, characterized in that: Used to store computer programs; wherein, when the computer program is executed by a processor, the steps of the verification resource allocation method according to any one of claims 1 to 16 are implemented.

20. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the steps of the verification resource allocation method described in any one of claims 1 to 16 are implemented.

Citation Information

Patent Citations

  • Resource allocation method and apparatus, and electronic device

    CN107608790A

  • Task allocation method and device, electronic equipment and computer readable storage medium

    CN112000485A

  • Resource allocation method and device, electronic equipment and storage medium

    CN116010110A

  • Data verification test method and device and computer readable storage medium

    CN116149901A

  • Calculation resource allocation method and device for tensor calculation graph and readable storage medium

    CN116483550A