Method, device, equipment and medium for burning solid state hard disk
By obtaining the bus number and hard disk capacity of the solid state hard disk, the capacity mapping relationship of the shared server is used to determine the target capacity parameters, the target capacity firmware is obtained from the predetermined capacity firmware integration package, and the writing is burned based on the bus number, which solves the problem of writing failure caused by the solid state hard disk and the mismatched capacity firmware, and improves the writing efficiency and quality.
Patent Information
- Application Number
- CN202510368792.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-27
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2045-03-27
AI Technical Summary
In the prior art, solid-state drives and mismatched capacity firmware are prone to failure or damage when writing, resulting in high failure rate of writing and waste of resources.
By obtaining the bus number and hard disk capacity of the solid state hard disk, the target capacity parameters are determined using the capacity mapping relationship of the shared server, the target capacity firmware is obtained from the predetermined capacity firmware integration package, and the target capacity firmware is burned to the hard disk based on the bus number to ensure capacity matching.
It improves the efficiency and quality of solid-state hard disk writing, reduces resource occupancy and failure rate, and ensures the accuracy and stability of batch writing.
Smart Images

Figure CN119883303B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of hard disk burning, and more specifically to a method, apparatus, device and medium for burning a solid-state hard disk. Background Art
[0002] Before using a solid-state drive to store, read, or write data in a server, you must first program the capacity firmware into the drive. SSDs and capacity firmware typically correspond one-to-one. Programming with a firmware that doesn't match the drive can cause the drive to fail or even become damaged. Summary of the Invention
[0003] In view of the above problems, the present application provides a method, apparatus, device and medium for burning a solid state drive.
[0004] According to a first aspect of the present application, a method for burning a solid-state hard drive is provided, comprising: obtaining a bus number and hard drive capacity of the solid-state hard drive; determining a target capacity parameter based on the hard drive capacity using a capacity mapping relationship stored on a shared server, wherein the capacity mapping relationship represents an association between multiple predetermined hard drive capacities and multiple predetermined capacity parameters; obtaining a target capacity firmware from a predetermined capacity firmware integration package stored on the shared server based on the target capacity parameter, wherein the predetermined capacity firmware integration package includes predetermined capacity firmware with multiple capacities; and burning the target capacity firmware to the solid-state hard drive based on the bus number to obtain a target solid-state hard drive.
[0005] The second aspect of the present application provides a device for burning a solid-state hard drive, including: a first acquisition module, used to obtain the bus number and hard drive capacity of the solid-state hard drive; a determination module, used to determine the target capacity parameter based on the hard drive capacity using the capacity mapping relationship stored in a shared server, wherein the capacity mapping relationship represents the association between multiple predetermined hard drive capacities and multiple predetermined capacity parameters; a second acquisition module, used to obtain the target capacity firmware from the predetermined capacity firmware integrated package stored in the shared server based on the target capacity parameter, wherein the predetermined capacity firmware integrated package includes predetermined capacity firmware with multiple capacities; a burning module, used to burn the target capacity firmware into the solid-state hard drive based on the bus number to obtain the target solid-state hard drive.
[0006] The third aspect of the present application provides an electronic device, comprising: one or more processors; a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.
[0007] The fourth aspect of the present application further provides a computer-readable storage medium having a computer program or instructions stored thereon, which implements the steps of the above method when the computer program or instructions are executed by a processor.
[0008] The fifth aspect of the present application further provides a computer program product, comprising a computer program or instructions, which implement the steps of the above method when executed by a processor.
[0009] According to the embodiment of the present application, the bus number and hard disk capacity of the solid-state hard disk are first obtained, so that the hard disk capacity can be used as a basic reference for selecting the matching target capacity firmware. The bus number is convenient for accurately locating the solid-state hard disk to be burned even in batches, thereby improving the burning efficiency and burning quality of the solid-state hard disk when burning alone or in batches. Then, using the capacity mapping relationship that is pre-built based on the association between the predetermined hard disk capacity and the predetermined capacity parameter and stored in the shared server, the target capacity parameter corresponding only to the hard disk capacity is determined from the mapping relationship bridge according to the hard disk capacity, and the target capacity parameter is used as a parameter instruction or parameter identifier to extract the target capacity firmware.
[0010] According to the embodiment of the present application, further, according to the target capacity parameter, the target capacity firmware is obtained from a unified predetermined capacity firmware integrated package stored in a shared server and containing predetermined capacity firmware of multiple capacities, so that in the process of obtaining the target capacity firmware, it is possible to search and obtain the target capacity firmware that matches the solid-state drive without traversing all firmware files in the shared server, thereby improving the efficiency of obtaining the target capacity firmware, avoiding omissions and occupying large resources when traversing multiple firmware files during the acquisition process, improving the accuracy and stability of obtaining the target capacity firmware, and reducing the resource cost during the burning process. Finally, based on the pre-acquired bus number, the solid-state drive to be burned is located, and the target capacity firmware that matches the solid-state drive is burned into the solid-state drive, thereby obtaining a target solid-state drive with a high success rate and effectiveness of burning, thereby improving the burning efficiency and burning quality of the solid-state drive during burning. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The above contents and other objects, features and advantages of the present application will become more apparent through the following description of the embodiments of the present application with reference to the accompanying drawings.
[0012] Figure 1 The present invention illustrates an application scenario diagram of a method, apparatus, device, and medium for programming a solid-state drive according to an embodiment of the present application.
[0013] Figure 2 A flow chart of a method for programming a solid-state drive according to an embodiment of the present application is shown.
[0014] Figure 3 A schematic diagram of multiple burning files containing interception identifiers according to an embodiment of the present application is shown.
[0015] Figure 4 A schematic diagram of programming a solid-state drive according to an embodiment of the present application is shown.
[0016] Figure 5 A schematic diagram of replacing and updating a predetermined capacity firmware integration package according to an embodiment of the present application is shown.
[0017] Figure 6 A schematic diagram of adding and updating a predetermined capacity firmware integration package according to an embodiment of the present application is shown.
[0018] Figure 7 A schematic diagram of adding and updating a predetermined capacity firmware integration package according to another embodiment of the present application is shown.
[0019] Figure 8 A schematic diagram of replacing and updating a predetermined-capacity firmware integrated package containing multiple sub-packages according to an embodiment of the present application is shown.
[0020] Figure 9 A structural block diagram of an apparatus for programming a solid-state hard disk according to an embodiment of the present application is shown.
[0021] Figure 10 A block diagram of an electronic device suitable for implementing a method for programming a solid-state hard disk according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0022] Hereinafter, embodiments of the present application will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present application. In the detailed description below, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present application. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessarily confusing the concepts of the present application.
[0023] The terms used herein are only for describing specific embodiments and are not intended to limit this application. The terms "comprise," "include," etc. used herein indicate the presence of the features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0024] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0025] When expressions such as "at least one of A, B, and C, etc." are used, they should generally be interpreted in accordance with the meaning commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0026] During the implementation of the present invention, we discovered that before using a solid-state drive to store, read, or write data in a server, we first needed to program the capacity firmware onto the drive. SSDs and capacity firmware typically correspond one-to-one. Programming with a capacity firmware that doesn't match the SSD can cause the SSD to fail or even become damaged.
[0027] In view of this, an embodiment of the present application provides a method for burning a solid-state hard drive, obtaining the bus number and hard drive capacity of the solid-state hard drive; according to the hard drive capacity, determining the target capacity parameter using the capacity mapping relationship stored in a shared server, wherein the capacity mapping relationship represents the association between multiple predetermined hard drive capacities and multiple predetermined capacity parameters; according to the target capacity parameter, obtaining the target capacity firmware from the predetermined capacity firmware integration package stored in the shared server, wherein the predetermined capacity firmware integration package includes predetermined capacity firmware with multiple capacities; based on the bus number, burning the target capacity firmware to the solid-state hard drive to obtain the target solid-state hard drive.
[0028] Figure 1 The present invention illustrates an application scenario diagram of a method, apparatus, device, and medium for programming a solid-state drive according to an embodiment of the present application.
[0029] like Figure 1 As shown, the application scenario according to this embodiment may include a first solid-state drive 101, a second solid-state drive 102, a third solid-state drive 103, a network 104, and a server 105. The network 104 is a medium for providing a communication link between the first solid-state drive 101, the second solid-state drive 102, the third solid-state drive 103, and the server 105. The network 104 may include various connection types, such as wired or wireless communication links or optical fiber cables, etc.
[0030] The user can use the first solid-state drive 101 , the second solid-state drive 102 , and the third solid-state drive 103 to interact with the server 105 via the network 104 to send device information of the solid-state drive to the server 105 .
[0031] The server 105 may be a server that uses firmware to burn the first solid-state drive 101, the second solid-state drive 102, and the third solid-state drive 103. For example, the server uses capacity firmware or functional firmware to burn the capacity or function of the first solid-state drive 101, the second solid-state drive 102, and the third solid-state drive 103, respectively, and displays the burning results as feedback. The server 105 can also reset the first solid-state drive 101, the second solid-state drive 102, and the third solid-state drive 103 in the card slot by restarting, so that the first solid-state drive 101, the second solid-state drive 102, and the third solid-state drive 103 can perform normal storage, reading, writing, and other operations.
[0032] It should be noted that the method for burning a solid-state hard disk provided in the embodiment of the present application can generally be performed by the server 105. Accordingly, the device for burning a solid-state hard disk provided in the embodiment of the present application can generally be set in the server 105. The method for burning a solid-state hard disk provided in the embodiment of the present application can also be performed by a server or server cluster that is different from the server 105 and can communicate with the first solid-state hard disk 101, the second solid-state hard disk 102, the third solid-state hard disk 103 and / or the server 105. Accordingly, the device for burning a solid-state hard disk provided in the embodiment of the present application can also be set in a server or server cluster that is different from the server 105 and can communicate with the first solid-state hard disk 101, the second solid-state hard disk 102, the third solid-state hard disk 103 and / or the server 105.
[0033] It should be understood that Figure 1 The number of solid-state drives, networks, and servers in the embodiment is merely illustrative. Any number of terminal devices, networks, and servers may be provided as required.
[0034] The following will be based on Figure 1 The scene described by Figures 2 to 8 The method for burning a solid state hard disk in an embodiment of the application is described in detail.
[0035] Figure 2 A flow chart of a method for programming a solid-state drive according to an embodiment of the present application is shown.
[0036] like Figure 2 As shown, the method for programming a solid state drive in this embodiment includes operations S210 to S240.
[0037] In operation S210 , the bus number and hard disk capacity of the solid state hard disk are acquired.
[0038] According to an embodiment of the present application, a server may include multiple hard drive slots, each of which may be inserted with a solid-state drive that complies with the service agreement. Each hard drive slot may have a corresponding bus number, and the bus number of the hard drive slot may be used to locate the solid-state drive to be programmed. Furthermore, when batch programming multiple solid-state drives, the bus number may be used to identify the solid-state drive being programmed, the solid-state drive to be programmed, the solid-state drive that has been successfully programmed, and so on.
[0039] According to an embodiment of the present application, a solid-state drive (SSD) may be a storage device. During the preparation of the SSD, the hard drive capacity of the SSD may be determined. When the SSD is inserted into a hard drive slot, the server may obtain the hardware capacity of the SSD in the slot.
[0040] In operation S220, a target capacity parameter is determined based on the hard disk capacity using a capacity mapping relationship stored in the shared server. The capacity mapping relationship represents an association relationship between a plurality of predetermined hard disk capacities and a plurality of predetermined capacity parameters.
[0041] According to an embodiment of the present application, the target capacity parameter may represent a parameter instruction or parameter identifier for obtaining the capacity firmware of the solid-state drive from the predetermined capacity firmware integrated package.
[0042] According to an embodiment of the present application, based on the association between the predetermined hard disk capacity and the predetermined capacity parameters, a capacity mapping relationship can be pre-constructed and stored in a shared server or shared file. For example, a shared file or service platform such as FTP (File Transfer Protocol), Samba (SMB / CIFS, network sharing protocol), or NFS (Network File System) can be pre-built to store the capacity mapping relationship therein, so that the capacity mapping relationship can be directly called during burning to determine the target capacity parameters.
[0043] In operation S230, according to the target capacity parameter, the target capacity firmware is obtained from the predetermined capacity firmware integrated package stored in the shared server. The predetermined capacity firmware integrated package may include predetermined capacity firmware with multiple capacities.
[0044] According to an embodiment of the present application, the capacity of each predetermined capacity firmware is different from each other. In the predetermined capacity firmware integrated package, the predetermined capacity firmware of multiple capacities can be sorted arbitrarily. For example, the sorting order is 0.96T predetermined capacity firmware - 15.36T predetermined capacity firmware - 1.6T predetermined capacity firmware - 3.2T predetermined capacity firmware - 3.84T predetermined capacity firmware.
[0045] According to the embodiments of the present application, the hard disk capacity of the solid-state drive and the capacity firmware used during programming are in a one-to-one correspondence, that is, the data size of the hard disk capacity of the solid-state drive and the capacity firmware used during programming are equal, so that programming to the solid-state drive can only be successful when using a capacity firmware equal to the hard disk capacity of the solid-state drive; otherwise, programming will fail. For example, when programming a solid-state drive with a 0.96T hard disk capacity using a 0.96T capacity firmware, programming can be successful; when programming a solid-state drive with a 0.96T hard disk capacity using a 1.6T capacity firmware, a prompt indicating programming failure occurs.
[0046] According to an embodiment of the present application, multiple capacities of predetermined capacity firmware and multiple functional firmware can be pre-existing in a shared server. Only multiple capacities of predetermined capacity firmware are extracted from the firmware containing various functions and types, and processed to form a predetermined capacity firmware integrated package that only includes capacity firmware. This reduces the number of firmware files and avoids high matching risks and high burning failure rates caused by errors such as missing files or confusing files when matching capacity firmware. At the same time, in the process of building the predetermined capacity firmware integrated package, the relationship between the multiple capacities of predetermined capacity firmware and capacity parameters is established, and the capacity firmware can be determined according to the capacity parameters during burning.
[0047] In operation S240 , the target capacity firmware is burned into the solid state drive based on the bus number to obtain a target solid state drive.
[0048] According to the embodiments of the present application, the bus number is used to confirm and verify whether the SSD to be programmed is correct, and the target capacity firmware is programmed into the SSD corresponding to the bus number, thereby avoiding the problem of incorrect or missed programming. In the case of batch programming, the bus number of each SSD can be used to avoid programming confusion and further improve the quality of batch programming.
[0049] According to the embodiment of the present application, the bus number and hard disk capacity of the solid-state hard disk are first obtained, so that the hard disk capacity can be used as a basic reference for selecting the matching target capacity firmware. The bus number is convenient for accurately locating the solid-state hard disk to be burned even in batches, thereby improving the burning efficiency and burning quality of the solid-state hard disk when burning alone or in batches. Then, using the capacity mapping relationship that is pre-built based on the association between the predetermined hard disk capacity and the predetermined capacity parameter and stored in the shared server, the target capacity parameter corresponding only to the hard disk capacity is determined from the mapping relationship bridge according to the hard disk capacity, and the target capacity parameter is used as a parameter instruction or parameter identifier to extract the target capacity firmware.
[0050] According to the embodiment of the present application, further, according to the target capacity parameter, the target capacity firmware is obtained from a unified predetermined capacity firmware integrated package stored in a shared server and containing predetermined capacity firmware of multiple capacities, so that in the process of obtaining the target capacity firmware, it is possible to search and obtain the target capacity firmware that matches the solid-state drive without traversing all firmware files in the shared server, thereby improving the efficiency of obtaining the target capacity firmware, avoiding omissions and occupying large resources when traversing multiple firmware files during the acquisition process, improving the accuracy and stability of obtaining the target capacity firmware, and reducing the resource cost during the burning process. Finally, based on the pre-acquired bus number, the solid-state drive to be burned is located, and the target capacity firmware that matches the solid-state drive is burned into the solid-state drive, thereby obtaining a target solid-state drive with a high success rate and effectiveness of burning, thereby improving the burning efficiency and burning quality of the solid-state drive during burning.
[0051] According to an embodiment of the present application, before obtaining the target capacity firmware from the predetermined capacity firmware integrated package, the predetermined capacity firmware integrated package can be pre-built in the shared server. Specifically, the predetermined capacity firmware integrated package can be built using the following methods:
[0052] According to an embodiment of the present application, a plurality of predetermined capacity firmwares with different capacities are obtained.
[0053] According to an embodiment of the present application, a plurality of predetermined capacity firmwares with different capacities may be stored in the server, for example, 0.96T predetermined capacity firmware, 1.6T predetermined capacity firmware, and 1.92T predetermined capacity firmware.
[0054] According to an embodiment of the present application, multiple predetermined capacity firmwares are compiled respectively to obtain multiple burning files corresponding to the multiple predetermined capacity firmwares, and the burning files have the same data volume as the predetermined capacity firmware.
[0055] According to an embodiment of the present application, further, a method for compiling multiple predetermined capacity firmwares respectively to obtain multiple burning files corresponding to the multiple predetermined capacity firmwares includes the following operations:
[0056] According to an embodiment of the present application, multiple predetermined capacity firmwares are compiled respectively to obtain multiple capacity files corresponding to the multiple predetermined capacity firmwares.
[0057] According to an embodiment of the present application, the plurality of capacity files are all binary files.
[0058] According to an embodiment of the present application, fields in multiple capacity files are marked respectively according to multiple interception identifiers to obtain multiple burning files.
[0059] According to an embodiment of the present application, the truncation identifier may include a start identifier and an end identifier. Marking the fields in the capacity file using the end identifier may include inserting an end identifier such as a binary form before, in the middle, or after the field, and may also include marking a certain character in all fields so that the character can appear with significant marks such as glowing or bold without changing the meaning. Further, when marking the fields in the capacity file using the start identifier, the start identifier needs to be located before all the fields of the capacity firmware, or on the first character of all the fields of the capacity firmware; when marking the fields in the capacity file using the end identifier, the start identifier needs to be located after all the fields of the capacity firmware, or on the last character of all the fields of the capacity firmware.
[0060] According to the embodiment of the present application, each programming file contains an interception identifier, and the interception identifiers in each programming file are different from each other. Through different interception identifiers, it is convenient to establish a mapping relationship with multiple predetermined capacity parameters.
[0061] According to an embodiment of the present application, the compiled capacity file is marked by utilizing the interception identifier to facilitate establishing a mapping relationship between the identifier in each capacity file and the predetermined capacity parameter, so that the accurate capacity firmware can be located according to the relevant capacity parameters.
[0062] Figure 3 A schematic diagram of multiple burning files containing interception identifiers according to an embodiment of the present application is shown.
[0063] like Figure 3 As shown, it includes multiple burning files with interception identifiers and different capacities. Each interception identifier is located at the front of a different field, that is, a starting identifier. By adding an arrow and a binary parameter identifier before the first character in the field, for example, an arrow and a binary parameter 0100 are added before the first character in the field of the 3.2T burning file, a connection can be established between multiple burning files and multiple predetermined capacity parameters.
[0064] According to an embodiment of the present application, multiple burning files are compressed separately to obtain multiple compressed burning files and attribute information of the multiple compressed burning files.
[0065] According to an embodiment of the present application, when the interception identifier includes a start identifier, the method of compressing multiple burning files separately to obtain multiple compressed burning files and attribute information of the multiple compressed burning files further includes the following operations:
[0066] According to an embodiment of the present application, a predetermined field of the programming file is marked according to the verification identifier to obtain an intermediate programming file. The predetermined field represents a field located after the start identifier.
[0067] According to an embodiment of the present application, the check mark used to mark the predetermined fields of the burning file can be the same. During the compression process of the burning file, if the compression is normal, the position of the interception mark in the burning file will not change. However, if a compression error such as garbled characters occurs, the position of the start mark in the burning file may be confused or lost. Therefore, a check mark can be introduced and inserted into the field after the start mark, or a certain character in the field after the mark can be marked so that the character can appear luminous, bold, or other significant marks without changing its meaning, to help determine whether the current compression is correct and improve the accuracy of generating a firmware integration package of a predetermined capacity.
[0068] According to an embodiment of the present application, the intermediate burning file is compressed to obtain an intermediate compressed burning file.
[0069] According to an embodiment of the present application, the intermediate compressed burning file is verified based on the relative position between the verification mark and the start mark of the intermediate compressed burning file to obtain a second verification result.
[0070] According to an embodiment of the present application, when the verification mark of the intermediate compressed burning file is located after the start mark, the second verification result may indicate a pass; otherwise, the second verification result may indicate a fail.
[0071] According to an embodiment of the present application, when the second verification result indicates passing, the intermediate compressed burning file is determined as the compressed burning file.
[0072] According to an embodiment of the present application, when the second verification result indicates failure, the intermediate burning file with compression errors is located, and operations such as re-compression, re-labeling, and regeneration of the binary burning file are performed on it.
[0073] According to an embodiment of the present application, when the interception identifier includes an end identifier, the field of the burning file located before the end identifier is marked according to the verification identifier to obtain an intermediate burning file, and the intermediate burning file is compressed to obtain an intermediate compressed burning file. The intermediate compressed burning file is verified based on the relative position between the verification identifier and the end identifier of the intermediate compressed burning file. If the verification identifier of the intermediate compressed burning file is located before the end identifier, the second verification result can indicate a pass; if the verification identifier of the intermediate compressed burning file is located after the end identifier or the end identifier is not identified, the second verification result can indicate a fail. Therefore, if the second verification result indicates a pass, the intermediate compressed burning file is determined to be a compressed burning file.
[0074] According to an embodiment of the present application, after determining to obtain multiple compressed burning files, the attribute information of each compressed burning file is obtained. The attribute information of the compressed burning file may include the size of the compressed burning file, but is not limited thereto.
[0075] According to an embodiment of the present application, multiple compressed burning files and multiple attribute information are packaged to obtain a firmware integrated package of predetermined capacity.
[0076] According to the embodiments of the present application, during the packaging process, the data content within the compressed and programmed files will not change in order, but the order between multiple compressed and programmed files will be disrupted. Therefore, before packaging, the interception identifier of the compressed and programmed files can be pre-associated with the attribute information that matches it, so that the compressed and programmed files, attribute information, and interception identifier are matched to each other, avoiding confusion and mixing, improving the order of the files within the predetermined capacity firmware integrated package, and improving the robustness, stability, and generation accuracy of the predetermined capacity firmware integrated package, thereby improving the accuracy of obtaining the target capacity firmware during the application process.
[0077] According to an embodiment of the present application, before determining the target capacity parameter using the capacity mapping relationship, the capacity mapping relationship may be pre-constructed in a shared server or shared file.
[0078] According to an embodiment of the present application, a first mapping sub-relationship is established based on the association relationship between multiple predetermined hard disk capacities and multiple predetermined capacity firmwares.
[0079] According to an embodiment of the present application, the association relationship between multiple predetermined capacity firmware and multiple predetermined capacity parameters is used to build a second mapping sub-relationship. For example, the predetermined capacity parameter can be represented by -c. When -c is 0, a predetermined capacity firmware of 0.96T is obtained; when -c is 1, a predetermined capacity firmware of 1.6T is obtained; when -c is 2, a predetermined capacity firmware of 1.92T is obtained; when -c is 3, a predetermined capacity firmware of 3.2T is obtained; when -c is 4, a predetermined capacity firmware of 3.84T is obtained; when -c is 5, a predetermined capacity firmware of 6.4T is obtained; when -c is 6, a predetermined capacity firmware of 7.68T is obtained; when -c is 7, a predetermined capacity firmware of 12.8T is obtained; when -c is 8, a predetermined capacity firmware of 15.36T is obtained.
[0080] According to an embodiment of the present application, a method for determining a target capacity parameter based on a hard disk capacity using a capacity mapping relationship stored in a shared server includes the following operations:
[0081] According to an embodiment of the present application, the capacity mapping relationship includes a first mapping sub-relationship and a second mapping sub-relationship.
[0082] According to an embodiment of the present application, the capacity information of the capacity firmware corresponding to the hard disk capacity is determined according to the first mapping sub-relationship.
[0083] According to an embodiment of the present application, based on the capacity information of the capacity firmware, the target capacity parameter is determined according to the second mapping sub-relationship.
[0084] For example, the hard disk capacity of the solid state drive is 0.96T. According to the first mapping sub-relationship, the capacity information of the capacity firmware is determined to be 0.96T. Based on the capacity information of the capacity firmware being 0.96T, according to the second mapping sub-relationship, the target capacity parameter -c is determined to be 0.
[0085] According to an embodiment of the present application, in the process of building the second mapping sub-relationship, multiple predetermined capacity parameters and multiple interception identifiers can be matched one by one, and the association between capacity parameters-interception identifiers-capacity firmware can be established, so that the target capacity firmware can be obtained from the predetermined capacity firmware integrated package based on the capacity parameters.
[0086] According to an embodiment of the present application, a first mapping sub-relationship and a second mapping sub-relationship are established based on the association between hard disk capacity, capacity firmware, and capacity parameters. Thus, when the hard disk capacity is known, the target capacity parameters of the solid-state drive can be determined, and based on the association between the predetermined capacity firmware integrated package and the capacity parameters, when the target capacity parameters are obtained, it is equivalent to obtaining the accurate parameter identifier for extracting the corresponding capacity firmware in the predetermined capacity firmware integrated package, so that each link is associated with each other and there is a one-to-one mapping connection, so that when burning a large number of solid-state drives, the matching error rate is reduced, and the accuracy and stability of obtaining the target capacity firmware of each solid-state drive are improved.
[0087] According to an embodiment of the present application, a method for obtaining target capacity firmware from a predetermined capacity firmware integrated package stored on a shared server according to target capacity parameters includes the following operations:
[0088] According to an embodiment of the present application, a firmware integration package of a predetermined capacity is retrieved from the firmware storage space of a shared server.
[0089] According to an embodiment of the present application, a target interception identifier and target attribute information corresponding to the target capacity parameter are determined according to the target capacity parameter.
[0090] According to an embodiment of the present application, by pre-establishing an association between the capacity parameter and the interception identifier, a target interception identifier can be determined based on the target capacity parameter, and then the size information of the corresponding target compressed burning file can be determined based on the target interception identifier.
[0091] According to an embodiment of the present application, target capacity firmware is obtained from a predetermined capacity firmware integrated package based on a target interception identifier and target attribute information.
[0092] According to an embodiment of the present application, further, a method for obtaining target capacity firmware from a predetermined capacity firmware integrated package according to a target interception identifier and target attribute information includes the following operations:
[0093] According to an embodiment of the present application, a target compressed burning file is obtained from a predetermined capacity firmware integrated package based on a target interception identifier and target attribute information.
[0094] According to an embodiment of the present application, the position of the target interception identifier is first determined from the predetermined capacity firmware integrated package. When the target interception identifier is the starting identifier, based on the size information of the target compressed burning file in the target attribute information, according to the marking method, with the starting identifier as the starting point, a compressed burning file of a size equal to the size information of the target compressed burning file is intercepted as the target compressed burning file.
[0095] For example, if the start identifier is inserted into the capacity file during the marking process, it is necessary to erase the start identifier in advance before intercepting the compressed burning file of the same size as the size information of the target compressed burning file, and then intercept the compressed burning file, or based on the size of the target compressed burning file and the number of characters of the start identifier, intercept multiple compressed burning files in the predetermined capacity firmware integrated package, and then erase the start identifier in the intercepted compressed burning file to obtain the target compressed burning file.
[0096] According to an embodiment of the present application, during the interception process, it is also possible to determine whether the next character carries an interception identifier or whether the next character is an interception identifier when the last character is intercepted, thereby helping to determine whether the interception of the current compressed burning file is accurate.
[0097] According to an embodiment of the present application, the target compressed burning file is decompressed to obtain the target burning file.
[0098] According to an embodiment of the present application, a target burning file is decompiled to obtain a first capacity firmware. The target burning file is a binary file.
[0099] According to an embodiment of the present application, based on the hard disk capacity, the capacity information of the first capacity firmware is verified to obtain a first verification result.
[0100] According to an embodiment of the present application, a capacity check is performed on the first capacity firmware obtained after decompilation based on the hard disk capacity. If the hard disk capacity is consistent with the capacity information of the first capacity firmware, the first check result is confirmed to be passed; otherwise, the first check result is confirmed to be failed.
[0101] According to an embodiment of the present application, when the first verification result indicates passing, the first capacity firmware is determined to be the target capacity firmware.
[0102] According to an embodiment of the present application, if the first verification result indicates a failure, operations such as reconfirming the target capacity parameters of the current solid-state drive or intercepting the target compressed burning file can be performed until the first verification result indicates a passing result. Furthermore, a verification number threshold for the first verification can be set, and if the first verification is repeated for a number greater than the threshold on the same solid-state drive, an alarm can be issued to the server.
[0103] According to an embodiment of the present application, based on the target capacity parameter, the target interception identifier and target attribute information corresponding to the target capacity parameter are determined, and then from the predetermined capacity firmware integrated package, based on the target interception identifier and target attribute information, the target compressed burning file is obtained, which is decompressed and decompiled to obtain the first capacity firmware, and then based on the hard disk capacity, the capacity information of the first capacity firmware is verified to obtain a first verification result, and based on the first verification result, the first capacity firmware is determined to be the target capacity firmware, so that based on the association between the capacity parameter-interception identifier-attribute information-compressed burning file, the target capacity firmware uniquely corresponding to the solid-state hard disk is obtained. At the same time, in the process of obtaining the target capacity firmware uniquely corresponding to the solid-state hard disk, repeated verification and validation are performed, and the integrity and accuracy of the obtained target capacity firmware are improved under multi-dimensional verification, so that when the target capacity firmware is used to burn the solid-state hard disk, it can be successfully burned, thereby improving the burning efficiency.
[0104] According to an embodiment of the present application, when batch burning multiple solid-state hard drives, the multiple solid-state hard drives can determine the target capacity parameters of each other based on their respective hard drive capacities and bus numbers, and each can determine the target capacity parameters of each single thread based on the established capacity parameters-interception identifiers-attribute information-compressed burning files. By utilizing multiple target capacity parameters, the target capacity firmware of each solid-state hard drive can be determined one by one without affecting each other. There is no need to traverse multiple firmware files from the server, which avoids omissions when traversing multiple firmware files and occupies a large number of resources, improves the accuracy and stability of obtaining the target capacity firmware, and reduces resource costs.
[0105] According to an embodiment of the present application, when batch-programming multiple solid-state drives, the bus numbers with the same hard drive capacity can be marked based on the same hard drive capacity. For solid-state drives with the same hard drive capacity, it is only necessary to obtain the target capacity firmware once, and then the obtained target capacity firmware is burned to the marked bus number, avoiding confusion caused by cross-acquisition in the predetermined capacity firmware integrated package and repeated acquisition of the same target capacity firmware, thereby improving the burning efficiency and accuracy of obtaining the target capacity firmware during batch programming.
[0106] According to an embodiment of the present application, the program can be programmed using the burn command (nvme burn -c) (-b) (fw-path) is used to burn batches of solid-state drives. Among them, (nvme burn -c) can represent the target capacity parameters, -b can represent the bus number and hard drive capacity, and fw-path can represent a shared file or shared server.
[0107] According to an embodiment of the present application, the method for programming a solid-state drive further includes:
[0108] According to an embodiment of the present application, the server into which the target solid-state drive is inserted is powered off to initialize the server.
[0109] According to an embodiment of the present application, the server is powered on and the target capacity firmware in the target solid-state drive is activated to enable the target solid-state drive to perform read and write operations.
[0110] According to the embodiments of the present application, considering that the server often has related running business while burning the solid-state hard disk, the server can be powered on and off during non-business operation to enable the target solid-state hard disk to perform read and write operations.
[0111] Figure 4 A schematic diagram of programming a solid-state drive according to an embodiment of the present application is shown.
[0112] like Figure 4As shown, three solid-state drives (SSDs) are installed on a target server 407. The bus number and hard drive capacity of each SSD are obtained 401. For example, the bus number of the first SSD is 1, and the hard drive capacity is 1.6 TB; the bus number of the first SSD is 2, and the hard drive capacity is 3.84 TB; and the bus number of the first SSD is 3, and the hard drive capacity is 12.8 TB. The target capacity parameter of each SSD is determined using the capacity mapping relationship 402 stored on the shared server. For example, the target capacity parameter -c of the first SSD is 1, the target capacity parameter -c of the second SSD is 4, and the target capacity parameter -c of the third SSD is 7. Based on the relationship between the capacity parameters and the interception identifier, the binary interception identifier of the target capacity parameter is determined 403 from the predetermined capacity firmware integration package stored on the shared server. For example, the binary format of -c 1 is 0001, the binary format of -c 4 is 0100, and the binary format of -c 7 is 0111. The target programming files 404 for the three SSDs are obtained. The target flashing files 404 for the three SSDs are decompiled to obtain target capacity firmware 405 for each SSD. Based on the bus number, target capacity firmware 405 is flashed to the corresponding SSDs, resulting in three target SSDs 406. The target server 407, into which the three target SSDs 406 are inserted, is powered on and off to enable read and write operations on each target SSD 406.
[0113] According to an embodiment of the present application, the method for programming a solid-state drive further includes:
[0114] According to an embodiment of the present application, an update compression burning file and update attribute information of the update compression burning file are obtained according to the update capacity firmware.
[0115] According to an embodiment of the present application, the update capacity firmware is subjected to the above operations such as interception identification marking, compilation, and compression to obtain an updated compressed burning file and its updated attribute information.
[0116] According to an embodiment of the present application, based on the update capacity firmware, a target update strategy is determined from multiple predetermined update strategies, and the multiple predetermined update strategies include at least one of a strategy for replacing the predetermined capacity firmware in the predetermined capacity firmware integrated package and a strategy for adding the updated capacity firmware to the predetermined capacity firmware integrated package, but are not limited to this.
[0117] According to an embodiment of the present application, based on a target update strategy, the predetermined-capacity firmware integrated package is updated to obtain an updated predetermined-capacity firmware integrated package.
[0118] According to an embodiment of the present application, further, based on the target update strategy, the method for updating the predetermined capacity firmware integrated package to obtain the updated predetermined capacity firmware integrated package includes the following operations:
[0119] According to an embodiment of the present application, when the target update strategy is to replace the predetermined capacity firmware in the predetermined capacity firmware integrated package, the compressed burning file and attribute information corresponding to the updated compressed burning file are queried from the predetermined capacity firmware integrated package based on the interception identifier.
[0120] For example, if the updated capacity firmware is 6.4T, the target capacity parameters of the 6.4T predetermined capacity firmware are queried from the capacity mapping relationship to determine the interception identifier 0101 of the 6.4T predetermined capacity firmware. Then, the compressed burning file and attribute information at the location of the interception identifier 0101 are queried from the predetermined capacity firmware integrated package.
[0121] According to an embodiment of the present application, the compressed burning file and the attribute information are replaced with the updated compressed burning file and the updated attribute information to obtain an updated predetermined capacity firmware integrated package.
[0122] According to an embodiment of the present application, after replacing the updated compressed burning file and updating the attribute information, it is necessary to synchronously update the cutoff mark corresponding to the predetermined capacity parameter of the predetermined capacity firmware. For example, if the cutoff mark in the 6.4T updated compressed burning file has the first character marked in yellow, after replacing the 6.4T updated compressed burning file and updating the attribute information, the original cutoff mark 0101 needs to be replaced with the first character marked in yellow.
[0123] Figure 5 A schematic diagram of replacing and updating a predetermined capacity firmware integration package according to an embodiment of the present application is shown.
[0124] like Figure 5 As shown, the 6.4T predetermined capacity firmware in the predetermined capacity firmware integrated package needs to be updated. When the interception identifier is inserted before the first character of the compressed burning file of the 6.4T predetermined capacity firmware, there is no need to erase the interception identifier 0101. According to the interception identifier 0101, the position of the compressed burning file of the 6.4T predetermined capacity firmware is located, and the 6.4T updated compressed burning file is used to replace it.
[0125] According to an embodiment of the present application, when the target update strategy is to add the updated capacity firmware to the predetermined capacity firmware integrated package, when performing the (i+1) round of update:
[0126] According to an embodiment of the present application, if i+1 is less than a predetermined threshold, the predetermined capacity firmware integrated package obtained in the i-th round of update is determined as the predetermined capacity firmware sub-package for the i+1th round. The predetermined capacity firmware integrated package for the i-th round includes the predetermined capacity firmware sub-packages for the previous i-1th round, where i is a positive integer.
[0127] According to an embodiment of the present application, when the target update strategy is a replacement strategy, the update round when the target update strategy is added may not be counted, that is, when the target update strategy is a replacement strategy, there is no need to consider the round and the update can be directly replaced.
[0128] According to an embodiment of the present application, the predetermined capacity firmware sub-package of the i+1th round, the updated compressed burning file of the i+1th round and the updated attribute information of the i+1th round are packaged to obtain an updated predetermined capacity firmware integrated package.
[0129] According to an embodiment of the present application, after the predetermined capacity firmware integrated package is updated, the cutoff flag corresponding to the predetermined capacity parameter of the predetermined capacity firmware needs to be updated synchronously.
[0130] According to an embodiment of the present application, when i+1 is less than a predetermined threshold, the predetermined capacity firmware integrated package obtained by the i-th round update is determined as the predetermined capacity firmware sub-package of the i+1th round, and the predetermined capacity firmware sub-package of the i+1th round, the updated compressed burning file of the i+1th round, and the updated attribute information of the i+1th round are packaged to obtain the updated predetermined capacity firmware integrated package. In this way, the predetermined capacity firmware integrated package can be quickly updated, and during the update process, the acquisition of the original capacity firmware will not be affected, and the burning and updating can be carried out simultaneously, thereby improving the burning efficiency and the updating efficiency. When it is necessary to add capacity firmware, by limiting the update rounds, it is equivalent to limiting the sub-packages contained in the predetermined capacity firmware integrated package, so that the structure within the predetermined capacity firmware integrated package is simple.
[0131] Figure 6 A schematic diagram of adding and updating a predetermined capacity firmware integration package according to an embodiment of the present application is shown.
[0132] like Figure 6 As shown, taking the predetermined threshold of 8 as an example, when i+1 is less than the predetermined threshold, the updated predetermined capacity firmware integrated package is obtained. The predetermined capacity firmware integrated package obtained in the second update round is determined as the predetermined capacity firmware sub-package for the third update round (the second predetermined capacity firmware sub-package), and is packaged with the updated compressed and burned file in the third update round to obtain the updated predetermined capacity firmware integrated package. The second update round predetermined capacity firmware integrated package also includes: the 0th predetermined capacity firmware sub-package obtained in the first update round, and the 1st predetermined capacity firmware sub-package obtained in the second update round.
[0133] According to an embodiment of the present application, when i+1 is greater than or equal to a predetermined threshold, multiple compressed burning files and multiple attribute information in the predetermined capacity firmware integration package obtained by the i-th round of update are obtained.
[0134] According to an embodiment of the present application, when i+1 is greater than or equal to a predetermined threshold, the compressed burning files of all original capacity firmware in the predetermined capacity firmware integrated package are disassembled from the integrated package.
[0135] According to an embodiment of the present application, multiple compressed burning files, multiple attribute information, the updated compressed burning files of the i+1th round and the updated attribute information of the i+1th round are packaged to obtain an updated predetermined capacity firmware integrated package.
[0136] According to an embodiment of the present application, the compressed burning file of the original capacity firmware and the updated compressed burning file are packaged together to obtain an updated predetermined capacity firmware integrated package.
[0137] According to an embodiment of the present application, when i+1 is greater than or equal to a predetermined threshold, multiple compressed burning files and multiple attribute information in the predetermined capacity firmware integrated package obtained in the i-th round of update are obtained, all compressed burning files and attribute information are packaged, and an updated predetermined capacity firmware integrated package is obtained, so that the predetermined capacity firmware integrated package can be quickly updated and the structure within the predetermined capacity firmware integrated package can be simplified.
[0138] According to an embodiment of the present application, when i+1 is less than a predetermined threshold, multiple sub-package identifiers can be used to mark each predetermined capacity firmware sub-package in each update round, and at the same time, the sub-package identifier is associated with the capacity size of all capacity firmware within the predetermined capacity firmware sub-package. In the case of multiple predetermined capacity firmware sub-packages, there is no need to first determine the target capacity parameter. The first mapping sub-relationship can be used to first determine the capacity information of the capacity firmware based on the hard disk capacity, and then the capacity information and the multiple sub-package identifiers can be used to determine the target predetermined capacity firmware sub-package. This can narrow the selection range of the target capacity parameter and determine the range of the target capacity firmware in the predetermined capacity firmware integrated package based on the cutoff identifier. Based on the selection range of the current target capacity parameter and the hard disk capacity, the target capacity parameter and the corresponding cutoff identifier are determined, and then the target capacity firmware is directly determined from the cutoff identifier to obtain the target capacity firmware. In this way, when the predetermined capacity firmware integrated package is updated with multiple rounds of capacity firmware, the predetermined capacity firmware sub-package where the target capacity firmware is located can be found more efficiently and quickly, further reducing the resource cost used in the burning process and improving the accuracy and stability of obtaining the target capacity firmware.
[0139] Figure 7 A schematic diagram of adding and updating a predetermined capacity firmware integration package according to another embodiment of the present application is shown.
[0140] like Figure 7As shown, taking the predetermined threshold of 3 as an example, when i+1 is greater than or equal to the predetermined threshold, all files in the predetermined capacity firmware integration package obtained after the third round of update need to be disassembled and packaged together with the 18.94T update compression and burning file of the fourth round of update to obtain the predetermined capacity firmware integration package after the fourth round of update.
[0141] Figure 8 A schematic diagram of replacing and updating a predetermined-capacity firmware integrated package containing multiple sub-packages according to an embodiment of the present application is shown.
[0142] like Figure 8 As shown, since the target update strategy is a replacement strategy, it can be excluded from the update round when the target update strategy is added. Therefore, the 6.4T compressed burning file corresponding to the 6.4T update compressed burning file can be directly queried according to the interception identifier 0101, and the 6.4T compressed burning file can be replaced with the 6.4T update compressed burning file to obtain the updated predetermined capacity firmware integration package.
[0143] Based on the above method for burning a solid state hard disk, the present application also provides a device for burning a solid state hard disk. Figure 9 The device is described in detail.
[0144] Figure 9 A structural block diagram of an apparatus for programming a solid-state hard disk according to an embodiment of the present application is shown.
[0145] like Figure 9 As shown, the apparatus for programming a solid state drive in this embodiment includes: a first acquisition module 910 , a determination module 920 , a second acquisition module 930 and a programming module 940 .
[0146] The first acquisition module 910 is used to obtain the bus number and hard disk capacity of the solid state drive. In one embodiment, the first acquisition module 910 can be used to perform the operation S210 described above, which will not be repeated here.
[0147] Determination module 920 is configured to determine a target capacity parameter based on the hard disk capacity using a capacity mapping relationship stored on the shared server, wherein the capacity mapping relationship represents an association between multiple predetermined hard disk capacities and multiple predetermined capacity parameters. In one embodiment, determination module 920 may be configured to perform operation S220 described above, which is not further described here.
[0148] The second acquisition module 930 is configured to acquire the target capacity firmware from a predetermined capacity firmware integrated package stored on the shared server based on the target capacity parameter, wherein the predetermined capacity firmware integrated package includes predetermined capacity firmware having multiple capacities. In one embodiment, the second acquisition module 930 may be configured to perform operation S230 described above, which will not be further described here.
[0149] The burning module 940 is used to burn the target capacity firmware into the solid state drive based on the bus number to obtain the target solid state drive. In one embodiment, the burning module 940 can be used to perform the operation S240 described above, which will not be repeated here.
[0150] According to an embodiment of the present application, the apparatus for programming a solid-state hard disk in this embodiment further includes: a power-off module and a power-on module.
[0151] The power-off module is used to power off the server in which the target solid-state drive is inserted, so as to initialize the server.
[0152] The power-on module is used to power on the server and activate the target capacity firmware in the target solid-state drive to enable the target solid-state drive to perform read and write operations.
[0153] According to an embodiment of the present application, the apparatus for programming a solid-state hard disk in this embodiment further includes: an obtaining module, a determining strategy module, and an updating module.
[0154] The obtaining module is used to obtain the update compression burning file and the update attribute information of the update compression burning file according to the update capacity firmware.
[0155] A policy determination module is used to determine a target update policy from multiple predetermined update policies based on the updated capacity firmware, wherein the multiple predetermined update policies include at least one of a policy for replacing the predetermined capacity firmware in the predetermined capacity firmware integrated package and a policy for adding the updated capacity firmware to the predetermined capacity firmware integrated package.
[0156] The update module is used to update the predetermined capacity firmware integration package based on the target update strategy to obtain an updated predetermined capacity firmware integration package.
[0157] According to embodiments of the present application, any multiple modules among the first acquisition module 910, the determination module 920, the second acquisition module 930, and the programming module 940 may be combined into a single module, or any one of these modules may be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of other modules and implemented in a single module. According to embodiments of the present application, at least one of the first acquisition module 910, the determination module 920, the second acquisition module 930, and the programming module 940 may be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or may be implemented in hardware or firmware through any other reasonable means of circuit integration or packaging, or may be implemented in any one of the three implementation methods of software, hardware, and firmware, or any appropriate combination of any of these. Alternatively, at least one of the first acquisition module 910 , the determination module 920 , the second acquisition module 930 and the programming module 940 may be at least partially implemented as a computer program module, which may perform corresponding functions when executed.
[0158] Figure 10 A block diagram of an electronic device suitable for implementing a method for programming a solid-state drive according to an embodiment of the present application is shown.
[0159] like Figure 10 As shown, the electronic device according to an embodiment of the present application includes a processor 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage unit 1008 into a random access memory (RAM) 1003. The processor 1001 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 1001 may also include onboard memory for caching purposes. The processor 1001 may include a single processing unit or multiple processing units for performing different actions of the method flow according to the embodiment of the present application.
[0160] Various programs and data required for the operation of the electronic device are stored in RAM 1003. The processor 1001, ROM 1002, and RAM 1003 are connected to each other via a bus 1004. The processor 1001 performs various operations of the method flow according to the embodiment of the present application by executing the programs in ROM 1002 and / or RAM 1003. It should be noted that the programs may also be stored in one or more memories other than ROM 1002 and RAM 1003. The processor 1001 may also perform various operations of the method flow according to the embodiment of the present application by executing the programs stored in the one or more memories.
[0161] According to an embodiment of the present application, the electronic device may further include an input / output (I / O) interface 1005, which is also connected to the bus 1004. The electronic device may further include one or more of the following components connected to the I / O interface 1005: an input section 1006 including a keyboard, mouse, etc.; an output section 1007 including devices such as a cathode ray tube (CRT), liquid crystal display (LCD), and speakers; a storage section 1008 including a hard disk; and a communication section 1009 including a network interface card such as a LAN card or modem. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the I / O interface 1005 as needed. Removable media 1011, such as a magnetic disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed in the drive 1010 as needed, so that computer programs read from the removable media can be installed in the storage section 1008 as needed.
[0162] This application also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments, or may exist independently and not be incorporated into the device / apparatus / system. The computer-readable storage medium carries one or more programs, and when the one or more programs are executed, the method according to the embodiments of this application is implemented.
[0163] According to an embodiment of the present application, a computer-readable storage medium may be a non-volatile computer-readable storage medium, and may include, for example, but not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present application, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present application, a computer-readable storage medium may include the ROM 1002 and / or RAM 1003 described above and / or one or more memories other than ROM 1002 and RAM 1003.
[0164] The embodiments of the present application also include a computer program product, which includes a computer program containing program code for executing the method shown in the flowchart. When the computer program product is executed in a computer system, the program code is used to cause the computer system to implement the method for burning a solid-state drive provided in the embodiments of the present application.
[0165] The computer program executes the above functions defined in the system / device of the embodiment of the present application when the computer program is executed by the processor 1001. According to the embodiment of the present application, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0166] In one embodiment, the computer program may be stored on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may be transmitted and distributed in the form of a signal on a network medium, downloaded and installed via the communication portion 1009, and / or installed from the removable medium 1011. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to wireless, wired, or any suitable combination thereof.
[0167] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 1009, and / or installed from the removable medium 1011. When the computer program is executed by the processor 1001, the above-mentioned functions defined in the system of the embodiment of the present application are performed. According to the embodiment of the present application, the systems, devices, means, modules, units, etc. described above can be implemented by computer program modules.
[0168] According to an embodiment of the present application, the program code for executing the computer program provided by the embodiment of the present application can be written in any combination of one or more programming languages. Specifically, these computer programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C" or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect via the Internet).
[0169] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of the boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0170] Those skilled in the art will appreciate that the features described in the various embodiments of this application may be combined and / or coupled in various ways, even if such combinations or couplings are not explicitly described in this application. In particular, the features described in the various embodiments of this application may be combined and / or coupled in various ways without departing from the spirit and teachings of this application. All such combinations and / or couplings fall within the scope of this application.
[0171] The embodiments of the present application have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present application. Although each embodiment has been described separately above, this does not mean that the measures in each embodiment cannot be advantageously used in combination. Without departing from the scope of the present application, those skilled in the art may make various substitutions and modifications, and these substitutions and modifications should all fall within the scope of the present application.
Claims
1. A method for programming a solid state drive, characterized in that: The method comprises: Obtaining the bus number of the hard disk slot where the solid-state hard disk is located in the server, the hard disk capacity, and the update round of the predetermined capacity firmware integration package; In a case where the predetermined capacity firmware integrated package stored on the shared server includes multiple predetermined capacity firmware sub-packages and the update round is less than a predetermined threshold, according to the hard disk capacity, a target capacity firmware corresponding to the hard disk capacity and a sub-package identifier corresponding to the target capacity firmware are determined using a capacity mapping relationship stored on the shared server, a target predetermined capacity firmware sub-package is determined according to the sub-package identifier, and in the target predetermined capacity firmware sub-package, a target capacity parameter for extracting the target capacity firmware is determined based on the target capacity firmware and according to the capacity mapping relationship, wherein the capacity mapping relationship represents an association relationship between multiple predetermined hard disk capacities and multiple predetermined capacity parameters, the target capacity parameter is represented as a parameter identifier corresponding to a target interception identifier of the target capacity firmware, and in the capacity mapping relationship, there is a one-to-one mapping relationship between the multiple predetermined hard disk capacities, the multiple predetermined capacity firmware, and the multiple predetermined capacity parameters; Determining the target interception identifier corresponding to the target capacity parameter according to the target capacity parameter, and obtaining the target capacity firmware from the target predetermined capacity firmware sub-package, wherein the predetermined capacity firmware integrated package includes predetermined capacity firmware with multiple capacities; Based on the bus number, the target capacity firmware is burned into the solid state drive to obtain a target solid state drive.
2. The method according to claim 1, characterized in that The capacity mapping relationship includes a first mapping sub-relationship and a second mapping sub-relationship; The first mapping sub-relationship represents the association relationship between the plurality of predetermined hard disk capacities and the plurality of predetermined capacity firmwares; The second mapping sub-relationship represents an association relationship between the plurality of predetermined capacity firmwares and the plurality of predetermined capacity parameters.
3. The method according to claim 1, characterized in that The step of determining the target interception identifier corresponding to the target capacity parameter according to the target capacity parameter, and obtaining the target capacity firmware from the target predetermined capacity firmware sub-package includes: Retrieving the firmware integration package of the predetermined capacity from the firmware storage space of the shared server; Determining the target interception identifier and target attribute information corresponding to the target capacity parameter according to the target capacity parameter; The target capacity firmware is obtained from the target predetermined capacity firmware sub-package of the predetermined capacity firmware integrated package according to the target interception identifier and the target attribute information.
4. The method according to claim 3, characterized in that The step of obtaining the target capacity firmware from the target predetermined capacity firmware sub-package of the predetermined capacity firmware integrated package according to the target interception identifier and the target attribute information includes: Obtaining a target compressed burning file from the target predetermined capacity firmware sub-package of the predetermined capacity firmware integrated package according to the target interception identifier and the target attribute information; Decompressing the target compressed burning file to obtain the target burning file; Decompiling the target burning file to obtain a first capacity firmware; Based on the hard disk capacity, verify the capacity information of the first capacity firmware to obtain a first verification result; If the first verification result indicates passing, the first capacity firmware is determined to be the target capacity firmware.
5. The method according to claim 1, wherein The predetermined capacity firmware integration package is constructed in the following manner: acquiring the plurality of predetermined-capacity firmwares having different capacities; Compiling the plurality of predetermined capacity firmwares respectively to obtain a plurality of burning files corresponding to the plurality of predetermined capacity firmwares, wherein the burning files have the same data volume as the predetermined capacity firmwares; Compressing the plurality of burning files respectively to obtain a plurality of compressed burning files and attribute information of the plurality of compressed burning files; The plurality of compressed burning files and the attribute information of the plurality of compressed burning files are packaged to obtain the firmware integrated package of the predetermined capacity.
6. The method according to claim 5, characterized in that The step of compiling the plurality of predetermined capacity firmwares respectively to obtain a plurality of burning files corresponding to the plurality of predetermined capacity firmwares includes: Compiling the plurality of predetermined capacity firmwares respectively to obtain a plurality of capacity files corresponding to the plurality of predetermined capacity firmwares; According to a plurality of interception identifiers, the fields in the plurality of capacity files are marked respectively to obtain a plurality of the burning files.
7. The method according to claim 5, characterized in that The interception mark includes the start mark; The step of compressing the plurality of burning files to obtain the plurality of compressed burning files and the attribute information of the plurality of compressed burning files includes: Marking a predetermined field of the programming file according to the verification identifier to obtain an intermediate programming file, wherein the predetermined field represents a field located after the start identifier; Compressing the intermediate burning file to obtain an intermediate compressed burning file; Verifying the intermediate compressed burning file according to the relative position between the verification mark of the intermediate compressed burning file and the start mark to obtain a second verification result; If the second verification result indicates passing, the intermediate compressed burning file is determined as the compressed burning file.
8. The method according to claim 1, characterized in that The method further comprises: Powering off the server into which the target solid-state drive is inserted to initialize the server; The server is powered on to activate the target capacity firmware in the target solid-state drive, so that the target solid-state drive performs read and write operations.
9. The method according to claim 1, characterized in that The method further comprises: Obtaining, according to the update capacity firmware, an update compressed burning file and update attribute information of the update compressed burning file; determining a target update strategy from a plurality of predetermined update strategies based on the update capacity firmware, the plurality of predetermined update strategies including at least one of a strategy for replacing the predetermined capacity firmware in the predetermined capacity firmware integrated package and a strategy for adding the update capacity firmware to the predetermined capacity firmware integrated package; Based on the target update strategy, the predetermined-capacity firmware integrated package is updated to obtain an updated predetermined-capacity firmware integrated package.
10. The method according to claim 9, characterized in that In the case where the target update strategy is a strategy of replacing the predetermined capacity firmware in the predetermined capacity firmware integrated package, The updating of the predetermined-capacity firmware integrated package based on the target update strategy to obtain an updated predetermined-capacity firmware integrated package includes: querying, from the predetermined capacity firmware integrated package, a compressed burning file and attribute information corresponding to the updated compressed burning file according to the interception identifier; The compressed burning file and the attribute information are replaced with the updated compressed burning file and the updated attribute information to obtain an updated firmware integrated package of predetermined capacity.
11. The method according to claim 9, characterized in that In the case where the target update strategy is a strategy of adding the updated capacity firmware to the predetermined capacity firmware integrated package, The updating of the predetermined-capacity firmware integrated package based on the target update strategy to obtain an updated predetermined-capacity firmware integrated package includes performing an (i+1) round of update in the following manner: If i+1 is less than a predetermined threshold, the predetermined capacity firmware integrated package obtained in the i-th round of update is determined as the predetermined capacity firmware sub-package in the i+1-th round of update, wherein the predetermined capacity firmware integrated package obtained in the i-th round of update includes the predetermined capacity firmware sub-package in the previous i-1 rounds, where i is a positive integer; The predetermined capacity firmware sub-package of the (i+1)th round, the updated compressed burning file of the (i+1)th round, and the updated attribute information of the (i+1)th round are packaged to obtain an updated predetermined capacity firmware integrated package.
12. The method according to claim 11, characterized in that The method further comprises: When i+1 is greater than or equal to the predetermined threshold, obtaining a plurality of compressed burning files and a plurality of attribute information in a predetermined capacity firmware integrated package obtained by the i-th round of update; The multiple compressed burning files, the multiple attribute information, the updated compressed burning files of the (i+1)th round, and the updated attribute information of the (i+1)th round are packaged to obtain the updated predetermined capacity firmware integrated package.
13. A device for programming a solid state hard disk, characterized in that: The device comprises: A first acquisition module is used to obtain the bus number of the hard disk slot where the solid-state hard disk is located in the server, the hard disk capacity, and the update round of the predetermined capacity firmware integration package; a determination module configured to, when the predetermined capacity firmware integrated package stored on the shared server includes multiple predetermined capacity firmware sub-packages and the update round is less than a predetermined threshold, determine, based on the hard disk capacity, a target capacity firmware corresponding to the hard disk capacity and a sub-package identifier corresponding to the target capacity firmware using a capacity mapping relationship stored on the shared server; determine, based on the sub-package identifier, a target capacity parameter for extracting the target capacity firmware from the target predetermined capacity firmware sub-package based on the target capacity firmware and based on the capacity mapping relationship; wherein the capacity mapping relationship represents an association relationship between multiple predetermined hard disk capacities and multiple predetermined capacity parameters; the target capacity parameter is represented as a parameter identifier corresponding to a target interception identifier of the target capacity firmware; and in the capacity mapping relationship, there is a one-to-one mapping relationship between the multiple predetermined hard disk capacities, the multiple predetermined capacity firmware, and the multiple predetermined capacity parameters; a second acquisition module, configured to determine, based on the target capacity parameter, the target interception identifier corresponding to the target capacity parameter, and acquire the target capacity firmware from the target predetermined capacity firmware sub-package, wherein the predetermined capacity firmware integrated package includes predetermined capacity firmware having multiple capacities; The burning module is used to burn the target capacity firmware into the solid state drive based on the bus number to obtain a target solid state drive.
14. An electronic device comprising: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 12.
15. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: When the computer program or instructions are executed by a processor, the steps of the method according to any one of claims 1 to 12 are implemented.
Citation Information
Patent Citations
A firmware burning method and device for solid state disks
CN112433734A
Test method and device for uninterrupted firmware update of solid state disk, equipment and medium
CN118331806A