Offline equipment positioning method and device, equipment and storage medium
By querying historical access information and controlling the indicator light modes of connected devices through the management controller, the problem of difficulty in quickly locating offline devices is solved, and fast and accurate device location is achieved.
Patent Information
- Application Number
- CN202511768840.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-27
- Publication Date
- 2026-02-27
AI Technical Summary
In complex network environments, it is difficult for administrators to quickly locate the position of offline network devices. Existing flash search functions are only applicable to online devices, and the device status lights are not conspicuous in rows of deployments, making them difficult to identify quickly.
By querying the historical access information of the target offline device through the management controller, control commands are sent to the connected device to make the indicator lights on the interconnected port flash according to the first light pattern, and other ports flash according to the second light pattern, so as to achieve two-level precise positioning by using differentiated light patterns.
It enables rapid and accurate location of offline devices, improves location speed and uniqueness, and simplifies device identification in the computer room.
Smart Images

Figure CN121585533A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of operation and maintenance, in particular to an offline device positioning method and device, equipment and storage medium. BACKGROUND
[0002] In a complex network environment such as a modern enterprise network or a data center, network devices such as switches and key business servers are often deployed in a dedicated computer room, and the controllers operated by the management personnel are physically separated from the computer room. When the network device enters an offline state due to power failure, loose network cable or other faults, its physical location does not change, but it is difficult for the management personnel to quickly locate it.
[0003] Currently, the flash search function provides a method for the network management personnel to quickly locate the device, and the controller can make the status light of an online switch flicker to help the administrator identify it in the computer room. However, this method is only applicable to online devices, and for the target device that has been offline, it is impossible to send any instructions to it to make its indicator light flicker. Moreover, since the device status light is usually only one, and may be close to the management port light, it is very inconspicuous in the row-deployed cabinet with many indicator lights, and it is difficult to quickly identify it.
[0004] Therefore, the above technical problems need to be solved by the technical personnel in the field. SUMMARY
[0005] Therefore, the present application aims to provide an offline device positioning method, device, equipment and storage medium, which can quickly locate the offline device. The specific scheme is as follows:
[0006] The first aspect of the present application provides an offline device positioning method applied to a preset management controller, comprising:
[0007] receiving a positioning request for a target offline device;
[0008] in response to the positioning request, querying the historical access information of the target offline device; the historical access information at least includes one upper connection device historically connected with the target offline device and an interconnection port on the upper connection device;
[0009] sending a target control instruction to the upper connection device to control the indicator lights corresponding to each port of the upper connection device to flicker according to a preset light mode, so as to locate the target offline device based on the position of the upper connection device; wherein the indicator light corresponding to the interconnection port flickers according to a first light mode, and the indicator light corresponding to the remaining port flickers according to a second light mode.
[0010] Optionally, the first light mode is used to indicate that the indicator light corresponding to the interconnection port flashes continuously, and the second light mode is used to indicate that the indicator light corresponding to the remaining ports except the interconnection port flashes in a water-lantern mode.
[0011] Optionally, the target offline device is located based on the position of the upper connection device, including:
[0012] The upper connection device is located based on the preset light mode.
[0013] The target offline device is located based on the cable connection information of the interconnection port in the upper connection device.
[0014] Optionally, the target control instruction further includes a timing parameter.
[0015] Correspondingly, the control of the indicator light corresponding to each port in the upper connection device to flash according to the preset light mode includes:
[0016] The target time range corresponding to the timing parameter is determined.
[0017] The indicator light corresponding to each port in the upper connection device is controlled to flash according to the preset light mode within the target time range.
[0018] Optionally, the target offline device is an offline switch, and the upper connection device is an upper connection switch of the offline switch; or, the target offline device is an offline server, and the upper connection device is a switch accessed by the offline server.
[0019] Optionally, the historical access information further includes running state information of the upper connection device.
[0020] Correspondingly, the offline device locating method further includes:
[0021] The running state information is used to determine whether the upper connection device is in an online state.
[0022] If the upper connection device is in the online state, a search button is displayed on a preset user interface, and after detecting a click operation on the search button, the step of sending the target control instruction to the upper connection device is executed.
[0023] If the upper connection device is in the offline state, the upper connection device is taken as a new target offline device, and then the step of querying the historical access information of the target offline device is executed, so as to sequentially locate the positions of the upper connection device and the target offline device.
[0024] Optionally, the step of designating the uplink device as the new target offline device and then proceeding to the step of querying the historical access information of the target offline device to sequentially locate the positions of the uplink device and the target offline device includes:
[0025] Obtain the network devices connected to the uplink port of the uplink device, and obtain the target ports of the network devices connected to the uplink device;
[0026] A target control command is sent to the network device to control the indicator lights corresponding to each port of the network device to flash according to a preset lighting pattern, so as to locate the uplink device based on the location of the network device, and locate the target offline device based on the cable connection information of the interconnection port in the uplink device; wherein, the indicator lights corresponding to the target port of the network device flash according to a first lighting pattern, and the indicator lights corresponding to the other ports flash according to a second lighting pattern.
[0027] A second aspect of this application provides an offline device positioning device, applied to a preset management controller, comprising:
[0028] The request receiving module is used to receive location requests for the target offline device;
[0029] The information query module is used to respond to the location request to query the historical access information of the target offline device; the historical access information is used to record the uplink devices that have been connected to the target offline device and the interconnection ports on the uplink devices;
[0030] The positioning module is used to send target control commands to the uplink device to control the indicator lights corresponding to each port of the uplink device to flash according to a preset lighting pattern, so as to locate the target offline device based on the location of the uplink device; wherein, the indicator lights corresponding to the interconnection port flash according to a first lighting pattern, and the indicator lights corresponding to the other ports flash according to a second lighting pattern.
[0031] A third aspect of this application provides an electronic device including a processor and a memory; wherein the memory is used to store a computer program, which is loaded and executed by the processor to implement the aforementioned offline device positioning method.
[0032] A fourth aspect of this application provides a computer-readable storage medium storing computer-executable instructions, which, when loaded and executed by a processor, implement the aforementioned offline device positioning method.
[0033] It can be seen that the application receives a positioning request for a target offline device through a management controller, responds to the positioning request to query historical access information of the target offline device, the historical access information is used to record an upper-link device once connected with the target offline device and an interconnection port on the upper-link device, sends a target control instruction to the upper-link device to control indicator lights corresponding to each port of the upper-link device to flash according to a preset light mode, so as to locate the target offline device based on the position of the upper-link device, wherein the indicator light corresponding to the interconnection port flashes according to a first light mode, and the indicator light corresponding to the remaining ports flashes according to a second light mode.
[0034] Beneficial effects: the application can extract the upper-link device and interconnection port information once connected with the target offline device by querying the historical access information, and further, the target offline device is located by sending a target control instruction to the upper-link device to control the indicator lights corresponding to each port of the upper-link device to flash, so as to locate the upper-link device first, and then locate the position of the target offline device according to the interconnection port. In this process, the indicator light corresponding to the interconnection port flashes according to a first light mode, and the indicator light corresponding to the remaining ports flashes according to a second light mode, so as to improve the uniqueness and recognition of the positioning by the differentiated light mode, realize two-stage accurate positioning of locating the device according to the overall light mode first, and locating the interconnection port according to the differentiated light mode, and greatly improve the positioning speed and accuracy. In this way, the application can realize fast positioning of the offline device. BRIEF DESCRIPTION OF DRAWINGS
[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description only constitute the embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of the provided drawings.
[0036] Figure 1 A flow chart of an offline device positioning method disclosed by the present application;
[0037] Figure 2 A schematic diagram of a 24-panel switch disclosed by the present application;
[0038] Figure 3 A structural schematic diagram of an offline device positioning device disclosed by the present application;
[0039] Figure 4 A structural diagram of an electronic device disclosed by the present application. DETAILED DESCRIPTION
[0040] With reference to the accompanying drawings, the technical solutions in the embodiments of the present application will be clearly and completely described below, obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.
[0041] In the prior art, the flash search function provides a method for network managers to locate a device, and the controller can make the status light of an online switch flicker to help the administrator identify it in the machine room. However, this method is only applicable to online devices, and cannot send any instructions to the target device to make its indicator light flicker. Moreover, since the device status light is usually only one, and may be close to the management port light, it is very inconspicuous in the rack with multiple indicator lights arranged in a row, and is difficult to quickly identify. Therefore, the present application provides an offline device positioning method, device, equipment and storage medium, which can quickly locate the offline device.
[0042] Figure 1 An offline device positioning method flowchart is provided for the embodiments of the present application, and is specifically applied to a preset management controller. As shown in Figure 1 The offline device positioning method includes:
[0043] Step S11: receiving a positioning request for a target offline device.
[0044] In the present embodiment, the network devices and services in the physical machine room are managed and controlled by the preset management controller. The management controller can continuously collect and store connection information from all switches and key services (such as some key servers), thereby forming a global network topology database, which can specifically include: which device is connected to another device through which port, including the upper connection device and the lower connection device, and the running state of these devices, such as online or offline, etc. The management controller can also provide an offline device display page, which is provided with a button for finding the latest access position of the offline device, and the user sends a positioning request for the offline device by clicking the button.
[0045] Step S12: responding to the positioning request to query the historical access information of the target offline device; the historical access information is used to record the upper connection device that has ever been connected with the target offline device and the interconnection port on the upper connection device.
[0046] In the present embodiment, the management controller responds to the positioning request to query the historical access information of the target offline device from the global network topology database, thereby extracting the upper connection device and the interconnection port information that the target offline device has ever been connected with.
[0047] It should be noted that there can be multiple access results in the historical access information, that is, the controller will record and display the access positions of the last few times, not just the last access position. This is because the network device location can be far away from the location of the controller, such as a controller in Beijing managing network devices in Shanghai branch. In the case of a network device location far away, the physical line of the network device may be switched by someone, which will cause the operation and maintenance personnel to forget the access position when designing. Therefore, through the historical multiple access records, the last possible correct position can be traced back by time.
[0048] The target offline device is an offline switch, and the upper connection device is an upper connection switch connected to the offline switch; or the target offline device is an offline server, and the upper connection device is a switch accessed by the offline server. That is, the target offline device can be an offline switch or an offline server. In one specific embodiment, when the target offline device is an offline switch, the upper connection device is an upper connection switch connected to the offline switch. In another specific embodiment, when the target offline device is an offline server, the upper connection device is a switch accessed by the offline server. It should be noted that when the target offline device is an offline server, the positioning request is triggered by inputting the IP address or MAC address of the offline server.
[0049] Step S13: sending a target control instruction to the upper connection device to control the indicator lights corresponding to each port in the upper connection device to flash according to a preset light mode, so as to locate the target offline device based on the position of the upper connection device; wherein the indicator light corresponding to the interconnection port flashes according to a first light mode, and the indicator light corresponding to the remaining ports flashes according to a second light mode.
[0050] In this embodiment, a target control instruction is sent to the upper connection device, so as to locate the upper connection device first by controlling the indicator lights corresponding to each port of the upper connection device to flash, and then locate the position of the target offline device according to the interconnection port. In this process, the indicator light corresponding to the interconnection port flashes according to a first light mode, and the indicator light corresponding to the remaining ports flashes according to a second light mode, so as to improve the uniqueness and recognition of positioning by differentiating the light mode, realize two-stage accurate positioning of first locating the device according to the overall light mode and then locating the interconnection port according to the differentiated light mode, and greatly improve the positioning speed and accuracy. In this way, the present application can realize fast positioning of the offline device.
[0051] In addition, it should be noted that the indicator light corresponding to each port in this embodiment specifically refers to the panel port status light. Taking a switch with 24 panel ports as an example, as shown in Figure 2As shown, 1, 2, 3, 4, 5, 6, 7, 8…24 are respectively 24 panel port status lights on the 24 ports of the switch. It can be understood that there are many lights on the switch device, such as device status lights, MGMT port lights, and panel port status lights, and the status lights of the switch device are usually only one, so if only the device status lights are used to identify the switch, it is not enough to be eye-catching, and the status lights themselves also have a fast flashing state, such as the MGMT port status light flashing represents using the maximum rate with traffic, and the panel port status light flashing represents using the maximum rate with traffic. Therefore, in order to quickly locate the uplink device, the embodiments of the present application will make the panel port status lights corresponding to each port of the uplink device participate in flashing, so as to enable the operation and maintenance personnel to quickly locate the position of the device from the machine room.
[0052] In the specific embodiment, the first light mode is used to indicate that the indicator light corresponding to the interconnection port continuously flashes, and the second light mode is used to indicate that the indicator light corresponding to the remaining ports except the interconnection port flashes in a flowing light mode. Specifically, the panel port status light corresponding to the interconnection port will flash red in a fast and continuous mode, thereby being used to identify the interconnection port (assuming that the interconnection port is 4 ports), and the other panel port status lights present a flowing light mode and perform the following operations in a cycle: 0.05 seconds later, light 1 is on red for 0.05 seconds, and other lights are off; 0.05 seconds later, light 2 is on red for 0.05 seconds, and other lights are off; 0.05 seconds later, light 3 is on red for 0.05 seconds, and 0.05 seconds later, light 5 is on red for 0.05 seconds (skipping 4 lights), and other lights are off; …, and so on, until all 24 panel port status lights complete the above operations, and then all lights are off for about 1 second, and then the next cycle is performed.
[0053] Specifically, the target offline device is located based on the position of the uplink device, including: locating the uplink device based on the preset light mode; and locating the target offline device based on the cable connection information of the interconnection port in the uplink device. That is, the present application first locates the position of the uplink device from the machine room through a unique light mode, and then further locates the position of the target offline device according to the cable connection information of the interconnection port.
[0054] Suppose that Switch-B is connected to the 4th port of Switch-A, and after sending the target control instruction to Switch-A, the panel port indicator lights corresponding to each port of Switch-A start to flash in the aforementioned light mode, then in a row of racks, the only switch whose panel port indicator lights corresponding to each port are running red flowing light is Switch-A, that is, by identifying the unique light state of the device itself, the location of the upper connection device can be quickly located. Further, after locating the upper connection device (Switch-A), it is also necessary to determine which port of it is connected to the offline device, and since the interconnection port will flash quickly and continuously with a red light, which is in sharp contrast to the flowing light mode of other ports, therefore by checking the physical cable information connected by the interconnection port, the location of the offline device can be found. It can be understood that the data center operation and maintenance will label the network cable, indicating the device connected at the other end, in addition, even without a label, the other end of the cable can be directly found by following the network cable connected by the only flashing port.
[0055] It should also be pointed out that the target control instruction also includes a timing parameter; accordingly, the control of the indicator lights corresponding to each port of the upper connection device according to the preset light mode includes: determining the target time range corresponding to the timing parameter; controlling the indicator lights corresponding to each port of the upper connection device to flash according to the preset light mode within the target time range. It can be understood that the indicator lights corresponding to each port of the upper connection device are not always flashing, which will occupy the light control module resources of the device and affect the regular state display of the port.
[0056] Therefore, the target control instruction also carries a timing parameter, when the upper connection device receives the target control instruction, it will determine the corresponding target time range according to the timing parameter carried in the instruction, so as to control the indicator lights corresponding to each port of the upper connection device to flash according to the preset light mode within the target time range, and stop flashing after exceeding the target time range. If there is no timing off function, once the management connection between the controller and the upper connection device is interrupted due to network flashing or controller crash, etc. accidental interruption, the flashing instruction may be executed by the switch indefinitely, that is, this upper connection device will always flash the wrong light, which not only produces additional energy consumption, but also makes the operation and maintenance personnel mistake the positioning light state as a device fault signal, causing unnecessary troubleshooting work. It can be seen that by setting the timing parameter, a reliable recovery mechanism can be provided, that is, the system can automatically return to the normal state after a preset time, ensuring the self-healing ability of the network device.
[0057] The time defined by the timing parameter can be set to 60 minutes, that is, the panel port status light stops flashing after 60 minutes of flashing. The 60-minute time period covers the normal time-consuming of the machine room troubleshooting, including the whole process of the management personnel going to the machine room from the console, finding the upper connection equipment according to the light guide, and positioning the offline equipment along the cable. There is no need to worry about the positioning mode failure in the middle of the operation, and there is no need to repeatedly initiate the positioning request.
[0058] It can be seen that, by querying the historical access information, the target offline device and the interconnection port information of the upper connection equipment once connected can be extracted. Further, by sending a target control instruction to the upper connection equipment, the upper connection equipment is located first by controlling the corresponding indicator light of each port of the upper connection equipment to flash, and then the position of the target offline device is located according to the interconnection port. In this process, the indicator light corresponding to the interconnection port flashes according to the first light mode, and the indicator light corresponding to the remaining ports flashes according to the second light mode, so as to improve the uniqueness and recognition of the positioning by the differentiated light mode, realize two-stage accurate positioning of first locating the equipment according to the overall light mode and then locating the interconnection port according to the differentiated light mode, and greatly improve the positioning speed and accuracy. In this way, the offline device can be quickly located.
[0059] Further, on the basis of the foregoing embodiments, the historical access information further includes running state information of the upper connection equipment. Correspondingly, the offline device positioning method further includes: judging whether the upper connection equipment is in an online state based on the running state information; if the upper connection equipment is in the online state, displaying a search button on a preset user interface, and after detecting a click operation on the search button, executing the step of sending a target control instruction to the upper connection equipment; if the upper connection equipment is in an offline state, taking the upper connection equipment as a new target offline device, and then jumping to execute the step of querying the historical access information of the target offline device, so as to sequentially locate the positions of the upper connection equipment and the target offline device.
[0060] That is, the running state information of the upper connection equipment, that is, whether the upper connection equipment is in an online state or an offline state, is also recorded in the historical access information.
[0061] In a specific implementation, if the upper connection equipment is in the online state, a search button is displayed on a preset user interface. The preset user interface can be a certain interface in the offline device display page. Then, after detecting a click operation of the search button by the user, a target control instruction is sent to the upper connection equipment.
[0062] In another specific embodiment, if the upper connection device is in an offline state, the historical access information of the upper connection device can be queried by the controller to find its upper connection device (second level upper connection), i.e., the embodiment of the application takes the upper connection device as a new target offline device, and then jumps to the step of querying the historical access information of the target offline device to locate the positions of the upper connection device and the target offline device in turn. In a special case, if all devices are shown offline, the core network link is interrupted or the controller itself network is abnormal, wherein the core network abnormality refers to the power-off of the core switch, the interruption of the core link, resulting in that all access devices and services in the lower layer cannot communicate with the controller, which is manifested as full offline; the controller network abnormality refers to the failure of the management network where the controller is located, resulting in that the controller cannot connect any device, rather than the offline of the device itself. Therefore, in this case, since the core network device, the controller and the management network are the key of the enterprise network, the user usually plans and deploys them separately, and the physical positions and emergency handling processes of the user are clear, so the user's preset scheme can be followed to handle.
[0063] Specifically, the step of taking the upper connection device as a new target offline device, and then jumping to the step of querying the historical access information of the target offline device to locate the positions of the upper connection device and the target offline device in turn comprises: acquiring a network device connected with the upper connection port of the upper connection device, and acquiring a target port in the network device connected with the upper connection device; sending a target control instruction to the network device to control the indicator lights corresponding to each port of the network device to flash according to a preset light mode, so as to locate the upper connection device based on the position of the network device, and locate the target offline device based on the cable connection information of the interconnection port in the upper connection device; wherein the indicator light corresponding to the target port of the network device flashes according to a first light mode, and the indicator lights corresponding to the remaining ports flash according to a second light mode.
[0064] That is, in the case that the upper connection device is offline, the network device connected with the upper connection port of the upper connection device is acquired, and the target port in the network device connected with the upper connection device is acquired. When the network device is online, the controller sends a target control instruction to the network device to control the indicator lights corresponding to each port of the network device to flash according to a preset light mode, wherein the indicator light corresponding to the target port of the network device flashes according to a first light mode, and the indicator lights corresponding to the remaining ports flash according to a second light mode, so as to locate the position of the network device first, and then locate the position of the upper connection device according to the cable connection information of the target port. Further, the position of the target offline device can be located based on the cable connection information of the interconnection port in the upper connection device.
[0065] The following is described with a specific example, assuming that the information of the network device is as follows:
[0066] Switch-A (online): located in the computer room A, 24-port switch, port 4 connected to Switch-B;
[0067] Switch-B (offline): located in the computer room B, offline due to loose power supply;
[0068] Server-X (critical business): accessed to the network through Switch-B, also offline at present;
[0069] The user inputs the IP or MAC address of Server-X in the offline device display page and clicks the button of finding the nearest access location to obtain the following information: the upper connecting device: Switch-B (offline), the interconnection port: Port 12; the upper connecting device of the upper connecting device: Switch-A (online), the interconnection port: Port 4.
[0070] Therefore, after the user clicks the finding button, the controller sends a target control instruction to Switch-A, and Switch-A executes light flashing, in which the red light of Port 4 flashes rapidly, and the red flowing light of other ports cyclically flashes; next, the user finds Port 4 of Switch-A, finds Switch-B along the network cable, finds Port 12 of Switch-B according to the record, and locates Server-X along the cable information.
[0071] It can be seen that the application discloses a process of locating a target offline device according to the operation state information of an upper connecting device. The chain processing logic of the application is designed to trace one level at a time, so that the application can still play a role when the upper connecting device is offline, that is, the positioning does not need to be abandoned due to the direct upper connection offline. The application can query the historical access information of the upper connecting device through the controller, trace upwards level by level, and repair the offline problem. When all devices are offline, it is directly determined that the core network or the controller network is abnormal, and the light positioning process of the application does not need to be started, so as to avoid doing useless work in the core fault scene.
[0072] Referring to Figure 3 The application embodiment also discloses an offline device positioning device, applied to a preset management controller, comprising:
[0073] A request receiving module 11 is configured to receive a positioning request for a target offline device;
[0074] An information query module 12 is configured to respond to the positioning request to query historical access information of the target offline device; the historical access information is used to record an upper connecting device that has ever connected with the target offline device and an interconnection port on the upper connecting device.
[0075] The positioning module 13 is configured to send a target control instruction to the upper connection device to control the indicator lights corresponding to the ports in the upper connection device to flash according to a preset light mode, so as to locate the target offline device based on the position of the upper connection device; wherein the indicator light corresponding to the interconnection port flashes according to a first light mode, and the indicator light corresponding to the remaining ports flashes according to a second light mode.
[0076] It can be seen that, by querying the historical access information, the upper connection device and the interconnection port information that the target offline device has ever connected can be extracted, and further, by sending a target control instruction to the upper connection device, the position of the target offline device can be located by controlling the indicator lights corresponding to the ports of the upper connection device to flash. In this process, the indicator light corresponding to the interconnection port flashes according to a first light mode, and the indicator light corresponding to the remaining ports flashes according to a second light mode, so as to improve the uniqueness and recognition of the positioning by the differentiated light modes, realize two-stage accurate positioning of locating the device according to the overall light mode and locating the interconnection port according to the differentiated light mode, and greatly improve the positioning speed and accuracy. In this way, the offline device can be quickly located.
[0077] In some embodiments, the first light mode is used to indicate that the indicator light corresponding to the interconnection port flashes continuously, and the second light mode is used to indicate that the indicator light corresponding to the remaining ports except the interconnection port flashes in a water-lantern mode.
[0078] In some embodiments, the positioning module 13 is specifically configured to locate the upper connection device based on the preset light mode, and locate the target offline device based on the cable connection information of the interconnection port in the upper connection device.
[0079] In some embodiments, the target control instruction further includes a timing parameter.
[0080] Correspondingly, the positioning module 13 is specifically configured to determine a target time range corresponding to the timing parameter, and control the indicator lights corresponding to the ports in the upper connection device to flash according to the preset light mode within the target time range.
[0081] In some embodiments, the target offline device is an offline switch, and the upper connection device is an upper connection switch of the offline switch; or, the target offline device is an offline server, and the upper connection device is a switch accessed by the offline server.
[0082] In some embodiments, the historical access information further includes running state information of the upper connection device.
[0083] Correspondingly, the offline device positioning apparatus is further configured to determine whether the upper-linking device is in an online state based on the running state information; if the upper-linking device is in the online state, display a search button on a preset user interface, and after detecting a click operation on the search button, execute the step of sending the target control instruction to the upper-linking device; if the upper-linking device is in an offline state, take the upper-linking device as a new target offline device, and then jump to the step of querying the historical access information of the target offline device, so as to sequentially locate the positions of the upper-linking device and the target offline device.
[0084] In some specific embodiments, the offline device positioning apparatus is specifically configured to acquire a network device connected to an upper-linking port of the upper-linking device, and acquire a target port in the network device connected to the upper-linking device; send a target control instruction to the network device to control the indicator lights corresponding to each port in the network device to flash in a preset light mode, so as to locate the upper-linking device based on the position of the network device, and locate the target offline device based on the cable connection information of the interconnection port in the upper-linking device; wherein the indicator light corresponding to the target port in the network device flashes in a first light mode, and the indicator lights corresponding to the remaining ports flash in a second light mode.
[0085] Further, the embodiment of the present application further provides an electronic device. Figure 4 The electronic device 20 structure diagram shown in the figure cannot be considered as any limitation on the use range of the present application.
[0086] Figure 4 The electronic device 20 structure diagram provided by the embodiment of the present application. The electronic device 20, specifically can include: at least one processor 21, at least one memory 22, power supply 23, communication interface 24, input output interface 25 and communication bus 26. Wherein, the memory 22 is used for storing computer program, the computer program is loaded and executed by the processor 21, to realize the related steps in the offline device positioning method disclosed in any of the preceding embodiments.
[0087] In the embodiment, the power supply 23 is used for providing working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol followed by the communication interface 24 can be any communication protocol applicable to the technical solution of the present application, which is not limited here; the input output interface 25 is used for acquiring external input data or outputting data to the outside world, and the specific interface type can be selected according to the specific application needs, which is not limited here.
[0088] In addition, the memory 22 as a carrier for storing resources can be a read-only memory, a random access memory, a magnetic disk or an optical disk, etc., and the resources stored thereon can include an operating system 221, a computer program 222 and data 223, etc., and the storage mode can be temporary storage or permanent storage.
[0089] The operating system 221 is used to manage and control each hardware device on the electronic device 20 and the computer program 222, so as to realize the operation and processing of the processor 21 on the mass data 223 in the memory 22, and can be Windows Server, Netware, Unix, Linux, etc. In addition to the computer program capable of completing the offline device positioning method disclosed in any of the preceding embodiments and executed by the electronic device 20, the computer program 222 can further include a computer program capable of completing other specific work. The data 223 can include the quality control strategy collected by the electronic device 20, etc.
[0090] Further, the embodiment of the present application further discloses a storage medium, wherein the storage medium stores a computer program, and the computer program is loaded and executed by a processor to realize the steps of the offline device positioning method disclosed in any of the preceding embodiments.
[0091] The embodiments in the specification are described in a progressive manner, and each embodiment focuses on the difference from other embodiments. The same or similar parts of each embodiment can be referred to each other. For the device disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and the related parts can be referred to the method part.
[0092] Finally, it should be noted that in this document, the relationship terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between the entities or operations. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the element defined by the statement "including a" does not exclude the presence of other identical elements in the process, method, article or device including the element.
[0093] The off-line device positioning method, device, equipment and storage medium provided by the present application are described in detail above, and the principles and implementation manners of the present application are described by applying specific examples. The above description of the embodiments is only used to help understand the method of the present application and its core idea; meanwhile, for those skilled in the art, according to the idea of the present application, the specific implementation manners and application ranges will be changed, and the above description should not be understood as a limitation on the present application.
Claims
1. An offline device positioning method, characterized in that, The management controller applied to the preset includes: Receive location requests for the target offline device; In response to the location request, the historical access information of the target offline device is queried; the historical access information is used to record the uplink devices that have been connected to the target offline device and the interconnection ports on the uplink devices; A target control command is sent to the uplink device to control the indicator lights corresponding to each port of the uplink device to flash according to a preset lighting pattern, so as to locate the target offline device based on the location of the uplink device; wherein, the indicator lights corresponding to the interconnection port flash according to a first lighting pattern, and the indicator lights corresponding to the other ports flash according to a second lighting pattern.
2. The offline device positioning method according to claim 1, characterized in that, The first lighting mode is used to indicate that the indicator light corresponding to the interconnect port flashes continuously, and the second lighting mode is used to indicate that the indicator lights corresponding to the other ports besides the interconnect port flash in a sequential light pattern.
3. The offline device positioning method according to claim 1, characterized in that, The step of locating the target offline device based on the location of the uplink device includes: The upstream device is located based on the preset lighting pattern; The target offline device is located based on the cable connection information of the interconnect port in the uplink device.
4. The offline device positioning method according to claim 1, characterized in that, The target control command also includes timing parameters; Correspondingly, the control of the indicator lights corresponding to each port in the connected device to flash according to a preset lighting pattern includes: Determine the target time range corresponding to the timing parameters; Within the target time range, control the indicator lights corresponding to each port of the uplink device to flash according to a preset lighting pattern.
5. The offline device positioning method according to claim 1, characterized in that, The target offline device is an offline switch, and the uplink device is the uplink switch of the offline switch; or, the target offline device is an offline server, and the uplink device is the switch to which the offline server is connected.
6. The offline device positioning method according to any one of claims 1 to 5, characterized in that, The historical access information also includes the operating status information of the uplink device; Correspondingly, the offline device positioning method further includes: Based on the operational status information, determine whether the uplink device is online; If the upstream device is online, a search button is displayed on the preset user interface, and after a click operation on the search button is detected, the step of sending the target control command to the upstream device is executed; If the uplink device is offline, then the uplink device is designated as the new target offline device, and the process jumps to the step of querying the historical access information of the target offline device, so as to locate the positions of the uplink device and the target offline device in sequence.
7. The offline device positioning method according to claim 6, characterized in that, The step of designating the uplink device as the new target offline device and then proceeding to the step of querying the historical access information of the target offline device, in order to sequentially locate the positions of the uplink device and the target offline device, includes: Obtain the network devices connected to the uplink port of the uplink device, and obtain the target ports of the network devices connected to the uplink device; A target control command is sent to the network device to control the indicator lights corresponding to each port of the network device to flash according to a preset lighting pattern, so as to locate the uplink device based on the location of the network device, and locate the target offline device based on the cable connection information of the interconnection port in the uplink device; wherein, the indicator lights corresponding to the target port of the network device flash according to a first lighting pattern, and the indicator lights corresponding to the other ports flash according to a second lighting pattern.
8. An offline device positioning device, characterized in that, The management controller applied to the preset includes: The request receiving module is used to receive location requests for the target offline device; The information query module is used to respond to the location request to query the historical access information of the target offline device; the historical access information is used to record the uplink devices that have been connected to the target offline device and the interconnection ports on the uplink devices; The positioning module is used to send target control commands to the uplink device to control the indicator lights corresponding to each port of the uplink device to flash according to a preset lighting pattern, so as to locate the target offline device based on the location of the uplink device; wherein, the indicator lights corresponding to the interconnection port flash according to a first lighting pattern, and the indicator lights corresponding to the other ports flash according to a second lighting pattern.
9. An electronic device, characterized in that, The electronic device includes a processor and a memory, wherein: The memory is used to store computer programs; The computer program is loaded and executed by the processor to implement the offline device location method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, Used to store computer-executable instructions, which, when loaded and executed by a processor, implement the offline device location method as described in any one of claims 1 to 7.