Hard Disk Installation Testing Method, Device, Electronic Device and Storage Medium of Server

By using the communication connection between photoelectric sensors and controllers in the server, automatic detection and verification of hard disk plug-ins is solved, and the accuracy and efficiency of plug-ins are improved.

CN115686968BActive Publication Date: 2025-06-27INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211405837.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-10
Publication Date
2025-06-27
Estimated Expiration
2042-11-10

AI Technical Summary

Technical Problem

The prior art relies on manual verification of the accuracy of hard disk insertion, resulting in large workloads and low efficiency for technicians, and cable reversal problems are prone to occur when there are many hard disks, reducing the accuracy of plugging.

Method used

A server hard disk insertion and testing method is adopted, and the communication connection between photoelectric sensors and controllers is used to obtain the model information of the hard disk, adjust the probe position, detect the indicator light status and convert it into electrical signals for comparison, and test information used to characterize the hard disk insertion and testing.

Benefits of technology

The process of automated testing of hard disk insertion is realized, which improves the accuracy and efficiency of plugging, reduces the workload of technicians, and can quickly locate and adjust the wrong hard disk insertion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115686968B_ABST
    Figure CN115686968B_ABST
Patent Text Reader

Abstract

An embodiment of the present invention provides a hard disk insertion test method, device, electronic device and storage medium for a server, which includes obtaining model information corresponding to a hard disk, determining a photoelectric sensor corresponding to the model information, obtaining the lighting sequence and logic signal of the hard disk indicator light from a controller according to the model information, adjusting the probe position of the detection probe of the photoelectric sensor according to the indicator light position of the hard disk indicator light, obtaining the indicator light status identifier of the hard disk indicator light corresponding to the probe position returned by the photoelectric sensor according to the indicator light lighting sequence, if it is detected that the indicator light status identifier of the hard disk indicator light is a lighting status identifier, converting the indicator light signal of the hard disk indicator light into an indicator light electrical signal, sending the indicator light electrical signal to the controller, obtaining the signal comparison result generated after the controller compares the indicator light electrical signal with the logic signal, and generating test information for characterizing the insertion test of the hard disk according to the signal comparison result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data testing, and in particular, to a hard disk insertion and installation testing method for a server, a hard disk insertion and installation testing device for a server, an electronic device, and a computer-readable storage medium. Background Art

[0002] A hard disk is the most important storage device of a server. The server hard disk is equivalent to the data warehouse of the server and is used to store various data of software and user data. Each server is usually configured with multiple hard disks, and multiple cables are required to insert and connect the hard disks during the assembly of the whole machine.

[0003] In the existing hard disk connection technology, the insertion of cables is mainly manually operated, and it is necessary to manually observe the lighting sequence of the hard disk indicator lights to verify whether the hard disk sequence is correct. However, since the hard disk interfaces of the same hard disk model are the same and the interface positions are adjacent, it is easy to have the problem of reverse connection of the cables, resulting in an incorrect hard disk sequence. Moreover, when the number of hard disks of the server hard disk is large and the hard disk indicator lights are small, this method of manually observing the hard disk indicator lights to verify the accuracy of hard disk insertion is prone to the problem of reverse connection of the cables, increasing the insertion workload of technicians and greatly reducing the work efficiency and the accuracy of hard disk insertion. Summary of the Invention

[0004] Embodiments of the present invention provide a hard disk insertion and installation testing method, device, electronic device, and computer-readable storage medium for a server to solve or partially solve the problems in the prior art that rely on manual verification of the accuracy of hard disk insertion, greatly increasing the workload of technicians and reducing the work efficiency, and at the same time, when the number of hard disks is too large, this method that only relies on manual judgment is prone to the problem of reverse connection of the cables, resulting in poor accuracy of hard disk insertion.

[0005] An embodiment of the present invention discloses a hard disk insertion and installation testing method for a server, which is applied to the server. There is a communication connection between the server and a hard disk insertion and installation detection system. The hard disk insertion and installation detection system includes a photoelectric sensor and a controller. The method includes:

[0006] Obtain the model information corresponding to the hard disk, and determine the photoelectric sensor corresponding to the model information. The photoelectric sensor includes a detection probe;

[0007] Obtain the lighting sequence of the hard disk indicator light of the hard disk and the logic signal corresponding to the lighting sequence from the controller according to the model information;

[0008] Adjust the probe position of the detection probe of the photoelectric sensor according to the indicator position of the hard disk indicator, and obtain the indicator status identifier of the hard disk indicator corresponding to the probe position returned by the photoelectric sensor in sequence according to the indicator lighting sequence. The indicator status identifier includes a lighting status identifier;

[0009] If it is detected that the indicator status identifier of the hard disk indicator is the lighting status identifier, convert the indicator light signal of the hard disk indicator into an indicator electrical signal, and send the indicator electrical signal to the controller;

[0010] Obtain the signal comparison result generated by the controller after comparing the indicator electrical signal with the logic signal, and generate test information for characterizing the insertion test of the hard disk according to the signal comparison result.

[0011] Optionally, the server includes a server nameplate label. The obtaining the model information corresponding to the hard disk and determining the photoelectric sensor corresponding to the model information includes:

[0012] Obtain the model barcode of the server nameplate label;

[0013] Use a barcode scanner to scan the model barcode to determine the model information corresponding to the hard disk and determine the photoelectric sensor corresponding to the model information.

[0014] Optionally, the indicator lighting sequence is generated in the following manner:

[0015] Obtain the number of hard disks and the hard disk insertion sequence of the hard disk;

[0016] Use the number of hard disks and the hard disk insertion sequence to generate an indicator lighting sequence for the hard disk indicator and a logic signal corresponding to the indicator lighting sequence;

[0017] Write the indicator lighting sequence and the logic signal into the controller.

[0018] Optionally, the adjusting the probe position of the detection probe of the photoelectric sensor according to the indicator position of the hard disk indicator and obtaining the indicator status identifier of the hard disk indicator corresponding to the probe position returned by the photoelectric sensor in sequence according to the indicator lighting sequence includes:

[0019] Align the probe position of the detection probe of the photoelectric sensor with the indicator position of the hard disk indicator in sequence;

[0020] Obtain the indicator status identifier of the hard disk indicator corresponding to the probe position returned by the photoelectric sensor in sequence according to the indicator lighting sequence.

[0021] Optionally, when it is detected that the indicator light status identifier of the hard disk indicator light is the lit status identifier, converting the indicator light signal of the hard disk indicator light into an indicator light electrical signal and sending the indicator light electrical signal to the controller includes:

[0022] If it is detected in sequence according to the indicator light lighting sequence that the indicator light status identifier of the hard disk indicator light is the lit status identifier, sequentially converting the indicator light signals of the hard disk indicator lights into indicator light electrical signals and sending each of the indicator light electrical signals to the controller.

[0023] Optionally, the hard disk insertion test system includes a liquid crystal display screen and a test indicator light. Generating test information for characterizing the hard disk insertion test according to the signal comparison result includes:

[0024] If the signal comparison result is that the signals are in agreement, obtaining the test pass information returned by the controller for characterizing that the hard disk insertion test passes;

[0025] Sending the test pass information to the liquid crystal display screen for display and lighting the test indicator light according to a preset indicator light color.

[0026] Optionally, the hard disk insertion test system further includes an audible and visual alarm. Generating test information for characterizing the hard disk insertion test according to the signal comparison result includes:

[0027] If the signal comparison result is that the signals are not in agreement, obtaining the test failure information returned by the controller for characterizing that the hard disk insertion test fails;

[0028] Sending the test failure information to the liquid crystal display screen for display, lighting the audible and visual alarm, and sending out an alarm message through the audible and visual alarm.

[0029] An embodiment of the present invention further discloses a hard disk insertion test device for a server, which is applied to a server. There is a communication connection between the server and a hard disk insertion detection system. The hard disk insertion detection system includes a photoelectric sensor and a controller. The device includes:

[0030] A model information acquisition module, configured to acquire the model information corresponding to the hard disk, and determine the photoelectric sensor corresponding to the model information. The photoelectric sensor includes a detection probe;

[0031] An indicator light lighting sequence acquisition module, configured to acquire the indicator light lighting sequence of the hard disk indicator light of the hard disk and the logic signal corresponding to the indicator light lighting sequence from the controller according to the model information;

[0032] The indicator status identification return module is used to adjust the probe position of the detection probe of the optoelectronic sensor according to the indicator position of the hard disk indicator, and obtain the indicator status identification of the hard disk indicator corresponding to the probe position sequentially returned by the optoelectronic sensor according to the indicator lighting sequence. The indicator status identification includes a lighting status identification;

[0033] The indicator electrical signal conversion module is used to convert the indicator light signal of the hard disk indicator into an indicator electrical signal if the indicator status identification of the hard disk indicator is the lighting status identification, and send the indicator electrical signal to the controller;

[0034] The test information generation module is used to obtain the signal comparison result generated by the controller after comparing the indicator electrical signal with the logic signal, and generate test information for characterizing the insertion test of the hard disk according to the signal comparison result.

[0035] Optionally, the server includes a server nameplate label, and the model information acquisition module is specifically used for:

[0036] Obtain the model barcode of the server nameplate label;

[0037] Use a barcode scanner to scan the model barcode to determine the model information corresponding to the hard disk, and determine the optoelectronic sensor corresponding to the model information.

[0038] Optionally, the indicator lighting sequence is generated in the following manner:

[0039] Obtain the number of hard disks and the hard disk insertion sequence of the hard disk;

[0040] Use the number of hard disks and the hard disk insertion sequence to generate an indicator lighting sequence for the hard disk indicator and a logic signal corresponding to the indicator lighting sequence;

[0041] Write the indicator lighting sequence and the logic signal into the controller.

[0042] Optionally, the indicator status identification return module is specifically used for:

[0043] Align the probe positions of the detection probes of the optoelectronic sensor with the indicator positions of the hard disk indicator in sequence;

[0044] Obtain the indicator status identification of the hard disk indicator corresponding to the probe position sequentially returned by the optoelectronic sensor according to the indicator lighting sequence.

[0045] Optionally, the indicator light electrical signal conversion module is specifically configured to:

[0046] If the indicator light status identifier of the hard disk indicator light is detected as the lit status identifier in sequence according to the lit order of the indicator lights, then convert the indicator light optical signals of the hard disk indicator light into indicator light electrical signals in sequence, and send each of the indicator light electrical signals to the controller.

[0047] Optionally, the hard disk insertion test system includes a liquid crystal display screen and a test indicator light, and the test information generation module includes:

[0048] A test pass information generation sub-module, configured to obtain test pass information returned by the controller for characterizing that the hard disk passes the insertion test if the signal comparison result is consistent in signal comparison;

[0049] A test pass information display sub-module, configured to send the test pass information to the liquid crystal display screen for display, and light the test indicator light according to a preset indicator light color.

[0050] Optionally, the hard disk insertion test system further includes an audible and visual alarm, and the test information generation module includes:

[0051] A test failure information generation sub-module, configured to obtain test failure information returned by the controller for characterizing that the hard disk fails the insertion test if the signal comparison result is inconsistent in signal comparison;

[0052] A test failure information display sub-module, configured to send the test failure information to the liquid crystal display screen for display, light the audible and visual alarm, and send out an alarm message through the audible and visual alarm.

[0053] An embodiment of the present invention also discloses an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete communication with each other through the communication bus;

[0054] The memory is used for storing a computer program;

[0055] The processor is configured to implement the method as described in the embodiment of the present invention when executing the program stored on the memory.

[0056] An embodiment of the present invention also discloses a computer-readable storage medium, on which instructions are stored, and when executed by one or more processors, cause the processors to execute the method as described in the embodiment of the present invention.

[0057] The embodiments of the present invention have the following advantages:

[0058] In an embodiment of the present invention, when applied to a server, there is a communication connection between the server and a hard disk insertion detection system. The hard disk insertion detection system includes a photoelectric sensor and a controller. The model information corresponding to the hard disk is obtained, and the photoelectric sensor corresponding to the model information is determined. The photoelectric sensor includes a detection probe. The lighting sequence of the hard disk indicator light and the logic signal corresponding to the lighting sequence are obtained from the controller according to the model information. The probe position of the detection probe of the photoelectric sensor is adjusted according to the indicator light position of the hard disk indicator light. The indicator light status identifier corresponding to the probe position returned by the photoelectric sensor in sequence according to the lighting sequence of the indicator light is obtained. The indicator light status identifier includes a lighting status identifier. If the indicator light status identifier of the hard disk indicator light is detected as the lighting status identifier, the indicator light signal of the hard disk indicator light is converted into an indicator light electrical signal, and the indicator light electrical signal is sent to the controller. The signal comparison result generated by the controller after comparing the indicator light electrical signal with the logic signal is obtained, and test information for characterizing the insertion test of the hard disk is generated according to the signal comparison result. Thus, the server realizes the automatic test of the hard disk insertion through the photoelectric sensor and the controller of the hard disk insertion detection system. On the one hand, the corresponding lighting sequence of the indicator light is obtained targeted according to the model information, and the probe position of the photoelectric sensor is adjusted in time according to the position of the hard disk indicator light to increase the effectiveness of the hard disk insertion test and ensure the correctness of the hard disk sequence. On the other hand, by converting the indicator light signal of the hard disk indicator light into an indicator light electrical signal and receiving the signal comparison result generated by the controller after comparing the indicator light electrical signal with the logic signal, the accuracy of the hard disk insertion test is improved. At the same time, test information for characterizing the insertion test of the hard disk is generated, so that technicians can quickly obtain the test result, quickly locate the problem hard disk when an error occurs in the hard disk insertion, and adjust it in time. Description of the Drawings

[0059] Figure 1 is a flowchart of the steps of a method for testing the insertion of a hard disk in a server provided in an embodiment of the present invention;

[0060] Figure 2 is a schematic diagram of a hard disk insertion detection system provided in an embodiment of the present invention;

[0061] Figure 3 is a flowchart of the steps of another method for testing the insertion of a hard disk in a server provided in an embodiment of the present invention;

[0062] Figure 4 is a block diagram of the structure of a device for testing the insertion of a hard disk in a server provided in an embodiment of the present invention;

[0063] Figure 5 is a block diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed implementation manner

[0064] To make the above objects, features, and advantages of the present invention more obvious and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific implementation manners.

[0065] A server, in a broad sense, refers to a computer system in a network that can provide certain services to other machines. For example, a PC (Personal Computer) that provides an ftp service externally can also be called a server. In a narrow sense, it specifically refers to some high-performance computers that can provide services externally. Compared with ordinary PCs, servers have higher requirements for stability, security, and performance. Therefore, servers are different from ordinary PCs in terms of hardware such as CPU, chipset, memory, disk system, network, etc. And a server is mainly composed of a processor, a hard disk, memory, a system bus, etc. Among them, the hard disk is the most important storage device of the server, equivalent to the core data warehouse of the server, used to store various data of software and user data. In the hard disk, the hard disk connection cable is a cable that plays a role in connecting and transmitting data between the external hard disk and the computer.

[0066] In the existing plug-in cable technology, relevant technicians manually plug in multiple cables to achieve the connection of the hard disk. However, the hard disk interfaces of the same hard disk model are the same and the interface positions are adjacent. Therefore, the relevant technology only relies on relevant technicians to manually plug in the cables and observe the lighting sequence of the hard disk indicator lights to judge the correctness of the hard disk sequence. If the number of hard disks to be connected is too large, then not only does the workload of relevant technicians increase significantly, increasing the fatigue of relevant technicians and reducing the work efficiency of hard disk installation, but also the increase in the number of cables greatly increases the risk of reverse connection of the cables, resulting in incorrect hard disk sequence and reducing the accuracy of hard disk installation.

[0067] In this regard, one of the core inventive points of the embodiments of the present invention lies in its application to a server. There is a communication connection between the server and a hard disk insertion detection system. The hard disk insertion detection system includes a photoelectric sensor and a controller. The model information corresponding to the hard disk is obtained, and the photoelectric sensor corresponding to the model information is determined. The photoelectric sensor includes a detection probe. According to the model information, the lighting sequence of the hard disk indicator light and the logical signal corresponding to the lighting sequence are obtained from the controller. The probe position of the detection probe of the photoelectric sensor is adjusted according to the position of the hard disk indicator light. The lighting status identifier of the hard disk indicator light corresponding to the probe position is obtained in sequence according to the lighting sequence of the indicator light by the photoelectric sensor. The lighting status identifier includes a lighting status identifier. If the lighting status identifier of the hard disk indicator light is detected as the lighting status identifier, the indicator light signal of the hard disk indicator light is converted into an indicator light electrical signal, and the indicator light electrical signal is sent to the controller. The signal comparison result generated by the controller after comparing the indicator light electrical signal and the logical signal is obtained. The test information for characterizing the insertion test of the hard disk is generated according to the signal comparison result. Thus, the server realizes the automatic test of the hard disk insertion through the photoelectric sensor and the controller of the hard disk insertion detection system. On the one hand, the corresponding lighting sequence of the indicator light is obtained specifically according to the model information, and the probe position of the photoelectric sensor is adjusted in time according to the position of the hard disk indicator light to increase the effectiveness of the hard disk insertion test and ensure the correctness of the hard disk sequence. On the other hand, the indicator light signal of the hard disk indicator light is converted into an indicator light electrical signal, and the signal comparison result generated by the controller after comparing the indicator light electrical signal and the logical signal is received to improve the accuracy of the hard disk insertion test. At the same time, the test information for characterizing the insertion test of the hard disk is generated so that technicians can quickly obtain the test result, quickly locate the problematic hard disk when an error occurs in the hard disk insertion, and make adjustments in time.

[0068] Referring to Figure 1 , a step flowchart of a method for testing the insertion of a hard disk in a server provided in an embodiment of the present invention is shown. It is applied to a server. There is a communication connection between the server and a hard disk insertion detection system. The hard disk insertion detection system includes a photoelectric sensor and a controller. Specifically, it may include the following steps:

[0069] Step 101, obtain the model information corresponding to the hard disk, and determine the photoelectric sensor corresponding to the model information. The photoelectric sensor includes a detection probe;

[0070] In an embodiment of the present invention, referring to Figure 2The schematic diagram of the hard disk insertion detection system is shown. The hard disk insertion detection system mainly consists of a photoelectric sensor 210, an audible and visual alarm 220, a test indicator light 230, a controller 2401, and a liquid crystal display 2402. The hard disk insertion detection system mainly serves as a test fixture to achieve the test of hard disk insertion. Among them, the photoelectric sensor (Photoelectric Transducer) can be a sensor based on the photoelectric effect, such as a color photoelectric sensor. After being irradiated by visible light, it generates the photoelectric effect and converts the optical signal into an electrical signal for output. It is a sensor that can convert the light flux into an electric quantity. It can be divided into analog photoelectric sensors and pulsed photoelectric sensors. In actual use, it mainly detects the optical signal through a detection probe. The audible and visual alarm (Audible and visual alarm) is also called an audible and visual alarm signal, which can emit two alarm signals of sound and light at the same time. The test indicator light can be an indicator light used to indicate whether the current hard disk insertion is correct. For example, when the test indicator light shows green, it means that the hard disk insertion is correct (the cable connection test is correct for the controller). The controller can be the control part in the test fixture. It is mainly composed of a control chip and peripheral circuits, and is used to collect I / O (Input / Output) signals, perform logical operations, output control signals (high and low levels), and control the action of the execution device, etc. The photoelectric sensor can be connected to the I / O port of the controller in sequence through a sensor connection cable. The controller can communicate with the server through USB interface, network port, serial port, etc. The liquid crystal display belongs to a type of flat panel display, which is used for screen display of televisions and computers, etc. The controller can display the test results through the liquid crystal display.

[0071] Optionally, before testing the hard disk insertion, the server needs to classify the models according to the hard disk insertion requirements. For example, the hard disk insertion requirements can include the number of hard disks, the insertion position, and the insertion order of the hard disks, etc. Therefore, the model information can be the server model classified according to the hard disk insertion requirements. For example, the model information corresponding to the hard disk includes 3.5*8 model, 3.5*12 model, 3.5*25 model, 3.5*24 model, 2.5*24 model (2.5-inch hard disks can also be inserted into 3.5-inch hard disk slots), etc. The actual meaning of the value in the model information is the hard disk size and the number of hard disks of the hard disk. Different model information can correspond to different photoelectric sensors. The corresponding photoelectric sensor can be obtained according to the model information corresponding to the hard disk. For example, if the model information corresponding to the hard disk is 3.5*8 model, then the photoelectric sensors numbered 0-7 corresponding to the 3.5*8 model can be selected.

[0072] Step 102: Obtain the lighting sequence of the hard disk indicator light of the hard disk and the logic signal corresponding to the lighting sequence from the controller according to the model information.

[0073] In an embodiment of the present invention, after obtaining the model information corresponding to the hard disk, it is necessary to obtain the lighting sequence of the hard disk indicator light of the hard disk and the logic signal corresponding to the lighting sequence from the controller according to the model information corresponding to the hard disk.

[0074] Optionally, the hard disk indicator light is an indicator light representing the working state of the hard disk. The lighting sequence can be the sequence in which the hard disk indicator lights of each hard disk are lit in the installation order when each hard disk is installed in the correct order. The lighting sequence is stored in the controller. The logic signal corresponding to the lighting sequence can be the logic signal that the controller recognizes the correct model information through the scanned code. For example, the logic signal is that the high-level pulses are received in sequence from I / O.0 to I / O.7 of the controller.

[0075] Step 103: Adjust the probe position of the detection probe of the photoelectric sensor according to the indicator position of the hard disk indicator light, and obtain the indicator status identifier of the hard disk indicator light corresponding to the probe position returned by the photoelectric sensor in sequence according to the lighting sequence of the indicator light. The indicator status identifier includes a lighting status identifier.

[0076] In an embodiment of the present invention, before testing the installation of the hard disk, it is necessary to align the indicator position of the hard disk indicator light with the probe position of the detection probe of the photoelectric sensor so that the corresponding hard disk can be accurately detected whether it is installed correctly during the test, so that the server can accurately obtain the indicator status identifier of the hard disk indicator light corresponding to the probe position returned by the photoelectric sensor in sequence according to the lighting sequence of the indicator light.

[0077] Optionally, the indicator status identifier is an identifier indicating whether the hard disk indicator light is in the lit state or the extinguished state during the test, and it includes a lighting status identifier and an extinguished status identifier.

[0078] Step 104: If it is detected that the indicator status identifier of the hard disk indicator light is the lighting status identifier, convert the indicator light signal of the hard disk indicator light into an indicator electrical signal, and send the indicator electrical signal to the controller.

[0079] In an embodiment of the present invention, if the server detects that the indicator status identifier of the hard disk indicator is the lit status identifier, it converts the indicator light signal of the hard disk indicator into an indicator electrical signal and sends the indicator electrical signal to the controller. If the server detects that the indicator status identifier of the hard disk indicator is the extinguished status identifier, it indicates that the hard disk is incorrectly inserted or no insertion operation has been performed. Since no optical signal is collected, there is no need to convert the optical signal into an electrical signal.

[0080] Step 105: Obtain the signal comparison result generated by the controller after comparing the indicator electrical signal with the logic signal, and generate test information for characterizing the insertion test of the hard disk according to the signal comparison result.

[0081] In an embodiment of the present invention, obtain the signal comparison result generated by the controller after comparing the indicator electrical signal with the logic signal, and generate test information for characterizing the insertion test of the hard disk according to the signal comparison result.

[0082] Optionally, if the controller detects that the indicator electrical signal is the same as the logic signal, it indicates that the comparison between the indicator electrical signal and the logic signal is consistent, and a signal comparison result indicating consistency is generated. If the controller detects that the indicator electrical signal is different from the logic signal, it indicates that the comparison between the indicator electrical signal and the logic signal is inconsistent, and a signal comparison result indicating inconsistency is generated. The test information is the test information for characterizing the insertion test of the hard disk generated according to whether the signal comparison is consistent or inconsistent, which may include test pass information and test failure information. Both the test pass information and the test failure information are stored in the test record of the server.

[0083] Refer to Figure 3 , which shows the step flowchart of another method for testing the insertion of a hard disk in a server provided in an embodiment of the present invention. Applied to a server, there is a communication connection between the server and a hard disk insertion detection system. The hard disk insertion detection system includes a photoelectric sensor and a controller, and specifically may include the following steps:

[0084] Step 301: Obtain the model information corresponding to the hard disk, and determine the photoelectric sensor corresponding to the model information. The photoelectric sensor includes a detection probe;

[0085] In an embodiment of the present invention, the server includes a server nameplate label. Obtain the model barcode of the server nameplate label, and use a barcode scanner to scan the model barcode to determine the model information corresponding to the hard disk and the photoelectric sensor corresponding to the model information.

[0086] Optionally, the server nameplate label is a label for recording various parameters, information, etc. associated with the server. A barcode scanner can be a technological product that closely combines technologies such as optics, mechanics, electronics, and software applications. It can extract information from drawings such as pictures, photos, and films to manuscripts and input it into a computer to achieve functions such as information processing, management, use, storage, or output. By using the barcode scanner to scan the model barcode of the hard disk, the model information corresponding to the hard disk can be automatically selected in the test fixture, avoiding the situation of misjudging the model information corresponding to the hard disk, and thus determining the corresponding optoelectronic sensor according to the model information.

[0087] Step 302, obtain the lighting sequence of the hard disk indicator light of the hard disk from the controller according to the model information, and the logic signal corresponding to the lighting sequence;

[0088] In an optional embodiment, the lighting sequence of the indicator light can be generated through the following sub-steps S31 - S33:

[0089] S31, obtain the number of hard disks of the hard disk and the hard disk insertion order;

[0090] S32, use the number of hard disks and the hard disk insertion order to generate the lighting sequence of the hard disk indicator light and the logic signal corresponding to the lighting sequence;

[0091] S33, write the lighting sequence of the indicator light and the logic signal into the controller.

[0092] In the embodiment of the present invention, assume that the hard disk insertion test is performed on the NF5280M5 server. First, obtain the number of hard disks of different models. For example, the number of hard disks of the 3.5*8 model is 8 hard disks, the number of hard disks of the 3.5*12 model is 12 hard disks, the number of hard disks of the 2.5*24 model is 24 hard disks, and the number of hard disks of the 3.5*25 model is 25 hard disks. Then, obtain the insertion order of each hard disk. For example, the hard disk insertion order of the 3.5*8 model is 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7, the hard disk insertion order of the 3.5*12 model is 0 - 1 - 2 - …… - 11, the hard disk insertion order of the 2.5*24 is 0 - 1 - 2 - …… - 23, and the hard disk insertion order of the 3.5*25 is 0 - 1 - 2 - …… - 24. Then, use the number of hard disks and the hard disk insertion order to generate the lighting sequence of the hard disk indicator light. Table 1 is the lighting sequence of the indicator light for the 3.5*8 model, Table 2 is the lighting sequence of the indicator light for the 3.5*12 model, Table 3 is the lighting sequence of the indicator light for the 2.5*24 model, and Table 4 is the lighting sequence of the indicator light for the 3.5*25 model. After generating the lighting sequence of the indicator light corresponding to the model information, the logic signal corresponding to the lighting sequence can be obtained and written into the controller.

[0093]

[0094] Table 1

[0095]

[0096] Table 2

[0097]

[0098] Table 3

[0099]

[0100] Table 4

[0101] Step 303: Adjust the probe position of the photoelectric sensor according to the indicator position of the hard disk indicator, and obtain the indicator status identifier of the hard disk indicator corresponding to the probe position returned by the photoelectric sensor in sequence according to the indicator lighting sequence. The indicator status identifier includes a lighting status identifier.

[0102] In the embodiment of the present invention, the probe position of the detection probe of the photoelectric sensor is sequentially aligned with the indicator position of the hard disk indicator, and the indicator status identifier of the hard disk indicator corresponding to the probe position returned by the photoelectric sensor in sequence according to the indicator lighting sequence is obtained. For example, for the 3.5*8 model, the photoelectric sensors numbered 0-7 are selected, the sensor wiring of the photoelectric sensor is sequentially connected to the 0-7 positions of the controller I / O port, and the detection probe of the sensor is sequentially aligned with the hard disk indicators at the 0-7 positions.

[0103] Step 304: If it is detected that the indicator status identifier of the hard disk indicator is the lighting status identifier, convert the indicator light signal of the hard disk indicator into an indicator electrical signal, and send the indicator electrical signal to the controller.

[0104] In the embodiment of the present invention, if it is sequentially detected that the indicator status identifiers of the hard disk indicators are lighting status identifiers in the indicator lighting sequence, the indicator light signals of the hard disk indicators are sequentially converted into indicator electrical signals, and each indicator electrical signal is sent to the controller. For example, after the hard disk insertion test starts, the hard disk indicator is triggered to light up sequentially from the "0" position. After the hard disk indicator lights up sequentially, the photoelectric sensor corresponding to the model information of the hard disk can mark the indicator status of the hard disk indicator as the lighting status. The server can control the photoelectric sensor to convert the indicator light signal into an indicator electrical signal and sequentially transmit it to the controller according to the indicator lighting sequence for the controller to compare the signals.

[0105] Step 305: Obtain the signal comparison result generated by the controller after comparing the indicator light electrical signal and the logic signal. If the signal comparison result is that the signals are in agreement, obtain the test pass information returned by the controller to indicate that the hard disk insertion test has passed.

[0106] In an embodiment of the present invention, if the signal comparison result is that the signals are in agreement, obtain the test pass information returned by the controller to indicate that the hard disk insertion test has passed, send the test pass information to the liquid crystal display for display, and light the test indicator light according to the preset indicator light color. The preset indicator light color can be a color set in advance by relevant technicians according to requirements, such as green.

[0107] In an example, assume that a hard disk insertion test is performed on a 3.5*8 model. After the test starts, the hard disk indicator lights up sequentially from positions 0-7. Then, the color photoelectric sensors 1 at positions 0-7 receive the optical signals and actuate in sequence, convert the optical signals into actually detected pulse signals (electrical signals), and send the actually detected pulse signals to the controller through the I / O.0-I / O.7 ports corresponding to positions 0-7. The correct logic signal that the controller can identify the hard disk model information through coding is: the I / O.0-I / O.7 ports receive high-level pulses in sequence. If the pulse signals received by the controller's I / O.0-I / O.7 ports are all high-level pulses, it means that the signal comparison result is that the signals are in agreement. Then, obtain the test pass information returned by the controller to indicate that the hard disk insertion test has passed, send the test pass information to the liquid crystal display for display, and at the same time light the test indicator light of the test fixture in a green display style.

[0108] Step 306: Obtain the signal comparison result generated by the controller after comparing the indicator light electrical signal and the logic signal. If the signal comparison result is that the signals are not in agreement, obtain the test failure information returned by the controller to indicate that the hard disk insertion test has failed.

[0109] In an embodiment of the present invention, if the signal comparison result is that the signals are not in agreement, obtain the test failure information returned by the controller to indicate that the hard disk insertion test has failed, send the test failure information to the liquid crystal display for display, and light the sound and light alarm to send out an alarm message.

[0110] As an example, assume that a hard disk insertion test is performed on a 3.5*8 model. After the test starts, the hard disk indicator lights of the hard disk are lit sequentially from positions 0 to 7. Then, the color photoelectric sensors 1 at positions 0 to 7 receive the optical signals in sequence and act, converting the optical signals into actually detected pulse signals (electrical signals), and sending the actually detected pulse signals to the controller through the I / O.0 - I / O.7 ports corresponding to positions 0 to 7. The correct logic signal that the controller can identify the hard disk model information through coding is: the I / O.0 - I / O.7 ports receive high - level pulses in sequence. If there are low - level pulses in the pulse signals received by the controller's I / O.0 - I / O.7 ports in sequence, it means that the signal comparison result is inconsistent. Then, obtain the test failure information returned by the controller indicating that the hard disk insertion test fails, send the test failure information to the liquid crystal display for display, and at the same time light up the sound and light alarm of the test fixture, triggering the sound and light alarm to send out an alarm message, thereby prompting the production line employees that the test fails, so as to prevent the servers with test failures from flowing into the normal production line.

[0111] In an alternative example of the present invention, after the hard disk insertion test of the server is completed, the server can update the test results in real - time and save the test information corresponding to the test results into the test record, so that relevant technical personnel can view it at any time or quickly locate the hard disk with insertion problems, thereby timely adjusting the errors and improving the effectiveness of hard disk insertion.

[0112] It should be noted that the embodiments of the present invention include but are not limited to the above examples. It can be understood that under the guidance of the idea of the embodiments of the present invention, those skilled in the art can set according to the actual situation, and the present invention does not limit this.

[0113] In an embodiment of the present invention, it is applied to a server. There is a communication connection between the server and a hard disk insertion detection system. The hard disk insertion detection system includes a photoelectric sensor and a controller. The model information corresponding to the hard disk is obtained, and the photoelectric sensor corresponding to the model information is determined. The photoelectric sensor includes a detection probe. According to the model information, the lighting sequence of the hard disk indicator light of the hard disk and the logic signal corresponding to the lighting sequence are obtained from the controller. The probe position of the detection probe of the photoelectric sensor is adjusted according to the indicator light position of the hard disk indicator light. The indicator light status identifier of the hard disk indicator light corresponding to the probe position is obtained in sequence according to the lighting sequence of the indicator light by the photoelectric sensor. The indicator light status identifier includes a lighting status identifier. If the indicator light status identifier of the hard disk indicator light is detected as the lighting status identifier, the indicator light signal of the hard disk indicator light is converted into an indicator light electrical signal, and the indicator light electrical signal is sent to the controller. The signal comparison result generated by the controller after comparing the indicator light electrical signal with the logic signal is obtained. The test information for characterizing the insertion test of the hard disk is generated according to the signal comparison result. Thus, the server realizes the automatic test of the hard disk insertion through the photoelectric sensor and the controller of the hard disk insertion detection system. On the one hand, the corresponding lighting sequence of the indicator light is obtained specifically according to the model information, and the probe position of the photoelectric sensor is adjusted in time according to the position of the hard disk indicator light to increase the effectiveness of the hard disk insertion test and ensure the correctness of the hard disk order. On the other hand, by converting the indicator light signal of the hard disk indicator light into an indicator light electrical signal and receiving the signal comparison result generated by the controller after comparing the indicator light electrical signal with the logic signal, the accuracy of the hard disk insertion test is improved. At the same time, the test information for characterizing the insertion test of the hard disk is generated, so that technicians can quickly know the test result, quickly locate the problem hard disk when an error occurs in the hard disk insertion, and adjust it in time.

[0114] It should be noted that, for the method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the embodiments of the present invention are not limited by the described action sequence, because according to the embodiments of the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily essential for the embodiments of the present invention.

[0115] Referring to Figure 4 , a structural block diagram of a hard disk insertion test device for a server provided in an embodiment of the present invention is shown. It is applied to a server. There is a communication connection between the server and a hard disk insertion detection system. The hard disk insertion detection system includes a photoelectric sensor and a controller. Specifically, it may include the following modules:

[0116] The model information acquisition module 401 is configured to acquire the model information corresponding to the hard disk, and determine the optoelectronic sensor corresponding to the model information. The optoelectronic sensor includes a detection probe;

[0117] The indicator light lighting sequence acquisition module 402 is configured to acquire the lighting sequence of the hard disk indicator light of the hard disk from the controller according to the model information, and the logic signal corresponding to the lighting sequence;

[0118] The indicator light status identification return module 403 is configured to adjust the probe position of the detection probe of the optoelectronic sensor according to the indicator position of the hard disk indicator light, and acquire the indicator light status identification of the hard disk indicator light corresponding to the probe position sequentially returned by the optoelectronic sensor according to the indicator light lighting sequence. The indicator light status identification includes a lighting status identification;

[0119] The indicator light electrical signal conversion module 404 is configured to convert the indicator light optical signal of the hard disk indicator light into an indicator light electrical signal if it is detected that the indicator light status identification of the hard disk indicator light is the lighting status identification, and send the indicator light electrical signal to the controller;

[0120] The test information generation module 405 is configured to acquire the signal comparison result generated by the controller after comparing the indicator light electrical signal and the logic signal, and generate test information for characterizing the insertion test of the hard disk according to the signal comparison result.

[0121] In an optional embodiment, the server includes a server nameplate label. The model information acquisition module 401 is specifically configured to:

[0122] Acquire the model barcode of the server nameplate label;

[0123] Use a barcode scanner to scan the model barcode to determine the model information corresponding to the hard disk, and determine the optoelectronic sensor corresponding to the model information.

[0124] In an optional embodiment, the indicator light lighting sequence is generated in the following manner:

[0125] Acquire the number of hard disks and the hard disk insertion sequence of the hard disk;

[0126] Use the number of hard disks and the hard disk insertion sequence to generate the lighting sequence of the hard disk indicator light and the logic signal corresponding to the lighting sequence;

[0127] Write the indicator light lighting sequence and the logic signal into the controller.

[0128] In an alternative embodiment, the indicator light status identification return module 403 is specifically configured to:

[0129] Align the probe positions of the detection probes of the photoelectric sensor with the indicator light positions of the hard disk indicator lights in sequence;

[0130] Obtain the indicator light status identifications of the hard disk indicator lights corresponding to the probe positions sequentially returned by the photoelectric sensor according to the indicator light lighting sequence.

[0131] In an alternative embodiment, the indicator light electrical signal conversion module 404 is specifically configured to:

[0132] If it is detected that the indicator light status identifications of the hard disk indicator lights are the lit status identifications in sequence according to the indicator light lighting sequence, convert the indicator light signals of the hard disk indicator lights into indicator light electrical signals in sequence, and send each of the indicator light electrical signals to the controller.

[0133] In an alternative embodiment, the hard disk insertion test system includes a liquid crystal display screen and a test indicator light, and the test information generation module 405 includes:

[0134] A test pass information generation sub-module, configured to obtain the test pass information returned by the controller for indicating that the hard disk insertion test is passed if the signal comparison result is that the signals are compared and are consistent;

[0135] A test pass information display sub-module, configured to send the test pass information to the liquid crystal display screen for display, and light the test indicator light according to a preset indicator light color.

[0136] In an alternative embodiment, the hard disk insertion test system further includes an audible and visual alarm, and the test information generation module 405 includes:

[0137] A test failure information generation sub-module, configured to obtain the test failure information returned by the controller for indicating that the hard disk insertion test fails if the signal comparison result is that the signals are compared and are inconsistent;

[0138] A test failure information display sub-module, configured to send the test failure information to the liquid crystal display screen for display, light the audible and visual alarm, and send out an alarm message through the audible and visual alarm.

[0139] For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple. For related parts, refer to the partial description of the method embodiment.

[0140] In addition, an embodiment of the present invention further provides an electronic device, including: a processor, a memory, and a computer program stored on the memory and executable on the processor. When the computer program is executed by the processor, it implements each process of the above-mentioned embodiment of the hard disk insertion test method of the server, and can achieve the same technical effect. To avoid repetition, it will not be described here again.

[0141] An embodiment of the present invention further provides a computer-readable storage medium. A computer program is stored on the computer-readable storage medium. When the computer program is executed by the processor, it implements each process of the above-mentioned embodiment of the hard disk insertion test method of the server, and can achieve the same technical effect. To avoid repetition, it will not be described here again. Among them, the computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc, etc.

[0142] Figure 5 Schematic diagram of the structure of an electronic device for implementing each embodiment of the present invention.

[0143] The electronic device 500 includes but is not limited to: a radio frequency unit 501, a network module 502, an audio output unit 503, an input unit 504, a sensor 505, a display unit 506, a user input unit 507, an interface unit 508, a memory 509, a processor 510, and a power supply 511, etc. Those skilled in the art can understand that Figure 5 The structure of the electronic device shown in does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements. In an embodiment of the present invention, the electronic device includes but is not limited to a mobile phone, a tablet computer, a notebook computer, a handheld computer, a vehicle-mounted terminal, a wearable device, and a pedometer, etc.

[0144] It should be understood that in an embodiment of the present invention, the radio frequency unit 501 can be used for receiving and sending signals during information reception or call processes. Specifically, after receiving the downlink data from the base station, it is given to the processor 510 for processing; in addition, the uplink data is sent to the base station. Usually, the radio frequency unit 501 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier, a duplexer, etc. In addition, the radio frequency unit 501 can also communicate with the network and other devices through a wireless communication system.

[0145] The electronic device provides the user with wireless broadband Internet access through the network module 502, such as helping the user to send and receive emails, browse web pages, and access streaming media, etc.

[0146] The audio output unit 503 can convert audio data received by the radio frequency unit 501 or the network module 502 or stored in the memory 509 into an audio signal and output it as sound. Moreover, the audio output unit 503 can also provide an audio output related to a specific function performed by the electronic device 500 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 503 includes a speaker, a buzzer, a receiver, etc.

[0147] The input unit 504 is used to receive an audio or video signal. The input unit 504 may include a Graphics Processing Unit (GPU) 5041 and a microphone 5042. The graphics processor 5041 processes the image data of a still picture or a video obtained by an image capturing device (such as a camera) in a video capture mode or an image capture mode. The processed image frame can be displayed on the display unit 506. The image frame processed by the graphics processor 5041 can be stored in the memory 509 (or other storage media) or transmitted via the radio frequency unit 501 or the network module 502. The microphone 5042 can receive sound and can process such sound into audio data. The processed audio data can be output in a format that can be transmitted to a mobile communication base station via the radio frequency unit 501 in the case of a phone call mode.

[0148] The electronic device 500 further includes at least one sensor 505, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor. Among them, the ambient light sensor can adjust the brightness of the display panel 5061 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 5061 and / or the backlight when the electronic device 500 is moved to the ear. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of the electronic device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as a pedometer, a knock), etc.; the sensor 505 can also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which will not be elaborated here.

[0149] The display unit 506 is used to display information input by the user or information provided to the user. The display unit 506 may include a display panel 5061, and the display panel 5061 can be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), etc.

[0150] The user input unit 507 can be used to receive input digital or character information and generate key signal inputs related to user settings and function control of the electronic device. Specifically, the user input unit 507 includes a touch panel 5071 and other input devices 5072. The touch panel 5071, also known as a touch screen, can collect touch operations of the user on or near it (such as operations of the user using any suitable object or accessory such as a finger or a stylus on or near the touch panel 5071). The touch panel 5071 can include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the touch position of the user and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the processor 510, and receives and executes the command sent by the processor 510. In addition, various types such as resistive, capacitive, infrared, and surface acoustic wave can be used to implement the touch panel 5071. In addition to the touch panel 5071, the user input unit 507 may further include other input devices 5072. Specifically, the other input devices 5072 may include but are not limited to a physical keyboard, function keys (such as volume control keys, power on / off keys, etc.), a trackball, a mouse, and a joystick, which will not be elaborated here.

[0151] Further, the touch panel 5071 can cover the display panel 5061. After the touch panel 5071 detects a touch operation on or near it, it transmits the operation to the processor 510 to determine the type of the touch event. Subsequently, the processor 510 provides a corresponding visual output on the display panel 5061 according to the type of the touch event. Although in Figure 5 the touch panel 5071 and the display panel 5061 are implemented as two independent components to realize the input and output functions of the electronic device, in some embodiments, the touch panel 5071 and the display panel 5061 can be integrated to realize the input and output functions of the electronic device, and the specific implementation here is not limited.

[0152] The interface unit 508 is an interface for connecting an external device to the electronic device 500. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, and so on. The interface unit 508 can be used to receive inputs from an external device (such as data information, power, etc.) and transmit the received inputs to one or more components within the electronic device 500 or can be used to transmit data between the electronic device 500 and the external device.

[0153] The memory 509 can be used to store software programs and various data. The memory 509 mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created according to the use of the mobile phone (such as audio data, phone book, etc.). In addition, the memory 509 may include high-speed random access memory and may also include non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0154] The processor 510 is the control center of the electronic device, connecting various parts of the entire electronic device through various interfaces and circuits. By running or executing software programs and / or modules stored in the memory 509, and by calling the data stored in the memory 509, it executes various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. The processor 510 may include one or more processing units; preferably, the processor 510 may integrate an application processor and a modem processor. Among them, the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor may not be integrated into the processor 510.

[0155] The electronic device 500 may also include a power supply 511 (such as a battery) for powering each component. Preferably, the power supply 511 can be logically connected to the processor 510 through a power management system, so as to implement functions such as management of charging, discharging, and power consumption management through the power management system.

[0156] In addition, the electronic device 500 includes some functional modules not shown here, which will not be elaborated further.

[0157] It should be noted that in this article, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of another identical element in the process, method, article or device including that element.

[0158] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-described example methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions for causing a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in various embodiments of the present invention.

[0159] The embodiments of the present invention have been described above in conjunction with the accompanying drawings. However, the present invention is not limited to the above specific embodiments. The above specific embodiments are merely illustrative and not restrictive. Under the inspiration of the present invention, those of ordinary skill in the art can also make many forms without departing from the spirit and scope protected by the claims of the present invention, and all of them belong to the protection scope of the present invention.

[0160] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed in the embodiments of the present invention can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.

[0161] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described systems, devices, and units can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.

[0162] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling, direct coupling, or communication connection can be through some interfaces. The indirect coupling or communication connection of the devices or units can be in an electrical, mechanical, or other form.

[0163] The unit described as a separation component may or may not be physically separated. The component shown as a unit may or may not be a physical unit, that is, it may be located in one place or distributed across multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0164] In addition, in each embodiment of the present invention, each functional unit may be integrated into a processing unit, may exist separately physically for each unit, or two or more units may be integrated into one unit.

[0165] If the described function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or a part of this technical solution can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical discs that can store program codes.

[0166] The above is only the specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of changes or substitutions, which should all be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.

Claims

1. A hard disk insertion test method for a server, characterized in that, Applied to a server, there is a communication connection between the server and a hard disk insertion detection system. The hard disk insertion detection system includes a photoelectric sensor and a controller. The method includes: Obtain the model information corresponding to the hard disk, and determine the photoelectric sensor corresponding to the model information. The photoelectric sensor includes a detection probe; Obtain the lighting sequence of the hard disk indicator light of the hard disk and the logic signal corresponding to the lighting sequence from the controller according to the model information. The lighting sequence of the indicator light is generated in the following manner: Obtain the number of hard disks and the hard disk insertion sequence of the hard disk; Use the number of hard disks and the hard disk insertion sequence to generate the lighting sequence of the hard disk indicator light and the logic signal corresponding to the lighting sequence; Write the lighting sequence of the indicator light and the logic signal into the controller; Adjust the probe position of the detection probe of the photoelectric sensor according to the indicator position of the hard disk indicator light, and obtain the indicator status identifier of the hard disk indicator light corresponding to the probe position returned by the photoelectric sensor in sequence according to the lighting sequence of the indicator light. The indicator status identifier includes a lighting status identifier; If it is detected that the indicator status identifier of the hard disk indicator light is the lighting status identifier, convert the indicator light signal of the hard disk indicator light into an indicator electrical signal, and send the indicator electrical signal to the controller; Obtain the signal comparison result generated by the controller after comparing the indicator electrical signal and the logic signal, and generate test information for characterizing the insertion test of the hard disk according to the signal comparison result.

2. The method according to claim 1, characterized in that The server includes a server nameplate label. The obtaining the model information corresponding to the hard disk and determining the photoelectric sensor corresponding to the model information includes: Obtain the model barcode of the server nameplate label; Use a barcode scanner to scan the model barcode to determine the model information corresponding to the hard disk, and determine the photoelectric sensor corresponding to the model information.

3. The method according to claim 1, characterized in that, The adjusting the probe position of the detection probe of the photoelectric sensor according to the indicator position of the hard disk indicator light and obtaining the indicator status identifier of the hard disk indicator light corresponding to the probe position returned by the photoelectric sensor in sequence according to the lighting sequence of the indicator light includes: Align the probe position of the detection probe of the photoelectric sensor with the indicator position of the hard disk indicator light in sequence; Obtain the indicator status identifier of the hard disk indicator light corresponding to the probe position returned by the photoelectric sensor in sequence according to the lighting sequence of the indicator light.

4. The method according to claim 1, wherein The if it is detected that the indicator status identifier of the hard disk indicator light is the lighting status identifier, convert the indicator light signal of the hard disk indicator light into an indicator electrical signal, and send the indicator electrical signal to the controller includes: If it is detected in sequence according to the lighting sequence of the indicator light that the indicator status identifier of the hard disk indicator light is the lighting status identifier, convert the indicator light signal of the hard disk indicator light into an indicator electrical signal in sequence, and send each indicator electrical signal to the controller.

5. The method according to claim 1, wherein The hard disk insertion test system includes a liquid crystal display screen and test indicator lights. Generating test information for characterizing the hard disk insertion test according to the signal comparison result includes: If the signal comparison result is that the signals are in agreement, obtain the test pass information returned by the controller for characterizing that the hard disk insertion test is passed; Send the test pass information to the liquid crystal display screen for display, and light the test indicator lights according to a preset indicator light color.

6. The method according to claim 5, wherein The hard disk insertion test system further includes an audible and visual alarm. Generating test information for characterizing the hard disk insertion test according to the signal comparison result includes: If the signal comparison result is that the signals are not in agreement, obtain the test failure information returned by the controller for characterizing that the hard disk insertion test fails; Send the test failure information to the liquid crystal display screen for display, light the audible and visual alarm, and send an alarm message through the audible and visual alarm.

7. A hard disk insertion test device for a server, characterized in that, Applied to a server, there is a communication connection between the server and the hard disk insertion detection system. The hard disk insertion detection system includes a photoelectric sensor and a controller. The device includes: A model information acquisition module, configured to acquire the model information corresponding to the hard disk, and determine the photoelectric sensor corresponding to the model information. The photoelectric sensor includes a detection probe; An indicator light lighting sequence acquisition module, configured to acquire the indicator light lighting sequence of the hard disk indicator lights of the hard disk and the logic signal corresponding to the indicator light lighting sequence from the controller according to the model information. The indicator light lighting sequence is generated in the following manner: acquire the number of hard disks and the hard disk insertion sequence of the hard disk; generate the indicator light lighting sequence for the hard disk indicator lights and the logic signal corresponding to the indicator light lighting sequence by using the number of hard disks and the hard disk insertion sequence; write the indicator light lighting sequence and the logic signal into the controller; An indicator light status identification return module, configured to adjust the probe position of the detection probe of the photoelectric sensor according to the indicator light position of the hard disk indicator lights, and acquire the indicator light status identification of the hard disk indicator lights corresponding to the probe position returned by the photoelectric sensor in sequence according to the indicator light lighting sequence. The indicator light status identification includes a lighting status identification; An indicator light electrical signal conversion module, configured to, if it is detected that the indicator light status identification of the hard disk indicator lights is the lighting status identification, convert the indicator light optical signal of the hard disk indicator lights into an indicator light electrical signal, and send the indicator light electrical signal to the controller; A test information generation module, configured to acquire the signal comparison result generated by the controller after comparing the indicator light electrical signal and the logic signal, and generate test information for characterizing the hard disk insertion test according to the signal comparison result.

8. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus. Among them, the processor, the communication interface, and the memory complete communication with each other through the communication bus; The memory is used for storing a computer program; When the processor executes the program stored in the memory, it implements the method according to any one of claims 1-6.

9. A computer-readable storage medium having instructions stored thereon that, when executed by one or more processors, cause the processors to execute the method according to any one of claims 1-6.

Citation Information

Patent Citations

  • Multi-control storage hard disk running status indicating system and method

    CN106445793A

  • Cable plugging detection method and device, equipment and storage medium

    CN115129559A