Server positioning method, device, equipment and storage medium

The server image is obtained through the camera device and the pixel length and offset angle are calculated. Combined with the position information, the problem of time-consuming and labor-intensive and low accuracy of traditional server positioning is solved, and efficient and high-precision server positioning is achieved.

CN114638893BActive Publication Date: 2025-08-22GUANGZHOU POWER SUPPLY BUREAU GUANGDONG POWER GRID CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210263866.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-15
Publication Date
2025-08-22
Estimated Expiration
2042-03-15

AI Technical Summary

Technical Problem

Traditional server positioning methods consume time and effort and have low positioning accuracy, making it impossible to determine the server location efficiently and accurately.

Method used

The image of the target server is obtained through the camera device, the pixel length and offset angle are calculated, and the position information of the camera device is combined with the position information, and the vertical and horizontal positions of the server are calculated using the trigonometric function to construct the corresponding relationship between the position information and the number.

Benefits of technology

It realizes the rapid and accurate acquisition of server location information, improves positioning efficiency and accuracy, avoids on-site manual measurement, and simplifies the positioning process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114638893B_ABST
    Figure CN114638893B_ABST
Patent Text Reader

Abstract

The present application provides a server positioning method, apparatus, device and storage medium, which can quickly and accurately obtain server location information, including: obtaining a target image of a target server to be located by a preset camera device, obtaining a first pixel length corresponding to the camera device, a second pixel length corresponding to the target server, and a horizontal offset angle between the target server and the camera device based on the target image, obtaining first vertical position information and first horizontal position information of the camera device, and a vertical distance between the camera device and the target server, obtaining second vertical position information of the target server based on the first vertical position information, the first pixel length and the second pixel length, and obtaining second horizontal position information of the target server based on the vertical distance and the horizontal offset angle, and obtaining the location information of the target server based on the second vertical position information and the second horizontal position information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of positioning technology, and in particular to a server positioning method, apparatus, computer equipment, and storage medium. Background Art

[0002] With the development of positioning technology, a technology that uses server numbers to locate servers has emerged. This technology pre-attaches a positioning tag on the server with the server number written on it. By recording the server number and the server's location information, a correspondence between the server number and the location information is established.

[0003] Traditionally, the server's location information requires users to visit the server installation site and manually measure and record it. This server positioning method not only consumes a lot of user time and effort, but also has low positioning accuracy. Summary of the Invention

[0004] Based on this, it is necessary to provide a high-efficiency and high-precision server positioning method, device, computer equipment and storage medium to address the above technical problems.

[0005] In a first aspect, the present application provides a server location method. The method comprises:

[0006] Using a preset camera device, a target image of the target server to be located is captured;

[0007] Based on the target image, obtaining a first pixel length corresponding to the camera device, a second pixel length corresponding to the target server, and a horizontal offset angle between the target server and the camera device;

[0008] Acquire first vertical position information and first horizontal position information of the camera device, and a vertical distance between the camera device and the target server;

[0009] Obtaining second vertical position information of the target server according to the first vertical position information, the first pixel length, and the second pixel length, and obtaining second horizontal position information of the target server according to the vertical distance and the horizontal offset angle;

[0010] The location information of the target server is obtained based on the second vertical location information and the second horizontal location information.

[0011] In one embodiment, obtaining the first pixel length corresponding to the camera device and the second pixel length corresponding to the target server includes:

[0012] Obtaining a first pixel length between the center point of the target image and a preset horizontal plane;

[0013] A second pixel length between the server center point of the target server and the preset horizontal plane in the target image is obtained.

[0014] In one embodiment, the predetermined horizontal plane includes the ground;

[0015] The obtaining of a first pixel length between a center point of the target image and a preset horizontal plane includes:

[0016] Segmenting the target image to obtain a plurality of image pixel segments constituting the target image;

[0017] Based on the trained ground boundary recognition model, the plurality of image pixel segments are input into the ground boundary recognition model, and target image pixel segments are obtained through the ground boundary recognition model;

[0018] A ground boundary pixel point is determined from the target image pixel segment, and a pixel length from the image center point to the ground boundary pixel point is used as the first pixel length.

[0019] In one embodiment, before inputting the plurality of image pixel segments into the trained ground boundary recognition model and obtaining the target image pixel segments through the ground boundary recognition model, the method further comprises:

[0020] Acquire a sample image; the sample image carries a server image and a ground image;

[0021] Segmenting the sample image and performing feature enhancement processing on the segmented sample image to obtain a plurality of sample image pixel segments constituting the sample image and sample annotated pixel segments carrying ground boundary pixel points in the sample image pixel segments;

[0022] The plurality of sample image pixel segments are input into a ground boundary recognition model to be trained, and the ground boundary recognition model is trained using the sample labeled pixel segments to obtain the trained ground boundary recognition model.

[0023] In one embodiment, the target server carries a tag; after obtaining the location information of the target server, the method further includes:

[0024] Obtaining a label strip image corresponding to the label strip carried by the target server, and obtaining server number information of the target server according to the label strip image;

[0025] Based on the location information of the target server and the server number information of the target server, a correspondence between the location information and the server number information is established.

[0026] In one embodiment, the label strip carries horizontal lines and vertical lines; and obtaining a label strip image corresponding to the label strip carried by the target server includes:

[0027] Acquire, by the camera device, an initial image of the label strip carried by the target server;

[0028] Acquiring a deflection angle between a vertical line carried by the label strip and a vertical direction of the initial image in the initial image;

[0029] performing correction processing on the initial image according to the deflection angle to obtain a corrected image;

[0030] The horizontal lines and vertical lines carried by the label strip in the corrected image are acquired, and the label strip image is obtained according to the horizontal lines and vertical lines carried by the label strip in the corrected image.

[0031] In one embodiment, after establishing the correspondence between the location information and the server number information, the method further includes:

[0032] Obtaining an abnormal server location information acquisition request issued by a full-link server monitoring system, wherein the full-link server monitoring system is used to monitor the operating status of the target server;

[0033] In response to the abnormal server location information acquisition request, acquiring the location information of the abnormal server and the corresponding server number information of the abnormal server;

[0034] Based on the pre-built corresponding relationship, the location information of the abnormal server is obtained.

[0035] In a second aspect, the present application further provides a server positioning device. The device includes:

[0036] An image acquisition module is used to acquire a target image of a target server to be located by using a preset camera device;

[0037] An image information acquisition module, configured to acquire a first pixel length corresponding to the camera device, a second pixel length corresponding to the target server, and a horizontal offset angle between the target server and the camera device;

[0038] A device information acquisition module, configured to acquire first vertical position information and first horizontal position information of the camera device, and a vertical distance between the camera device and the target server;

[0039] a server position information acquisition module, configured to obtain second vertical position information of the target server based on the first vertical position information, the first pixel length, and the second pixel length, and to obtain second horizontal position information of the target server based on the vertical distance and the horizontal offset angle;

[0040] The server location information determination module is configured to obtain the location information of the target server based on the second vertical location information and the second horizontal location information.

[0041] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are performed:

[0042] Using a preset camera device, a target image of the target server to be located is captured;

[0043] Based on the target image, obtaining a first pixel length corresponding to the camera device, a second pixel length corresponding to the target server, and a horizontal offset angle between the target server and the camera device;

[0044] Acquire first vertical position information and first horizontal position information of the camera device, and a vertical distance between the camera device and the target server;

[0045] Obtaining second vertical position information of the target server according to the first vertical position information, the first pixel length, and the second pixel length, and obtaining second horizontal position information of the target server according to the vertical distance and the horizontal offset angle;

[0046] The location information of the target server is obtained based on the second vertical location information and the second horizontal location information.

[0047] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the following steps:

[0048] Using a preset camera device, a target image of the target server to be located is captured;

[0049] Based on the target image, obtaining a first pixel length corresponding to the camera device, a second pixel length corresponding to the target server, and a horizontal offset angle between the target server and the camera device;

[0050] Acquire first vertical position information and first horizontal position information of the camera device, and a vertical distance between the camera device and the target server;

[0051] Obtaining second vertical position information of the target server according to the first vertical position information, the first pixel length, and the second pixel length, and obtaining second horizontal position information of the target server according to the vertical distance and the horizontal offset angle;

[0052] The location information of the target server is obtained based on the second vertical location information and the second horizontal location information.

[0053] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the following steps:

[0054] Using a preset camera device, a target image of the target server to be located is captured;

[0055] Based on the target image, obtaining a first pixel length corresponding to the camera device, a second pixel length corresponding to the target server, and a horizontal offset angle between the target server and the camera device;

[0056] Acquire first vertical position information and first horizontal position information of the camera device, and a vertical distance between the camera device and the target server;

[0057] Obtaining second vertical position information of the target server according to the first vertical position information, the first pixel length, and the second pixel length, and obtaining second horizontal position information of the target server according to the vertical distance and the horizontal offset angle;

[0058] The location information of the target server is obtained based on the second vertical location information and the second horizontal location information.

[0059] The above-mentioned server positioning method, apparatus, computer equipment, storage medium and computer program product obtain a target image of the target server to be located by a preset camera device, obtain a first pixel length corresponding to the camera device, a second pixel length corresponding to the target server, and a horizontal offset angle between the target server and the camera device based on the target image, obtain first vertical position information and first horizontal position information of the camera device, and a vertical distance between the camera device and the target server, obtain the second vertical position information of the target server based on the first vertical position information, the first pixel length and the second pixel length, and obtain the second horizontal position information of the target server based on the vertical distance and the horizontal offset angle, and obtain the location information of the target server based on the second vertical position information and the second horizontal position information. The present application uses a camera device to capture a target image of the target server to be located, obtains the first pixel length corresponding to the camera device, the second pixel length corresponding to the target server, and the horizontal offset angle between the target server and the camera device based on the target image, then obtains the vertical and horizontal position information of the camera device, and the vertical distance between the camera device and the target server, and obtains the location information of the target server through the above data. This application can achieve fast and accurate acquisition of server location information, thereby avoiding the need for users to go to the server installation site and obtain server location information by manual measurement and recording, thereby improving the efficiency and accuracy of server positioning. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 A diagram showing an application environment of a server positioning method in one embodiment;

[0061] Figure 2 1 is a flow chart of a server location method according to an embodiment;

[0062] Figure 3 A schematic flow chart of a method for obtaining a first pixel length between an image center point and a preset horizontal plane in a target image in one embodiment;

[0063] Figure 4 A schematic diagram of a process for constructing a ground boundary recognition model in one embodiment;

[0064] Figure 5 A schematic flow chart of a method for obtaining a label strip image corresponding to a label strip carried by the target server in one embodiment;

[0065] Figure 6 A top view of a server captured by a camera device in one embodiment;

[0066] Figure 7 A simplified diagram of a target image captured by a server in one embodiment;

[0067] Figure 8 A structural diagram of a ground boundary recognition model in one embodiment;

[0068] Figure 9 is a structural block diagram of a server positioning device in one embodiment;

[0069] Figure 10 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0070] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0071] It should be noted that the terms "first" and "second" as used in the embodiments of the present invention are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It is understood that the terms "first" and "second" may interchangeably represent a specific order or precedence, where permitted. It should be understood that the objects distinguished by "first" and "second" may be interchangeable, where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than that illustrated or described herein.

[0072] The server location method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown, the camera device 102 communicates with the server 104 via a network. Based on the target image captured by the camera device 102, the server 104 obtains the first pixel length corresponding to the camera device, the second pixel length corresponding to the target server, and the horizontal offset angle between the target server and the camera device. The server 104 then obtains the vertical and horizontal position information of the camera device, as well as the vertical distance between the camera device and the target server. The target server's position information is obtained from the above data. The camera device 102 can be, but is not limited to, various cameras, smart devices with cameras, etc. The server 104 can be implemented as an independent server or a server cluster consisting of multiple servers.

[0073] In one embodiment, Figure 2 As shown, a server positioning method is provided, which is applied to Figure 1 The server 104 is used as an example for description, and the following steps are included:

[0074] Step S201 : obtaining and photographing a target image of a target server to be located by using a preset camera device 102 .

[0075] The preset camera device 102 may be a camera, a smart device with a camera function, etc. The target server is a server that needs to be located, and the target image is an image carrying the target server.

[0076] Specifically, the camera device 102 is fixed at the center of all target servers, and the camera angle and focal length of the camera device 102 are adjusted so that all target servers are within the shooting field of view, and the camera is shot toward the plane where all target servers are located, thereby obtaining the above-mentioned target image.

[0077] Step S202 : Based on the target image, obtain a first pixel length corresponding to the camera device 102 , a second pixel length corresponding to the target server, and a horizontal offset angle between the target server and the camera device 102 .

[0078] Among them, the first pixel length is the distance from the center point of the target image to the preset horizontal plane, which can be used to indicate the distance from the camera device 102 to the horizontal plane; the second pixel length is the distance from the center point of the target server to the preset horizontal plane, which can be used to indicate the distance from the target server to the horizontal plane; the horizontal offset angle is the horizontal angle between the target server and the camera device 102.

[0079] Specifically, the server 104 obtains the target image through the camera 102 , and obtains the first pixel length, the second pixel length, and the horizontal offset angle between the target server and the camera 102 from the target image through the server 104 .

[0080] Step S203 : Acquire first vertical position information and first horizontal position information of the camera device 102 , and a vertical distance between the camera device 102 and the target server.

[0081] Among them, the first vertical position information is the distance from the camera device 102 to the preset horizontal plane, the first horizontal position information is the distance from the camera device 102 to the preset vertical plane, and the vertical distance between the camera device 102 and the target server refers to the vertical distance between the camera device 102 and the plane where the target server is located.

[0082] Specifically, the technical personnel go to the server room to measure and obtain the above data.

[0083] Step S204 : obtaining second vertical position information of the target server according to the first vertical position information, the first pixel length, and the second pixel length, and obtaining second horizontal position information of the target server according to the vertical distance and the horizontal offset angle.

[0084] The second vertical position information is the distance from the target server to a preset horizontal plane, and the second horizontal position information is the distance from the target server to a preset vertical plane.

[0085] Specifically, the second vertical position information is calculated based on the ratio of the first pixel length to the first vertical position information being equal to the ratio of the second pixel length to the second vertical position information; the second horizontal position information is calculated based on the vertical distance between the camera device 102 and the target server, and the horizontal offset angle between the target server and the camera device, according to the tangent theorem of trigonometric functions.

[0086] Step S205: Obtaining the location information of the target server based on the second vertical location information and the second horizontal location information.

[0087] The location information of the target server is the location coordinates of the target server.

[0088] Specifically, the location coordinates of the target server are obtained based on the second vertical location information and the second horizontal location information.

[0089] In the above-mentioned server positioning method, a target image of the target server to be positioned is obtained by a preset camera device, and based on the target image, a first pixel length corresponding to the camera device, a second pixel length corresponding to the target server, and a horizontal offset angle between the target server and the camera device are obtained, and the first vertical position information and the first horizontal position information of the camera device, as well as the vertical distance between the camera device and the target server are obtained. According to the first vertical position information, the first pixel length, and the second pixel length, the second vertical position information of the target server is obtained, and according to the vertical distance and the horizontal offset angle, the second horizontal position information of the target server is obtained. Based on the second vertical position information and the second horizontal position information, the position information of the target server is obtained. The present application uses a camera device to capture a target image of the target server to be positioned, and based on the target image, obtains the first pixel length corresponding to the camera device, the second pixel length corresponding to the target server, and the horizontal offset angle between the target server and the camera device, and then obtains the vertical and horizontal position information of the camera device, as well as the vertical distance between the camera device and the target server, and obtains the position information of the target server through the above-mentioned data.

[0090] This application enables fast and accurate acquisition of server location information, thereby avoiding the need for users to go to the server installation site and obtain server location information by manual measurement and recording, thereby improving the efficiency and accuracy of server positioning.

[0091] In one embodiment, step S202 includes the following steps:

[0092] A first pixel length between the center point of the target image and a preset horizontal plane is obtained; and a second pixel length between the center point of the target server and the preset horizontal plane is obtained.

[0093] Among them, the target image center point is the central pixel point of the target image, which can be the shooting center point of the camera device 102; the preset horizontal plane is a pre-set horizontal reference plane, for example, it can be the ground; the server center point is the pixel point at the center position of the target server in the target image.

[0094] Specifically, the server 104 obtains the above-mentioned target image through the camera device 102, and calculates the distance from the center point of the target image and the center point of the target server to the preset horizontal plane through the server 104, the center point of the target image, the center point of the target server and the preset horizontal plane, so as to obtain the first pixel length and the second pixel length.

[0095] In this embodiment, the server 104 identifies the target image center point, the target server center point and the preset horizontal plane, calculates the distances from the target image center point and the target server center point to the preset horizontal plane, and accurately obtains the first pixel length and the second pixel length.

[0096] In one embodiment, Figure 3 As shown, obtaining the first pixel length between the center point of the target image and the preset horizontal plane includes the following steps:

[0097] Step S301 : segmenting a target image to obtain a plurality of image pixel segments constituting the target image.

[0098] Among them, image pixel fragments can be used to input the ground boundary recognition model.

[0099] Specifically, the target image is evenly segmented according to a preset segmentation dimension by the server 104 to obtain the above-mentioned image pixel segments.

[0100] Step S302: Based on the trained ground boundary recognition model, multiple image pixel segments are input into the ground boundary recognition model, and target image pixel segments are obtained through the ground boundary recognition model.

[0101] Among them, the ground is a choice of a preset horizontal plane, the ground boundary is the boundary line between the ground and the plane where the target server is located, and the ground boundary recognition model can be used to identify the target image pixel fragment; the target image pixel fragment is an image pixel fragment carrying the ground boundary.

[0102] Specifically, a plurality of image pixel segments are input into a ground boundary recognition model, and a target image pixel segment is obtained through the ground boundary recognition model.

[0103] Step S303 : determining ground boundary pixel points from the target image pixel segments, and taking the pixel length from the image center point to the ground boundary pixel points as the first pixel length.

[0104] Among them, the ground boundary pixels are the pixels that constitute the ground boundary in the target image.

[0105] Specifically, a ground boundary pixel point is determined from the target image pixel segment, a ground boundary pixel point vertically corresponding to the image center point is found, and the pixel length between the image center point and the ground boundary pixel point is used as the first pixel length.

[0106] In this embodiment, the target image pixel fragment is obtained through the trained ground boundary recognition model, the ground boundary pixel point is obtained through the target image pixel fragment, the pixel length between the image center point and the ground boundary pixel point is calculated, and the first pixel length is obtained accurately and quickly.

[0107] In one embodiment, Figure 4 As shown, before step S302, the following steps are also included:

[0108] Step S401: Acquire a sample image; the sample image carries a server image and a ground image.

[0109] The sample image is taken by the camera device 102 and carries a server image and a ground image.

[0110] Specifically, the camera angle and focal length of the camera 102 are adjusted so that all target servers and the ground are within the shooting field of view, and the camera is shot toward the plane where all target servers are located, thereby obtaining the above sample images.

[0111] Step S402 , segmenting the sample image and performing feature enhancement processing on the segmented sample image to obtain a plurality of sample image pixel segments constituting the sample image and sample annotated pixel segments carrying ground boundary pixel points in the sample image pixel segments.

[0112] Among them, the sample image pixel fragment can be used to input the ground boundary recognition model to be trained, and the sample annotation pixel fragment is the sample image pixel fragment carrying the ground boundary pixel point; feature enhancement processing refers to rotating the segmented sample image at multiple angles and increasing the features of the image by leaving blank space on the left and right.

[0113] Specifically, the server 104 divides the sample image equally according to the preset dividing dimension, and performs feature enhancement processing on the divided sample image to obtain the above-mentioned sample image pixel fragments, and manually marks the sample image pixel fragments carrying ground boundary pixel points to obtain sample marked pixel fragments.

[0114] Step S403 : inputting a plurality of sample image pixel segments into a ground boundary recognition model to be trained, and training the ground boundary recognition model using the sample labeled pixel segments to obtain a trained ground boundary recognition model.

[0115] The ground boundary recognition model to be trained is a ground boundary recognition model that has not been trained, and the trained ground boundary recognition model is a ground boundary recognition model that can recognize ground boundaries.

[0116] Specifically, a plurality of sample image pixel segments are input into the ground boundary recognition model to be trained, and the ground boundary recognition model is trained using the sample labeled pixel segments and a pre-selected model structure to obtain a trained ground boundary recognition model.

[0117] In this embodiment, the sample image is segmented and the image features are enhanced to obtain sample image pixel segments. The labeling refers to the sample image pixel segments carrying ground boundary pixels to obtain sample labeled pixel segments. Finally, the ground boundary recognition model is trained using the sample labeled pixel segments and the pre-selected model structure to quickly and accurately obtain the trained ground boundary recognition model.

[0118] In one embodiment, after step S205, the following steps are further included:

[0119] Obtain a label strip image corresponding to the label strip carried by the target server, and obtain the server number information of the target server according to the label strip image; based on the location information of the target server and the server number information of the target server, establish a correspondence between the location information and the server number information.

[0120] The label strip carries the serial number information of the target server, and the label strip image is used to identify the serial number information.

[0121] Specifically, by adjusting the shooting angle and shooting focal length of the camera device 102, the shooting range is locked on the target server label strip area, and the initial image of the label strip carried by the target server is captured. The initial image is processed to obtain the label strip image, and then the label strip number information is obtained through digital recognition; by adding the corresponding server number information to the location information of the target server, the specific location information corresponding to the target server with a specific number can be obtained.

[0122] In this embodiment, the target server number information is obtained by identifying the target server's tag strip, and the specific location information corresponding to the target server with a specific number can be accurately obtained by adding the corresponding server number information to the target server's location information.

[0123] In one embodiment, Figure 5As shown, obtaining the label strip image corresponding to the label strip carried by the target server includes the following steps:

[0124] Step S501 : obtaining an initial image of the label strip carried by the target server through the camera device 102 .

[0125] The initial image of the label strip not only includes the label strip image within the rectangular wireframe, but also includes the image outside the rectangular wireframe.

[0126] Specifically, by adjusting the shooting angle and shooting focal length of the camera device 102 , the shooting range is locked to the target server label strip area, and the initial image of the label strip carried by the target server is captured.

[0127] Step S502 : obtaining a deflection angle between a vertical line carried by the label strip in the initial image and the vertical direction of the initial image.

[0128] The vertical line carried by the label strip is the vertical side of the rectangular wireframe, and the corresponding horizontal side is the horizontal line carried by the label strip; the deflection angle is the deflection angle between the vertical line and the vertical direction of the initial image.

[0129] Specifically, the server 104 obtains the deflection angle between the vertical line carried by the label strip and the vertical direction of the initial image.

[0130] Step S503: Correct the initial image according to the deflection angle to obtain a corrected image.

[0131] The calibrated image is used to obtain the label strip image.

[0132] Specifically, according to the above-mentioned deflection angle, a corrected image is obtained through the server 104 .

[0133] Step S504 , obtaining the horizontal lines and vertical lines carried by the label strip in the corrected image, and obtaining the label strip image according to the horizontal lines and vertical lines carried by the label strip in the corrected image.

[0134] The horizontal lines carried by the label strip are the horizontal sides of the rectangular wireframe, and the label strip image is the image within the rectangular wireframe.

[0135] Specifically, the server 104 obtains the horizontal lines and vertical lines in the corrected image, and identifies a rectangular wireframe enclosed by the horizontal lines and the vertical lines to obtain the label strip image.

[0136] In this embodiment, the initial image of the label strip is obtained by adjusting the shooting angle and focal length of the camera device 102, the initial image is corrected, and finally the label strip image is accurately obtained by identifying the rectangular area surrounded by horizontal lines and vertical lines.

[0137] In one embodiment, after establishing the correspondence between the location information and the server number information, the following steps are further included:

[0138] Obtaining a request for obtaining abnormal server location information from a server monitoring system, wherein the server monitoring system is used to monitor the operating status of a target server;

[0139] In response to the abnormal server location information acquisition request, acquiring the location information of the abnormal server and the server number information of the corresponding abnormal server;

[0140] Based on the pre-built correspondence, the location information of the abnormal server is obtained.

[0141] The abnormal server is a server that is monitored to be operating abnormally, and the server monitoring system is used to monitor the operating status of the target server.

[0142] Specifically, after discovering an abnormal server, the server monitoring system issues a location request for the abnormal server. In response to the request, the server location device obtains the abnormal server number from the detection system and searches for the location information corresponding to the abnormal server number to obtain the abnormal server location information.

[0143] In this embodiment, after the server monitoring system finds an abnormal server, it obtains the number of the abnormal server and searches for the location information corresponding to the number, thereby quickly and accurately obtaining the location information of the abnormal server and troubleshooting the abnormal fault in a timely manner.

[0144] The server's full-link data real-time collection, monitoring and positioning system obtains the operating data of applications and servers in real time through data embedding, API calling, or automatic program generation, saves it in the form of log files, and reflects the server's operating status in real time by real-time analysis of the dynamic data in the log files.

[0145] First, install IPMI monitoring on each server, use the IPMITOOL tool to monitor the server's power supply, fan, disk, CPU and other hardware, and use the script to generate the server's monitoring log file in real time.

[0146] Next, plan the dimensions to be organized in real time based on different monitoring topics. System monitoring dimensions include: CPU utilization (capacity, available, used), memory usage (capacity, available, used), disk I / O read / write rate, network speed, virtual memory (capacity, available, used), etc. Hardware monitoring dimensions include: battery health, fan status, power supply status, system motherboard status, processor status, voltage, temperature, power, storage, and network usage (receive rate, transmit rate). Traffic monitoring dimensions include: application name, application process ID, application parent node name, application parent node process name, application current port number, current port upstream traffic, current port downstream traffic, current application total download traffic, parent node total download traffic for the day, and current application's percentage of total traffic for the day. Network monitoring dimensions include: latency between the current server and the upper-level data server, latency between the current server and the lower-level server, latency between the current server and the carrier, and packet loss statistics. Log monitoring dimensions include: application log storage path, application log size, log time range, application error statistics, application alarm statistics, application weight level, and application log latency. Application monitoring statistics include: current day application traffic, average application traffic over the past 30 days, application memory usage, average application memory usage over the past 30 days, number of cores used by the application, average number of cores used by the application over the past 30 days, application runtime, average application runtime over the past 30 days, number of application runs, average number of application runs over the past 30 days, number of successful application runs, average number of successful application runs over the past 30 days, number of application restarts, average number of application restarts over the past 30 days, number of application failures, and number of application failures over the past 30 days.

[0147] Then the application alarm will generate a large amount of redundant data in real time, and the data needs to be aggregated and counted. Real-time aggregation is performed based on the application name, time of day, alarm category, and alarm weight level. The weighted alarm threshold is set according to different weight levels. When the threshold is reached, fault recovery is initiated.

[0148] Aggregate and count the amount of data transmitted by lower-level servers to prevent empty transmission or missing data. Count the amount of output data and compare the data volume between upper and lower-level servers to ensure consistency. Determine data missingness based on data volume and data dimensions, which serves as the basis for determining data integrity.

[0149] Based on the aggregation results of the alarm information, the affected lower-level applications are associated. For example, when the memory usage reaches 80%, the running time of the application to be started will increase, or the impact on the number of application failures will be determined.

[0150] Finally, based on the aggregated results of each system, we analyze data anomalies and errors in key dimensions, generate statistics, and provide data completeness and the percentage of true data. We also provide early warnings for incomplete data and abnormal data changes. We analyze application, system, and traffic monitoring data, and issue alerts immediately when the number of application failures exceeds a threshold. For applications that take too long to run, we restart tasks. When the restart count reaches a threshold, we issue a critical alert, providing feedback and self-healing.

[0151] Regarding the server location, such as Figure 6 As shown, the line connecting the camera device and the center point of the rack group is perpendicular to the line connecting the rack groups. Figure 7 shown.

[0152] Measure the camera's visual height (H) (the distance from the camera to the ground). When facing the camera, the center point of the camera is at the same height as the center point of the ground (H), meaning it's the same height as the camera. By measuring the first-pixel distance between the center point and the center point of the ground, and the second-pixel distance from the target server to the ground, you can infer the relative height of the target server.

[0153] By measuring the vertical distance L between the camera and the rack group, the offset angle of the camera shooting the target server can be deduced based on the trigonometric tangent theorem. The location information of each server can be returned to the server.

[0154] The digital label strip on the server is photographed by a camera, and the original image of the label strip is analyzed to obtain the label strip image, and digital recognition is performed to obtain the current server code value. The specific implementation is as follows:

[0155] The system uses a camera connected to the server via a network to capture a barcode image of the server. The camera first detects vertical lines in the original image of the label strip. After analyzing the offset angle of the vertical lines, the original image of the label strip is corrected to a positive angle based on the offset angle. The captured video frame is then re-identified for horizontal and vertical lines to obtain a rectangular area of ​​the label strip. This rectangular area is then digitally identified to obtain the server number. The identification results are then returned to the server, ultimately providing the location information for each server.

[0156] By entering commands, preset modes quickly locate servers that meet the screening criteria. Directions and voice prompts guide operators to quickly locate the server. Operators can set their own screening criteria for all monitoring indicators. By combining these criteria, they can quickly select a list of servers that meet the screening criteria. By clicking on a server in the server list, a voice prompt will be displayed indicating the server's location.

[0157] The main difficulty of this method lies in identifying the boundary between the ground and the rack in the image. The position of the ground is identified through image recognition and mathematical modeling. The captured image is segmented into 8*8 pixel segments, and the pixel segments that meet the boundary characteristics (including the boundary pixels) are marked. The segmented pixel segments are rotated at multiple angles and the left and right margins are used to increase the image features and serve as the input of the model.

[0158] Since the ground features of the small segments are more obvious in the horizontal continuous input image, the use of a model with continuous horizontal input can effectively increase the recognition accuracy. The model structure is as follows: Figure 8 After feature extraction, the model finally obtains the model result. If the discriminant probability exceeds 0.8, it is considered to be the boundary between the rack and the ground.

[0159] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0160] Based on the same inventive concept, embodiments of the present application also provide a server locating device for implementing the aforementioned server locating method. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations of one or more server locating device embodiments provided below can be found in the aforementioned limitations of the server locating method and will not be further elaborated here.

[0161] In one embodiment, Figure 9 As shown, a server positioning device is provided, comprising: an image acquisition module 901, an image information acquisition module 902, a device information acquisition module 903, a server location information acquisition module 904, and a server location information determination module 905, wherein:

[0162] The image acquisition module 901 is configured to acquire a target image of a target server to be located by using a preset camera device.

[0163] The image information acquisition module 902 is configured to acquire a first pixel length corresponding to the camera device, a second pixel length corresponding to the target server, and a horizontal offset angle between the target server and the camera device.

[0164] The device information acquisition module 903 is configured to acquire first vertical information and first horizontal position information of the camera device, as well as a vertical distance between the camera device and the target server.

[0165] The server position information acquisition module 904 is used to obtain the second vertical position information of the target server based on the first vertical position information, the first pixel length and the second pixel length, and to obtain the second horizontal position information of the target server based on the vertical distance and the horizontal offset angle.

[0166] The server location information determining module 905 is configured to obtain the location information of the target server based on the second vertical location information and the second horizontal location information.

[0167] In one embodiment, the image information acquisition module 902 is further configured to acquire a first pixel length between the center point of the target image and a preset horizontal plane;

[0168] A second pixel length between the server center point of the target server and the preset horizontal plane in the target image is obtained.

[0169] In one embodiment, the image information acquisition module 902 is further configured to segment the target image to obtain a plurality of image pixel segments constituting the target image;

[0170] Based on the trained ground boundary recognition model, the plurality of image pixel segments are input into the ground boundary recognition model, and target image pixel segments are obtained through the ground boundary recognition model;

[0171] A ground boundary pixel point is determined from the target image pixel segment, and a pixel length from the image center point to the ground boundary pixel point is used as the first pixel length.

[0172] In one embodiment, the image information acquisition module 902 is further configured to acquire a sample image; the sample image includes a server image and a ground image;

[0173] Segmenting the sample image and performing feature enhancement processing on the segmented sample image to obtain a plurality of sample image pixel segments constituting the sample image and sample annotated pixel segments carrying ground boundary pixel points in the sample image pixel segments;

[0174] The plurality of sample image pixel segments are input into a ground boundary recognition model to be trained, and the ground boundary recognition model is trained using the sample labeled pixel segments to obtain the trained ground boundary recognition model.

[0175] In one embodiment, the image information acquisition module 902 is further configured to acquire a label strip image corresponding to the label strip carried by the target server, and obtain the server number information of the target server according to the label strip image;

[0176] Based on the location information of the target server and the server number information of the target server, a correspondence between the location information and the server number information is established.

[0177] In one embodiment, the image information acquisition module 902 is further configured to acquire, through the camera device, an initial image of the label strip carried by the target server;

[0178] Acquiring a deflection angle between a vertical line carried by the label strip and a vertical direction of the initial image in the initial image;

[0179] performing correction processing on the initial image according to the deflection angle to obtain a corrected image;

[0180] The horizontal lines and vertical lines carried by the label strip in the corrected image are acquired, and the label strip image is obtained according to the horizontal lines and vertical lines carried by the label strip in the corrected image.

[0181] In one embodiment, the server location information determining module 905 is further configured to, in response to an abnormal server location information obtaining request, obtain server number information of the abnormal server corresponding to the abnormal server location information obtaining request;

[0182] Based on the pre-constructed correspondence between the location information and the server number information, the location information of the abnormal server is obtained.

[0183] Each module in the server location device described above can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in hardware form, or can be stored in a computer device memory in software form, so that the processor can call and execute the corresponding operations of each module.

[0184] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 10As shown. The computer device includes a processor, memory, and a network interface connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store server location data. The network interface of the computer device is used to communicate with an external terminal via a network connection. When executed by the processor, the computer program implements a server location method.

[0185] Those skilled in the art will understand that Figure 10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0186] In one embodiment, a computer device is further provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program.

[0187] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0188] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0189] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0190] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in the various embodiments provided herein may be, but are not limited to, a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, and the like.

[0191] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0192] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A server positioning method, characterized in that: The method comprises: Using a preset camera device, a target image of the target server to be located is captured; Based on the target image, obtaining a first pixel length corresponding to the camera device, a second pixel length corresponding to the target server, and a horizontal offset angle between the target server and the camera device; the first pixel length is used to represent the distance from the center point of the target image to a preset horizontal plane, and the second pixel length is used to represent the distance from the center point of the target server in the target image to the preset horizontal plane; Obtaining first vertical position information and first horizontal position information of the camera device, as well as a vertical distance between the camera device and the target server; the first vertical position information is used to represent the distance from the camera device to the preset horizontal plane, and the first horizontal position information is used to represent the distance from the camera device to the preset vertical plane, and the vertical distance is the vertical distance between the camera device and the plane where the target server is located; Obtaining second vertical position information of the target server based on the first vertical position information, the first pixel length, and the second pixel length, and obtaining second horizontal position information of the target server based on the vertical distance and the horizontal offset angle; the second vertical position information is used to represent the distance from the target server to the preset horizontal plane, and the second horizontal position information is used to represent the distance from the target server to the preset vertical plane; The location information of the target server is obtained based on the second vertical location information and the second horizontal location information.

2. The method according to claim 1, characterized in that The preset horizontal plane includes the ground; The first pixel length is obtained by: Segmenting the target image to obtain a plurality of image pixel segments constituting the target image; Based on the trained ground boundary recognition model, the plurality of image pixel segments are input into the ground boundary recognition model, and target image pixel segments are obtained through the ground boundary recognition model; A ground boundary pixel point is determined from the target image pixel segment, and a pixel length from the center point of the target image to the ground boundary pixel point is used as the first pixel length.

3. The method according to claim 2, characterized in that Before inputting the plurality of image pixel segments into the ground boundary recognition model based on the trained ground boundary recognition model and obtaining the target image pixel segments through the ground boundary recognition model, the method further includes: Acquire a sample image; the sample image carries a server image and a ground image; Segmenting the sample image and performing feature enhancement processing on the segmented sample image to obtain a plurality of sample image pixel segments constituting the sample image and sample annotated pixel segments carrying ground boundary pixel points in the sample image pixel segments; The plurality of sample image pixel segments are input into a ground boundary recognition model to be trained, and the ground boundary recognition model is trained using the sample labeled pixel segments to obtain the trained ground boundary recognition model.

4. The method according to claim 1, wherein The target server carries a tag; after obtaining the location information of the target server, the method further includes: Obtaining a label strip image corresponding to the label strip carried by the target server, and obtaining server number information of the target server according to the label strip image; Based on the location information of the target server and the server number information of the target server, a correspondence between the location information and the server number information is established.

5. The method according to claim 4, characterized in that The label strip carries horizontal lines and vertical lines; and obtaining a label strip image corresponding to the label strip carried by the target server includes: Acquire, by the camera device, an initial image of the label strip carried by the target server; Acquiring a deflection angle between a vertical line carried by the label strip and a vertical direction of the initial image in the initial image; performing correction processing on the initial image according to the deflection angle to obtain a corrected image; The horizontal lines and vertical lines carried by the label strip in the corrected image are acquired, and the label strip image is obtained according to the horizontal lines and vertical lines carried by the label strip in the corrected image.

6. The method according to claim 4, characterized in that After the correspondence between the location information and the server number information is established, the method further includes: Obtaining an abnormal server location information acquisition request issued by a server monitoring system, wherein the server monitoring system is used to monitor the operating status of the target server; In response to the abnormal server location information acquisition request, acquiring the location information of the abnormal server and the corresponding server number information of the abnormal server; Based on the pre-built corresponding relationship, the location information of the abnormal server is obtained.

7. A server positioning device, characterized in that: The device comprises: An image acquisition module is used to acquire a target image of a target server to be located by using a preset camera device; an image information acquisition module, configured to acquire a first pixel length corresponding to the camera device, a second pixel length corresponding to the target server, and a horizontal offset angle between the target server and the camera device; the first pixel length being used to represent the distance from the center point of the target image to a preset horizontal plane, and the second pixel length being used to represent the distance from the center point of the target server in the target image to the preset horizontal plane; a device information acquisition module, configured to acquire first vertical position information and first horizontal position information of the camera device, as well as a vertical distance between the camera device and the target server; the first vertical position information is used to represent the distance between the camera device and the preset horizontal plane, and the first horizontal position information is used to represent the distance between the camera device and the preset vertical plane, wherein the vertical distance is the vertical distance between the camera device and the plane where the target server is located; a server position information acquisition module, configured to obtain second vertical position information of the target server based on the first vertical position information, the first pixel length, and the second pixel length, and to obtain second horizontal position information of the target server based on the vertical distance and the horizontal offset angle, wherein the second vertical position information is used to represent the distance from the target server to the preset horizontal plane, and the second horizontal position information is used to represent the distance from the target server to the preset vertical plane; The server location information determination module is configured to obtain the location information of the target server based on the second vertical location information and the second horizontal location information.

8. The device according to claim 7, characterized in that The image information acquisition module is further configured to segment the target image to obtain a plurality of image pixel segments constituting the target image; based on a trained ground boundary recognition model, input the plurality of image pixel segments into the ground boundary recognition model to obtain the target image pixel segments through the ground boundary recognition model; A ground boundary pixel point is determined from the target image pixel segment, and a pixel length from the center point of the target image to the ground boundary pixel point is used as the first pixel length.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Indoor positioning method and device, computer equipment and storage medium

    CN110132274A