CN116305100A - Method, system, computer device and storage medium for identifying hot-plug hard disk - Google Patents

Method, system, computer device and storage medium for identifying hot-plug hard disk Download PDF

Info

Publication number
CN116305100A
CN116305100A CN202310285830.2A CN202310285830A CN116305100A CN 116305100 A CN116305100 A CN 116305100A CN 202310285830 A CN202310285830 A CN 202310285830A CN 116305100 A CN116305100 A CN 116305100A
Authority
CN
China
Prior art keywords
hard disk
hot
file
pluggable
identifying
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310285830.2A
Other languages
Chinese (zh)
Inventor
王长鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202310285830.2A priority Critical patent/CN116305100A/en
Publication of CN116305100A publication Critical patent/CN116305100A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/55Detecting local intrusion or implementing counter-measures
    • G06F21/554Detecting local intrusion or implementing counter-measures involving event detection and direct action
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a method, a system, computer equipment and a storage medium for identifying a hot-plug hard disk, which comprise the steps of obtaining the hard disk and reading a hard disk file of the hard disk; identifying and reading whether a system file which can be hot plugged and pulled is in a fixed directory of a hard disk in the hard disk file; if the system file exists, judging that the hard disk can be hot plugged; and setting a hot-pluggable identifier for the hard disk judged to be hot-pluggable. According to the method, the computer with the solid state disk can be subjected to hot plug operation of the hard disk, the hard disk can be replaced efficiently and rapidly, or the hard disk is used for data transmission, so that dependence of a user on transmission equipment is reduced, the working efficiency is improved, and meanwhile, the safety and the practicability of the hard disk in data transmission can be improved.

Description

Method, system, computer device and storage medium for identifying hot-plug hard disk
Technical Field
The present invention relates to the field of hot plug technology for hard disks, and in particular, to a method, a system, a computer device, and a storage medium for identifying hot plug hard disks.
Background
The method is characterized in that a plurality of computers are required in various industries at present, a plurality of host game users assemble the computers to realize high performance in terms of performance so as to achieve the self-demand, therefore, simplification of the computers becomes one of industry targets, with expansion and promotion of functions of the hard disk, hot plug tests and hot plug scenes of the hard disk are more and more, but at present, hot plug operation of the hard disk on the computer provided with a solid state hard disk cannot be performed, a user can only operate the hard disk after disassembling the computer in a power-down state of the computer, and the user cannot efficiently and quickly replace the hard disk when the computer is powered on, or use the hard disk to perform data transmission, so that dependence of the user on transmission equipment is increased, the operation is more complicated, the work efficiency is greatly reduced, and meanwhile, the safety and the practicability of the data transmission are also lost.
Therefore, it is necessary to provide a method, a system, a computer device and a storage medium for identifying hot-plug hard disks, so that a computer with a solid state disk can perform hot-plug operation of the hard disk, can efficiently and quickly replace the hard disk, or use the hard disk to perform data transmission, reduce the dependence of a user on the transmission device, improve the working efficiency, and also improve the safety and the practicability of the hard disk during data transmission.
Disclosure of Invention
The invention provides a method, a system, computer equipment and a storage medium for identifying a hot-plug hard disk, which can solve the technical problems that a computer provided with a solid state hard disk cannot perform hot-plug operation of the hard disk, can not efficiently and quickly replace the hard disk when the computer is electrified, or use the hard disk to perform data transmission, the dependence of a user on transmission equipment is increased, the operation is more complicated, the working efficiency is greatly reduced, and the safety and the practicability of the data transmission of the hard disk are simultaneously lost.
In order to achieve the above object, the present invention provides a method for identifying a hot-swappable hard disk, comprising:
acquiring a hard disk and reading a hard disk file of the hard disk;
identifying and reading whether a system file which can be hot plugged and pulled is in a fixed directory of a hard disk in the hard disk file;
if the system file exists, judging that the hard disk can be hot plugged;
and setting a hot-pluggable identifier for the hard disk judged to be hot-pluggable.
Further, the obtaining the hard disk and reading the hard disk file of the hard disk include:
and reading the hard disk file of the hard disk, transmitting the hard disk file of the hard disk into the BIOS, and confirming whether the hard disk file of the hard disk is safe or not in the BIOS.
Further, the reading the hard disk file of the hard disk, transferring the hard disk file of the hard disk into the BIOS, and confirming in the BIOS whether the hard disk file of the hard disk is safe or not includes:
identifying whether a Trojan horse program exists in a hard disk file of the hard disk;
if not, judging that the hard disk file of the hard disk is safe, and continuously judging whether the hard disk is a hot plug hard disk or not;
if yes, judging that the hard disk file of the hard disk is unsafe, and ending.
Further, the identifying and reading whether the system file related to hot plug exists under the hard disk fixed directory in the hard disk file includes:
identifying whether a system file exists under a hard disk fixed directory in the hard disk files in the BIOS; if yes, executing the next step; if not, ending;
and in response to the fact that the system files exist under the hard disk fixed directory in the hard disk files, reading the system files existing under the identified hard disk fixed directory in the BIOS, judging that the hard disk can be subjected to hot plug if the system files related to hot plug exist under the hard disk fixed directory in the hard disk files, judging that the hard disk can not be subjected to hot plug in the BIOS if the system files are not read, and ending.
Further, the setting the hot-pluggable identifier for the hard disk that is determined to be hot-pluggable includes:
in response to the fact that the hard disk can be hot plugged in or out in the BIOS, the model of the hard disk is obtained, and safety detection is carried out on the hard disk;
if the hard disk is safe, the model of the hard disk is marked as hot pluggable in an interface module, and if the hard disk is unsafe, the process is finished.
Further, after the step of setting the hot-pluggable identification to the hard disk that is determined to be hot-pluggable, the method further includes:
responding to the condition that a hard disk is accessed to the interface module, and carrying out safety detection on the hard disk;
if the hard disk is safe, the hard disk is provided with a hot-pluggable identifier; if the hard disk is not safe, ending;
if the hard disk is provided with a hot-pluggable identifier, and the hard disk is subjected to safety detection, and if the hard disk safety detection result is safe, the hard disk is read; and if the hard disk safety detection result is unsafe, ending.
In another aspect, there is provided a method of identifying a hot-swappable hard disk system, the system comprising:
the interface module is used for acquiring a hard disk and reading a hard disk file of the hard disk;
the BIOS hard disk module is used for identifying and reading whether a system file related to hot plug exists under a hard disk fixed directory in the hard disk file;
the hard disk judging module is used for judging whether the hard disk can be subjected to hot plug operation or not;
the device comprises a set identification module, a hot-pluggable identification module and a hot-pluggable identification module, wherein the set identification module is used for setting the hot-pluggable identification for the hard disk which is judged to be capable of being hot-pluggable;
and the identification module is used for identifying the hard disk which is inserted into the interface module and is provided with the hot-pluggable identification.
In yet another aspect, a computer device is provided comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the steps of:
acquiring a hard disk and reading a hard disk file of the hard disk;
identifying and reading whether a system file which can be hot plugged and pulled is in a fixed directory of a hard disk in the hard disk file;
if the system file exists, judging that the hard disk can be hot plugged;
and setting a hot-pluggable identifier for the hard disk judged to be hot-pluggable.
In yet another aspect, there is provided a computer-readable storage medium storing a program which, when executed by a processor, causes the processor to perform the steps of:
acquiring a hard disk and reading a hard disk file of the hard disk;
identifying and reading whether a system file which can be hot plugged and pulled is in a fixed directory of a hard disk in the hard disk file;
if the system file exists, judging that the hard disk can be hot plugged;
and setting a hot-pluggable identifier for the hard disk judged to be hot-pluggable.
The method for identifying the hot plug hard disk has the following beneficial effects:
according to the method for identifying the hot plug hard disk, the hard disk interface is connected with the hard disk to be identified, the hard disk interface reads the hard disk file of the hard disk and transmits the hard disk file of the hard disk to the BIOS, whether a Trojan program exists in the hard disk file or not is checked in the BIOS, if the Trojan program does not exist, whether a system file exists under a hard disk fixed catalog in the hard disk file or not is identified in the BIOS, if the system file exists, whether the system file which can be hot plugged exists is continuously read in the BIOS, if the system file which can be hot plugged exists is read under the hard disk fixed catalog in the hard disk file, the hard disk is judged to be the hot plug hard disk, then the interface module can carry out safety detection on the hard disk, and if the safety detection on the hard disk is passed through the interface module, the interface module can set a hot plug identification on the hard disk. When the hard disk provided with the hot-pluggable identifier is accessed to the interface module again, the interface module carries out safety detection on the hard disk, and if the safety detection passes, the interface module can carry out normal data transmission with a computer.
Through the arrangement, the computer with the solid state disk can be subjected to hot plug operation of the hard disk, the hard disk can be replaced efficiently and quickly, or the hard disk is used for data transmission, so that the dependence of a user on transmission equipment is reduced, the working efficiency is improved, and meanwhile, the safety and the practicability of the hard disk in data transmission can be improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is an application environment diagram of a method for identifying a hot-swapped hard disk according to an embodiment of the present application;
FIG. 2 is a method flow chart of a method for identifying hot-swapped hard disk according to an embodiment of the present application;
FIG. 3 is a detailed method flowchart of a method for identifying a hot-swapped hard disk according to an embodiment of the present application;
FIG. 4 is a flowchart of a detailed method for identifying hot-swappable hard disk according to an embodiment of the present application
FIG. 5 is a schematic diagram of a configuration of a hot-swappable hard disk system according to an embodiment of the present disclosure;
fig. 6 is a schematic diagram of a computer device provided in an embodiment of the present application.
Detailed Description
With the objects, technical solutions and advantages of the present application made clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
Example 1
The method for identifying the hot plug hard disk can be applied to an application environment shown in fig. 1. The hard disk at the hard disk interface 101 is connected with the computer 102 through a cable and a motherboard for data connection and transmission. After a user inserts a hard disk which is not identified to be hot-pluggable into a hard disk interface, the hard disk interface reads a hard disk file of the hard disk, the hard disk file of the hard disk is transmitted into a BIOS, whether a Trojan program exists in the hard disk file or not is checked in the BIOS, if the Trojan program does not exist, whether a system file exists under a hard disk fixed catalog in the hard disk file or not is identified in the BIOS, if the system file exists, the hot-pluggable related system file is continuously read in the BIOS, if the hot-pluggable related system file is read under the hard disk fixed catalog in the hard disk file, the hard disk is judged to be the hot-pluggable hard disk, then the hard disk interface 101 carries out safety detection on the hard disk, and if the safety detection on the hard disk is passed through the hard disk interface 101, the hot-pluggable identification is set on the hard disk. When the hard disk provided with the hot-pluggable identifier is accessed to the hard disk interface 101 again, the hard disk interface 101 carries out safety detection on the hard disk, and if the safety detection passes, the hard disk can carry out normal data transmission with a computer. The hard disk interface 101 may be, but not limited to, a hard disk interface of various personal computers, notebook computers, smartphones, tablet computers and portable wearable devices, and the computer 102 may be implemented by a stand-alone computer or a computer cluster composed of a plurality of computers.
According to the method for identifying the hot plug hard disk, a user inserts the hard disk into a hard disk interface, acquires the hard disk and reads the hard disk file of the hard disk; identifying and reading whether a system file which can be hot plugged and pulled is in a fixed directory of a hard disk in the hard disk file; if the system file exists, judging that the hard disk can be hot plugged; and setting a hot-pluggable identifier for the hard disk judged to be hot-pluggable.
In one embodiment, as shown in fig. 2 and 5, a method for identifying a hot-swapped hard disk is provided, which includes the following steps S1-S4:
s1, obtaining a hard disk and reading a hard disk file of the hard disk.
In the embodiment of the invention, a user inserts a new hard disk which is not provided with a hot-pluggable identifier into a hard disk interface, the hard disk interface is connected with a computer main board through a cable, the computer is a computer which is only provided with a fixed hard disk, a chip at the hard disk interface can acquire hard disk files in the hard disk, the hard disk files in the hard disk comprise music files, picture files, video files, theme files, archive files, upgrade files and system files, wherein the system files comprise hot-pluggable supporting system files, and when the hard disk files in the hard disk exist and can read the hot-pluggable related system files, the hard disk is indicated to support hot-pluggable operation on the computer.
And S2, identifying and reading whether a system file which can be subjected to hot plug and pull is in the fixed directory of the hard disk in the hard disk file. Wherein the system file is preferably an OS file.
In the embodiment of the invention, after a user inserts a hard disk which is not provided with a hot-pluggable identifier into a hard disk interface, a chip at the hard disk interface can acquire a hard disk file in the hard disk and transmit hard disk file information in the hard disk to a BIOS (basic input/output system), in the BIOS, a BIOS hard disk module 2 can identify whether a system file exists in a hard disk fixed directory of the hard disk file, and then whether the system file which is related to hot plug and is in the hard disk fixed directory can be read is judged. If both can get the determined result, the BIOS system gives the determination result of the BIOS hard disk module 2.
And S3, if the system file exists, judging that the hard disk can be hot plugged.
In the embodiment of the invention, in the BIOS system, the BIOS hard disk module 2 can identify whether a system file exists under a hard disk fixed catalog in the hard disk files, and can also read the system file related to hot plug under the hard disk fixed catalog, only if the system file exists under the hard disk fixed catalog and can also read the system file related to hot plug under the hard disk fixed catalog, the judging result of the BIOS hard disk module 2 is that the hard disk which is not set with the hot plug identifier can be set as the hard disk with the hot plug identifier.
S4: and setting a hot-pluggable identifier for the hard disk judged to be hot-pluggable.
In the embodiment of the invention, after the determination result of the BIOS hard disk module 2 is that the hard disk not set with the hot-pluggable identifier is set as the hard disk with the hot-pluggable identifier, the BIOS hard disk module 2 sends information that the hard disk not set with the hot-pluggable identifier is set as the hard disk with the hot-pluggable identifier to the interface module 1 at the hard disk interface, and a chip in the interface module 1 obtains the model of the hard disk at the hard disk interface, namely, the hard disk not set with the hot-pluggable identifier is set as the hard disk with the hot-pluggable identifier, and the identifier is marked.
In the method for identifying the hot-plug hard disk, the technical characteristics are combined to carry out reasonable deduction, so that the technical problem in the background technology can be solved.
Example 2
Embodiment 2 includes the features of the foregoing embodiment, as shown in fig. 3, in this embodiment, a method for identifying a hot-swappable hard disk is provided, including: step 100: reading the hard disk file of the hard disk, and transmitting the hard disk file of the hard disk into the BIOS, wherein the step 200 is as follows: and confirming whether the hard disk file of the hard disk is safe or not in the BIOS.
It can be understood that in the embodiment of the invention, after the user inserts the hard disk which is not provided with the hot-pluggable identifier into the hard disk interface, the chip at the hard disk interface can acquire the hard disk file in the hard disk and transmit the hard disk file information in the hard disk to the BIOS system, in the BIOS system, the user can manually confirm the security of the hard disk to be identified at the BIOS interface first, i.e. manually confirm whether the hard disk file in the hard disk has a virus or Trojan program and the like which jeopardize the program of the hard disk to be identified at the BIOS interface, so as to ensure the security of the hard disk to be identified.
The embodiment of the invention provides a method for identifying a hot-plug hard disk, which comprises the following steps: identifying whether a Trojan horse program exists in a hard disk file of the hard disk; if not, judging that the hard disk file of the hard disk is safe, and continuously judging whether the hard disk is a hot plug hard disk or not; if yes, judging that the hard disk file of the hard disk is unsafe, and ending.
It may be understood that in the embodiment of the present invention, after a user inserts a hard disk that is not provided with a hot-pluggable identifier into a hard disk interface, a chip at the hard disk interface may obtain a hard disk file in the hard disk and transmit information of the hard disk file in the hard disk to a BIOS system, in the BIOS system, the user may manually confirm the security of the hard disk at the BIOS interface first, and the security factor includes a program that damages the hard disk to be identified, such as a virus or a Trojan program, and if the program that damages the hard disk to be identified does not exist, the BIOS system may determine that the hard disk file of the hard disk is secure, and continue to determine whether the hard disk is a program that can be hot-pluggable, and if the hard disk to be identified is not secure, the program that determines that the hard disk to be identified is a hard disk that can be hot-pluggable identifier is terminated.
The embodiment of the invention provides a method for identifying a hot-plug hard disk, which comprises the following steps: step 300: identifying whether a system file exists under a hard disk fixed directory in the hard disk files in the BIOS; if yes, executing the next step; if not, ending; step 400: and in response to the fact that the system files exist under the hard disk fixed directory in the hard disk files, reading the system files existing under the identified hard disk fixed directory in the BIOS, judging that the hard disk can be subjected to hot plug if the system files related to hot plug exist under the hard disk fixed directory in the hard disk files, judging that the hard disk can not be subjected to hot plug in the BIOS if the system files are not read, and ending.
It can be understood that, in the embodiment of the present invention, after a user inserts a hard disk that is not provided with a hot-pluggable identifier into a hard disk interface, in a BIOS system, after the user first manually confirms the security of the hard disk at the BIOS interface, the BIOS hard disk module 2 in the BIOS system first identifies whether a system file exists under a hard disk fixed directory in a hard disk file, that is, determines whether a complete system file exists under the hard disk fixed directory in the hard disk file, where the identified system file includes an identifier file of arch, block, crypto, documentation, kernel, drivers, include, cfg suffix, etc., and if the identified system file exists under the hard disk fixed directory in the hard disk file, determines that the next reading operation can be executed, and if the system file exists under the hard disk fixed directory in the hard disk file is not identified, determines that the program for identifying the hot-pluggable hard disk is terminated. After determining that the next reading operation can be performed, the BIOS hard disk module 2 reads a system file related to hot plug under a hard disk fixed directory in the hard disk files, where the read system file related to hot plug includes an identification file with a cfg suffix, if the system file related to hot plug is read under the hard disk fixed directory, the hard disk not set with the hot plug identifier is determined to be a hot plug hard disk, and if the system file related to hot plug is not read under the hard disk fixed directory, it is determined to end the procedure of identifying the hot plug hard disk.
The embodiment of the invention provides a method for identifying a hot-plug hard disk, which comprises the following steps: step 500: in response to the fact that the hard disk can be hot plugged in or out in the BIOS, the model of the hard disk is obtained, and safety detection is carried out on the hard disk; step 600: if the hard disk is safe, the model of the hard disk is marked as hot pluggable in an interface module, and if the hard disk is unsafe, the process is finished.
It can be understood that, referring to fig. 5, in the embodiment of the present invention, the BIOS hard disk module 2 has a system file in the hard disk file identified as the hard disk, and has a system file related to hot plug under the hard disk fixed directory in the hard disk file readable as the hard disk, and the BIOS hard disk module 2 determines that the hard disk not set with the hot plug identifier is the hot plug hard disk. After the BIOS hard disk module 2 determines that the hard disk not provided with the hot-pluggable identifier is a hot-pluggable hard disk, the BIOS hard disk module 2 transmits information capable of being provided with the hot-pluggable identifier to the interface module 1 at the hard disk interface, at this time, the interface module 1 obtains the model of the hard disk determined to be capable of being provided with the hot-pluggable identifier, and performs security detection on the hard disk provided with the hot-pluggable identifier.
Referring to fig. 5, if the chip at the interface module 1 is safe to the hard disk that is determined to be able to set the hot plug identifier, the chip at the interface module 1 at the hard disk interface sets the hot plug identifier to the hard disk that is determined to be able to set the hot plug identifier, and if the chip at the interface module 1 is unsafe to the hard disk that is determined to be able to set the hot plug identifier, the program for setting the hot plug identifier to the hard disk that is determined to be able to set the hot plug identifier is terminated.
Example 3
As shown in fig. 4 and 5, an embodiment of the present invention provides a method for identifying a hot-swappable hard disk, including: step 700: if the hard disk is provided with a hot-pluggable identifier, and the hard disk is subjected to safety detection, and if the hard disk safety detection result is safe, the hard disk is read; and if the hard disk safety detection result is unsafe, ending.
In practical application, the used hard disk provided with the hot-pluggable identifier is the hot-pluggable hard disk provided with the method for identifying the hot-pluggable hard disk, and the hot-pluggable identifier is arranged on the hard disk to indicate that the hard disk can be subjected to hot-pluggable operation in a computer. When a user uses the hard disk provided with the hot-pluggable identification, after the user inserts the hot-pluggable hard disk into the interface module 1 at the interface of the hard disk, a chip in the interface module 1 can perform safety detection on the hot-pluggable hard disk, detect whether the hard disk provided with the hot-pluggable identification has factors of viruses, trojan programs and other factors which harm the hard disk or the terminals such as computers, if the safety detection of the chip of the interface module 1 does not find the factors of viruses, trojan programs and other factors which harm the hard disk or the terminals such as computers, the hard disk provided with the hot-pluggable identification can perform data transmission or other operations with the terminals such as computers, and if the safety detection of the chip of the interface module 1 finds the factors of viruses, trojan programs and other factors which harm the hard disk or the terminals such as computers, the hard disk provided with the hot-pluggable identification stops performing data transmission or other operations with the terminals such as computers.
Example 4
The present embodiment includes the features of the foregoing embodiment, and in this embodiment, a system for identifying a hot-swappable hard disk is provided, as shown in fig. 5, where the system includes: the device comprises an interface module 1, a BIOS hard disk module 2, a judging hard disk module 3, a setting identification module 4 and an identification module 5.
The interface module 1 is used for acquiring a hard disk and reading a hard disk file of the hard disk; the BIOS hard disk module 2 is used for identifying and reading whether a system file related to hot plug exists under a hard disk fixed directory in the hard disk file; the hard disk judging module 3 is used for judging whether the hard disk can be subjected to hot plug operation or not; the setting identification module 4 is used for setting a hot-pluggable identification for the hard disk which is judged to be hot-pluggable; the identification module 5 is used for identifying the hard disk which is inserted into the interface module 1 and is provided with the hot-pluggable identification.
The above embodiments merely describe the structural relationship and composition of each unit module, and in practical application, the execution method of each unit module is referred to the method shown in fig. 3, which is not repeated herein.
In the embodiment of the invention, the interface module 1 is connected with the hard disk to be identified and is used for acquiring the hard disk and reading the hard disk file of the hard disk, meanwhile, the chip in the interface module 1 can carry out security detection on the hard disk which is judged to be capable of carrying out hot plug, if the hard disk which is not judged to be capable of setting the hot plug identification is detected to be safe, no factors which harm the hard disk or a computer and the like, such as viruses, trojan programs and the like, are found, the hard disk which is not judged to be capable of setting the hot plug identification can be provided with the hot plug identification, and if the hard disk which is judged to be capable of carrying out hot plug is detected to be safe, no factors which harm the hard disk or the computer and the like, such as viruses, trojan programs and the like, are found, the hard disk which is set with the hot plug identification can carry out data transmission with the terminal such as the computer.
The BIOS hard disk module 2 is configured such that after a user inserts a hard disk that is not provided with a hot-pluggable identifier into a hard disk interface, a chip of the interface module 1 at the hard disk interface can obtain a hard disk file in the hard disk, and transmit hard disk file information in the hard disk to the BIOS system, the BIOS system manually confirms and detects whether the hard disk that is not provided with the hot-pluggable identifier has viruses, trojan programs, and other factors that damage the hard disk or a terminal such as a computer, and after the manually confirms that the security detection result is safe, the BIOS hard disk module 2 identifies and reads the hard disk that is not provided with the hot-pluggable identifier, and identifies whether a system file exists in a hard disk fixed directory in the hard disk file, and reads whether the system file related to hot plug is read under a hard disk fixed directory in the hard disk file.
The hard disk module 3 is configured to determine that a next reading operation can be performed when a system file exists under a hard disk fixed directory in the hard disk files, and determine that a program for identifying a hot-swapped hard disk is terminated when a system file exists under a hard disk fixed directory in the hard disk files. After determining that the next reading operation can be performed, the BIOS hard disk module 2 reads whether a system file related to hot plug exists under a hard disk fixed directory in the hard disk files, if the system file related to hot plug is read under the hard disk fixed directory, the hard disk not provided with the hot plug flag is determined to be a hot plug hard disk, and if the system file related to hot plug is not read under the hard disk fixed directory, the program for identifying the hot plug hard disk is determined to be ended.
The set identifier module 4 is configured such that, after the hard disk module determines that the hard disk not provided with the hot-pluggable identifier is a hard disk capable of being provided with the hot-pluggable identifier, the BIOS hard disk module 2 transmits information of the hard disk not provided with the hot-pluggable identifier to the chip of the interface module 1, the set identifier module 4 is arranged on the chip, and after the set identifier module 4 receives the hard disk not provided with the hot-pluggable identifier, the chip of the interface module 1 performs security detection on the hard disk determined to be capable of being provided with the hot-pluggable identifier, and the chip manually confirms that a user identifies a factor damaging the hard disk such as a virus or a Trojan program, and thus the possibility of omission cannot be eliminated, so that the chip at the interface module 1 performs security detection on the hard disk determined to be capable of being provided with the hot-pluggable identifier, the security detection is program logic detection, and the security detection is dependent on whether the hard disk determined to be capable of being provided with the hot-pluggable identifier is a factor of a terminal such as a virus or a Trojan program. If the chip at the interface module 1 is safe to the hard disk judged to be capable of setting the hot plug identifier, the chip at the interface module 1 at the hard disk interface sets the hot plug identifier to the hard disk judged to be capable of setting the hot plug identifier, and if the chip at the interface module 1 is unsafe to the hard disk judged to be capable of setting the hot plug identifier, the program for setting the hot plug identifier to the hard disk judged to be capable of setting the hot plug identifier is ended.
The identification module 5 is a factor that the security detection of the chip of the interface module 1 does not find the virus, the Trojan horse program and other factors that harm the hard disk or the computer and other terminals, the hard disk provided with the hot-pluggable identification can perform data transmission or other operations with the computer and other terminals, and if the security detection of the chip of the interface module 1 finds the virus, the Trojan horse program and other factors that harm the hard disk or the computer and other terminals, the hard disk provided with the hot-pluggable identification stops performing data transmission or other operations with the computer and other terminals.
The BIOS hard disk module 2 comprises a hard disk directory file identification module and a hard disk directory file reading module, wherein the hard disk directory file identification module is used for identifying whether a system file exists under a hard disk fixed directory in the hard disk files; and the hard disk directory file reading module is used for reading whether a system file related to hot plug exists under the hard disk fixed directory in the hard disk file. The hard disk directory file identification module identifies whether a system file exists in a hard disk fixed directory in hard disk files of a hard disk after a user confirms that a security detection result is secure by a manual operation of the BIOS system, if the system file exists in the hard disk fixed directory of the hard disk file, the hard disk directory file identification module enters the hard disk judgment module 3 to judge that a next hard disk directory file reading program can be executed, if the system file does not exist, the hard disk directory file identification module enters the hard disk judgment module 3 to judge that the program for identifying the hot-plug hard disk is ended. The hard disk directory file reading module is used for reading the identified system files after a user confirms that the security detection result is secure by personnel in the BIOS system and identifies the system files under the hard disk fixed directory in the hard disk files of the hard disk, if the system files related to hot plug are read, the hard disk directory file reading module enters the judging hard disk module 3 and judges that the hot plug-capable identification can be set for the hard disk which is not provided with the hot plug-capable identification, and if the system files related to hot plug are not read, the hard disk directory file reading module enters the judging hard disk module 3 and judges that the hot plug-capable identification cannot be set for the hard disk which is not provided with the hot plug-capable identification, and the program for identifying the hot plug hard disk is ended.
Specific limitations regarding identifying hot-swappable hard disk systems may be found in the limitations of the methods above, and are not described in detail herein. The above-mentioned identification of each module in the hot-swappable hard disk system may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
It should be understood that, although the steps in the flowcharts of fig. 2, 3, and 4 are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in fig. 3 may include multiple sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor do the order in which the sub-steps or stages are performed necessarily performed in sequence, but may be performed alternately or alternately with at least a portion of the sub-steps or stages of other steps or other steps.
Example 5
The embodiment provides a computer device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the steps of the method for identifying the hot plug hard disk when executing the computer program.
The computer device may be a terminal, and its internal structure may be as shown in fig. 6. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program, when executed by a processor, implements a method of identifying hot-swapped hard disks. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be keys, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
In one embodiment, a computer device is provided that includes a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
acquiring a hard disk and reading a hard disk file of the hard disk;
identifying and reading whether a system file which can be hot plugged and pulled is in a fixed directory of a hard disk in the hard disk file;
if the system file exists, judging that the hard disk can be hot plugged;
and setting a hot-pluggable identifier for the hard disk judged to be hot-pluggable.
In one embodiment, the processor when executing the computer program further performs the steps of:
and reading the hard disk file of the hard disk, transmitting the hard disk file of the hard disk into the BIOS, and confirming whether the hard disk file of the hard disk is safe or not in the BIOS.
In one embodiment, the processor when executing the computer program further performs the steps of:
identifying whether a Trojan horse program exists in a hard disk file of the hard disk;
if not, judging that the hard disk file of the hard disk is safe, and continuously judging whether the hard disk is a hot plug hard disk or not;
if yes, judging that the hard disk file of the hard disk is unsafe, and ending.
In one embodiment, the processor when executing the computer program further performs the steps of:
and in response to the fact that the system files exist under the hard disk fixed directory in the hard disk files, reading the system files existing under the identified hard disk fixed directory in the BIOS, judging that the hard disk can be subjected to hot plug if the system files related to hot plug exist under the hard disk fixed directory in the hard disk files, judging that the hard disk can not be subjected to hot plug in the BIOS if the system files are not read, and ending.
In one embodiment, the processor when executing the computer program further performs the steps of:
in response to the fact that the hard disk can be hot plugged in or out in the BIOS, the model of the hard disk is obtained, and safety detection is carried out on the hard disk;
if the hard disk is safe, the model of the hard disk is marked as hot pluggable in the interface module 1, and if the hard disk is unsafe, the process is finished.
In one embodiment, the processor when executing the computer program further performs the steps of:
in response to obtaining that a hard disk is accessed to the interface module 1, carrying out security detection on the hard disk;
if the hard disk is safe, the hard disk is provided with a hot-pluggable identifier; if the hard disk is not safe, ending;
if the hard disk is provided with a hot-pluggable identifier, the hard disk is read; and if the hard disk is not provided with the hot-pluggable identifier, ending.
Example 6
The present embodiment provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of:
acquiring a hard disk and reading a hard disk file of the hard disk;
identifying and reading whether a system file which can be hot plugged and pulled is in a fixed directory of a hard disk in the hard disk file;
if the system file exists, judging that the hard disk can be hot plugged;
and setting a hot-pluggable identifier for the hard disk judged to be hot-pluggable.
According to the method for identifying the hot plug hard disk, the hard disk interface is connected with the hard disk to be identified, the hard disk interface reads the hard disk file of the hard disk and transmits the hard disk file of the hard disk to the BIOS, whether a Trojan program exists in the hard disk file or not is checked in the BIOS, if the Trojan program does not exist, whether a system file exists under a hard disk fixed catalog in the hard disk file or not is identified in the BIOS, if the system file exists, whether the system file which can be hot plugged exists is continuously read in the BIOS, if the system file which can be hot plugged exists is read under the hard disk fixed catalog in the hard disk file, the hard disk is judged to be the hot plug hard disk, then the interface module can carry out safety detection on the hard disk, and if the safety detection on the hard disk is passed through the interface module, the interface module can set a hot plug identification on the hard disk. When the hard disk provided with the hot-pluggable identifier is accessed to the interface module again, the interface module carries out safety detection on the hard disk, and if the safety detection passes, the interface module can carry out normal data transmission with a computer.
Through the arrangement, the computer with the solid state disk can be subjected to hot plug operation of the hard disk, the hard disk can be replaced efficiently and quickly, or the hard disk is used for data transmission, so that the dependence of a user on transmission equipment is reduced, the working efficiency is improved, and meanwhile, the safety and the practicability of the hard disk in data transmission can be improved.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the various embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile 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 a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples merely represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the invention. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application is to be determined by the claims appended hereto.

Claims (10)

1. A method of identifying a hot-swappable hard disk, the method comprising:
acquiring a hard disk and reading a hard disk file of the hard disk;
identifying and reading whether a system file which can be hot plugged and pulled is in a fixed directory of a hard disk in the hard disk file;
if the system file exists, judging that the hard disk can be hot plugged;
and setting a hot-pluggable identifier for the hard disk judged to be hot-pluggable.
2. The method of claim 1, wherein the obtaining a hard disk and reading a hard disk file of the hard disk comprises:
and reading the hard disk file of the hard disk, transmitting the hard disk file of the hard disk into the BIOS, and confirming whether the hard disk file of the hard disk is safe or not in the BIOS.
3. The method for identifying a hot-swappable hard disk according to claim 2, wherein the reading the hard disk file of the hard disk, transferring the hard disk file of the hard disk into the BIOS, and confirming in the BIOS whether the hard disk file of the hard disk is secure comprises:
identifying whether a Trojan horse program exists in a hard disk file of the hard disk;
if not, judging that the hard disk file of the hard disk is safe, and continuously judging whether the hard disk is a hot plug hard disk or not;
if yes, judging that the hard disk file of the hard disk is unsafe, and ending.
4. The method for identifying a hot-swappable hard disk according to claim 1, wherein identifying and reading whether a hot-swappable related system file exists under a hard disk fixed directory in the hard disk file comprises:
identifying whether a system file exists under a hard disk fixed directory in the hard disk files in the BIOS; if yes, executing the next step; if not, ending;
and in response to the fact that the system files exist under the hard disk fixed directory in the hard disk files, reading the system files existing under the identified hard disk fixed directory in the BIOS, judging that the hard disk can be subjected to hot plug if the system files related to hot plug exist under the hard disk fixed directory in the hard disk files, judging that the hard disk can not be subjected to hot plug in the BIOS if the system files are not read, and ending.
5. The method for identifying a hot-swappable hard disk according to claim 1, wherein the setting a hot-swappable identification for the hard disk determined to be hot-swappable comprises:
in response to the fact that the hard disk can be hot plugged in or out in the BIOS, the model of the hard disk is obtained, and safety detection is carried out on the hard disk;
if the hard disk is safe, the model of the hard disk is marked as hot pluggable in an interface module, and if the hard disk is unsafe, the process is finished.
6. The method for identifying a hot-swappable hard disk as in claim 5, further comprising, after the step of setting a hot-swappable identification for the hard disk determined to be hot-swappable:
responding to the condition that a hard disk is accessed to the interface module, and carrying out safety detection on the hard disk;
if the hard disk is safe, the hard disk is provided with a hot-pluggable identifier; if the hard disk is not safe, ending;
if the hard disk is provided with a hot-pluggable identifier, and the hard disk is subjected to safety detection, and if the hard disk safety detection result is safe, the hard disk is read; and if the hard disk safety detection result is unsafe, ending.
7. A system for identifying hot-swappable hard disk, the system comprising:
the interface module is used for acquiring a hard disk and reading a hard disk file of the hard disk;
the BIOS hard disk module is used for identifying and reading whether a system file related to hot plug exists under a hard disk fixed directory in the hard disk file;
the hard disk judging module is used for judging whether the hard disk can be subjected to hot plug operation or not;
the device comprises a set identification module, a hot-pluggable identification module and a hot-pluggable identification module, wherein the set identification module is used for setting the hot-pluggable identification for the hard disk which is judged to be capable of being hot-pluggable;
and the identification module is used for identifying the hard disk which is inserted into the interface module and is provided with the hot-pluggable identification.
8. The hot-swappable hard disk system of claim 7, wherein said BIOS hard disk module comprises:
the hard disk directory file identification module is used for identifying whether a system file related to hot plug exists under a hard disk fixed directory in the hard disk file;
and the hard disk directory file reading module is used for reading whether a system file related to hot plug exists under the hard disk fixed directory in the hard disk file.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any one of claims 1 to 6 when the computer program is executed by the processor.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
CN202310285830.2A 2023-03-22 2023-03-22 Method, system, computer device and storage medium for identifying hot-plug hard disk Pending CN116305100A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310285830.2A CN116305100A (en) 2023-03-22 2023-03-22 Method, system, computer device and storage medium for identifying hot-plug hard disk

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310285830.2A CN116305100A (en) 2023-03-22 2023-03-22 Method, system, computer device and storage medium for identifying hot-plug hard disk

Publications (1)

Publication Number Publication Date
CN116305100A true CN116305100A (en) 2023-06-23

Family

ID=86822008

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310285830.2A Pending CN116305100A (en) 2023-03-22 2023-03-22 Method, system, computer device and storage medium for identifying hot-plug hard disk

Country Status (1)

Country Link
CN (1) CN116305100A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117591458A (en) * 2024-01-18 2024-02-23 四川惟芯科技有限公司 Hot plug management system and method for solid state disk

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117591458A (en) * 2024-01-18 2024-02-23 四川惟芯科技有限公司 Hot plug management system and method for solid state disk
CN117591458B (en) * 2024-01-18 2024-04-09 四川惟芯科技有限公司 Hot plug management system and method for solid state disk

Similar Documents

Publication Publication Date Title
US9239725B2 (en) System and method for installing an OS via a network card supporting PXE
US9448889B2 (en) BIOS failover update with service processor
US9448808B2 (en) BIOS update with service processor without serial peripheral interface (SPI) access
US9529750B2 (en) Service processor (SP) initiated data transaction with bios utilizing interrupt
US20160314002A1 (en) Caching unified extensible firmware interface (uefi) and/or other firmware instructions in a non-volatile memory of an information handling system (ihs)
US9529410B2 (en) Service processor (SP) initiated data transaction with BIOS utilizing power off commands
US20130138934A1 (en) Loading configuration information
CN110753084B (en) Uplink data reading method, cache server and computer readable storage medium
CN116305100A (en) Method, system, computer device and storage medium for identifying hot-plug hard disk
US10514972B2 (en) Embedding forensic and triage data in memory dumps
CN102890634B (en) The method of the operating system of terminal device and startup terminal device
TW201423596A (en) Pinning boot data for faster boot
US20090013167A1 (en) Computer device, method for booting the same, and booting module for the same
CN112667246A (en) Application function extension method and device and electronic equipment
US11366800B2 (en) System and method to automate validating media redirection in testing process
US9946552B2 (en) System and method for detecting redundant array of independent disks (RAID) controller state from baseboard management controller (BMC)
EP2869189A1 (en) Boot up of a multiprocessor computer
CN114579055A (en) Disk storage method, device, equipment and medium
US10242191B2 (en) Dynamically-loaded code analysis device, dynamically-loaded code analysis method, and dynamically-loaded code analysis program
CN108009039B (en) Terminal information recording method, device, storage medium and electronic equipment
US20130086371A1 (en) Method for device-less option-rom bios load and execution
WO2020113469A1 (en) Power on self test method, power on self test device and mobile terminal
CN111953753B (en) Communication device connection method, device, computer device and storage medium
CN113778485A (en) System operation method and device of electronic chip, electronic chip and storage medium
CN110908725B (en) Application program starting method and device, electronic equipment and readable medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination