CN110928814A - Method and device for detecting transmission abnormality of serial hard disk and electronic equipment - Google Patents
Method and device for detecting transmission abnormality of serial hard disk and electronic equipment Download PDFInfo
- Publication number
- CN110928814A CN110928814A CN201911144451.1A CN201911144451A CN110928814A CN 110928814 A CN110928814 A CN 110928814A CN 201911144451 A CN201911144451 A CN 201911144451A CN 110928814 A CN110928814 A CN 110928814A
- Authority
- CN
- China
- Prior art keywords
- hard disk
- serial
- disk
- transmission mode
- serial hard
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/14—Handling requests for interconnection or transfer
- G06F13/16—Handling requests for interconnection or transfer for access to memory bus
- G06F13/1668—Details of memory controller
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4282—Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The application provides a method and a device for detecting transmission abnormity of a serial port hard disk and electronic equipment, and belongs to the technical field of computer application. Wherein, the method comprises the following steps: when a disk detection request is obtained, calling a system equipment interface of equipment where the equipment is located, and obtaining a serial port hard disk identifier currently mounted on the equipment; acquiring self-monitoring analysis and report technical data of each serial hard disk according to the identification of each serial hard disk, wherein the self-monitoring analysis and report technical data comprise the current transmission mode and the highest transmission mode of each serial hard disk; judging whether the current transmission mode of each serial port hard disk is matched with the highest transmission mode; and if the current transmission mode of the first serial port hard disk is not matched with the highest transmission mode, determining that the interface connection of the first serial port hard disk is abnormal. Therefore, the abnormal connection of the serial hard disk can be automatically detected by the method for detecting the abnormal transmission of the serial hard disk.
Description
Technical Field
The application relates to the technical field of computer application, in particular to a method and a device for detecting transmission abnormality of a serial port hard disk and electronic equipment.
Background
The hard disk interface is a connecting component between the hard disk and the host system and is used for transmitting data between the hard disk cache and the host memory. Different hard disk interfaces determine the data transfer speed between the hard disk and the computer. Serial Advanced Technology Attachment (SATA) interfaces are used to support the connection between a Serial hard disk (SATA) and a host system, and are used to transmit data in a Serial manner.
In the related art, the SATA interface on the host is not obviously different from other interfaces, so that a user cannot identify a correct SATA interface when connecting to a SATA hard disk, and the problem of abnormal connection of the SATA hard disk is likely to occur.
Disclosure of Invention
The method, the device and the electronic equipment for detecting the transmission abnormality of the serial hard disk are used for solving the problem that in the related technology, due to the fact that the SATA interface on a host is not obviously different from other interfaces, a user cannot identify the correct SATA interface when connecting the SATA hard disk, and the SATA hard disk is easy to be abnormally connected.
An embodiment of the application provides a method for detecting transmission abnormality of a serial hard disk, including: when a disk detection request is obtained, calling a system equipment interface of equipment where the equipment is located, and obtaining a serial port hard disk identifier currently mounted on the equipment; acquiring self-monitoring analysis and report technical data of each serial hard disk according to the identification of each serial hard disk, wherein the self-monitoring analysis and report technical data comprise the current transmission mode and the highest transmission mode of each serial hard disk; judging whether the current transmission mode of each serial port hard disk is matched with the highest transmission mode; and if the current transmission mode of the first serial port hard disk is not matched with the highest transmission mode, determining that the interface connection of the first serial port hard disk is abnormal.
Optionally, in a possible implementation form of the embodiment of the first aspect, the obtaining the serial hard disk identifier currently mounted on the device includes:
acquiring information of each disk currently mounted by the equipment, wherein the disk information comprises disk identification and classification information;
judging whether each disk is a serial hard disk or not according to the classification information in each disk information;
and if the second disk is a serial hard disk, acquiring the identifier of the second disk.
Optionally, in another possible implementation form of the embodiment of the first aspect, the disk identifier includes a disk capacity, a name, and/or a disk identifier.
Optionally, in another possible implementation form of the embodiment of the first aspect, after the obtaining the technical data of self-monitoring analysis and report of each serial hard disk, the method further includes:
filling the self-monitoring analysis and report technical data into a preset identification equipment data structure;
and acquiring the current transmission mode and the highest transmission mode of the serial hard disk from the preset identification equipment data structure according to the content identification corresponding to each part of the preset identification equipment data structure.
Optionally, in another possible implementation form of the embodiment of the first aspect, after determining that the interface connection of the first serial hard disk is abnormal, the method further includes:
and displaying early warning information of abnormal connection of the first serial port hard disk interface in a display interface of the equipment.
The device for detecting the transmission abnormality of the serial hard disk provided by the embodiment of the application on the other hand comprises: the device comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for calling a system device interface of the device to acquire a serial hard disk identifier currently mounted on the device when a disk detection request is acquired; the second acquisition module is used for acquiring self-monitoring analysis and report technical data of each serial hard disk according to the identifier of each serial hard disk, wherein the self-monitoring analysis and report technical data comprise the current transmission mode and the highest transmission mode of each serial hard disk; the judging module is used for judging whether the current transmission mode of each serial port hard disk is matched with the highest transmission mode; the determining module is used for determining that the interface connection of the first serial port hard disk is abnormal if the current transmission mode of the first serial port hard disk is not matched with the highest transmission mode.
Optionally, in a possible implementation form of the embodiment of the second aspect, the first obtaining module is specifically configured to:
acquiring information of each disk currently mounted by the equipment, wherein the disk information comprises disk identification and classification information;
judging whether each disk is a serial hard disk or not according to the classification information in each disk information;
and if the second disk is a serial hard disk, acquiring the identifier of the second disk.
Optionally, in another possible implementation form of the embodiment of the second aspect, the disk identifier includes a disk capacity, a name, and/or a disk identifier.
Optionally, in another possible implementation form of the embodiment of the second aspect, the apparatus further includes:
the filling module is used for filling the self-monitoring analysis and report technical data into a preset identification equipment data structure;
and the third obtaining module is used for obtaining the current transmission mode and the highest transmission mode of the serial hard disk from the preset identification equipment data structure according to the content identification corresponding to each part of the preset identification equipment data structure.
Optionally, in another possible implementation form of the embodiment of the second aspect, the apparatus further includes:
and the display module is used for displaying the early warning information of the abnormal connection of the first serial port hard disk interface in a display interface of the equipment.
An embodiment of another aspect of the present application provides an electronic device, which includes: the device comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, and is characterized in that the processor realizes the method for detecting the transmission abnormity of the serial hard disk when executing the program.
In another aspect of the present application, a computer-readable storage medium is provided, on which a computer program is stored, where the computer program is executed by a processor to implement the method for detecting a transmission abnormality of a serial hard disk as described above.
In another aspect of the present application, a computer program is provided, and when the computer program is executed by a processor, the method for detecting a transmission abnormality of a serial hard disk according to the embodiment of the present application is implemented.
According to the serial hard disk transmission abnormity detection method, the serial hard disk transmission abnormity detection device, the electronic equipment, the computer readable storage medium and the computer program, when the disk detection request is obtained, the system equipment interface of the equipment where the serial hard disk is located is called, the serial hard disk identifier of the equipment currently mounted is obtained, and the self-monitoring analysis and report technical data of each serial hard disk is obtained according to the identifier of each serial hard disk, wherein the self-monitoring analysis and report technical data comprise the current transmission mode and the highest transmission mode of each serial hard disk, and therefore when a first serial hard disk with the current transmission mode not matched with the highest transmission mode exists, the interface connection abnormity of the first serial hard disk is determined. Therefore, the abnormal serial hard disk of the interface connection is determined by judging whether the current transmission mode of each serial hard disk is matched with the highest transmission mode according to the acquired self-monitoring analysis and report technical data of each serial hard disk, so that the abnormal connection of the serial hard disk is automatically detected.
Additional aspects and advantages of the present application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the present application.
Drawings
The foregoing and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a schematic flow chart of a method for detecting a transmission abnormality of a serial hard disk according to an embodiment of the present application;
fig. 2 is a schematic flowchart of another method for detecting abnormal transmission of a serial hard disk according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a serial hard disk transmission abnormality detection apparatus according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to the embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the like or similar elements throughout. The embodiments described below with reference to the drawings are exemplary and intended to be used for explaining the present application and should not be construed as limiting the present application.
The embodiment of the application aims at the problems that in the related technology, as the SATA interface on the host is not obviously different from other interfaces, when a user is connected with the SATA hard disk, the correct SATA interface cannot be identified, and the SATA hard disk is easy to be abnormally connected, and provides a serial hard disk transmission abnormality detection method.
According to the method for detecting the transmission abnormality of the serial hard disk, when a disk detection request is obtained, a system device interface of a device where the serial hard disk is located is called, a serial hard disk identifier of the device currently mounted is obtained, and according to the identifier of each serial hard disk, self-monitoring analysis and report technical data of each serial hard disk are obtained, wherein the self-monitoring analysis and report technical data comprise a current transmission mode and a highest transmission mode of each serial hard disk, and therefore when a first serial hard disk with the current transmission mode not matched with the highest transmission mode exists, the connection abnormality of the interface of the first serial hard disk is determined. Therefore, the abnormal serial hard disk of the interface connection is determined by judging whether the current transmission mode of each serial hard disk is matched with the highest transmission mode according to the acquired self-monitoring analysis and report technical data of each serial hard disk, so that the abnormal connection of the serial hard disk is automatically detected.
The following describes a method, an apparatus, an electronic device, a storage medium, and a computer program for detecting transmission anomalies in a serial hard disk according to the present application in detail with reference to the accompanying drawings.
The method for detecting the transmission abnormality of the serial hard disk according to the embodiment of the present application is described in detail below with reference to fig. 1.
Fig. 1 is a schematic flow chart of a method for detecting a transmission abnormality of a serial hard disk according to an embodiment of the present application.
As shown in fig. 1, the method for detecting the transmission abnormality of the serial hard disk includes the following steps:
It should be noted that the method for detecting the transmission abnormality of the serial hard disk according to the embodiment of the present application may be executed by the apparatus for detecting the transmission abnormality of the serial hard disk according to the embodiment of the present application. The device for detecting the transmission abnormality of the serial hard disk can be configured in any electronic equipment, such as a mobile phone, a tablet computer, a personal digital assistant, wearable equipment and the like, and is not limited in the embodiment of the application.
It should be noted that, because various serial hard disk interfaces in various devices (such as computers) are very similar and not easy to distinguish, when a user connects a serial hard disk with a hard disk interface, the serial hard disk interface and the hard disk interface are usually simply and randomly connected, so that the performance of the hard disk interface connected with the serial hard disk is not matched with that of the serial hard disk, and problems such as abnormal connection of the serial hard disk, reduction of transmission rate and the like are easily caused. The method for detecting the abnormal transmission of the serial hard disk can automatically detect whether a hard disk interface connected with the serial hard disk in equipment is matched with the performance of the serial hard disk, so that the problem of abnormal connection of the serial hard disk is solved.
The disk detection request may be automatically generated by a processor of the device when detecting that the system device interface of the device in which the disk detection request is located has an external device connection; or the detection instruction may be generated when the processor acquires a disk detection instruction of an input device (such as a keyboard, a mouse, a touch screen, and the like) of the device, which is passed through by a user, and this is not limited in this embodiment of the application.
The system device interface refers to an interface for connecting a host system of the device with other external devices to realize data transmission, such as a Universal Serial Bus (USB) interface, a hard disk interface, and the like. In this embodiment of the application, the called system device interface of the device may be a hard disk interface of the device.
The serial hard disk identifier may be a name, a model, and the like of the serial hard disk.
In the embodiment of the application, when the disk detection request is obtained, all system device interfaces of the device where the disk detection request is located may be called to determine whether each system device interface is currently in a connected state, and if the system device interface is currently in the connected state, the serial hard disk identifier connected to the system device interface, that is, the serial hard disk identifier currently mounted on the device where the disk detection request is located, is obtained.
Furthermore, the external device connected with the device through the system device interface may include multiple types, so that when the serial hard disk identifier currently mounted on the device is obtained, it may be determined whether the device connected with the system device interface is a serial hard disk. That is, in a possible implementation form of the embodiment of the present application, the step 101 may include:
acquiring information of each disk currently mounted by equipment, wherein the disk information comprises disk identification and classification information;
judging whether each disk is a serial hard disk or not according to the classification information in each disk information;
and if the second disk is a serial hard disk, acquiring the identifier of the second disk.
The disk identifier includes information such as disk capacity, name, and/or disk identifier.
The second disk refers to a disk of the serial hard disk among the disks currently mounted by the device.
As a possible implementation manner, since the currently mounted disk of the device may include multiple types, the classification information in each piece of currently mounted disk information may be obtained by calling a system device interface of the device, and then the second disk of which the classification information is the serial hard disk is determined according to the classification information in each disk, and then the identifier of the second disk is obtained from the disk information of the second disk.
It should be noted that, because the serial hard disk usually stores a default hard disk identifier (such as a hard disk name) when leaving a factory, serial hard disks produced by the same manufacturer may have the same hard disk identifier, so that when the serial hard disk transmission abnormality detection is performed, if only the serial hard disk identifier currently mounted on the device is obtained to distinguish the serial hard disks, the situation that a plurality of serial hard disk identifiers are the same easily occurs, and thus the plurality of currently mounted serial hard disks cannot be distinguished. Therefore, in the embodiment of the application, information of multiple dimensions, such as the capacity, the name, the identifier of the disk, and the like of the disk can be simultaneously acquired as the disk identifier, so that the disk can be uniquely determined according to the acquired disk identifier.
The Self-Monitoring Analysis and reporting Technology (s.m.a.r.t.) of the serial hard disk refers to a Technology of continuously collecting information from each sensor on the serial hard disk and storing the information in a system reserved area (service area) of the serial hard disk.
The current transmission mode of the serial hard disk refers to a transmission mode which can be used when the serial hard disk is mounted on equipment through a system equipment interface which is connected with the serial hard disk at present; the highest transmission mode of the serial hard disk refers to a transmission mode with the highest transmission rate which can be supported by the serial hard disk.
For example, for a serial hard disk supporting SATA3 protocol (data transfer rate supports 600MB/s), if the serial hard disk passes through an interface supporting SATA2 protocol (data generation rate supports 300MB/s) on the device, the current transfer mode of the serial hard disk is SATA/300, and the highest transfer mode is SATA/600.
It should be noted that the system reserved area of the serial hard disk is generally located in the first few tens of physical tracks of the physical surface of the serial hard disk 0, and is written into the relevant internal management program by the manufacturer. Here, the s.m.a.r.t. data includes a low-level formatting program, an encryption/decryption program, a self-monitoring program, an automatic repair program, and the like. The monitoring software used by the user can read the s.m.a.r.t. data by a command named "SMART Return Status" (command code: B0h) and does not allow the end user to modify the information.
As a possible implementation manner, when the disk detection request is obtained, the processor may call the disk monitoring software installed in the device, so as to obtain the s.m.a.r.t. data of each serial hard disk through the installed disk monitoring software, and further determine the current transmission mode and the highest transmission mode of each serial hard disk according to the obtained s.m.a.r.t. data.
And 103, judging whether the current transmission mode of each serial hard disk is matched with the highest transmission mode.
In the embodiment of the application, after the current transmission mode and the highest transmission mode of each serial hard disk are determined, whether the current transmission mode and the highest transmission mode of each serial hard disk are matched can be judged; and determining whether the serial hard disk with the abnormal interface connection exists according to the judgment result.
And step 104, if the current transmission mode of the first serial port hard disk is not matched with the highest transmission mode, determining that the interface connection of the first serial port hard disk is abnormal.
The first serial port hard disk refers to a serial port hard disk of which the current transmission mode is not matched with the highest transmission mode in the serial port hard disks currently mounted on the equipment.
In the embodiment of the application, if the current transmission mode of the serial hard disk is matched with the highest transmission mode, it can be determined that the transmission mode supported by the system equipment interface currently connected with the serial hard disk is matched with the highest transmission mode supported by the serial hard disk, that is, it can be determined that the interface connection of the serial hard disk is normal; if the current transmission mode of the serial hard disk is not matched with the highest transmission mode, the serial hard disk can be determined to be the first serial hard disk, that is, the transmission mode supported by the system equipment interface currently connected with the first serial hard disk is not matched with the highest transmission mode supported by the first serial hard disk, so that the highest transmission rate supported by the first serial hard disk cannot be reached when the first serial hard disk performs data transmission with the equipment, and the abnormal connection of the interface of the first serial hard disk can be determined.
For example, the device is currently mounted with two serial hard disks, and the disk information, the current transmission mode, and the highest transmission mode information of the two serial hard disks are respectively: a first serial port hard disk: ST1000DM003-1SB10C 1000GB (highest transmission mode: SATA/600| Current Transmission mode: SATA/300 "); a second serial port hard disk: crucial _ CT240M500SSD 1240 GB (highest support: SATA/600| Current mode: SATA/600"), so that it can be determined that the serial hard disk is the first serial hard disk with abnormal interface connection.
Furthermore, when the first serial port hard disk with the abnormal interface connection is determined, early warning information can be displayed in a display interface of the equipment, so that a user can replace a system equipment interface connected with the first serial port hard disk according to the early warning information. That is, in a possible implementation form of the embodiment of the present application, after the step 104, the method may further include:
and displaying early warning information of abnormal connection of the first serial port hard disk interface in a display interface of the equipment.
As a possible implementation manner, when the first serial port hard disk with the abnormal interface connection is determined, the early warning information of the abnormal connection of the conclusion of the first serial port hard disk can be displayed in the display interface of the device, so that a user can replace the system device interface connected with the first serial port hard disk according to the early warning information, and after the system device interface is better, the current transmission mode of the first serial port hard disk can be matched with the highest transmission mode. The warning information may include, but is not limited to, "display the disk information of the first serial port hard disk in a special color", "display the warning information in a pop-up dialog box", and "display a special mark on the disk information side of the first serial port hard disk".
According to the method for detecting the transmission abnormality of the serial hard disk, when a disk detection request is obtained, a system device interface of a device where the serial hard disk is located is called, a serial hard disk identifier of the device currently mounted is obtained, and S.M.A.R.T. data of each serial hard disk is obtained according to the identifier of each serial hard disk, wherein the S.M.A.R.T. data comprise a current transmission mode and a highest transmission mode of each serial hard disk, and therefore when a first serial hard disk with the current transmission mode not matched with the highest transmission mode exists, the connection abnormality of the interface of the first serial hard disk is determined. Therefore, the serial hard disk with the abnormal interface connection is determined by judging whether the current transmission mode of each serial hard disk is matched with the highest transmission mode according to the acquired S.M.A.R.T. data of each serial hard disk, so that the abnormal connection of the serial hard disks is automatically detected.
In a possible implementation form of the application, the acquired s.m.a.r.t. data can be read into a preset data structure, and then the current transmission mode and the highest transmission mode of the serial hard disk can be acquired from the preset data structure.
The method for detecting the transmission abnormality of the serial hard disk according to the embodiment of the present application is further described with reference to fig. 2.
Fig. 2 is a schematic flow chart of another serial hard disk transmission abnormality detection method according to an embodiment of the present application.
As shown in fig. 2, the method for detecting the transmission abnormality of the serial hard disk includes the following steps:
The detailed implementation process and principle of the steps 201-202 can refer to the detailed description of the above embodiments, and are not described herein again.
The preset identification device data structure refers to a structural body which is preset in a bottom layer driving model of the device and used for storing data of external devices connected with the device so as to identify the external devices. For example, the DEVICE structure may be an IDENTIFY _ DEVICE structure.
As a possible implementation manner, after obtaining the s.m.a.r.t. data of each serial hard disk, the original data structure of the s.m.a.r.t. data of each serial hard disk may be obtained by calling the application programming interface DeviceIoControl of the DEVICE where the DEVICE is located and using the parameter IOCTL _ STORAGE _ QUERY _ proxy, and the returned data is filled into the IDENTIFY _ ice DEVICE structure. Therefore, the content of the identity _ DEVICE structure body contains the original data information of each serial hard disk.
And 204, acquiring the current transmission mode and the highest transmission mode of the serial hard disk from the preset identification device data structure according to the content identification corresponding to each part of the preset identification device data structure.
Each part of the preset identification device data structure may refer to each field included in the preset identification device data structure, and each field may be used to define and store different data; accordingly, the content identifier of each part may refer to the field name of each field.
In this embodiment of the application, after the s.m.a.r.t. data of each serial hard disk is filled into the preset identification device data structure, the s.m.a.r.t. original data information of each serial hard disk can be obtained according to the content identifier of the s.m.a.r.t. data of each serial hard disk in the preset identification device data structure, and then the current transmission mode and the highest transmission mode of each serial hard disk are read from the s.m.a.r.t. original data information of each serial hard disk.
In step 206, if the current transmission mode of the first serial port hard disk is not matched with the highest transmission mode, it is determined that the interface connection of the first serial port hard disk is abnormal.
The detailed implementation process and principle of the steps 205 and 206 can refer to the detailed description of the above embodiments, and are not described herein again.
According to the serial hard disk transmission abnormity detection method provided by the embodiment of the application, when a disk detection request is obtained, a system device interface of equipment where the serial hard disk is located is called, the serial hard disk identification currently mounted on the equipment is obtained, S.M.A.R.T. data of each serial hard disk is obtained according to the identification of each serial hard disk, then the S.M.A.R.T. data is filled into a preset identification device data structure, and then the current transmission mode and the highest transmission mode of the serial hard disk are obtained from the preset identification device data structure according to content identifications corresponding to all parts of the preset identification device data structure, so that when a first serial hard disk with the current transmission mode not matched with the highest transmission mode exists, the interface connection abnormity of the first serial hard disk is determined. Therefore, the data are filled into the preset identification equipment data structure according to the acquired S.M.A.R.T. data of each serial hard disk, and then the current transmission mode and the highest transmission mode of each serial hard disk are acquired from the preset identification equipment data structure, so that the serial hard disk with abnormal interface connection is determined by judging whether the current transmission mode and the highest transmission mode of each serial hard disk are matched, the abnormal connection of the serial hard disks is automatically detected, and the reliability and the stability of detection results are further improved.
In order to implement the above embodiment, the present application further provides a device for detecting transmission abnormality of a serial hard disk.
Fig. 3 is a schematic structural diagram of a serial hard disk transmission abnormality detection apparatus according to an embodiment of the present application.
As shown in fig. 3, the apparatus 30 for detecting transmission abnormality of a serial hard disk includes:
the first obtaining module 31 is configured to, when a disk detection request is obtained, call a system device interface of a device where the first obtaining module is located, and obtain a serial hard disk identifier currently mounted on the device;
the second obtaining module 32 is configured to obtain self-monitoring analysis and reporting technical data of each serial hard disk according to the identifier of each serial hard disk, where the self-monitoring analysis and reporting technical data includes a current transmission mode and a highest transmission mode of each serial hard disk;
the judging module 33 is configured to judge whether the current transmission mode of each serial hard disk matches the highest transmission mode;
the determining module 34 is configured to determine that the interface connection of the first serial port hard disk is abnormal if the current transmission mode of the first serial port hard disk is not matched with the highest transmission mode.
In practical use, the device for detecting the transmission abnormality of the serial hard disk provided by the embodiment of the application can be configured in any electronic equipment to execute the method for detecting the transmission abnormality of the serial hard disk.
The device for detecting the transmission abnormality of the serial hard disk, provided by the embodiment of the application, obtains the serial hard disk identifier currently mounted on the device by calling the system device interface of the device when the disk detection request is obtained, and obtains the s.m.a.r.t. data of each serial hard disk according to the identifier of each serial hard disk, wherein the s.m.a.r.t. data includes the current transmission mode and the highest transmission mode of each serial hard disk, and further determines that the interface connection of the first serial hard disk is abnormal when the first serial hard disk exists, the current transmission mode and the highest transmission mode of which are not matched. Therefore, the serial hard disk with the abnormal interface connection is determined by judging whether the current transmission mode of each serial hard disk is matched with the highest transmission mode according to the acquired S.M.A.R.T. data of each serial hard disk, so that the abnormal connection of the serial hard disks is automatically detected.
In a possible implementation form of the present application, the first obtaining module 31 is specifically configured to:
acquiring information of each disk currently mounted by the equipment, wherein the disk information comprises disk identification and classification information;
judging whether each disk is a serial hard disk or not according to the classification information in each disk information;
and if the second disk is a serial hard disk, acquiring the identifier of the second disk.
Further, in another possible implementation form of the present application, the disk identifier includes a disk capacity, a name, and/or a disk identifier.
Further, in another possible implementation form of the present application, the device 30 for detecting transmission abnormality of a serial hard disk further includes:
the filling module is used for filling the self-monitoring analysis and report technical data into a preset identification equipment data structure;
and the third obtaining module is used for obtaining the current transmission mode and the highest transmission mode of the serial hard disk from the preset identification equipment data structure according to the content identification corresponding to each part of the preset identification equipment data structure.
Further, in another possible implementation form of the present application, the device 30 for detecting transmission abnormality of a serial hard disk further includes:
and the display module is used for displaying the early warning information of the abnormal connection of the first serial port hard disk interface in a display interface of the equipment.
It should be noted that the foregoing explanation of the embodiment of the serial hard disk transmission abnormality detection method shown in fig. 1 and fig. 2 is also applicable to the serial hard disk transmission abnormality detection apparatus 30 of this embodiment, and details are not repeated here.
The serial port hard disk transmission abnormality detection device provided by the embodiment of the application calls a system device interface of a device where the serial port hard disk is located when a disk detection request is obtained, obtains a serial port hard disk identifier currently mounted on the device, obtains S.M.A.R.T. data of each serial port hard disk according to the identifier of each serial port hard disk, fills the S.M.A.R.T. data into a preset identification device data structure, further obtains a current transmission mode and a highest transmission mode of the serial port hard disk from the preset identification device data structure according to content identifiers corresponding to all parts of the preset identification device data structure, and determines that the interface connection of the first serial port hard disk is abnormal when the first serial port hard disk with the current transmission mode and the highest transmission mode which are not matched exists. Therefore, the data are filled into the preset identification equipment data structure according to the acquired S.M.A.R.T. data of each serial hard disk, and then the current transmission mode and the highest transmission mode of each serial hard disk are acquired from the preset identification equipment data structure, so that the serial hard disk with abnormal interface connection is determined by judging whether the current transmission mode and the highest transmission mode of each serial hard disk are matched, the abnormal connection of the serial hard disks is automatically detected, and the reliability and the stability of detection results are further improved.
In order to implement the above embodiments, the present application further provides an electronic device.
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
As shown in fig. 4, the electronic device 200 includes:
the memory 210 and the processor 220 are connected to a bus 230 of different components (including the memory 210 and the processor 220), the memory 210 stores a computer program, and when the processor 220 executes the program, the method for detecting the transmission exception of the serial hard disk according to the embodiment of the present application is implemented.
A program/utility 280 having a set (at least one) of program modules 270, including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or some combination thereof may comprise an implementation of a network environment, may be stored in, for example, the memory 210. The program modules 270 generally perform the functions and/or methodologies of the embodiments described herein.
The processor 220 executes various functional applications and data processing by executing programs stored in the memory 210.
It should be noted that, for the implementation process and the technical principle of the electronic device in this embodiment, reference is made to the foregoing explanation of the method for detecting a transmission abnormality of a serial hard disk in the embodiment of the present application, and details are not described here again.
The electronic device provided by the embodiment of the application can execute the method for detecting the transmission abnormality of the serial hard disk, and the method comprises the steps of calling a system device interface of the device to obtain the serial hard disk identifier currently mounted on the device when a disk detection request is obtained, and obtaining the s.m.a.r.t. data of each serial hard disk according to the identifier of each serial hard disk, wherein the s.m.a.r.t. data comprises the current transmission mode and the highest transmission mode of each serial hard disk, and further determining that the interface connection of the first serial hard disk is abnormal when the first serial hard disk with the unmatched current transmission mode and the highest transmission mode exists. Therefore, the serial hard disk with the abnormal interface connection is determined by judging whether the current transmission mode of each serial hard disk is matched with the highest transmission mode according to the acquired S.M.A.R.T. data of each serial hard disk, so that the abnormal connection of the serial hard disks is automatically detected.
In order to implement the above embodiments, the present application also proposes a computer-readable storage medium.
The computer-readable storage medium stores thereon a computer program, and when the computer program is executed by a processor, the method for detecting the transmission abnormality of the serial hard disk according to the embodiment of the present application is implemented.
In order to implement the foregoing embodiments, an embodiment of a further aspect of the present application provides a computer program, where the computer program is executed by a processor to implement the method for detecting a transmission exception of a serial hard disk according to the embodiment of the present application.
In an alternative implementation, the embodiments may be implemented in any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the consumer electronic device, partly on the consumer electronic device, as a stand-alone software package, partly on the consumer electronic device and partly on a remote electronic device, or entirely on the remote electronic device or server. In the case of remote electronic devices, the remote electronic devices may be connected to the consumer electronic device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external electronic device (e.g., through the internet using an internet service provider).
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.
Claims (10)
1. A method for detecting transmission abnormality of a serial hard disk is characterized by comprising the following steps:
calling a system device interface of the device to obtain a serial port hard disk identifier currently mounted on the device;
acquiring self-monitoring analysis and report technical data of each serial hard disk according to the identification of each serial hard disk, wherein the self-monitoring analysis and report technical data comprise the current transmission mode and the highest transmission mode of each serial hard disk;
judging whether the current transmission mode of each serial port hard disk is matched with the highest transmission mode;
and if the current transmission mode of the first serial port hard disk is not matched with the highest transmission mode, determining that the interface connection of the first serial port hard disk is abnormal.
2. The method of claim 1, wherein the obtaining of the serial hard disk identifier currently mounted on the device comprises:
acquiring information of each disk currently mounted by the equipment, wherein the disk information comprises disk identification and classification information;
judging whether each disk is a serial hard disk or not according to the classification information in each disk information;
and if the second disk is a serial hard disk, acquiring the identifier of the second disk.
3. The method of claim 2, wherein the disk identification comprises a disk capacity, a name, and/or a disk identifier.
4. The method of claim 1, wherein after obtaining the self-monitoring analysis and reporting technology data of each serial hard disk, the method further comprises:
filling the self-monitoring analysis and report technical data into a preset identification equipment data structure;
and acquiring the current transmission mode and the highest transmission mode of the serial hard disk from the preset identification equipment data structure according to the content identification corresponding to each part of the preset identification equipment data structure.
5. The method according to any one of claims 1 to 4, wherein after determining that the interface connection of the first serial port hard disk is abnormal, the method further comprises:
and displaying early warning information of abnormal connection of the first serial port hard disk interface in a display interface of the equipment.
6. The utility model provides a serial port hard disk transmission anomaly detection device which characterized in that includes:
the first acquisition module is used for calling a system equipment interface of the equipment to acquire a serial port hard disk identifier currently mounted on the equipment;
the second acquisition module is used for acquiring self-monitoring analysis and report technical data of each serial hard disk according to the identifier of each serial hard disk, wherein the self-monitoring analysis and report technical data comprise the current transmission mode and the highest transmission mode of each serial hard disk;
the judging module is used for judging whether the current transmission mode of each serial port hard disk is matched with the highest transmission mode;
the determining module is used for determining that the interface connection of the first serial port hard disk is abnormal if the current transmission mode of the first serial port hard disk is not matched with the highest transmission mode.
7. The apparatus of claim 6, wherein the first obtaining module is specifically configured to:
acquiring information of each disk currently mounted by the equipment, wherein the disk information comprises disk identification and classification information;
judging whether each disk is a serial hard disk or not according to the classification information in each disk information;
and if the second disk is a serial hard disk, acquiring the identifier of the second disk.
8. The apparatus of claim 7, wherein the disk identification comprises a disk capacity, a name, and/or a disk identifier.
9. An electronic device, comprising: the device comprises a memory, a processor and a program which is stored on the memory and can run on the processor, and is characterized in that when the processor executes the program, the method for detecting the transmission abnormality of the serial hard disk according to any one of claims 1 to 5 is realized.
10. A computer-readable storage medium on which a computer program is stored, wherein the program, when executed by a processor, implements the method for detecting a transmission abnormality of a serial hard disk according to any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911144451.1A CN110928814A (en) | 2019-11-20 | 2019-11-20 | Method and device for detecting transmission abnormality of serial hard disk and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911144451.1A CN110928814A (en) | 2019-11-20 | 2019-11-20 | Method and device for detecting transmission abnormality of serial hard disk and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110928814A true CN110928814A (en) | 2020-03-27 |
Family
ID=69851428
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911144451.1A Pending CN110928814A (en) | 2019-11-20 | 2019-11-20 | Method and device for detecting transmission abnormality of serial hard disk and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110928814A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113641409A (en) * | 2020-04-27 | 2021-11-12 | 佛山市顺德区顺达电脑厂有限公司 | USB concentrator with fixable serial number of serial port |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102566941A (en) * | 2011-12-22 | 2012-07-11 | 深圳市创新科信息技术有限公司 | Method for recognizing serial advanced technology attachment (SATA) hard disk through serial attached SCSI (SAS) hard disk expander |
CN102591591A (en) * | 2011-12-19 | 2012-07-18 | 杭州瑞网广通信息技术有限公司 | Disk detection system, disk detection method and network storage system |
CN106990919A (en) * | 2017-03-04 | 2017-07-28 | 郑州云海信息技术有限公司 | The memory management method and device of automatic separating fault disk |
CN107402855A (en) * | 2017-06-30 | 2017-11-28 | 郑州云海信息技术有限公司 | A kind of detection method of hard disk, device and server |
CN109117091A (en) * | 2018-07-27 | 2019-01-01 | 广东浪潮大数据研究有限公司 | A kind of SSD equipment mount point acquisition methods and relevant apparatus |
-
2019
- 2019-11-20 CN CN201911144451.1A patent/CN110928814A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102591591A (en) * | 2011-12-19 | 2012-07-18 | 杭州瑞网广通信息技术有限公司 | Disk detection system, disk detection method and network storage system |
CN102566941A (en) * | 2011-12-22 | 2012-07-11 | 深圳市创新科信息技术有限公司 | Method for recognizing serial advanced technology attachment (SATA) hard disk through serial attached SCSI (SAS) hard disk expander |
CN106990919A (en) * | 2017-03-04 | 2017-07-28 | 郑州云海信息技术有限公司 | The memory management method and device of automatic separating fault disk |
CN107402855A (en) * | 2017-06-30 | 2017-11-28 | 郑州云海信息技术有限公司 | A kind of detection method of hard disk, device and server |
CN109117091A (en) * | 2018-07-27 | 2019-01-01 | 广东浪潮大数据研究有限公司 | A kind of SSD equipment mount point acquisition methods and relevant apparatus |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113641409A (en) * | 2020-04-27 | 2021-11-12 | 佛山市顺德区顺达电脑厂有限公司 | USB concentrator with fixable serial number of serial port |
CN113641409B (en) * | 2020-04-27 | 2023-07-18 | 佛山市顺德区顺达电脑厂有限公司 | USB hub with fixable serial number of serial port |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110989926B (en) | Fault magnetic disc slot positioning method and device and electronic equipment | |
US11509505B2 (en) | Method and apparatus for operating smart network interface card | |
US10169183B2 (en) | Mobile device and chassis with contactless tags to diagnose hardware and software faults | |
US20130030753A1 (en) | Testing system and method using same | |
US20120151007A1 (en) | Monitoring Sensors For Systems Management | |
CN111796978B (en) | Interface detection method, device, system, equipment and storage medium | |
CN103838537A (en) | Control device and information processing apparatus | |
CN111522703A (en) | Method, apparatus and computer program product for monitoring access requests | |
CN105468482A (en) | Hard disk position identification and fault diagnosis method and server device | |
CN108874441B (en) | Board card configuration method, device, server and storage medium | |
CN101321166A (en) | User message management methods and systems | |
CN111694684B (en) | Abnormal construction method and device of storage device, electronic device and storage medium | |
CN108647284B (en) | Method and device for recording user behavior, medium and computing equipment | |
CN101354667A (en) | Method for testing peripheral component interconnect bus level pressure | |
CN113934758A (en) | Vehicle fault repairing method and device, vehicle-mounted terminal, server and storage medium | |
CN110928814A (en) | Method and device for detecting transmission abnormality of serial hard disk and electronic equipment | |
US20130073914A1 (en) | Storage management systems and methods | |
KR102137891B1 (en) | Server managing Method, Server, and Recording medium using User Specialized Operating Mechanism on BMC environment | |
CN111737082A (en) | Container and monitoring method, device, equipment and medium for container application | |
US9069951B2 (en) | Inferring security decisions from trusted users | |
CN103106140A (en) | Intelligent display device testing information display method | |
CN107766385B (en) | Method and equipment for converting file format of virtual disk | |
CN114064510A (en) | Function testing method and device, electronic equipment and storage medium | |
US11334421B2 (en) | Method and apparatus to identify a problem area in an information handling system based on latencies | |
CN112763251A (en) | Mobile robot testing method and device |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200327 |
|
RJ01 | Rejection of invention patent application after publication |