Heterogeneous storage device adaptation control method and apparatus, electronic device, and storage medium
Patent Information
- Application Number
- CN202611226211.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-13
- Publication Date
- 2026-10-30
AI Technical Summary
[0003]但现有纯软件适配方法存在明显不足:要么直接固定设备参数,要么依赖厂商封闭工具,并未对“背板”这一关键硬件层级及其与硬盘槽位的物理连接关系进行抽象梳理
[0011]本申请提供了一种异构存储设备适配控制方法及装置、电子设备和存储介质,通过接收包含背板与槽位映射关系及指令模板的配置信息,在触发控制指令事件后,依据映射关系精准确定目标背板标识,并结合该标识、目标逻辑槽位与指令模板动态生成设备控制指令,因此,可以解决现有技术中因缺乏对背板层级的抽象建模、无灵活的背板-槽位关联机制及通用指令生成方式,导致控制指令无法准确寻址、异构设备适配僵化的问题,达到精准控制目标存储设备、提升异构设备适配灵活性、降低适配与维护成本、减少操作失误的技术效果。
Smart Images

Figure CN123011147A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of distributed storage system technology, and in particular to a heterogeneous storage device adaptation control method and apparatus, electronic device and storage medium. Background Technology
[0002] Modern storage systems are a crucial component of data centers and enterprise-level IT infrastructure, used for storing and managing massive amounts of data. With advancements in hardware technology, today's storage environments often consist of a mix of devices from different vendors, forming complex heterogeneous architectures. In related technologies, management software, by developing dedicated drivers and middleware for specific device models and working in conjunction with vendor-provided closed toolkits, enables the monitoring and operation of storage devices, covering key operational aspects such as device discovery, interface display, and hard drive indicator lights.
[0003] However, existing pure software adaptation methods have significant shortcomings: they either directly fix device parameters or rely on vendor-locked tools, failing to abstract and organize the critical hardware layer of the "backplane" and its physical connection to the hard drive slots. Furthermore, control operations such as LED lighting require precise mapping to the backplane of the slot; this lack of hardware topology information causes software commands to fail to correctly locate the physical device. Specifically, the interface layout logic varies between different vendors, requiring maintenance personnel to frequently adapt to new interfaces; simultaneously, inaccurate LED control can easily lead to misoperations, affecting fault location efficiency. These issues result in management software with poor flexibility, high maintenance costs, and difficulty in quickly adapting to newly connected heterogeneous storage devices. Summary of the Invention
[0004] This application provides a heterogeneous storage device adaptation control method and apparatus, electronic device and storage medium, to at least partially solve one of the technical problems in the related art.
[0005] This application provides a heterogeneous storage device adaptation control method, including:
[0006] Receive configuration information of the target storage device, including at least the mapping relationship between the backplane and the slot and the instruction template for generating control instructions; Responds to control commands triggered by the target logical slot; Based on the target logical slot, query the mapping relationship to determine the target backplane identifier associated with the target logical slot; Based on the target backplane identifier, target logical slot, and instruction template, generate and send the corresponding device control instructions to the target storage device.
[0007] This application also provides a heterogeneous storage device adaptation control device, including: The receiving unit is used to receive configuration information of the target storage device. The configuration information includes at least the mapping relationship between the backplane and the slot and the instruction template for generating control instructions. Triggering unit, used to respond to control command triggering events on target logic slot; The query unit is used to query the mapping relationship based on the target logical slot in order to determine the target backplane identifier associated with the target logical slot. The generation unit is used to generate and send corresponding device control commands to the target storage device based on the target backplane identifier, target logical slot, and instruction template.
[0008] This application also provides an electronic device, including: a memory for storing a computer program; and a processor for executing the computer program to implement the steps of any of the above methods.
[0009] This application also provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of any of the above methods.
[0010] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above methods.
[0011] This application provides a heterogeneous storage device adaptation control method and apparatus, electronic device, and storage medium. By receiving configuration information including backplane-slot mapping relationships and instruction templates, after triggering a control instruction event, the target backplane identifier is accurately determined based on the mapping relationship. Then, the device control instruction is dynamically generated by combining the identifier, the target logical slot, and the instruction template. Therefore, it can solve the problems in the prior art where the lack of abstract modeling of the backplane hierarchy, the lack of a flexible backplane-slot association mechanism, and the lack of a universal instruction generation method lead to inaccurate addressing of control instructions and rigid adaptation of heterogeneous devices. This achieves the technical effects of accurately controlling the target storage device, improving the flexibility of heterogeneous device adaptation, reducing adaptation and maintenance costs, and reducing operational errors.
[0012] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0013] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein: Figure 1 A flowchart illustrating a heterogeneous storage device adaptation control method provided in an embodiment of this application; Figure 2This is a schematic diagram of a heterogeneous storage device adaptation control device provided in an embodiment of this application. Detailed Implementation
[0014] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0015] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0016] The specific application environment architecture or specific hardware architecture on which the execution of the heterogeneous storage device adaptation control method depends is described here.
[0017] Embodiments of this application provide a heterogeneous storage device adaptation control method. Figure 1 This is a flowchart illustrating a heterogeneous storage device adaptation control method provided in an embodiment of this application.
[0018] like Figure 1 As shown, the method includes the following steps: Step 101: Receive configuration information of the target storage device. The configuration information includes at least the mapping relationship between the backplane and the slot and the instruction template for generating control instructions.
[0019] In the embodiments of this application, to address the rigidity issues caused by the lack of abstract modeling of the backplane layer and a universal control logic adaptation mechanism in the adaptation of storage devices from different vendors, this solution first receives adaptation configuration information for the target storage device. This configuration information consists of universal parameters decoupled from the hardware details of the target storage device. It includes at least the mapping relationship between the backplane and the slots used to clarify the physical topology association of the device (i.e., the association data reflecting the backplane to which each slot belongs) and the instruction template for adapting the device control logic (i.e., a universal template structure that dynamically generates effective control instructions based on specific device parameters). By receiving this configuration information in advance, the subsequent adaptation process does not need to rely on device-specific drivers or hard-coded logic, and can adapt storage devices of different vendors and models based on a unified configuration receiving mechanism. As one implementation, the mapping relationship can be structured data recording the backplane identifier and the corresponding slot set, the instruction template can include placeholders related to the backplane identifier and slot, and the configuration information can be input in the form of a structured file and parsed and stored by the system.
[0020] This technology establishes a configurable foundation for the physical topology and control logic of storage devices, effectively eliminating reliance on vendor-specific tools or hard-coded methods. It provides core data support for the subsequent precise control and rapid adaptation of heterogeneous devices, significantly improving the flexibility and versatility of the adaptation process.
[0021] Step 102, in response to a control command trigger event for the target logical slot.
[0022] In the embodiments of this application, after obtaining the configuration information of the target storage device, a response is made to a control command trigger event for the target logical slot. The target logical slot is a logical identifier at the software level used to represent the physical slot of the storage device. The control command trigger event is the trigger condition for initiating device control of the physical slot corresponding to the target logical slot. It can originate from various legitimate control request initiation forms and is not limited by specific triggering scenarios or operation methods. The core of this response process is to capture a valid trigger signal and confirm the identifier information of the target logical slot, providing pre-trigger support for subsequently generating precise control commands based on the configuration information, ensuring the orderly start of the control process. As one implementation method, the control command trigger event can be triggered by operations such as positioning or fault identification performed by the user on a slot icon in the management interface. The system completes the response by identifying the logical slot identifier corresponding to the operation.
[0023] It can flexibly respond to the control requirements of the target logical slot without binding to a specific trigger form, ensuring the universality and adaptability of the control process startup, and providing a reliable triggering premise for the subsequent generation of precise control commands based on the mapping relationship between the backplane and the slot, thus ensuring the pertinence and effectiveness of the control operation.
[0024] Step 103: Based on the target logical slot, query the mapping relationship to determine the target backplane identifier associated with the target logical slot.
[0025] In the embodiments of this application, after responding to the control command trigger event and identifying the target logical slot, this solution determines the target backplane identifier associated with the target logical slot by querying the pre-received mapping relationship between the backplane and the slot (i.e., the topology data representing the association between each logical slot and the corresponding physical backplane). The core of this query process is to match the unique corresponding backplane identifier from the mapping relationship based on the identifier information of the target logical slot, thereby establishing a precise association between the logical operation object and the physical hardware level. This provides a key prerequisite for the subsequent generation of control commands that can be accurately addressed, and avoids control failure problems caused by the lack of backplane level association. As one implementation method, the mapping relationship can be in the form of a structured association table. During the query, the corresponding entry recorded in the table by the target logical slot number can be retrieved quickly to obtain the backplane identifier to which it belongs.
[0026] It can achieve precise mapping from logical slots to physical backplanes, effectively making up for the lack of backplane-level abstract modeling in existing technologies, providing accurate hardware addressing basis for control commands, and fundamentally ensuring the accuracy and effectiveness of subsequent control operations.
[0027] Step 104: Generate and send the corresponding device control commands to the target storage device based on the target backplane identifier, target logical slot, and command template.
[0028] In the embodiments of this application, after determining the target backplane identifier and the target logical slot, this solution utilizes a pre-received instruction template (a generalized template structure adaptable to the target storage device control logic) to integrate the two key parameters, the target backplane identifier and the target logical slot, into the template. This dynamically generates device control instructions that match the hardware control logic of the target storage device. The instructions are then sent to the target storage device through an adapted communication mechanism, ensuring that the instructions can be accurately recognized and executed by the device, thereby achieving precise control of the target physical slot. This process does not rely on device-specific control logic or hard-coded instructions; it adapts to the control requirements of devices from different manufacturers simply by combining parameters and templates. As one implementation method, the instruction template may contain placeholders corresponding to the target backplane identifier and the target logical slot. When generating instructions, the placeholders are replaced with specific parameter values to obtain executable commands. The sending process can be completed through standard communication channels such as SSH and IPMI.
[0029] It enables the generalized and precise generation and issuance of device control commands, completely eliminating the reliance on vendor-specific control logic or hard-coded methods, effectively ensuring the accuracy of control operations for storage devices from different vendors, and significantly improving the flexibility and scalability of the storage system to adapt to heterogeneous devices.
[0030] This application provides a heterogeneous storage device adaptation control method. By receiving configuration information including the mapping relationship between the backplane and the slot and the instruction template, after triggering a control instruction event, the method accurately determines the target backplane identifier based on the mapping relationship, and dynamically generates device control instructions by combining the identifier, the target logical slot and the instruction template. Therefore, it can solve the problems in the prior art where the lack of abstract modeling of the backplane level, the lack of a flexible backplane-slot association mechanism and a general instruction generation method leads to inaccurate addressing of control instructions and rigid adaptation of heterogeneous devices. This method achieves the technical effects of accurately controlling the target storage device, improving the flexibility of heterogeneous device adaptation, reducing adaptation and maintenance costs, and reducing operational errors.
[0031] In the embodiments involved in this application, there are various feasible specific implementation methods. To clearly and completely illustrate the technical solutions of this disclosure, the implementation methods listed below are merely exemplary and do not constitute a limitation on the scope of protection of this disclosure. That is, in addition to the implementation methods described below, other implementation methods that can be obtained by those skilled in the art based on the technical content disclosed in this disclosure through reasonable logical analysis, reasoning, or limited experimentation should also be covered within the scope of protection of this disclosure. The following specifically describes some exemplary implementation methods: As a specific implementation of this application, in addition to the basic solution, the configuration information further includes: layout rules for defining the presentation style of the hard disk slot in the user interface; the configuration information is carried by a structured configuration file, which includes device identifiers, mapping relationships and instruction templates.
[0032] Specifically, the configuration information further includes layout rules, which define the presentation style of the hard drive slots in the user interface. These rules can be defined as "from top to bottom," "from left to right," "from bottom to top," "from right to left," or a custom two-dimensional arrangement logic, providing a clear basis for the display order and spatial distribution of slot icons in the user interface. Simultaneously, the configuration information is carried by a structured configuration file. This file uses formats such as JSON, XML, or YAML that are easy for machines to parse and for humans to edit. In addition to containing the mapping relationship between the backplane and the slots, instruction templates for generating control commands, and integrated device identifiers, these files contain unique identification information for the target storage device (such as the device model). This is used by the system to accurately match the corresponding target storage device when loading the configuration, ensuring a one-to-one correspondence between the configuration information and the device. After obtaining this structured configuration file, the system parses its contents, extracts the layout rules, mapping relationships, instruction templates, and device identifiers, and stores them in categories. The layout rules will provide a direct basis for the subsequent slot rendering in the user interface.
[0033] The layout rules enable configurable UI presentation styles for hard drive slots, ensuring consistency and intuitiveness of the user interface across different manufacturers' devices. The structured configuration file integrates device identifiers and core configuration information, facilitating configuration management, editing, and transmission, while also ensuring accurate matching between the configuration and the target device, further enhancing the convenience and reliability of heterogeneous device adaptation.
[0034] As a specific implementation of this application, the layout rules are further defined on the basis of the basic scheme, including: predefined enumeration styles or custom layout algorithms, which are used to drive the view rendering engine to dynamically calculate the display coordinates of each hard disk slot in the user interface.
[0035] Specifically, the layout rules include two implementation forms: predefined enumeration styles and custom layout algorithms. Predefined enumeration styles are standardized display methods pre-set by the system, including common styles such as vertical arrangement from top to bottom, horizontal arrangement from left to right, and reverse arrangements from bottom to top and right to left. Custom layout algorithms allow for personalized two-dimensional arrangement logic based on the actual physical structure of the device or maintenance needs, such as defining the arrangement order according to chassis partitions or slot number ranges. This layout rule is passed as a core parameter to the view rendering engine. After receiving the rule, the engine calls the corresponding layout calculation logic, using the logical identifier of each hard drive slot as input, and dynamically calculates the X and Y axis display coordinates of each slot in the user interface through a coordinate mapping algorithm. This ensures that the spatial distribution of all slots strictly follows the layout rules, achieving matching between the software view and the preset logic or physical layout of the device. As a specific implementation, when the layout rule is an enumeration style from left to right, the engine will assign horizontal coordinates sequentially according to the slot number in ascending order, so that the slot icons are arranged horizontally in a continuous sequence.
[0036] Through diverse layout rules, the system comprehensively covers the view presentation needs of storage devices from different manufacturers. It can adapt to standardized device layouts as well as meet the personalized display requirements of special physical structures. The view rendering engine uses a rule-based dynamic coordinate calculation method to ensure the accuracy and consistency of the UI layout, effectively reducing the adaptation cost for maintenance personnel to different device interfaces.
[0037] As a specific implementation of this application, based on the basic scheme, the mapping relationship is further defined as being recorded in a two-dimensional data structure to store the correspondence between each backplane identifier and the set of slot numbers under its jurisdiction; querying the mapping relationship includes: retrieving the set of slot numbers containing the target logical slot in the two-dimensional data structure, and obtaining the backplane identifier corresponding to the set as the target backplane identifier.
[0038] Specifically, the mapping relationship is recorded using a two-dimensional data structure. This data structure uses the backplane ID as the core index item and the set of slot numbers under its jurisdiction as the associated data item, forming a key-value pair association of "backplane ID - slot number set". For example, Backplane_1 corresponds to the slot number set [1,2,3,4], and Backplane_2 corresponds to the slot number set [5,6,7,8]. This clearly and completely stores the attribution relationship between each backplane and its subordinate slots. When querying the mapping relationship to determine the target backplane ID, the system uses the number of the target logical slot as the search keyword, traverses all slot number sets in the two-dimensional data structure, and checks whether each set contains the target logical slot ID. When a slot number set containing the target logical slot is found, the backplane ID bound to that set is directly extracted and identified as the target backplane ID associated with the target logical slot.
[0039] This two-dimensional data structure makes the relationship between backplanes and slots highly intuitive and regular. The query process does not require complex calculations. The target backplane identifier can be quickly located simply by checking the set inclusion property. This not only ensures the accuracy of the association relationship but also improves the query response efficiency, laying an efficient data query foundation for the accurate generation of subsequent control commands.
[0040] As a specific implementation of this application, based on the basic solution, the instruction template is further defined to include a first placeholder for indicating the backplane identifier and a second placeholder for indicating the slot number; generating and sending the corresponding device control instruction to the target storage device includes: replacing the first placeholder in the instruction template with the target backplane identifier; replacing the second placeholder with the target logical slot, so as to concatenate to form a complete executable command string.
[0041] Specifically, the instruction template (i.e., the lighting hardware command template) contains two dedicated placeholders. The first placeholder explicitly indicates the parameter position of the target backplane identifier, and the second placeholder explicitly indicates the parameter position of the target slot number. Both placeholders exist in a preset special character combination (e.g., the first placeholder is {backplane_id}, and the second placeholder is {slot_number}), forming a complete generic structure with the fixed command syntax of the instruction template. When generating device control instructions, the system first extracts the corresponding generic command structure from the stored instruction template, then calls the string replacement module to precisely replace the first placeholder reserved in the template with the previously queried target backplane identifier (e.g., the specific backplane number "2"), and simultaneously replaces the second placeholder with the target logical slot number (e.g., "5"). Through character concatenation logic, the replaced specific parameters are integrated with the template's fixed syntax to form a complete executable command string that conforms to the hardware control protocol requirements of the target storage device, ensuring that the command can be directly recognized by the device controller.
[0042] Through a structured design with dual placeholders, the instruction template can adapt to the command syntax differences of devices from different manufacturers. The replacement and splicing process can quickly generate accurate instructions without complex logical operations, which not only ensures the correctness of control instructions, but also avoids the tedious operation of hardcoding commands for different devices, further improving the flexibility of heterogeneous device adaptation and the efficiency of instruction generation.
[0043] As a specific implementation of this application, based on the basic solution, it is further limited to the following step after receiving the configuration information: verifying the integrity of the configuration information. The verification includes checking whether the mapping relationship covers all logical slots and whether the instruction template contains the necessary placeholders. The configuration information is loaded only when the verification is successful for use in subsequent processes.
[0044] Specifically, after the adaptation configuration module receives and parses the configuration information of the target storage device, it will initiate a dedicated configuration verification process to ensure the integrity of the configuration information. This verification process includes two core checks: First, regarding the mapping relationship between the backplane and the slots, the system will first obtain the total number of slots and the range of legal slot numbers for the target storage device, and then traverse the set of slot numbers corresponding to all backplanes in the mapping relationship to verify whether all legal slot numbers are included in the mapping relationship and whether any slot number is repeatedly assigned to multiple backplanes; Second, regarding the instruction template used to generate control commands, the system will parse the template string and check whether it contains both a first placeholder for indicating the backplane identifier and a second placeholder for indicating the slot number, and whether the format of the placeholders conforms to the preset recognition specifications. Only when both of the above checks pass (i.e., the mapping relationship completely covers all logical slots and the instruction template contains all necessary placeholders) will the system load the parsed configuration information into the designated memory storage area for subsequent processes such as querying the mapping relationship and generating control commands; if either check fails, the system will refuse to load the configuration information and output a clear error message.
[0045] Through targeted integrity verification, problems such as subsequent control command generation failure and device misoperation caused by missing slots in the mapping relationship or missing necessary placeholders in the command template are effectively avoided, ensuring the validity and reliability of the configuration information and providing a solid prerequisite for the accurate adaptation and control operation of subsequent heterogeneous devices.
[0046] As a specific implementation of this application, based on the basic solution, the control instruction triggering event is further limited to a batch operation instruction for multiple logical slots; the embodiment of this application also includes: for each logical slot in the batch instruction, sequentially executing a query mapping relationship, generating and sending a device control instruction.
[0047] Specifically, the control command trigger event is a user-initiated batch control operation command for multiple logical slots (such as batch positioning or batch fault indicator lighting operation commands). This batch command contains the numbering information of all target logical slots to be operated. After receiving the batch operation command, the system first parses the command, extracts the numbers of all target logical slots to be processed, and forms an ordered list of slots to be processed. Then, the system executes the subsequent process for each target logical slot in the list according to a preset traversal order (such as ascending slot number and the order of slots in the command): first, it queries the mapping relationship between the backplane and the slot based on the current logical slot number to determine its corresponding target backplane identifier; then, it calls the command template, replaces the first and second placeholders in the template with the target backplane identifier and the current logical slot number respectively, and concatenates them to form an independent executable command string for that slot; finally, it sends the command to the target storage device through the adapted communication channel, until all logical slots in the list of slots to be processed have completed the generation and sending of commands.
[0048] It supports batch control operations on multiple logical slots, eliminating the need to repeatedly initiate control requests for individual slots, thus significantly improving the efficiency of multi-slot operation and maintenance. At the same time, by independently executing mapping queries and command generation for each slot, it ensures the accuracy of each control command in batch operations, making it particularly suitable for complex physical topology storage devices with multiple backplanes and multiple slots, further expanding the practical scenarios of the solution.
[0049] It should be noted that the embodiments of this disclosure may include multiple steps. For ease of description, these steps are numbered, but these numbers are not a limitation on the execution time slots or execution order between the steps; these steps can be implemented in any order, and the embodiments of this disclosure do not limit this.
[0050] Corresponding to the heterogeneous storage device adaptation control method described above, this disclosure also proposes a heterogeneous storage device adaptation control apparatus. Since the apparatus embodiments of this disclosure correspond to the method embodiments described above, details not disclosed in the apparatus embodiments can be referred to the method embodiments described above, and will not be repeated here.
[0051] Figure 2 This is a schematic diagram of the structure of a heterogeneous storage device adaptation control device provided in an embodiment of this disclosure, as shown below. Figure 2 As shown, it includes: The receiving unit 21 is used to receive configuration information of the target storage device. The configuration information includes at least the mapping relationship between the backplane and the slot and the instruction template for generating control instructions. Trigger unit 22 is used to respond to control command trigger events for the target logic slot; Query unit 23 is used to query the mapping relationship based on the target logical slot in order to determine the target backplane identifier associated with the target logical slot; The generation unit 24 is used to generate and send corresponding device control commands to the target storage device based on the target backplane identifier, the target logical slot and the command template.
[0052] It should be noted that the foregoing explanation of the method embodiments also applies to the apparatus of this embodiment, and the principle is the same, so it is not limited in this embodiment.
[0053] For a description of the features in the corresponding embodiment of the heterogeneous storage device adaptation control device, please refer to the relevant description of the corresponding embodiment of the heterogeneous storage device adaptation control method, which will not be repeated here.
[0054] Embodiments of this application also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any of the heterogeneous storage device adaptation control method embodiments described above.
[0055] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the embodiments of the heterogeneous storage device adaptation control method described above when running.
[0056] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0057] The embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the embodiments of the heterogeneous storage device adaptation control method described above.
[0058] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above-described heterogeneous storage device adaptation control method embodiments.
[0059] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0060] The above provides a detailed description of a heterogeneous storage device adaptation control method, apparatus, electronic device, and storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and its core ideas. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this application.
Claims
1. A method for adapting and controlling heterogeneous storage devices, characterized in that, include: Receive configuration information of the target storage device, wherein the configuration information includes at least the mapping relationship between the backplane and the slot and the instruction template for generating control instructions; Responds to control commands triggered by the target logical slot; Based on the target logical slot, query the mapping relationship to determine the target backplane identifier associated with the target logical slot; Based on the target backplane identifier, the target logical slot, and the instruction template, generate and send corresponding device control instructions to the target storage device.
2. The method according to claim 1, characterized in that, The configuration information also includes: layout rules for defining the presentation style of hard drive slots in the user interface; The configuration information is carried by a structured configuration file, which includes the device identifier, the mapping relationship, and the instruction template.
3. The method according to claim 2, characterized in that, The layout rules include: predefined enumeration styles or custom layout algorithms, which drive the view rendering engine to dynamically calculate the display coordinates of each hard disk slot in the user interface.
4. The method according to claim 1, characterized in that, The mapping relationship is recorded in a two-dimensional data structure to store the correspondence between each backplate identifier and the set of slot numbers it governs; The query of the mapping relationship includes: Retrieve the set of slot numbers containing the target logical slot in the two-dimensional data structure, and obtain the backplane identifier corresponding to the set as the target backplane identifier.
5. The method according to claim 1, characterized in that, The instruction template includes a first placeholder for indicating the back panel identifier and a second placeholder for indicating the slot number; The step of generating and sending corresponding device control commands to the target storage device includes: Replace the first placeholder in the instruction template with the target backplane identifier; Replace the second placeholder with the target logical slot to concatenate them into a complete executable command string.
6. The method according to claim 1, characterized in that, After receiving the configuration information, the following is also included: The step of verifying the integrity of the configuration information includes: checking whether the mapping relationship covers all logical slots and checking whether the instruction template contains necessary placeholders; only when the verification passes, the configuration information is loaded for use in subsequent processes.
7. The method according to claim 1, characterized in that, The control command triggering event is a batch operation command for multiple logical slots; the method further includes: For each logical slot in the batch command, the query mapping relationship is executed sequentially, and the device control command is generated and sent.
8. A heterogeneous storage device adaptation control device, characterized in that, include: A receiving unit is used to receive configuration information of the target storage device, wherein the configuration information includes at least the mapping relationship between the backplane and the slot and the instruction template for generating control instructions; Triggering unit, used to respond to control command triggering events on target logic slot; The query unit is used to query the mapping relationship based on the target logical slot in order to determine the target backplane identifier associated with the target logical slot; The generation unit is used to generate and send corresponding device control commands to the target storage device based on the target backplane identifier, the target logical slot, and the instruction template.
9. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the heterogeneous storage device adaptation control method according to any one of claims 1-7.
10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to execute the heterogeneous storage device adaptation control method according to any one of claims 1-7.
