Method, system, computer device and storage medium for identifying hot plug hard disk
By identifying and setting the hot-swappable identifier for hard drives, combined with security detection in the BIOS and interface modules, the problem of computers being unable to hot-swap hard drives while powered on is solved, improving the efficiency and security of hard drive replacement and data transfer.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INSPUR SUZHOU INTELLIGENT TECH CO LTD
- Filing Date
- 2023-03-22
- Publication Date
- 2026-06-12
AI Technical Summary
Current technology cannot perform hot-swapping of hard drives while the computer is powered on, resulting in low efficiency in replacing hard drives and transferring data, increased dependence on transmission equipment, and reduced data transmission security.
By acquiring hard drive files, identifying and reading system files in a fixed directory on the hard drive, determining whether the hard drive is hot-swappable, setting a hot-swappable flag in the BIOS, and combining this with security detection of the interface module, the security of the hard drive is ensured.
It enables efficient and quick hard drive replacement and data transfer while the computer is powered on, reducing reliance on transmission equipment and improving work efficiency and data transmission security.
Smart Images

Figure CN116305100B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of hard disk hot-swappable technology, and in particular to a method, system, computer device, and storage medium for identifying hot-swappable hard disks. Background Technology
[0002] Nowadays, all industries have a huge demand for computers. In terms of performance, many console gamers assemble computers to achieve high performance to meet their needs. Therefore, simplifying computers has become one of the industry goals. With the expansion and improvement of hard drive functions, there are more and more tests and scenarios for hot-swapping hard drives. However, it is currently not possible to perform hot-swapping operations on computers with a solid-state drive. Users can only operate the hard drive after the computer is powered off. It is not possible to replace the hard drive efficiently and quickly when the computer is powered on, or to use the hard drive for data transfer. This increases the user's dependence on the transmission device, makes the operation more complicated, greatly reduces work efficiency, and also loses the security and practicality of data transmission.
[0003] Therefore, there is a need for a method, system, computer device, and storage medium to identify hot-swappable hard drives, enabling computers equipped with a solid-state drive to perform hot-swappable operations, allowing for efficient and quick replacement of hard drives, or using hard drives for data transfer, reducing user dependence on transmission devices, improving work efficiency, and enhancing the security and usability of hard drives during data transfer. Summary of the Invention
[0004] This invention proposes a method, system, computer device, and storage medium for identifying hot-swappable hard drives. It can solve the technical problems that computers equipped with a solid-state drive cannot perform hot-swappable operations, cannot efficiently and quickly replace the hard drive while the computer is powered on, or use the hard drive for data transfer. This increases the user's dependence on the transmission device, makes the operation more complicated, greatly reduces work efficiency, and at the same time, compromises the security and practicality of hard drive data transfer.
[0005] To achieve the above objectives, the present invention provides a method for identifying hot-swappable hard drives, comprising:
[0006] Obtain the hard drive and read the hard drive files;
[0007] Identify and read whether there are hot-swappable related system files in the fixed directory of the hard disk in the hard disk file;
[0008] If system files exist, the hard drive is determined to be hot-swappable;
[0009] Set a hot-swappable identifier for hard drives that are determined to be hot-swappable.
[0010] Furthermore, the step of acquiring the hard disk and reading the hard disk files includes:
[0011] The hard drive files are read, transferred to the BIOS, and the BIOS is used to verify whether the hard drive files are safe.
[0012] Furthermore, the step of reading the hard drive files, transferring the hard drive files to the BIOS, and verifying the safety of the hard drive files in the BIOS includes:
[0013] Identify whether the hard drive files contain Trojan programs;
[0014] If not, the hard drive files on the hard drive are determined to be safe, and then it is further determined whether the hard drive is a hot-swappable hard drive;
[0015] If so, the hard drive files on the hard drive are determined to be insecure, and the process ends.
[0016] Furthermore, identifying and reading whether hot-swappable related system files exist in the fixed directory of the hard disk in the hard disk file includes:
[0017] The BIOS checks whether system files exist in the fixed directory of the hard drive as listed in the hard drive files; if they exist, proceed to the next step; otherwise, the process ends.
[0018] In response to the detection of system files in a fixed directory of the hard disk in the hard disk file, the system files in the fixed directory of the detected hard disk are read in the BIOS. If hot-swap-related system files are read in the fixed directory of the hard disk in the hard disk file, the hard disk is determined to be hot-swappable in the BIOS. If no system files are read, the hard disk is determined to be non-hot-swappable in the BIOS, and the process ends.
[0019] Furthermore, the step of setting a hot-swappable flag for hard drives determined to be hot-swappable includes:
[0020] In response to the determination in the BIOS that the hard drive is hot-swappable, the model of the hard drive is obtained, and a security test is performed on the hard drive;
[0021] If the hard drive is secure, the model of the hard drive will be marked as hot-swappable in the interface module; if the hard drive is not secure, the process will end.
[0022] Furthermore, after the step of setting the hot-swappable identifier for the determined hot-swappable hard drive, the method further includes:
[0023] When a hard drive is detected to be connected to the interface module, a security check is performed on the hard drive;
[0024] If the hard drive is secure, then the hard drive is marked as hot-swappable; if the hard drive is not secure, then the process ends.
[0025] If the hard drive is marked as hot-swappable, and a security check is performed on the hard drive, if the hard drive security check result is secure, then the hard drive is read; if the hard drive security check result is insecure, then the process ends.
[0026] On the other hand, a system for identifying hot-swappable hard drives is provided, the system comprising:
[0027] An interface module is used to obtain the hard drive and read the hard drive files;
[0028] The BIOS hard disk module is used to identify and read whether there are hot-swap related system files in the fixed directory of the hard disk file;
[0029] The hard drive determination module is used to determine whether the hard drive can be hot-swapped.
[0030] The setting identification module is used to set a hot-swappable identification for hard drives that are determined to be hot-swappable.
[0031] An identification module is used to identify the hard drive that has been marked as hot-swappable by the insertion interface module.
[0032] In another aspect, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:
[0033] Obtain the hard drive and read the hard drive files;
[0034] Identify and read whether there are hot-swappable related system files in the fixed directory of the hard disk in the hard disk file;
[0035] If system files exist, the hard drive is determined to be hot-swappable;
[0036] Set a hot-swappable identifier for hard drives that are determined to be hot-swappable.
[0037] In another aspect, a computer-readable storage medium is provided, the computer-readable storage medium storing a program that, when executed by a processor, causes the processor to perform the following steps:
[0038] Obtain the hard drive and read the hard drive files;
[0039] Identify and read whether there are hot-swappable related system files in the fixed directory of the hard disk in the hard disk file;
[0040] If system files exist, the hard drive is determined to be hot-swappable;
[0041] Set a hot-swappable identifier for hard drives that are determined to be hot-swappable.
[0042] The method for identifying hot-swappable hard drives proposed in this application has the following advantages:
[0043] The method for identifying hot-swappable hard drives proposed in this application involves connecting the hard drive to be identified via a hard drive interface. The hard drive interface reads the hard drive's hard drive file and transfers it to the BIOS. The BIOS checks the hard drive file for malware. If no malware is found, the BIOS checks for system files in a fixed directory within the hard drive's file. If system files are found, the BIOS continues to check for hot-swappable system files. If hot-swappable system files are found in the fixed directory, the hard drive is identified as hot-swappable. The interface module then performs a security check on the hard drive. If the security check passes, the interface module assigns a hot-swappable identifier to the hard drive. When the hot-swappable hard drive is reconnected to the interface module, the module performs a security check. If the security check passes, the hard drive can then perform normal data transfer with the computer.
[0044] The above settings enable computers equipped with a solid-state drive (SSD) to perform hot-swapping, efficiently and quickly replace the drive, or use the drive for data transfer. This reduces the user's reliance on transmission devices, improves work efficiency, and enhances the security and usability of the hard drive during data transfer. Attached Figure Description
[0045] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0046] Figure 1 This is an application environment diagram of the method for identifying hot-swappable hard drives provided in the embodiments of this application;
[0047] Figure 2 This is a flowchart of a method for identifying hot-swappable hard drives provided in an embodiment of this application;
[0048] Figure 3 This is a detailed flowchart of the method for identifying hot-swappable hard drives provided in the embodiments of this application;
[0049] Figure 4 This is a detailed flowchart illustrating the method for identifying hot-swappable hard drives provided in this application embodiment.
[0050] Figure 5 This is a schematic diagram of the structure of the hot-swappable hard disk identification system provided in the embodiments of this application;
[0051] Figure 6 This is a schematic diagram of the computer device provided in the embodiments of this application. Detailed Implementation
[0052] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0053] Example 1
[0054] The method for identifying hot-swappable hard drives provided in this application can be applied to, for example... Figure 1 In the application environment shown, the hard drive at hard drive interface 101 is connected to computer 102 via cable and motherboard for data transmission. When a user inserts a hard drive whose hot-swappability is not yet determined, the hard drive interface reads the hard drive's file and transfers it to the BIOS. The BIOS checks the hard drive file for malware. If no malware is found, the BIOS checks for system files in the hard drive's fixed directory. If system files are found, the BIOS continues to read hot-swappable system files. If hot-swappable system files are found in the fixed directory, the hard drive is identified as hot-swappable. Hard drive interface 101 then performs a security check on the hard drive. If the security check passes, hard drive interface 101 assigns a hot-swappable flag to the hard drive. When a hot-swappable hard drive is connected to hard drive interface 101 again, hard drive interface 101 performs a security check. If the security check passes, the hard drive can perform normal data transmission with the computer. The hard disk interface 101 can be, but is not limited to, the hard disk interface of various personal computers, laptops, smartphones, tablets and portable wearable devices, and the computer 102 can be implemented by a standalone computer or a computer cluster composed of multiple computers.
[0055] The method for identifying hot-swappable hard drives provided in this application involves a user inserting the hard drive into the hard drive interface, obtaining the hard drive, and reading the hard drive file; identifying and reading whether there are hot-swappable related system files in a fixed directory of the hard drive file; if system files exist, determining that the hard drive can be hot-swapped; and setting a hot-swappable identifier for the hard drive determined to be hot-swappable.
[0056] In one embodiment, such as Figure 2 , Figure 5 As shown, a method for identifying hot-swappable hard drives is provided, including the following steps S1-S4:
[0057] S1: Obtain the hard disk and read the hard disk files on the hard disk.
[0058] In this embodiment of the invention, the user inserts a new hard drive that is not marked as hot-swappable into the hard drive interface. The hard drive interface is connected to the computer motherboard via a cable. The computer has only one fixed hard drive. The chip at the hard drive interface can access the hard drive files. The hard drive files include music files, image files, video files, theme files, archive files, upgrade files, and system files. The system files include hot-swappable system files. When the hard drive files contain and can read the hot-swappable related system files, it indicates that the hard drive supports hot-swapping operations on the computer.
[0059] S2: Identify and read whether there are hot-swappable related system files in the fixed directory of the hard disk in the hard disk file. The system files are preferably OS files.
[0060] In this embodiment of the invention, when a user inserts a hard drive without a hot-swappable identifier into the hard drive interface, the chip at the interface can retrieve the hard drive files and transmit the file information to the BIOS system. In the BIOS system, the BIOS hard drive module 2 can identify whether system files exist in the fixed directory of the hard drive files, and then determine whether the hot-swappable related system files in the fixed directory can be read. If both methods yield positive results, the BIOS system will provide the determination result from the BIOS hard drive module 2.
[0061] S3: If system files exist, the hard drive is determined to be hot-swappable.
[0062] In this embodiment of the invention, in the BIOS system, the BIOS hard disk module 2 can identify whether there are system files in the fixed directory of the hard disk file, and can also read the hot-swap related system files in the fixed directory of the hard disk. Only when it can identify the existence of system files in the fixed directory of the hard disk and can also read the hot-swap related system files in the fixed directory of the hard disk, can the BIOS hard disk module 2 determine that the hard disk that has not been set with the hot-swap label can be set as a hot-swap hard disk.
[0063] S4: Set a hot-swappable flag for hard drives that are determined to be hot-swappable.
[0064] In this embodiment of the invention, after the BIOS hard disk module 2 determines that a hard disk that is not marked as hot-swappable can be set as a hot-swappable hard disk, the BIOS hard disk module 2 will send the information that the hard disk that is not marked as hot-swappable can be set as a hot-swappable hard disk to the interface module 1 at the hard disk interface. The chip in the interface module 1 obtains the model of the hard disk at the hard disk interface, that is, sets the hard disk that is not marked as hot-swappable to a hot-swappable hard disk and marks it.
[0065] The above-described method for identifying hot-swappable hard drives, by combining the aforementioned technical features with reasonable derivation, achieves the beneficial effect of solving the technical problems raised in the background art.
[0066] Example 2
[0067] This embodiment 2 includes the features of the above embodiments, such as Figure 3 As shown, this embodiment provides a method for identifying hot-swappable hard drives, including: step 100: reading the hard drive file of the hard drive and transferring the hard drive file of the hard drive to the BIOS; step 200: confirming in the BIOS whether the hard drive file of the hard drive is safe.
[0068] It is understood that in this embodiment of the invention, when a user inserts a hard drive that is not marked as hot-swappable into the hard drive interface, the chip at the hard drive interface can obtain the hard drive files in the hard drive and transmit the hard drive file information to the BIOS system. In the BIOS system, the user will first manually confirm the security of the hard drive to be identified in the BIOS interface, that is, manually confirm in the BIOS interface whether there are viruses or Trojan programs or other programs that may harm the hard drive to be identified, so as to ensure the security of the hard drive to be identified.
[0069] This invention provides a method for identifying hot-swappable hard drives, comprising: identifying whether the hard drive files of the hard drive contain Trojan programs; if not, determining that the hard drive files of the hard drive are safe, and then continuing to determine whether the hard drive is a hot-swappable hard drive; if so, determining that the hard drive files of the hard drive are insecure, and then ending the process.
[0070] Understandably, in this embodiment of the invention, when a user inserts a hard drive without a hot-swappable label into the hard drive interface, the chip at the hard drive interface can obtain the hard drive files and transmit the hard drive file information to the BIOS system. In the BIOS system, the user will first manually confirm the security of the hard drive in the BIOS interface. Security factors include programs such as viruses or Trojans that could harm the hard drive to be identified. If there are no viruses or Trojans that could harm the hard drive to be identified, the BIOS system will determine that the hard drive files are safe and continue to determine whether the hard drive is a hot-swappable hard drive. If the user manually confirms in the BIOS interface that the hard drive to be identified is not safe, the process of determining that the hard drive to be identified is a hot-swappable hard drive ends.
[0071] This invention provides a method for identifying hot-swappable hard drives, comprising: Step 300: identifying whether system files exist in a fixed directory of the hard drive in the hard drive file in the BIOS; if they exist, proceed to the next step; if they do not exist, end the process; Step 400: in response to identifying the existence of system files in the fixed directory of the hard drive in the hard drive file, reading the system files existing in the identified fixed directory of the hard drive in the BIOS; if hot-swappable related system files are read in the fixed directory of the hard drive in the hard drive file, the hard drive is determined to be hot-swappable in the BIOS; if not read, the hard drive is determined to be non-hot-swappable in the BIOS, and the process ends the process.
[0072] Understandably, in combination Figure 5In this embodiment of the invention, when a user inserts a hard drive without a hot-swappable label into the hard drive interface, the user first manually confirms the safety of the hard drive in the BIOS interface. Then, the BIOS hard drive module 2 in the BIOS system first identifies whether there are system files in the fixed directory of the hard drive file. That is, it determines whether there are complete system files in the fixed directory of the hard drive file. The identified system files include identifier files with suffixes such as arch, block, crypto, documentation, kernel, drivers, include, and cfg. If system files are identified in the fixed directory of the hard drive file, it is determined that the next reading operation can be performed. If no system files are identified in the fixed directory of the hard drive file, it is determined that the hot-swappable hard drive identification process ends. After determining that the next reading operation can be performed, the BIOS hard disk module 2 reads the system files related to hot-swapping in the fixed directory of the hard disk file. The system files related to hot-swapping read include an identifier file with the .cfg suffix. If the system files related to hot-swapping are read in the fixed directory of the hard disk, the hard disk that has not been marked as hot-swappable is determined to be a hot-swappable hard disk. If the system files related to hot-swapping are not read in the fixed directory of the hard disk, the process of identifying hot-swappable hard disks ends.
[0073] This invention provides a method for identifying hot-swappable hard drives, comprising: step 500: in response to determining in the BIOS that the hard drive is hot-swappable, obtaining the hard drive model and performing a security test on the hard drive; step 600: if the hard drive is secure, marking the hard drive model as hot-swappable in the interface module; if the hard drive is not secure, then the process ends.
[0074] Understandably, in combination Figure 5In this embodiment of the invention, when the BIOS hard disk module 2 recognizes the presence of system files in the hard disk files and can read the presence of system files related to hot-swappability in a fixed directory of the hard disk files, the BIOS hard disk module 2 will determine that the hard disk without a hot-swappable flag is a hot-swappable hard disk. After the BIOS hard drive module 2 determines that the hard drive without a hot-swappable label is hot-swappable, it transmits this information to the interface module 1 at the hard drive interface. The interface module 1 then obtains the model of the hot-swappable hard drive and performs a security check. Since the user manually verifies the security of the hot-swappable hard drive after inserting it into the interface and transmitting the file information to the BIOS system, this manual verification involves the user identifying potential threats like viruses or malware. However, this manual verification may lead to oversights. Therefore, the chip at the interface module 1 performs a security check on the hot-swappable hard drive. This security check is a program logic check, which determines whether the hot-swappable hard drive contains viruses, malware, or other threats that could harm the hard drive or the computer.
[0075] Combination Figure 5 If the chip at interface module 1 performs a security check on the hard drive that is determined to be hot-swappable, the chip at interface module 1 at the hard drive interface will set the hot-swappable flag on the hard drive that is determined to be hot-swappable. If the chip at interface module 1 performs a security check on the hard drive that is determined to be hot-swappable, the process of setting the hot-swappable flag on the hard drive that is determined to be hot-swappable will end.
[0076] Example 3
[0077] like Figure 4 , Figure 5 As shown, this embodiment of the invention provides a method for identifying hot-swappable hard drives, including: step 700: if the hard drive is marked as hot-swappable, and a security test is performed on the hard drive; if the hard drive security test result is secure, then the hard drive is read; if the hard drive security test result is insecure, then the process ends.
[0078] In practical applications, the hard drives used that are marked with a hot-swappable identifier are the hot-swappable hard drives identified by the aforementioned hot-swappable hard drive identification method. The hot-swappable identifier on the hard drive indicates that it can be hot-swapped within the computer. When a user inserts a hot-swappable hard drive into interface module 1 at the hard drive interface, the chip in interface module 1 performs a security check on the hard drive. This check detects whether the hard drive contains viruses, Trojan programs, or other factors that could harm the hard drive or computer. If the security check by interface module 1 does not detect any such factors, the hot-swappable hard drive can perform data transfer or other operations with the computer. If the security check by interface module 1 detects such factors, the hot-swappable hard drive will stop performing data transfer or other operations with the computer.
[0079] Example 4
[0080] This embodiment includes the features of the above embodiments. This embodiment provides a system for identifying hot-swappable hard drives, such as... Figure 5 As shown, the system includes: an interface module 1, a BIOS hard disk module 2, a hard disk determination module 3, a setting identifier module 4, and an identification identifier module 5.
[0081] Interface module 1 is used to acquire the hard disk and read the hard disk file of the hard disk; BIOS hard disk module 2 is used to identify and read whether there are hot-swappable related system files in the fixed directory of the hard disk in the hard disk file; hard disk determination module 3 is used to determine whether the hard disk can be hot-swapped; setting identification module 4 is used to set a hot-swappable identification for the hard disk determined to be hot-swappable; identification identification module 5 is used to identify the hard disk that has been set with the hot-swappable identification when inserted into interface module 1.
[0082] The above embodiments only illustrate the structural relationships and components between the various unit modules. For practical applications, please refer to the execution methods of each unit module. Figure 3 The method shown will not be elaborated here.
[0083] In this embodiment of the invention, interface module 1 is connected to the hard drive to be identified, and is used to acquire the hard drive and read the hard drive files. At the same time, the chip in interface module 1 performs a security test on the hard drive that has been determined to be hot-swappable. If the hard drive that has not been determined to be hot-swappable is detected as safe and no factors such as viruses or Trojan programs that may harm the hard drive or computer terminal are found, then the hard drive that has not been determined to be hot-swappable can be marked as hot-swappable. If the hard drive that has been determined to be hot-swappable is detected as safe and no factors such as viruses or Trojan programs that may harm the hard drive or computer terminal are found, then the hard drive that has been marked as hot-swappable can transmit data with the computer terminal.
[0084] The BIOS hard drive module 2 is used when a user inserts a hard drive without a hot-swappable label into the hard drive interface. The chip in the interface module 1 at the hard drive interface can obtain the hard drive files and transmit the hard drive file information to the BIOS system. The BIOS system will then perform a manual security check on the hard drive without a hot-swappable label. This security check detects whether the hard drive without a hot-swappable label contains viruses, Trojan programs, or other factors that could harm the hard drive or the computer. After the BIOS system's manual security check result is deemed safe, the BIOS hard drive module 2 will identify and read the hard drive without a hot-swappable label. Identification involves checking whether system files exist in the fixed directory of the hard drive file, and reading involves checking whether the system files related to hot-swapping are found in the fixed directory of the hard drive file.
[0085] The hard drive module 3 determines whether the next read operation can proceed if a system file is detected in the fixed directory of the hard drive in the hard drive file. If no system file is detected in the fixed directory of the hard drive in the hard drive file, the process of identifying the hot-swappable hard drive ends. After determining that the next read operation can proceed, the BIOS hard drive module 2 reads whether there are system files related to hot-swapping in the fixed directory of the hard drive in the hard drive file. If a system file related to hot-swapping is read in the fixed directory of the hard drive, the hard drive that is not marked as hot-swappable is identified as a hot-swappable hard drive. If no system file related to hot-swapping is read in the fixed directory of the hard drive, the process of identifying the hot-swappable hard drive ends.
[0086] After the hard drive module determines that a hard drive without a hot-swappable label can be hot-swapped, the BIOS hard drive module 2 transmits this information to the chip in the interface module 1. This chip contains the setting module 4. Upon receiving this information, the chip in the interface module 1 performs a security check on the hard drive deemed hot-swappable. Since manual verification by the user is not possible due to oversights, the chip in the interface module 1 performs a program logic check to determine if the hard drive deemed hot-swappable has any viruses, Trojans, or other harmful elements. This check is a program logic detection method, assessing whether the hard drive deemed hot-swappable has any viruses, Trojans, or other harmful elements that could damage the hard drive or computer. If the chip at interface module 1 performs a security check on the hard drive that is determined to be hot-swappable, the chip at interface module 1 at the hard drive interface will set the hot-swappable flag on the hard drive. If the chip at interface module 1 performs a security check on the hard drive that is determined to be hot-swappable, the process of setting the hot-swappable flag on the hard drive will end.
[0087] If the security detection of the interface module 1 chip does not detect any factors that could harm the hard drive or computer, the hard drive with the hot-swappable label can perform data transmission or other operations with the computer. If the security detection of the interface module 1 chip detects any factors that could harm the hard drive or computer, the hard drive with the hot-swappable label will stop performing data transmission or other operations with the computer.
[0088] The BIOS hard drive module 2 includes a hard drive directory file identification module and a hard drive directory file reading module. The hard drive directory file identification module identifies whether system files exist in a fixed directory within the hard drive file. The hard drive directory file reading module reads whether hot-swap-related system files exist in the fixed directory within the hard drive file. Specifically, after the user manually confirms the security check result in the BIOS system, the hard drive directory file identification module checks whether system files exist in the fixed directory within the hard drive file. If system files exist in the fixed directory, the process proceeds to the hard drive determination module 3, which determines whether the next step of the hard drive directory file reading procedure can proceed. If not, the process ends at the hard drive determination module 3. The hard disk directory file reading module is used after the user manually confirms the security check result in the BIOS system and identifies the system files in the fixed directory of the hard disk in the hard disk file. The hard disk directory file reading module reads the identified system files. If a system file related to hot-swapping is read, it will enter the hard disk determination module 3 to determine whether the hard disk that has not been marked as hot-swappable can be marked as hot-swappable. If no system file related to hot-swapping is read, it will enter the hard disk determination module 3 again to determine whether the hard disk that has not been marked as hot-swappable cannot be marked as hot-swappable, and the process of identifying hot-swappable hard disks will end.
[0089] Specific limitations regarding the identification of hot-swappable hard drive systems can be found in the method limitations described above, and will not be repeated here. The modules in the hot-swappable hard drive identification system described above can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0090] It should be understood that, although Figure 2 , Figure 3 , Figure 4 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 3 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
[0091] Example 5
[0092] This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of a method for recognizing hot-swappable hard drives.
[0093] The computer device can be a terminal, and its internal structure diagram can be as follows: Figure 6 As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external terminals via a network connection. When executed by the processor, the computer program implements a method for recognizing hot-swappable hard drives. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.
[0094] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:
[0095] Obtain the hard drive and read the hard drive files;
[0096] Identify and read whether there are hot-swappable related system files in the fixed directory of the hard disk in the hard disk file;
[0097] If system files exist, the hard drive is determined to be hot-swappable;
[0098] Set a hot-swappable identifier for hard drives that are determined to be hot-swappable.
[0099] In one implementation, the processor also performs the following steps when executing a computer program:
[0100] The hard drive files are read, transferred to the BIOS, and the BIOS is used to verify whether the hard drive files are safe.
[0101] In one implementation, the processor also performs the following steps when executing a computer program:
[0102] Identify whether the hard drive files contain Trojan programs;
[0103] If not, the hard drive files on the hard drive are determined to be safe, and then it is further determined whether the hard drive is a hot-swappable hard drive;
[0104] If so, the hard drive files on the hard drive are determined to be insecure, and the process ends.
[0105] In one implementation, the processor also performs the following steps when executing a computer program:
[0106] In response to the detection of system files in a fixed directory of the hard disk in the hard disk file, the system files in the fixed directory of the detected hard disk are read in the BIOS. If hot-swap-related system files are read in the fixed directory of the hard disk in the hard disk file, the hard disk is determined to be hot-swappable in the BIOS. If no system files are read, the hard disk is determined to be non-hot-swappable in the BIOS, and the process ends.
[0107] In one implementation, the processor also performs the following steps when executing a computer program:
[0108] In response to the determination in the BIOS that the hard drive is hot-swappable, the model of the hard drive is obtained, and a security test is performed on the hard drive;
[0109] If the hard drive is secure, the model of the hard drive will be marked as hot-swappable in interface module 1; if the hard drive is not secure, the process will end.
[0110] In one implementation, the processor also performs the following steps when executing a computer program:
[0111] When a hard drive is detected to be connected to the interface module 1, a security check is performed on the hard drive;
[0112] If the hard drive is secure, then the hard drive is marked as hot-swappable; if the hard drive is not secure, then the process ends.
[0113] If the hard drive is marked as hot-swappable, then the process reads the hard drive; otherwise, the process ends.
[0114] Example 6
[0115] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, it performs the following steps:
[0116] Obtain the hard drive and read the hard drive files;
[0117] Identify and read whether there are hot-swappable related system files in the fixed directory of the hard disk in the hard disk file;
[0118] If system files exist, the hard drive is determined to be hot-swappable;
[0119] Set a hot-swappable identifier for hard drives that are determined to be hot-swappable.
[0120] The method for identifying hot-swappable hard drives proposed in this application involves connecting the hard drive to be identified via a hard drive interface. The hard drive interface reads the hard drive's hard drive file and transfers it to the BIOS. The BIOS checks the hard drive file for malware. If no malware is found, the BIOS checks for system files in a fixed directory within the hard drive's file. If system files are found, the BIOS continues to check for hot-swappable system files. If hot-swappable system files are found in the fixed directory, the hard drive is identified as hot-swappable. The interface module then performs a security check on the hard drive. If the security check passes, the interface module assigns a hot-swappable identifier to the hard drive. When the hot-swappable hard drive is reconnected to the interface module, the module performs a security check. If the security check passes, the hard drive can then perform normal data transfer with the computer.
[0121] The above settings enable computers equipped with a solid-state drive (SSD) to perform hot-swapping, efficiently and quickly replace the drive, or use the drive for data transfer. This reduces the user's reliance on transmission devices, improves work efficiency, and enhances the security and usability of the hard drive during data transfer.
[0122] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0123] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0124] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A method for identifying hot-swappable hard drives, characterized in that, The method includes: The system acquires the hard drive and reads the hard drive file based on the chip at the hard drive interface, then transfers the hard drive file to the basic input / output system. Based on the hard disk module in the basic input / output system, identify and read whether there are hot-swappable related system files in the fixed directory of the hard disk file; If system files exist, the hard drive is determined to be hot-swappable; Set a hot-swappable identifier for hard drives that are determined to be hot-swappable.
2. The method for identifying hot-swappable hard drives according to claim 1, characterized in that, The process of acquiring the hard drive and reading the hard drive files includes: The hard drive files are read, transferred to the BIOS, and the BIOS is used to verify whether the hard drive files are safe.
3. The method for identifying hot-swappable hard drives according to claim 2, characterized in that, The process of reading the hard drive files, transferring the hard drive files to the BIOS, and verifying the safety of the hard drive files in the BIOS includes: Identify whether the hard drive files contain Trojan programs; If not, the hard drive files on the hard drive are determined to be safe, and then it is further determined whether the hard drive is a hot-swappable hard drive; If so, the hard drive files on the hard drive are determined to be insecure, and the process ends.
4. The method for identifying hot-swappable hard drives according to claim 1, characterized in that, The process of identifying and reading whether hot-swappable related system files exist in a fixed directory on the hard drive includes: The BIOS checks whether system files exist in the fixed directory of the hard drive as listed in the hard drive files; if they exist, proceed to the next step; otherwise, the process ends. In response to the detection of system files in a fixed directory of the hard disk in the hard disk file, the system files in the fixed directory of the detected hard disk are read in the BIOS. If hot-swap-related system files are read in the fixed directory of the hard disk in the hard disk file, the hard disk is determined to be hot-swappable in the BIOS. If no system files are read, the hard disk is determined to be non-hot-swappable in the BIOS, and the process ends.
5. The method for identifying hot-swappable hard drives according to claim 1, characterized in that, The step of setting a hot-swappable flag for hard drives that are determined to be hot-swappable includes: In response to the determination in the BIOS that the hard drive is hot-swappable, the model of the hard drive is obtained, and a security test is performed on the hard drive; If the hard drive is secure, the model of the hard drive will be marked as hot-swappable in the interface module; if the hard drive is not secure, the process will end.
6. The method for identifying hot-swappable hard drives according to claim 5, characterized in that, After the step of setting the hot-swappable identifier for the determined hot-swappable hard drive, the method further includes: When a hard drive is detected to be connected to the interface module, a security check is performed on the hard drive; If the hard drive is secure, then the hard drive is marked as hot-swappable; if the hard drive is not secure, then the process ends. If the hard drive is marked as hot-swappable, and a security check is performed on the hard drive, if the hard drive security check result is secure, then the hard drive is read; if the hard drive security check result is insecure, then the process ends.
7. A system for identifying hot-swappable hard drives, characterized in that, The system includes: The interface module is used to acquire the hard disk and read the hard disk file based on the chip at the hard disk interface, and transfer the hard disk file to the basic input / output system; The BIOS hard disk module is used to identify and read whether there are hot-swap related system files in the fixed directory of the hard disk file based on the hard disk module in the basic input / output system. The hard drive determination module is used to determine whether the hard drive can be hot-swapped. The setting identification module is used to set a hot-swappable identification for hard drives that are determined to be hot-swappable. An identification module is used to identify the hard drive that has been marked as hot-swappable by the insertion interface module.
8. A hot-swappable hard disk system according to claim 7, characterized in that, The BIOS hard disk module includes: The hard disk directory file identification module is used to identify whether there are hot-swap related system files in the fixed directory of the hard disk file; The hard disk directory file reading module is used to read whether there are hot-swap related system files in the fixed directory of the hard disk file.
9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.