Screen printing information matching method and device
By automatically identifying and matching slot positioning lamps and silk screen information on the server, the problem of low manual matching efficiency in the prior art is solved, and efficient and accurate silk screen and slot matching is achieved.
Patent Information
- Application Number
- CN202412000526.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2044-12-31
AI Technical Summary
In the prior art, the manual matching efficiency of server chassis screen printing and slots is low, resulting in misreading and inefficient problems.
The camera on the USB slot collects images of the server slot positioning lamp and silkscreen sticker, identify the target slot positioning lamp and silkscreen information, automatically match, and establish the relationship between the slot number and silkscreen information.
The efficiency of matching the server chassis silk screen and slots is improved, the risk of misreading manual operations is reduced, automated matching is achieved, and overall efficiency is improved.
Smart Images

Figure CN120047930A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of server hard disk status display. Specifically, the present application relates to a method and device for matching silk screen information. Background Art
[0002] Currently, in the server field, there is no good automatic matching technology for the silk screen of the Peripheral Component Interconnect Express (PCIe) slot. After the silk screen designs of chassis with different models and configurations in server production are completed, firmware development engineers need to manually read them and then write them into the firmware to correspond to the same slot number. In this way, manual operations are prone to misreading and the efficiency is low.
[0003] In view of the above problems, there is no effective solution yet. Summary of the Invention
[0004] The embodiments of the present application provide a method and device for matching silk screen information to at least solve the problem of low efficiency in manually matching the silk screen of the server chassis and slots in related technologies.
[0005] According to an embodiment of the present application, a method for matching silk screen information is provided, including: collecting the i-th image through a camera on the USB slot, where the i-th image includes the slot positioning lights and slot silk screen stickers on the server, and i is an integer; identifying the i-th target slot positioning light in the i-th image, where the i-th target slot positioning light is in an on state in the i-th image; identifying each silk screen information in the slot silk screen sticker, and matching the i-th target slot positioning light with each silk screen information.
[0006] In an exemplary embodiment, matching the i-th target slot positioning light with each silk screen information includes: determining the position of the i-th target slot positioning light in the i-th image to obtain the i-th target position; determining the silk screen information closest to the i-th target position among the silk screen information as the i-th target silk screen information; determining the i-th target silk screen information as the silk screen information matching the i-th target slot, where the i-th target slot positioning light is set on the i-th target slot.
[0007] In an exemplary embodiment, after determining the i-th target silk screen information as the silk screen information matching the i-th target slot, the method further includes: establishing an association relationship between the i-th target silk screen information and the i-th target slot number, where the i-th target slot number is the number of the i-th target slot.
[0008] In an exemplary embodiment, before acquiring the i-th image through the camera on the USB slot, the method further includes: receiving the i-th target slot number from the basic input / output system, and controlling the i-th target slot positioning light on the i-th target slot corresponding to the i-th target slot number to be in the on state; after establishing the association relationship between the i-th target silk screen information and the i-th target slot number, the method further includes: sending the association relationship to the basic input / output system.
[0009] In an exemplary embodiment, the method further includes: sequentially controlling the slot positioning lights provided on each of the slots to be in the on state, and sequentially matching the slot positioning lights in the on state with the silk screen information in the slot silk screen stickers, where the i-th target slot positioning light is the slot positioning light that performs the silk screen information matching for the i-th time, and when acquiring the i-th image, the i-th target slot positioning light is in the on state, and when the i-th target slot positioning light is in the on state, the other slot positioning lights on the server are in the off state; in the case where the i-th target slot positioning light is the last slot positioning light that performs the silk screen information matching, after matching the i-th target slot positioning light with each of the silk screen information, the method further includes: sending the target mapping relationship table to the basic input / output system, where the target mapping relationship table records the association relationship between each slot number and the corresponding silk screen information; in the case where the i-th target slot positioning light is not the last slot positioning light that performs the silk screen information matching, after matching the i-th target slot positioning light with each of the silk screen information, the method further includes: acquiring the (i + 1)-th image through the camera on the USB slot; identifying the (i + 1)-th target slot positioning light in the (i + 1)-th image, where the (i + 1)-th target slot positioning light is in the on state in the (i + 1)-th image; identifying each of the silk screen information in the slot silk screen stickers, and matching the (i + 1)-th target slot positioning light with each of the silk screen information.
[0010] In an exemplary embodiment, a first USB slot and a second USB slot are provided on the server. The first USB slot is disposed on the front window of the server chassis, and the second USB slot is disposed on the rear window of the server chassis. Wherein, collecting the i-th image through a camera on the USB slot includes: collecting the i-th image through a first camera on the first USB slot, where the i-th image is an image captured by the first camera of the front window of the server chassis, and the slot positioning light and the slot silk-screen sticker are disposed on the front window of the server chassis; or, collecting the i-th image through a second camera on the second USB slot, where the i-th image is an image captured by the second camera of the rear window of the server chassis, and the slot positioning light and the slot silk-screen sticker are disposed on the rear window of the server chassis.
[0011] According to another embodiment of the present application, a device for matching silk-screen information is provided, including: a collecting module, configured to collect the i-th image through a camera on the USB slot, where the i-th image includes a slot positioning light and a slot silk-screen sticker on the server, and i is an integer; an identifying module, configured to identify the i-th target slot positioning light in the i-th image, where the i-th target slot positioning light is in an on state in the i-th image; a matching module, configured to identify each silk-screen information in the slot silk-screen sticker, and match the i-th target slot positioning light with each silk-screen information.
[0012] According to still another embodiment of the present application, a computer-readable storage medium is further provided. A computer program is stored in the computer-readable storage medium, where the computer program is configured to execute the steps in any one of the above method embodiments when running.
[0013] According to still another embodiment of the present application, an electronic device is further provided, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0014] Through the present application, since the i-th image is collected through a camera on the USB slot, where the i-th image includes a slot positioning light and a slot silk-screen sticker on the server, and i is an integer; the i-th target slot positioning light in the i-th image is identified, where the i-th target slot positioning light is in an on state in the i-th image; each silk-screen information in the slot silk-screen sticker is identified, and the i-th target slot positioning light is matched with each silk-screen information. Therefore, the problem of low efficiency in manually matching the silk-screen of the server chassis with the slot in the related art can be solved, and the effect of improving the matching efficiency of the silk-screen of the server chassis with the slot can be achieved. Brief Description of the Drawings
[0015] Figure 1 is a hardware structure block diagram of a computer device for a method of matching silk screen information according to an embodiment of the present application;
[0016] Figure 2 is a flowchart of a method of matching silk screen information according to an embodiment of the present application;
[0017] Figure 3 is a structural diagram of a server chassis with a slot positioning light and a USB slot provided at the front or rear according to an embodiment of the present invention;
[0018] Figure 4 is a schematic diagram of a slot positioning light and a slot silk screen sticker according to an embodiment of the present invention;
[0019] Figure 5 is a structural block diagram of a BMC controlling a camera to collect and process images according to an embodiment of the present invention;
[0020] Figure 6 is a flowchart of automatic matching of PCIe and hard disk slot silk screens based on machine vision recognition according to an embodiment of the present invention;
[0021] Figure 7 is a structural block diagram of a device for matching silk screen information according to an embodiment of the present application. Detailed Description of the Embodiments
[0022] The embodiments of the present application will be described in detail below with reference to the drawings and in conjunction with the embodiments.
[0023] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily describe a specific order or sequence.
[0024] The relevant technical background of this embodiment is as follows:
[0025] The Baseboard Management Controller (BMC) is a dedicated controller used to monitor and manage servers. In layman's terms, the BMC is an independent system under the host server system. This independent system has its own processor and memory. Even if the host hardware or operating system crashes or shuts down, the host system can still be managed by the BMC system. It is like a backdoor on the server for server management. Generally, when a new server is racked, one way is to modify the network configuration related to the BMC, configure the Internet Protocol (IP) address, gateway, and connect an Ethernet cable through the out-of-band management port to achieve communication. Then, use the Intelligent Platform Management Interface (IPMI) to achieve remote management of the server, such as some operations like console redirection, and then perform remote management, install the system, etc.
[0026] The BMC system mainly has the following functions:
[0027] Device information management: Record the detailed information of the server, including model, manufacturer, date, production and technical information of each component, chassis information, motherboard information, etc., as well as the information of the BMC itself, such as the server hostname, IP address, BMC firmware version, etc.
[0028] Server status monitoring and management: Detect the health status of various components of the server (such as the central processing unit, memory, hard disk, fan, chassis, etc.), such as temperature and voltage. At the same time, adjust the fan speed in real time according to the situation of each temperature acquisition point to ensure that the server does not overheat and control the overall power consumption within a reasonable range. If any abnormality occurs in a single-board component, the BMC will report the information to the upper-layer network management in a timely manner through various industry-standard specifications such as the Simple Network Management Protocol (SNMP), Simple Mail Transfer Protocol (SMTP), and Redfish protocol.
[0029] Remote control and management of the server: Include operations such as power on / off, restart, maintenance, firmware update, and system installation of the server.
[0030] Maintenance management: Include log management, user management, BIOS management, alarm management, etc.
[0031] BMC is generally regarded as a small operating system or dedicated management subsystem independent of the server computing node, and it has greater permissions than the host server. This enables BMC to manage and monitor business nodes in real time, ensuring the separation of business nodes and management nodes, thus avoiding interference from business nodes to management nodes.
[0032] Broadly speaking, BMC is a System on Chip (SOP) system, which is divided into two levels: BMC chip and BMC firmware. It does not depend on other hardware (such as central processing unit, memory, hard disk, etc.) or software (such as Basic Input / Output System (BIOS), Operating System (OS), Complex Programmable Logic Device (CPLD), etc.) on the system, but exists as a completely independent system.
[0033] Peripheral Component Interconnect Express (PCIe) is a high-speed serial computer expansion bus standard designed to replace the old PCI, PCI-X, and Accelerated Graphics Port bus standards. PCIe belongs to high-speed serial point-to-point dual-channel high-bandwidth transmission, and the devices connected are allocated exclusive channel bandwidth and do not share bus bandwidth. It mainly supports functions such as active power management, error reporting, end-to-end reliable transmission, hot plugging, and quality of service.
[0034] The development process of PCIe is as follows:
[0035] PCIe 1.0: Starting in 2003, it introduced a transmission rate of 2.5 GT / s.
[0036] PCIe 2.0: Launched in 2007, it doubled the transmission rate to 5 GT / s while maintaining backward compatibility with version 1.0.
[0037] PCIe 3.0: Released in 2010, it further increased the rate to 8 GT / s and introduced a more efficient 128b / 130b encoding scheme.
[0038] PCIe 4.0: Launched in 2017, the rate reached 16 GT / s, bringing unprecedented performance improvements to storage and network devices.
[0039] PCIe 5.0: Released in 2019, it increased the rate to 32 GT / s, providing strong support for high-performance computing and data center applications.
[0040] PCIe 6.0: Launched in 2022, it achieved a transmission rate of 64 GT / s, further promoting the development of technology.
[0041] PCIe 7.0: Starting in 2023, the PCI-SIG announced the specification of PCI Express (PCIe) 7.0, with the final version expected to be released in 2025. The maximum data rate is increased to 128 gigatransfers per second (GT / s), improving energy efficiency and retaining backward compatibility with previous generations of specifications.
[0042] PCIe 7.0 is the next-generation computer interconnect technology, aiming to increase the data transfer speed per pin to 128 GT / s, which is twice that of PCIe 6.0's 64 GT / s. The development of this technology marks a further advancement in computer interconnect technology, providing stronger support for future high-performance computing and data center applications.
[0043] The silk screen printing process, also known as the screen printing process, is a technology that uses a silk screen as the printing plate base and makes a silk screen printing plate with patterns and texts through a photosensitive plate-making method for printing. This process includes five basic elements: silk screen printing plate, squeegee, ink, printing table, and substrate. The mesh holes in the graphic part of the silk screen printing plate can pass through the ink, while the non-graphic part cannot pass through the ink, thus realizing printing. During the printing process, after the ink is applied with a certain pressure by the squeegee, it is squeezed through the mesh holes in the graphic part of the silk screen printing plate onto the substrate.
[0044] The silk screen printing process has the characteristics of strong adaptability, simple processes, high production efficiency, and low cost, and is especially suitable for mass production. It is widely used in the printing of various materials, including but not limited to paper printing. In addition, silk screen printing also has an important application in PCB (printed circuit board) manufacturing. By printing text information such as circuit points, components, and circuit symbols on the PCB board, it facilitates the installation, maintenance, and identification of circuits.
[0045] During the design, production, and maintenance processes of PCIe devices, the silk screen information plays a crucial role. Silk screen, that is, the identification information printed on the device, is essential for device identification, positioning, and fault troubleshooting. The relationship between device identification and silk screen information:
[0046] A method for updating PCIe silk screen information in the System Management BIOS (SMBIOS) includes allocating Slot Identification (SLOTID) for the PCIe slots on the motherboard, creating a slot silk screen table, and updating the information such as the collected PCIe silk screen into the corresponding table in the SMBIOS. This method helps BIOS engineers update the PCIe silk screen information simply and conveniently according to the hardware design, so as to realize the identification and positioning of PCIe devices.
[0047] The relationship between error reporting location and silk screen information: In the method of error reporting location for PCIe devices, the silk screen information also plays an important role. By pre-obtaining and sending the attribute information of the PCIe device and the corresponding silk screen identifier to the BMC, the BMC can establish the correspondence between the attribute information and the silk screen identifier. When a PCIe device reports an error, by obtaining the identification data of the root bridge, the PCIe device and each level of PCI Bridge between them and sending it to the BMC, the BMC records the error log based on this identification data, and then realizes the error reporting location of the PCIe device. This method is not only applicable to directly connected PCIe devices, but also can perform error reporting location on PCIe devices transferred through a Switch, which is convenient for the maintenance of PCIe devices. In summary, the silk screen information plays a key role in the design, production and maintenance process of PCIe devices. It not only helps with the identification and positioning of devices, but also plays an important role in error reporting location and fault troubleshooting.
[0048] OpenCV is a cross-platform computer vision and machine learning software library distributed under the Apache 2.0 license (open source). It can run on Linux, Windows, Android, and Mac OS operating systems. It is lightweight and efficient - consisting of a series of C functions and a small number of C++ classes, and at the same time provides interfaces for languages such as Python, Ruby, MATLAB, etc., implementing many common algorithms in image processing and computer vision. OpenCV is written in C++ language, it has C++, Python, Java, and MATLAB interfaces, and supports Windows, Linux, Android, and Mac OS. OpenCV mainly focuses on real-time vision applications and utilizes MMX and SSE instructions when available. Now it also provides support for C#, Ch, Ruby, GO.
[0049] imread is a function in the OpenCV library used to read image files. It supports multiple image formats such as JPEG, PNG, BMP, etc. The imread function loads the image file into memory and represents it as a multi-dimensional array (usually a NumPy array) for further image processing and analysis.
[0050] Tesseract is an open-source optical character recognition (OCR) engine that can convert text in images into editable text. It supports multiple languages and can output in multiple formats such as plain text, HTML, PDF, etc. Tesseract is usually used in combination with image processing libraries (such as OpenCV) to preprocess images and improve the accuracy of OCR.
[0051] Currently, in the server field, there is no good automatic matching technology for PCIe slot silkscreen in the industry. The work required for the BIOS firmware to adapt to the chassis silkscreen is as follows: Currently, since the slot number of each PCIe device is assigned by the BIOS, generally, it is arranged in sequence from CPU0PE1~PE4, CPU1PE1~PE4, CPU2PE1~PE4, CPU3PE1~PE4. If there are two X8 devices on CPU0PE1, the slot numbers of these two devices are 0 and 1. If there is one X16 device on CPU0PE2, its slot number is 2, and so on. In addition, the correspondence between the physical location of each PCIe device and the CPUPE port used by the device is not fixed and is related to the specific wiring method of the riser card and slimline. Therefore, the physical location arrangement and the slot numbers assigned to the devices do not correspond. BIOS firmware engineers need to manually establish a correspondence table between the silkscreen of the current model (each physical slot) and the slot number (and each device), import it into the asset information list function module in the firmware, and pass the asset information with the device silkscreen to the BMC to be displayed on the BMC web management interface to achieve the accurate correspondence between each device and the slot silkscreen.
[0052] The method embodiment for matching silkscreen information provided in the embodiments of this application can be executed in a computer device or a similar computing device. Taking running on a computer device as an example, Figure 1 is the hardware structure block diagram of a computer device for a method of matching silkscreen information according to an embodiment of this application. As Figure 1 shown, the computer device may include one or more ( Figure 1Only one processor 102 is shown (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), and a memory 104 for storing data. Among them, the above computer device may further include a transmission device 106 for communication functions and an input / output device 108. Those of ordinary skill in the art can understand that Figure 1 The structure shown is only schematic and does not limit the structure of the above computer device. For example, the computer device may further include more or fewer components than Figure 1 shown in, or have a different configuration from Figure 1 shown.
[0053] The memory 104 can be used to store computer programs. For example, software programs and modules of application software, such as the computer program corresponding to the method of matching silk screen information in the embodiments of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implements the above method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memories. In some instances, the memory 104 may further include a memory remotely provided with respect to the processor 102, and these remote memories can be connected to the computer device through a network. Examples of the above network include, but are not limited to, the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.
[0054] The transmission device 106 is used to receive or send data via a network. Specific examples of the above network may include a wireless network provided by the communication provider of the computer device. In one instance, the transmission device 106 includes a network adapter (abbreviated as NIC), which can be connected to other network devices through a base station and thus can communicate with the Internet. In one instance, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0055] In this embodiment, a method for matching silk screen information is provided. Figure 2 is a flowchart of the method for matching silk screen information according to the embodiments of the present application, as Figure 2 shown, and the process includes the following steps:
[0056] Step S202, collect the i-th image through the camera on the USB slot, where the i-th image includes the slot positioning lamp and the slot silk screen sticker on the server, and i is an integer;
[0057] It is possible to traverse the opening and closing of the slot positioning lights on the front and rear windows of the control server, and only one slot positioning light is turned on each time an image is captured. Therefore, the number of images to be captured is equal to the number of slot positioning lights on the front and rear windows of the server. The above-mentioned i-th image represents the number of times of image capture, and the image contains slot positioning lights and slot silk screen stickers. Figure 3 It is a structural diagram of a slot positioning light and a USB slot provided at the front or rear of a server chassis according to an embodiment of the present invention, as Figure 3 shown. Two Universal Serial Bus (USB) interfaces of the BMC chip are connected to two USB cameras, and corresponding camera driver programs are installed to respectively capture images of the front window and the rear window of the server. The USB cameras can completely capture the slot positioning lights and slot numbers outside the chassis. The above-mentioned slot silk screen stickers are provided on one side of the PCIe installation slot installed at the front or rear of the server chassis. Figure 4 It is a schematic diagram of a slot positioning light and a slot silk screen sticker according to an embodiment of the present invention, as Figure 4 shown. The above-mentioned slot silk screen stickers adopt a single string recognition method. For example, for the slot number SLOT1, the recognition strings are S, L, O, T, 1. The above-mentioned slot positioning lights are installed above the slot silk screen stickers of the PCIe device slots with the slot numbers silk-screened. The slot silk screen stickers display the device position information slot number corresponding to the PCIe device slot and the indication "Δ" icon. A window is opened above the indication "Δ" icon on the server chassis to form the window opening hole for the above-mentioned slot positioning light. The LED lamp beads of the slot positioning light show blue light outside the window opening hole, and the slot positioning light is lit when a PCIe expansion card or other devices are inserted into the PCIe slot. In this embodiment, since each slot positioning light is traversed and turned on in sequence, and the silk screen information in each slot positioning light is matched with the silk screen information in the slot silk screen sticker, the technical effect of ensuring that each slot on the server can be matched with the silk screen information and improving the matching efficiency can be achieved.
[0058] Specifically, the above-mentioned server is provided with a first USB slot and a second USB slot. The first USB slot is provided on the front window of the server chassis, and the second USB slot is provided on the rear window of the server chassis. Among them, collecting the i-th image through the camera on the USB slot includes: collecting the i-th image through the first camera on the first USB slot, where the i-th image is an image captured by the first camera of the front window of the server chassis, and the slot positioning light and the slot silk screen sticker are provided on the front window of the server chassis; or, collecting the i-th image through the second camera on the second USB slot, where the i-th image is an image captured by the second camera of the rear window of the server chassis, and the slot positioning light and the slot silk screen sticker are provided on the rear window of the server chassis.
[0059] The first USB slot is arranged on the front window of the server chassis and is used to collect images of the front window of the server chassis. The second USB slot is arranged on the rear window of the server chassis and is used to collect images of the rear window of the server chassis, so as to ensure that all PCIe device slots in the front and rear windows of the server chassis can correspond to the slot silk-screen stickers. Figure 5 It is a structural block diagram of the BMC controlling the camera to collect and process images according to an embodiment of the present invention. As Figure 5 shown, the BMC on the server motherboard is provided with two USB connection structures and two-way BMC USB interface circuits. One circuit is connected to the external physical USB interface (USB slot) on the front window of the server chassis, and the other is connected to the external physical USB interface (USB slot) on the rear window of the server chassis; the external physical USB interface is used to connect a USB camera, and the USB camera captures images of the front or rear window of the chassis and transmits the captured images of the slot positioning lights and slot numbers to the BMC. In this embodiment, by setting a USB slot on the server, a camera can be installed on the USB slot for image acquisition. The BMC performs image analysis through the internally set imread function and Tesseract algorithm, thereby achieving the effect of automatic matching of slot silk-screening.
[0060] Step S204, identify the i-th target slot positioning light in the i-th image, where the i-th target slot positioning light is in an on state in the i-th image;
[0061] Optionally, before collecting the i-th image through the camera on the USB slot, the method further includes: receiving the i-th target slot number from the basic input / output system, and controlling the i-th target slot positioning light on the i-th target slot corresponding to the i-th target slot number to be in the on state.
[0062] When photographing the front and rear windows of the server, the basic input / output system (BIOS) will specify to light up the slot positioning light corresponding to a slot number of a PCIe device or a hard disk slot, and display it in blue. The BMC uses a USB camera to capture the current front or rear window image and analyzes the image.
[0063] In this embodiment, during the server startup process, the BIOS will send the device slot numbers of each PCIe device including NVMe hard disks automatically allocated by the BIOS to the BMC. The BMC can sequentially control the slot positioning lights set on the slots to be in the on state. The USB camera photographs the front and rear windows of the server, identifies the positions of the turned-on slot positioning lights, finds the nearest slot silk-screen sticker, and identifies the information of the slot silk-screen sticker, so as to achieve the correspondence between the slot and the silk-screen information.
[0064] Optionally, sequentially control the slot positioning lights provided on each of the slots to be in the on state, and sequentially match the slot positioning lights in the on state with the silk-screening information in the slot silk-screening stickers. Among them, the i-th target slot positioning light is the slot positioning light that performs the silk-screening information matching for the i-th time, and the i-th target slot positioning light is in the on state when the i-th image is collected. When the i-th target slot positioning light is in the on state, the other slot positioning lights on the server are in the off state.
[0065] In the above embodiments, the BIOS can control the turning on of the slot positioning lights, or the server can automatically control the slot positioning lights to turn on sequentially, so that the server can perform silk-screening information matching for the corresponding slots based on the instructions of the BIOS, or can automatically perform silk-screening information matching for all the slots on the server sequentially.
[0066] Step S206: Identify each silk-screening information in the slot silk-screening sticker, and match the i-th target slot positioning light with each silk-screening information.
[0067] Specifically, determine the position of the i-th target slot positioning light in the i-th image to obtain the i-th target position; determine the silk-screening information closest to the i-th target position among the respective silk-screening information as the i-th target silk-screening information; determine the i-th target silk-screening information as the silk-screening information matching the i-th target slot, where the i-th target slot positioning light is provided on the i-th target slot.
[0068] When the above USB camera takes pictures of the front and rear windows of the above service chassis, all the slot positioning lights and slot silk-screening stickers at the front or rear end of the server will be photographed. The BIOS or BMC can control only one slot positioning light to display blue at the same time. The above target slot positioning light is the slot positioning light that displays blue in the image taken by the USB camera, and the above target silk-screening information is the silk-screening information identified from the slot silk-screening sticker closest to the above target slot positioning light, and match the above silk-screening information with the above target slot positioning light.
[0069] Specifically, after determining the i-th target silk-screening information as the silk-screening information matching the i-th target slot, the method further includes: establishing an association relationship between the i-th target silk-screening information and the i-th target slot number, where the i-th target slot number is the number of the i-th target slot.
[0070] The above slot positioning lights are used to locate the positions of the slots. Each slot has its own number. After matching the slot silk screen information with the slot positioning lights, the above slot silk screen information needs to be associated with the slot numbers.
[0071] Specifically, after establishing the association relationship between the i-th target silk screen information and the i-th target slot number, the method further includes: sending the association relationship to the basic input / output system. After associating the above slot silk screen information with the slot numbers, it needs to be sent to the basic input / output system for storage. This can achieve the purpose of the server automatically matching the silk screen information, avoid the problem of low efficiency of manual matching, and achieve the effect of improving the matching efficiency.
[0072] This embodiment will realize the correspondence between all the slots of the front and rear windows of the server and their slot silk screen information. Therefore, it is necessary to determine whether the currently matched slot positioning light is the last positioning light for silk screen information matching to determine the subsequent steps.
[0073] Optionally, in the case where the i-th target slot positioning light is the last slot positioning light for the silk screen information matching, after matching the i-th target slot positioning light with each of the silk screen information, the method further includes: sending the target mapping relationship table to the basic input / output system, where the target mapping relationship table records the association relationship between each slot number and the corresponding silk screen information.
[0074] When the above slot positioning light is the last slot positioning light for silk screen information matching, after its silk screen information matching is completed, it indicates that the silk screen information matching of all the slot positioning lights of the front and rear windows of the server has been completed. Therefore, there is no need to perform the matching operation again, that is, the mapping relationship table recording the association relationship between each slot number and the corresponding silk screen information is sent to the basic input / output system for storage.
[0075] Optionally, in the case where the i-th target slot positioning light is not the last slot positioning light for the silk screen information matching, after matching the i-th target slot positioning light with each of the silk screen information, the method further includes: collecting the (i + 1)-th image through the camera on the USB slot; identifying the (i + 1)-th target slot positioning light in the (i + 1)-th image, where the (i + 1)-th target slot positioning light is in the on state in the (i + 1)-th image; identifying each silk screen information in the slot silk screen sticker, and matching the (i + 1)-th target slot positioning light with each of the silk screen information.
[0076] When the above slot positioning light is not the last slot positioning light for silk screen information matching, after it completes the silk screen information matching, it indicates that the silk screen information matching for all slot positioning lights on the front and rear windows of the server has not been completed. Therefore, it is necessary to continue to use the USB camera to capture the image of the next server's front and rear windows, find the position of the slot positioning light that is lit in the front-end image, find the nearest slot silk screen sticker, and identify the information of the above slot silk screen sticker to achieve the correspondence between the slot and the silk screen information.
[0077] Figure 6 is a flowchart of automatic matching of PCIe and hard disk slot silk screens based on machine vision recognition according to an embodiment of the present invention, as Figure 6 shown, this process includes the following steps:
[0078] S601, the internal linux system of the BMC establishes the OCR character recognition model Tesseract and the imread library function in OpenCV;
[0079] Specifically, in this embodiment, Tesseract is used in linux to read and output each character in a picture and output its position:
[0080]
[0081]
[0082] (2) By checking the distance between characters, splice the strings with adjacent positions:
[0083]
[0084]
[0085] S602, connect two USB cameras to the two USB interfaces of the BMC chip, and aim them at the front window and the rear window of the server respectively for shooting;
[0086] S603, during the server startup process, the BIOS will send the device slot numbers of each PCIe device automatically allocated by the BIOS, including the NVMe hard disk, to the BMC;
[0087] S604, insert a PCIe expansion piece into the PCIe slot, then the slot positioning light is lit, and the BMC uses the USB camera to capture the image of the current front window or rear window and analyze the image;
[0088] S605, the BMC uses a color recognition algorithm to find the slot where the current positioning light is lit;
[0089] Specifically, in this embodiment, imread is used in the linux system to output the positions of the blue pixel points in the picture:
[0090]
[0091]
[0092] S606. The BMC uses the imread library function and the Tesseract character recognition algorithm to recognize all the silk screen prints in the picture as strings, records their locations, and updates the silk screen prints to the corresponding PCIe device slots;
[0093] Specifically, the specific operation steps of the Tesseract character recognition algorithm are as follows:
[0094] Associate the silk screen print location with the location of the nearest slot number:
[0095]
[0096]
[0097]
[0098] The path recognition algorithm uses the shortest path algorithm on Neo4j.
[0099] The shortest path algorithm of Neo4j assumes that the underlying graph is undirected. The default setting can be changed by passing the parameter direction: "OUTGOING" or direction: "INCOMING". Outgoing represents the outgoing link, and Incoming represents the incoming link.
[0100] To make the shortest path algorithm of Neo4j ignore the weights, pass a null value as the third parameter of the procedure, which indicates that the weight attribute does not need to be considered when executing the algorithm. Then, the algorithm will assume that the default weight of each relationship is 1.0.
[0101] S607. Repeat S601 - S606 to obtain the silk screen print information of each hard disk and PCIe device slot;
[0102] S608. During the next server startup process, the BMC will send the silk screen print information corresponding to the device slot number to the BIOS.
[0103] Through the above steps, the problem of low matching efficiency between the silk screen print and the slot in the related technology is solved, and the matching efficiency between the silk screen print and the slot of the server chassis is improved.
[0104] This embodiment specifically relates to a server intelligent production technology and application tool for automatic matching of PCIe and hard disk slot silk screens based on machine vision recognition. An OCR character recognition model Tesseract and the imread library function in OpenCV are established in the internal Linux system of BMC. During the production stage, two USB cameras are connected to the two USB interfaces of the BMC chip, and the corresponding camera driver programs are installed, and they are respectively aligned with the front window and the rear window of the server for shooting. During the server startup process, the BIOS sends the device slot numbers of each PCIe device, including NVMe hard disks, automatically allocated by the BIOS to the BMC. The slot positioning lights corresponding to a slot number are lit for the PCIe device or hard disk slot, and the BMC uses the USB camera to capture the image of the current rear window. The BMC uses a color recognition program to find the slot where the currently lit slot positioning light is located. The BMC uses the imread library function and the Tesseract character recognition algorithm to recognize all the silk screens in the picture into strings, records their positions, and then uses a path recognition algorithm to find the silk screen string information closest to the lit positioning light, and updates the silk screen to the corresponding slot. Repeat the above steps to obtain the silk screen information of each hard disk and PCIe device slot. During the next server startup process, the BMC will send the silk screen information corresponding to the device slot number to the BIOS. This solves the problems that manual operations are prone to misreading and incorrect reading, and the efficiency is low. The traditional chassis silk screen adaptation method requires developing and designing corresponding firmware versions for each model and each configuration, and the silk screen firmware adaptation work is rather cumbersome and inefficient.
[0105] This embodiment has the following beneficial effects:
[0106] 1. The advantage of establishing an automatic matching system for server component slot silk screens in BMC is that it is independent of the server production line production system. After delivering to the customer, it is convenient for the customer to reconfigure the server by themselves. In the case of changes in the slot silk screen, the customer can also use the USB camera to independently use the slot silk screen automatic matching system to automatically update the silk screen, avoiding the drawback that the traditional chassis silk screen adaptation method requires developing new firmware versions for each model and each configuration. The silk screen firmware adaptation work is more efficient, reduces the development cost, and has a more user-friendly design.
[0107] 2. Reduce the risk of misreading and incorrect reading that is prone to occur in manual operations, improve the accuracy of automatic matching of PCIe and hard disk slot silk screens, and improve the matching efficiency.
[0108] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases, the former is a better implementation method. Based on such an understanding, the technical solution of the present application, 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 device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of the present application.
[0109] In this embodiment, a device for matching silk screen information is also provided. This device is used to implement the above embodiments and preferred implementation manners, and those that have been described will not be repeated. As used hereinafter, the term "module" can be a combination of software and / or hardware that can achieve a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.
[0110] Figure 7 is a structural block diagram of a device for matching silk screen information according to an embodiment of the present application. As Figure 7 shown, the device includes an acquisition module 702, which is used to acquire the i-th image through a camera on the USB slot. Among them, the i-th image includes the slot positioning lamp and the slot silk screen sticker on the server, where i is an integer; an identification module 704, which is used to identify the i-th target slot positioning lamp in the i-th image, where the i-th target slot positioning lamp is in an on state in the i-th image; a matching module 706, which is used to identify each silk screen information in the slot silk screen sticker and match the i-th target slot positioning lamp with each silk screen information.
[0111] In an exemplary embodiment, the above device is further used to determine the position of the i-th target slot positioning lamp in the i-th image to obtain the i-th target position; determine the silk screen information closest to the i-th target position among the respective silk screen information as the i-th target silk screen information; determine the i-th target silk screen information as the silk screen information matching the i-th target slot, where the i-th target slot positioning lamp is provided on the i-th target slot.
[0112] In an exemplary embodiment, the above device is further used to establish an association relationship between the i-th target silk screen information and the i-th target slot number, where the i-th target slot number is the number of the i-th target slot.
[0113] In an exemplary embodiment, the above device is further configured to receive the i-th target slot number from the basic input / output system, and control the i-th target slot positioning light on the i-th target slot corresponding to the i-th target slot number to be in the on state; after establishing the association relationship between the i-th target silk screen information and the i-th target slot number, the method further includes: sending the association relationship to the basic input / output system.
[0114] In an exemplary embodiment, the above device is further configured to sequentially control the slot positioning lights provided on each of the slots to be in the on state, and sequentially match the slot positioning lights in the on state with the silk screen information in the slot silk screen stickers, where the i-th target slot positioning light is the slot positioning light that performs the silk screen information matching for the i-th time, and the i-th target slot positioning light is in the on state when the i-th image is acquired; when the i-th target slot positioning light is in the on state, the other slot positioning lights on the server are in the off state; in the case where the i-th target slot positioning light is the last slot positioning light that performs the silk screen information matching, after matching the i-th target slot positioning light with each of the silk screen information, the method further includes: sending the target mapping relationship table to the basic input / output system, where the target mapping relationship table records the association relationship between each slot number and the corresponding silk screen information; in the case where the i-th target slot positioning light is not the last slot positioning light that performs the silk screen information matching, after matching the i-th target slot positioning light with each of the silk screen information, the method further includes: acquiring the (i + 1)-th image through the camera on the USB slot; identifying the (i + 1)-th target slot positioning light in the (i + 1)-th image, where the (i + 1)-th target slot positioning light is in the on state in the (i + 1)-th image; identifying each of the silk screen information in the slot silk screen stickers, and matching the (i + 1)-th target slot positioning light with each of the silk screen information.
[0115] In an exemplary embodiment, the above device is further configured to acquire the i-th image through the first camera on the first USB slot, where the i-th image is an image captured by the first camera of the front window of the server chassis, and the slot positioning light and the slot silk screen sticker are provided on the front window of the server chassis; or acquire the i-th image through the second camera on the second USB slot, where the i-th image is an image captured by the second camera of the rear window of the server chassis, and the slot positioning light and the slot silk screen sticker are provided on the rear window of the server chassis.
[0116] It should be noted that the above-mentioned modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to this: the above-mentioned modules are all located in the same processor; or, the above-mentioned modules are separately located in different processors in any combination form.
[0117] An embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored. Wherein, the computer program is configured to execute the steps in any one of the above method embodiments when running.
[0118] In an exemplary embodiment, the above-mentioned computer-readable storage medium may include, but is not limited to: various media such as USB flash drives, read-only memories (ROM for short), random access memories (RAM for short), mobile hard disks, magnetic disks or optical discs that can store computer programs.
[0119] An embodiment of the present application also provides an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0120] In an exemplary embodiment, the above-mentioned electronic device may further include a transmission device and an input / output device. Wherein, the transmission device is connected to the above-mentioned processor, and the input / output device is connected to the above-mentioned processor.
[0121] Specific examples in this embodiment may refer to the examples described in the above embodiments and exemplary embodiments, and will not be repeated here.
[0122] Obviously, those skilled in the art should understand that the above-mentioned modules or steps of the present application can be implemented by a general-purpose computing device. They can be concentrated on a single computing device or distributed on a network composed of multiple computing devices. They can be implemented by program codes executable by the computing device. Thus, they can be stored in a storage device and executed by the computing device. And in some cases, the steps shown or described can be executed in a different order than here, or they can be separately made into individual integrated circuit modules, or multiple modules or steps among them can be made into a single integrated circuit module to implement. In this way, the present application is not limited to any specific combination of hardware and software.
[0123] The above are only the preferred embodiments of the present application and are not used to limit the present application. For those skilled in the art, the present application can have various changes and modifications. Any modifications, equivalent replacements, improvements, etc. made within the principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for matching silk screen information, characterized in that: Applied to a server, the server is provided with a plurality of slots, each of the slots is provided with a slot positioning light, the plurality of slots are also provided with slot silk-screen stickers, the silk-screen information of each slot is recorded on the slot silk-screen stickers, and the server is also provided with a USB slot, including: The i-th image is captured by the camera on the USB slot, wherein the i-th image includes the slot location light and the slot silk-screen sticker on the server, wherein i is an integer; Identify an i-th target slot location light in the i-th image, wherein the i-th target slot location light is in an on state in the i-th image; Identify each silk-screen information in the slot silk-screen sticker, and match the i-th target slot positioning light with each silk-screen information.
2. The method according to claim 1, characterized in that Matching the i-th target slot location light with each of the silk-screen information includes: Determine the position of the ith target slot locator light in the ith image to obtain the ith target position; Determine the silk screen information closest to the i-th target position among the silk screen information as the i-th target silk screen information; The i-th target silk-screen information is determined as silk-screen information matching the i-th target slot, wherein the i-th target slot positioning light is set on the i-th target slot.
3. The method according to claim 2, characterized in that After determining the i-th target silk screen information as silk screen information matching the i-th target slot, the method further includes: An association relationship between the i-th target silk-screen information and the i-th target slot number is established, wherein the i-th target slot number is the serial number of the i-th target slot.
4. The method according to any one of claims 1 to 3, characterized in that Before acquiring the i-th image through the camera on the USB slot, the method further includes: Receiving an i-th target slot number from a basic input / output system, and controlling the i-th target slot locating light on the i-th target slot corresponding to the i-th target slot number to be in the on state; After establishing the association relationship between the i-th target silk-screen information and the i-th target slot number, the method further includes: sending the association relationship to the basic input and output system.
5. The method according to any one of claims 1 to 3, characterized in that The method further comprises: Controlling the slot locating lights provided on each of the slots to be in the on state in sequence, and matching the slot locating lights in the on state with the silk-screen information in the slot silk-screen sticker in sequence, wherein the i-th target slot locating light is the i-th slot locating light for matching the silk-screen information, and the i-th target slot locating light is in the on state when the i-th image is collected, and when the i-th target slot locating light is in the on state, other slot locating lights on the server are in the off state; In the case where the i-th target slot locator light is the last slot locator light to be matched with the silk screen information, after matching the i-th target slot locator light with each of the silk screen information, the method further includes: Sending a target mapping relationship table to a basic input / output system, wherein the target mapping relationship table records the association relationship between each slot number and the corresponding silk-screen information; In the case that the i-th target slot locating light is not the last slot locating light to be matched with the silk-screen information, after matching the i-th target slot locating light with each of the silk-screen information, the method further includes: acquiring the i+1-th image through the camera on the USB slot; identifying the i+1-th target slot locating light in the i+1-th image, wherein the i+1-th target slot locating light is in the on state in the i+1-th image; identifying each silk-screen information in the slot silk-screen sticker, and matching the i+1-th target slot locating light with each of the silk-screen information.
6. The method according to any one of claims 1 to 3, characterized in that The server is provided with a first USB slot and a second USB slot, wherein the first USB slot is provided on the front window of the chassis of the server, and the second USB slot is provided on the rear window of the chassis of the server, wherein: The method captures an i-th image through a camera on the USB slot, comprising: The i-th image is captured by the first camera on the first USB slot, wherein the i-th image is an image taken by the first camera of the front window of the chassis of the server, and the slot positioning light and the slot silk-screen sticker are arranged on the front window of the chassis of the server; or, The i-th image is captured by the second camera on the second USB slot, wherein the i-th image is an image taken by the second camera of the rear window of the chassis of the server, and the slot positioning light and the slot silk-screen sticker are arranged on the rear window of the chassis of the server.
7. A device for matching silk screen information, characterized in that: Applied to a server, the server is provided with a plurality of slots, each of the slots is provided with a slot positioning light, the plurality of slots are also provided with slot silk-screen stickers, the silk-screen information of each slot is recorded on the slot silk-screen stickers, and the server is also provided with a USB slot, including: A collection module, used for collecting an i-th image through a camera on the USB slot, wherein the i-th image includes a slot location light and a slot silk-screen sticker on the server, wherein i is an integer; A recognition module, used to recognize the ith target slot location light in the ith image, wherein the ith target slot location light is in an on state in the ith image; The matching module is used to identify each silk-screen information in the slot silk-screen sticker and match the i-th target slot positioning light with each silk-screen information.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 6 when executed by a processor.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
PCIE screen printing information updating method and device in BIOS setup, controlled terminal and storage medium
CN109933376A
Detection method and device for screen printing information of hard disk, storage medium and electronic device
CN116107824A
Hard disk positioning method and device
CN116820194A
Topology generation method, expansion board card and server
CN117687944A
Hard disk fault identification system, method and device of server, server and medium
CN118606118A