Slave device positioning method and device in stacking environment, equipment and storage medium
By utilizing the differentiated display and brightness adjustment of the device's own LEDs in the stacking environment, combined with the environmental brightness adjustment, the problems of inaccuracy and increased hardware cost are solved, and efficient and energy-saving equipment positioning is achieved.
Patent Information
- Application Number
- CN202510801712.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-16
- Publication Date
- 2025-09-02
AI Technical Summary
In stacking environments, traditional device positioning methods rely on rack labels or additional configuration LEDs, resulting in inaccurate positioning or increased hardware costs.
By configuring the built-in LEDs on the slave device's ports, a diverse display control strategy is adopted, such as differentiated display, brightness adjustment and dynamic changes, combined with environmental brightness adjustment, and coordinated display with adjacent devices to form spatial guidance and achieve rapid positioning.
Without adding additional costs, precise positioning of equipment in a stacking environment is achieved, positioning efficiency and accuracy is improved, user experience is optimized, and energy consumption and labor costs are reduced.
Smart Images

Figure CN120583060A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, apparatus, device, and storage medium for positioning a slave device in a stacking environment. Background Art
[0002] In large-scale network environments, switch stacking technology is widely used due to its advantages such as increasing network bandwidth, enhancing network reliability and simplifying network management.
[0003] Typically, a stacked switch consists of a master device and multiple slave devices. Numerous master devices and their corresponding slave devices are deployed in a computer room. When a slave device fails and needs to be replaced, traditional solutions use rack labels to quickly locate the failed slave device. However, over time, these labels can become detached from the racks, making it impossible to accurately locate the devices.
[0004] To this end, additional LEDs are configured on these slave devices to display the slave device numbers. Although this method can intuitively display the device numbers and facilitate finding the devices, this additional LED solution will increase hardware costs. Summary of the Invention
[0005] The present application provides a method, apparatus, device, and storage medium for positioning a slave device in a stacking environment, which can realize positioning of the slave device in the stacking environment without increasing additional costs.
[0006] To achieve the above objectives, this application adopts the following technical solutions: In a first aspect, the present application provides a method for positioning a slave device in a stacking environment, wherein the slave device includes at least one port and an LED matching the port, including: Obtaining a positioning request for a target slave device, the positioning request carrying a target identifier of the target slave device; generating a positioning instruction for the target slave device; A positioning instruction is sent to all slave devices in the area where the target slave device is located, wherein the positioning instruction is used to highlight the LED of the port of the target slave device among all the slave devices.
[0007] Optionally, highlighting the LEDs of the ports of the target slave device in all slave devices includes: The display mode of the LED indicating the port of the target slave device is different from the display mode of the LEDs of the ports of the remaining devices, and the display modes of the LEDs of the ports of each device in the remaining devices are the same. The remaining devices are the slave devices except the target slave device in all the slave devices.
[0008] Optionally, the method further includes: A restoration instruction is sent to all slave devices in the area where the target slave device is located, wherein the restoration instruction is used to instruct the display mode of the LEDs of the ports of all slave devices in the target area to be restored to the default display mode.
[0009] Optionally, the method further includes: Acquiring the ambient brightness in the area where the target slave device is located; generating a positioning instruction for the target slave device, including: Determining the display brightness of the LED of the port of the target slave device according to the ambient brightness; A positioning instruction is generated according to the display brightness of the LED of the port of the target slave device.
[0010] Optionally, highlighting the LEDs of the ports of the target slave device in all slave devices includes: Indicate that the display brightness of the LED of the port of the target slave device is greater than the display brightness of the LED of the port of the slave device adjacent to the target slave device, and turn off the LED of the port of the slave device not adjacent to the target slave device.
[0011] Optionally, the positioning instruction is further used to instruct the display brightness of the LED of the port of the target slave device to dim over time after the LED of the port of the target slave device is lit.
[0012] Optionally, a positioning response fed back by the target slave device is received, where the positioning response is used to indicate that the target slave device has received the positioning instruction.
[0013] In a second aspect, the present application provides a positioning device for a slave device in a stacking environment, the device comprising: An acquisition module, configured to acquire a positioning request for a target slave device, wherein the positioning request carries a target identifier of the target slave device; A generating module, configured to generate a positioning instruction for the target slave device; The sending module is used to send a positioning instruction to all slave devices in the area where the target slave device is located, and the positioning instruction is used to highlight the LED of the port of the target slave device among all the slave devices.
[0014] In a third aspect, the present application provides a computing device, including a memory and a processor; One or more computer programs are stored in the memory, and the one or more computer programs include instructions; when the instructions are executed by the processor, the computing device executes the method as described in any one of the first aspects.
[0015] In a fourth aspect, the present application provides a computer-readable storage medium for storing a computer program for executing the method as described in any one of the first aspects.
[0016] It can be seen from the above technical solution that this application has at least the following beneficial effects: In this application, the method for locating slave devices in a stacked environment has several significant benefits. First, by sending a positioning command to uniquely highlight the LED on the target slave device's port, the target slave device can be quickly and intuitively located in a complex stacked device environment, significantly improving the efficiency of device locating by operators or users and significantly reducing the cost and time of manual positioning.
[0017] Secondly, diversified LED display control strategies, such as differentiated display, brightness adjustment, and dynamic changes, can not only meet positioning requirements in different scenarios, but also avoid visual interference caused by strong light to users, thus optimizing the user experience; At the same time, the LED display brightness is determined according to the ambient brightness, making the positioning process more in line with the actual environment. Spatial guidance is formed through the coordinated display of adjacent devices, which is suitable for rapid positioning in high-density stacking environments. The display brightness of the LED of the port of the target slave device dims over time, balancing positioning efficiency and energy consumption. It automatically enters the energy-saving state after rapid positioning, which is in line with the concept of green computing.
[0018] Furthermore, receiving positioning responses from the target slave device effectively confirms the command execution status, ensuring the accuracy and reliability of the positioning operation. The setting of a recovery command ensures that the device quickly returns to normal after the positioning operation, maintaining stable system operation and further enhancing the integrity and reliability of the positioning method. Therefore, this method can achieve precise positioning of slave devices in a stacked environment without incurring additional costs.
[0019] It should be understood that the description of technical features, technical solutions, beneficial effects or similar language in this application does not imply that all features and advantages can be realized in any single embodiment. On the contrary, it is understood that the description of a feature or beneficial effect means that a specific technical feature, technical solution or beneficial effect is included in at least one embodiment. Therefore, the description of a technical feature, technical solution or beneficial effect in this specification does not necessarily refer to the same embodiment. Furthermore, the technical features, technical solutions and beneficial effects described in the present embodiment can also be combined in any appropriate manner. Those skilled in the art will understand that the embodiment can be implemented without one or more specific technical features, technical solutions or beneficial effects of a specific embodiment. In other embodiments, additional technical features and beneficial effects can also be identified in specific embodiments that do not embody all embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 A schematic diagram of an application scenario provided in an embodiment of the present application; Figure 2 A flowchart of a method for locating a slave device in a stacking environment provided by an embodiment of the present application; Figure 3 A schematic diagram of a positioning device for a slave device in a stacking environment provided by an embodiment of the present application; Figure 4 A schematic diagram of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0021] The terms "first", "second" and "third" in this application specification and the accompanying drawings are used to distinguish different objects rather than to limit a specific order.
[0022] In the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0023] To make the description of the following embodiments clear and concise, a brief introduction to the related technologies is first given: A stacking environment involves multiple network devices (such as switches and servers) connected via specific technologies (such as physical stacking cables or virtualization) to form a unified management unit. In this environment, the devices share a control plane and can be viewed as a single logical entity, while remaining physically independent. Stacking technology is commonly used in scenarios such as data centers and enterprise networks to improve network reliability, scalability, and management efficiency.
[0024] In a master-slave architecture, a slave device is controlled by a master device. In a stack of network devices, a slave device typically performs forwarding functions, receiving and executing configurations and commands issued by the master device. It lacks independent management capabilities. Status changes on slave devices must be synchronized with the master device to maintain stack consistency.
[0025] A port is a physical interface, such as an Ethernet port or fiber optic port, that connects a device to an external network or other devices. In network devices, ports are responsible for sending, receiving, and forwarding data, and are the fundamental unit of network communication. Each port is typically equipped with an LED indicator to display port status (such as connection status and traffic flow).
[0026] Currently, additional LEDs are configured on these slave devices to display information about the slave devices, such as numbers and status. Although this method can intuitively display device information and facilitate finding the device, this additional LED configuration will increase hardware costs.
[0027] In view of this, an embodiment of the present application provides a method for positioning a slave device in a stacking environment, which can be executed by a processing device. The processing device can be a terminal or a server. Terminals include but are not limited to smartphones, tablets, laptops, personal digital assistants, or smart wearable devices. The server can be a cloud server, such as a central server in a central cloud computing cluster, or an edge server in an edge cloud computing cluster. Of course, the server can also be a server in a local data center. A local data center refers to a data center directly controlled by the user.
[0028] The core of this method is to use the LED that matches the port of the slave device as a positioning mark, which can solve the hardware cost problem of adding additional LEDs in the existing technology. Taking into account the needs of different usage scenarios, a variety of LED display control strategies are adopted, and the display brightness is dynamically adjusted in combination with the ambient brightness. The collaborative display of adjacent devices forms a spatial guide to help quickly locate. The display brightness of the LED at the port of the target slave device dims over time, balancing the positioning efficiency and energy consumption. In addition, by setting positioning response and recovery instructions, the accuracy of instruction execution and the stability of system operation are guaranteed. The invention concept uses an innovative LED control method as a starting point to perform special control on the LED that comes with the device, thereby eliminating the need to add additional LEDs to the device. This effectively solves the problem of difficult positioning of slave devices in a stacked environment, and can quickly highlight the target slave device among many slave devices, achieving intuitive and efficient positioning, greatly improving device management efficiency and user experience.
[0029] In order to make the technical solution of this application clearer and easier to understand, the application scenarios of the technical solution of this application are introduced below with reference to the accompanying drawings. Figure 1 As shown in the figure, this figure is a schematic diagram of an application scenario provided by an embodiment of the present application.
[0030] In this application scenario, there is a stack environment consisting of five devices: master device 1, backup master device 2, slave device 3, slave device 4, and slave device 5.
[0031] If a certain situation occurs now, it is necessary to find port 15 of slave device 3 and port 15 of slave device 5 among a large number of master devices and slave devices.
[0032] According to the traditional search method, in this case, you have to rely on the labels manually added on the rack when the network was set up, or the marks manually edited in the network management system when the network was set up, and other information to find 3 and 5 from many slave devices. If a long time passes or the device is moved during use, the label may fall off, which makes the search very troublesome and prone to errors.
[0033] Some manufacturers' devices directly configure LEDs on the front panel to directly display the information of each device, including the number and status. Although this method can intuitively find slave devices 3 and 5 and avoid search errors, it wastes energy by lighting the LEDs for a long time. In addition, adding a dedicated LED to display slave device information also increases the cost of the device.
[0034] To this end, the LEDs that match the ports on the slave devices are fully utilized to display the devices to be found, which are slave devices 3 and 5 in this application scenario.
[0035] The processing device provides a human-computer interaction interface, through which the operation and maintenance personnel can trigger the positioning operation. The processing device responds to the positioning operation, obtains the positioning request of the target slave devices 3 and 5, and generates positioning instructions for the target slave devices 3 and 5, including: instructing the LED of port 15 of slave device 3 and the LED of port 15 of slave device 5 to be different from the status of all port LEDs of the remaining devices (devices 1, 2, and 4), where the port LED is Figure 1 Shown in small and medium circles.
[0036] In a stacked environment, the O&M personnel observed that the signals emitted by the LEDs on port 15 of slave device 3 and slave device 5 were different from the others. They quickly located the target slave devices and ports. The entire process was simple and quick.
[0037] After the target slave device is found, the operation and maintenance personnel use the human-computer interaction interface to make the processing device send a recovery command to restore the LEDs of all device ports to the default display mode to ensure the consistency of network status monitoring.
[0038] In order to make the technical solution of this application clearer and easier to understand, the following application scenario introduces a positioning method for a slave device in a stacking environment provided by an embodiment of this application. Figure 2 As shown, this figure is a flowchart of a positioning method for a slave device in a stacking environment provided by an embodiment of the present application.
[0039] S201: A processing device obtains a positioning request for a target slave device, where the positioning request carries a target identifier of the target slave device.
[0040] The positioning request is sent by the operation and maintenance personnel through the human-computer interaction interface to enable the processing device to obtain instructions for the target slave device. It carries the unique identifier of the target slave device (such as address, serial number, port number, etc.) and is used to trigger the positioning process.
[0041] For example, the operation and maintenance personnel need to locate slave device 3. At this time, they start to operate the human-computer interaction interface to let the processing device first obtain the positioning request for slave device 3, so that the processing device knows that the device to be found is slave device 3.
[0042] S202: The processing device generates a positioning instruction for the target slave device.
[0043] A positioning command is a control command generated by a processing device after receiving a positioning request through analysis and logical processing. It is designed to quickly locate a target slave device using its LED visual identifier. After extracting the target identifier from the positioning request, the processing device determines the command content based on pre-set rules.
[0044] The command content includes specified parameters: for example, to highlight the target slave device, the command will set the LED of the target slave device's port to display in high brightness, a specific color (such as red), or high-frequency flashing, while the LEDs of other slave devices remain in the default or low brightness state.
[0045] The command also includes environmental adaptation parameters: the processing device determines the ambient brightness of the target slave device's area and, based on the ambient brightness, determines the brightness of the LEDs on the target slave device's ports. Positioning instructions are then generated based on the brightness of the LEDs on the target slave device's ports. For example, in a dimly lit computer room, lowering the LED brightness can reduce glare and visual disturbance for maintenance personnel. In brighter environments, automatically increasing the brightness ensures clear LED visibility, preventing difficulty identifying the target slave device due to insufficient light, making positioning operations more efficient and comfortable.
[0046] Dynamically adjusting LED brightness can enhance the visual contrast between the target slave device and its surroundings and other devices. For example, in a window-side equipment room exposed to direct sunlight, increasing the LED brightness can make the target slave device port more visible. Meanwhile, at night or during low-light hours, appropriately reducing the brightness can still maintain the device's prominence and prevent misidentification due to inappropriate brightness.
[0047] For example, the processing device can use a light intensity sensor to obtain the ambient brightness within the area where the target slave device is located. A mapping relationship between a reference ambient brightness and a reference display brightness can be pre-set. After determining the ambient brightness, the display brightness of the LED on the target slave device's port is determined based on this mapping relationship. A positioning instruction is then generated based on the determined display brightness. In other words, the positioning instruction instructs the target slave device to display at the determined display brightness.
[0048] S203: The processing device sends a positioning instruction to all slave devices in the area where the target slave device is located. The positioning instruction is used to highlight the LED of the port of the target slave device among all slave devices.
[0049] During the delivery process, the processing device sends positioning instructions to all slave devices in the area where the target slave device is located to ensure execution consistency.
[0050] Of course, the processing device may also only send the positioning instruction to the master device that manages the slave devices, and then the master device sends the positioning instruction to the slave devices.
[0051] When the positioning command is received from the device, the built-in control module will parse the received information in real time, obtain the command parameters, and drive the LED hardware circuit of the corresponding port to perform display adjustment.
[0052] The locate command is used to highlight the LED of the port of the target slave device among all the slave devices in order to quickly find the target slave device.
[0053] The positioning instruction is set as follows: the display mode of the LED of the port of the target slave device is different from the display mode of the LED of the ports of the remaining devices, the display mode of the LED of the ports of each device in the remaining devices is the same, and the remaining devices are all slave devices except the target slave device.
[0054] For example, after the target slave device is parsed, the command parameters obtained are to make the LED on port 15 flash red three times per second, while the LEDs on the same ports of other slave devices turn to a gray static display. Through the sharp visual contrast, it helps operation and maintenance personnel quickly lock the target slave device in a complex stacking environment, greatly improving the efficiency and accuracy of device positioning.
[0055] The instruction may also be configured such that the display brightness of the LED of the port of the target slave device is greater than the display brightness of the LED of the port of the slave device adjacent to the target slave device, and the LED of the port of the slave device not adjacent to the target slave device is turned off.
[0056] High-brightness LEDs make the target slave device the visual center in the stacked array, while the lower-brightness LEDs of adjacent devices serve as auxiliary references, creating a clear brightness gradient that helps operators quickly locate the target. Turning off the LEDs of non-adjacent devices completely eliminates interference from irrelevant light sources, reducing the visual search range and significantly shortening positioning time even in complex environments with densely packed equipment.
[0057] Turning off unnecessary LEDs prevents visual overload caused by excessive light sources and reduces fatigue for operators who struggle to interpret complex lighting. For example, in a large data center, among hundreds of stacked devices, retaining only the LEDs for the target and adjacent devices creates a simpler and more intuitive interface, improving comfort and efficiency in operations.
[0058] Of course, the instruction can also be set to: after the LED of the port of the target slave device is illuminated, the display brightness of the LED of the port of the target slave device will be dimmed over time. The high contrast mode is used to attract attention in the initial stage, and the low power consumption mode is switched to in the subsequent stage until the recovery instruction is received.
[0059] By dimming the brightness over time, the system reduces energy consumption immediately after the positioning requirement is met, reducing the workload of the device, extending the life of the LEDs, and lowering maintenance costs. This long-term savings can significantly reduce electricity resources, especially in scenarios with frequent positioning, in line with the concept of green energy conservation.
[0060] S204: The processing device receives a positioning response fed back by the target slave device. The positioning response is used to indicate that the target slave device has received the positioning instruction.
[0061] The positioning response is the confirmation information that the target slave device feeds back to the processing device after receiving the positioning command sent by the processing device. It is used to clearly indicate that the target slave device has successfully received the positioning command and can perform the LED highlighting operation as required by the command.
[0062] By receiving positioning responses, the processing device can monitor the status of command transmission in real time, preventing command loss or non-execution due to network failures or device anomalies. For example, in complex network environments, if the processing device does not receive a response, it can automatically resend the command or trigger an alarm to ensure accurate execution of the positioning task.
[0063] The location-response mechanism establishes a closed, bidirectional communication loop between the processing device and the slave devices. Upon receiving a command, the target slave device parses the command content and checks its own execution conditions (such as the LED hardware status). If these conditions are met, it responds. This mechanism can promptly detect device failures. For example, if the LED circuit in a slave device is damaged, it will not be able to respond properly, helping operations and maintenance personnel quickly locate potential problems.
[0064] S205 : The processing device sends a restoration instruction to all slave devices in the area where the target slave device is located. The restoration instruction is used to instruct all slave devices in the target area to restore the display mode of the LEDs of the ports to the default display mode.
[0065] The restore command is a crucial command sent by the processing device to all slave devices in the target area after the stacking device positioning operation is complete. It quickly restores the LED display status of all slave device ports to the default mode, such as solid green for normal links and flashing green for data transmission. This prevents highlighting or special displays caused by the positioning operation from interfering with subsequent operations and maintenance. The restore command also saves energy, protects LED hardware, and maintains system stability. If the execution fails, the processing device automatically retransmits the command and marks the device as faulty.
[0066] Based on the above description, this application has the following beneficial effects: First, by sending a positioning command to make the LED of the target slave device port stand out in a unique way, the target slave device can be quickly and intuitively located in a complex stacked device environment, greatly improving the efficiency of operation and maintenance personnel or users in finding devices and significantly reducing the cost and time consumption of manual positioning.
[0067] Secondly, diversified LED display control strategies, such as differentiated display, brightness adjustment, and dynamic changes, can not only meet positioning requirements in different scenarios, but also avoid visual interference caused by strong light to users, thus optimizing the user experience; At the same time, the LED display brightness is determined according to the ambient brightness, making the positioning process more in line with the actual environment. Spatial guidance is formed through the coordinated display of adjacent devices, which is suitable for rapid positioning in high-density stacking environments. The display brightness of the LED of the port of the target slave device dims over time, balancing positioning efficiency and energy consumption. It automatically enters the energy-saving state after rapid positioning, which is in line with the concept of green computing.
[0068] Furthermore, receiving positioning responses from the target slave device effectively confirms the command execution status, ensuring the accuracy and reliability of the positioning operation. The setting of a recovery command ensures that the device quickly returns to normal after the positioning operation, maintaining stable system operation and further enhancing the integrity and reliability of the positioning method. Therefore, this method can achieve precise positioning of slave devices in a stacked environment without incurring additional costs.
[0069] The following describes the process of issuing positioning instructions with a specific example: The processing device sends a locate command to the master device, specifying the slave device to be searched. For example, if the slave device to be searched is member 3, the command vsf memberid show member 3 mode blinking times 10 is issued.
[0070] After receiving the locate command, the master device interprets it and determines that the slave device to be located is member 3, and that the search method is to flash the port for 10 minutes. The master device then encapsulates the search method and duration parameters into an RPC message and sends it to member 3.
[0071] After receiving the RPC message from the master, the target slave, member 3, parses the message. Recognizing that it's a master device search, it immediately starts the vsf memberid search timer, T, and enters the vsf memberid lighting logic. Internal control logic then converts its member id, 3, into a control signal for the corresponding LED on port 3, driving the port's LED to flash. This timer, T, is set to 10 minutes, meaning that the LED on port 3 of the target slave, member 3, will flash continuously for 10 minutes.
[0072] When the vsf memberid search timer T times out, the vsf memberid lighting logic will be stopped, the system will automatically clear the display on the LED, and enter the normal port lighting logic.
[0073] If the vsf memberid lookup timer T has not expired, you can also manually clear the LED display by issuing a specific clear command. For example, issuing the command no vsf memberid show member 3 immediately resets the vsf memberid lookup timer T to 0, and the port lighting logic returns to normal.
[0074] Combined with the above Figures 1 to 2 A method for positioning a slave device in a stacking environment provided in an embodiment of the present application is described in detail. The apparatus and device provided in the embodiment of the present application will be described below in conjunction with the accompanying drawings.
[0075] like Figure 3 As shown in the figure, this figure is a schematic diagram of a positioning device for a slave device in a stacking environment provided by an embodiment of the present application, the device comprising: An acquisition module 301 is configured to acquire a positioning request for a target slave device, wherein the positioning request carries a target identifier of the target slave device; A generating module 302 is configured to generate a positioning instruction for the target slave device; The sending module 303 is configured to send a positioning instruction to all slave devices in the area where the target slave device is located, wherein the positioning instruction is configured to highlight the LED of the port of the target slave device among all the slave devices.
[0076] Optionally, the generation module 302 is specifically used to indicate that the display mode of the LED of the port of the target slave device is different from the display mode of the LED of the ports of the remaining devices, and the display mode of the LED of the port of each device in the remaining devices is the same, and the remaining devices are the slave devices among all the slave devices except the target slave device.
[0077] Optionally, the sending module 303 is further configured to send a recovery instruction to all slave devices in the area where the target slave device is located, wherein the recovery instruction is configured to instruct all slave devices in the target area to restore the display mode of the LEDs on the ports to the default display mode.
[0078] Optionally, the acquisition module 301 is further configured to acquire the ambient brightness in the area where the target slave device is located; The generating module 302 is further configured to generate a positioning instruction for the target slave device, including: Determining the display brightness of the LED of the port of the target slave device according to the ambient brightness; A positioning instruction is generated according to the display brightness of the LED of the port of the target slave device.
[0079] Optionally, the generating module 302 is specifically configured to indicate that the display brightness of the LED of the port of the target slave device is greater than the display brightness of the LED of the port of the slave device adjacent to the target slave device, and turn off the LED of the port of the slave device not adjacent to the target slave device.
[0080] Optionally, the generating module 302 is further configured to instruct the display brightness of the LED of the port of the target slave device to dim over time after the LED of the port of the target slave device is lit.
[0081] Optionally, the sending module 303 is further configured for the target slave device to send a positioning response to the master device, where the positioning response is used to indicate that the target slave device has received the positioning instruction.
[0082] According to an embodiment of the present application, a positioning device for a slave device in a stacking environment may correspond to executing the method described in the embodiment of the present application, and the above-mentioned other operations and / or functions of each module / unit of a positioning method device for a slave device in a stacking environment are respectively for realizing Figure 2For the sake of brevity, the corresponding processes of the various methods in the illustrated embodiments are not described again here.
[0083] The present application also provides a computing device. Figure 4 As shown, this figure is a schematic diagram of a computing device provided by an embodiment of the present application, and the computing device 700 includes a bus 701, a processor 702, a communication interface 703 and a memory 704. The processor 702, the memory 704 and the communication interface 703 communicate with each other via the bus 701.
[0084] The bus 701 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.
[0085] The processor 702 may be any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).
[0086] The communication interface 703 is used for communicating with the outside.
[0087] The memory 704 may include volatile memory, such as random access memory (RAM). The memory 704 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).
[0088] The memory 704 stores executable codes, and the processor 702 executes the executable codes to perform the aforementioned method for positioning a slave device in a stacking environment.
[0089] Specifically, in the implementation Figure 3 In the case of the embodiment shown, and Figure 3In the embodiment described in the embodiment, when each module or unit of the positioning device of the slave device in a stacking environment is implemented by software, the execution Figure 3 The software or program code required for the functions of each module / unit in the system may be partially or completely stored in the memory 704. The processor 702 executes the program code corresponding to each unit stored in the memory 704 to perform the aforementioned method for positioning a slave device in a stacking environment.
[0090] Embodiments of the present application also provide a computer-readable storage medium. The computer-readable storage medium can be any available medium capable of being stored by a computing device, or a data storage device such as a data center that contains one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, hard disk, or magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to execute the aforementioned method for locating a slave device in a stacked environment.
[0091] The present application also provides a computer program product comprising one or more computer instructions that, when loaded and executed on a computing device, fully or partially generate the process or function described in the present application.
[0092] The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, or data center to another website, computer, or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means.
[0093] When the computer program product is executed by a computer, the computer performs any of the aforementioned methods for locating a slave device in a stacking environment. The computer program product may be a software installation package, and when any of the aforementioned methods for locating a slave device in a stacking environment is needed, the computer program product may be downloaded and executed on the computer.
[0094] The descriptions of the processes or structures corresponding to the above figures have different emphases. For parts that are not described in detail in a certain process or structure, please refer to the relevant descriptions of other processes or structures.
[0095] The above description is only a specific implementation method of the present application, but the protection scope of the present application is not limited thereto. Any changes or replacements within the technical scope disclosed in the present application should be included in the protection scope of the present application.
Claims
1. A method for positioning a slave device in a stacking environment, wherein the slave device comprises at least one port and an LED matching the port, characterized in that: The method comprises: Obtaining a positioning request for a target slave device, the positioning request carrying a target identifier of the target slave device; generating a positioning instruction for the target slave device; A positioning instruction is sent to all slave devices in the area where the target slave device is located, wherein the positioning instruction is used to highlight the LED of the port of the target slave device among all the slave devices.
2. The method according to claim 1, characterized in that The LED for highlighting the port of the target slave device among all the slave devices includes: The display mode of the LED indicating the port of the target slave device is different from the display mode of the LEDs of the ports of the remaining devices, and the display modes of the LEDs of the ports of each device in the remaining devices are the same. The remaining devices are the slave devices except the target slave device in all the slave devices.
3. The method according to claim 1, characterized in that The method further comprises: A restoration instruction is sent to all slave devices in the area where the target slave device is located, wherein the restoration instruction is used to instruct the display mode of the LEDs of the ports of all slave devices in the target area to be restored to the default display mode.
4. The method according to claim 1, wherein The method further comprises: Obtaining the ambient brightness in the area where the target slave device is located; The generating of the positioning instruction for the target slave device includes: Determining the display brightness of the LED of the port of the target slave device according to the ambient brightness; A positioning instruction is generated according to the display brightness of the LED of the port of the target slave device.
5. The method according to claim 1, characterized in that The LED for highlighting the port of the target slave device among all the slave devices includes: Indicate that the display brightness of the LED of the port of the target slave device is greater than the display brightness of the LED of the port of the slave device adjacent to the target slave device, and turn off the LED of the port of the slave device not adjacent to the target slave device.
6. The method according to claim 1, characterized in that The positioning instruction is further used to instruct the display brightness of the LED of the port of the target slave device to dim over time after the LED of the port of the target slave device is lit.
7. The method according to any one of claims 1 to 6, characterized in that The method further comprises: A positioning response fed back by the target slave device is received, where the positioning response is used to indicate that the target slave device has received the positioning instruction.
8. A positioning device for a slave device in a stacking environment, characterized in that: The device comprises: An acquisition module, configured to acquire a positioning request for a target slave device, wherein the positioning request carries a target identifier of the target slave device; A generating module, configured to generate a positioning instruction for the target slave device; The sending module is used to send a positioning instruction to all slave devices in the area where the target slave device is located, and the positioning instruction is used to highlight the LED of the port of the target slave device among all the slave devices.
9. A computing device, characterized in that including memory and processor; One or more computer programs are stored in the memory, and the one or more computer programs include instructions; when the instructions are executed by the processor, the computing device executes the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium is used to store a computer program, and the computer program is used to execute the method according to any one of claims 1 to 7.