Server positioning method and device, electronic device, and storage medium
By storing the configuration relationship between the installation location and the port in the server positioning device, and by sending device information after the server is powered on for automatic positioning, the problem of time-consuming and labor-intensive and costly radio frequency identification technology is solved, and precise positioning and Cost reduction.
Patent Information
- Application Number
- CN202211017667.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-23
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2042-08-23
AI Technical Summary
Traditional server positioning methods are time-consuming and labor-intensive and have errors. Radio frequency identification technology is difficult to promote on a large scale due to the short battery life of active tags and high procurement and installation costs.
By storing the configuration relationship between the installation location and the port in the server positioning device, and sending device information after the server is powered on to find the target installation location, automatic positioning is achieved, avoiding the increase in cost caused by additional equipment and strict deployment rules.
Accurate server positioning, reduce location and deployment costs, and simplify server deployment process without the need for additional equipment.
Smart Images

Figure CN115314464B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the computer field, and in particular to a server positioning method and device, an electronic device, and a storage medium. Background Art
[0002] In recent years, with the rapid development of information technology, in order to support the information services of enterprises, the number of servers deployed in IDC computer rooms has also increased rapidly. In this case, accurate positioning of servers has become the key to ensuring the stable operation of servers.
[0003] In traditional server positioning technology, the server's positioning information needs to be manually measured and recorded at the server installation site in the computer room. This server positioning method not only consumes a lot of time and manpower, but also the positioning accuracy will be inaccurate due to manual operation.
[0004] With the development of positioning technology, a method of using radio frequency identification (RFID) technology to locate servers has emerged. However, this technology requires the use of active tag batteries, which have a short life cycle. Therefore, once the active tag battery is out of power, the location of the server corresponding to the active tag battery cannot be obtained. In addition, RFID technology also has the problem of high procurement and installation costs, which is not conducive to large-scale promotion and use. Summary of the invention
[0005] The present disclosure provides a server positioning method and device, electronic equipment, and storage medium, which can realize accurate positioning of a server.
[0006] According to a first aspect of the present disclosure, a server positioning method is provided, which is applied to a server positioning device, wherein the server positioning device stores a configuration relationship between each installation position and each port; the method comprises:
[0007] Upon receiving device information sent by a target port connected to any server after power-on, searching the configuration relationship for a target installation position corresponding to the target port;
[0008] The found target installation location is determined as the installation location of any one of the servers.
[0009] According to a second aspect of the present disclosure, there is provided a server positioning device, which is applied to a server positioning device, wherein the server positioning device stores a configuration relationship between each installation position and each port; the device comprises:
[0010] a search unit, which searches for a target installation position corresponding to the target port in the configuration relationship when receiving device information sent by the target port connected to any server after it is powered on;
[0011] The determining unit determines the found target installation location as the installation location of any one of the servers.
[0012] According to a third aspect of the present disclosure, there is provided an electronic device, including:
[0013] processor;
[0014] a memory for storing processor-executable instructions;
[0015] The processor implements the method as described in the first aspect by running the executable instructions.
[0016] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which computer instructions are stored, and when the instructions are executed by a processor, the steps of the method described in the first aspect are implemented.
[0017] In the technical solution disclosed in the present invention, the port configuration can be performed preferentially on the installation positions that can be used to install the server, and when the configuration is completed, the configuration relationship between each installation position and each port is stored in the server positioning device. On this basis, after any server is connected to the target port, a device message can be sent to the server positioning device through the connected target port, and the server positioning device can search for the target installation position corresponding to the target port in the stored configuration relationship to determine the target installation position as the installation position of any server that sends the device message.
[0018] It should be understood that through the technical solution of the present invention, the server positioning device can automatically locate the position of each installed server, avoiding the problem of increased positioning costs caused by the need to set up additional positioning devices in related technologies, or the problem of increased deployment costs caused by the need to deploy servers according to specific rules. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0020] Figure 1 is a flow chart of a server positioning method shown in an exemplary embodiment of the present disclosure;
[0021] Figure 2 is a flow chart of another server location method shown in an exemplary embodiment of the present disclosure;
[0022] Figure 3 is a block diagram of a server positioning device shown in an exemplary embodiment of the present disclosure;
[0023] Figure 4 is a block diagram of another server positioning device shown in an exemplary embodiment of the present disclosure;
[0024] Figure 5 It is a schematic structural diagram of an electronic device in an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0025] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0026] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. The singular forms of "a", "said" and "the" used in this disclosure and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0027] It should be understood that although the terms first, second, third, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present disclosure, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0028] In the field of server operation and maintenance, it is necessary to locate the location of each server so that the operation and maintenance personnel can perform server maintenance. Related technologies usually use manual deployment or radio frequency identification technology to locate the server.
[0029] Among them, in the solution of positioning by manual deployment, it is necessary to plan the deployment location of each server and install each server to the corresponding location according to the plan. In this solution, although no additional positioning operation is required, it is necessary to prioritize planning and strictly deploy servers according to the plan, which greatly increases the cost of server deployment. When using radio frequency identification technology (RFID, Radio Frequency Identification) for server positioning, it is necessary to give priority to adding radio frequency tags to each server, and install radio frequency signal readers and writers for detecting radio frequency tags at specific locations. On this basis, the radio frequency signal reader and writer can locate the position of each server by identifying each radio frequency tag. In this solution, not only is it necessary to use additional equipment, but also it is necessary to perform additional operations manually, such as adding radio frequency tags to servers, installing radio frequency readers and writers, etc., which increases the hardware cost and the labor cost, and the positioning cost is high.
[0030] To this end, the present disclosure proposes a server positioning method to avoid the problem of high positioning cost in related technologies due to the need to deploy servers according to preset specifications or to perform server positioning through radio frequency identification technology.
[0031] Figure 1 A server location method is shown as an exemplary embodiment of the present disclosure. Figure 1 As shown, the method may include the following steps:
[0032] Step 102: upon receiving device information sent by a target port connected to any server after it is powered on, searching the configuration relationship for a target installation position corresponding to the target port.
[0033] In the present disclosure, ports can be configured preferentially for each installation location that can be used to install a server, so that a technician can install a server at each installation location through the configured ports. After the port configuration for each installation location is completed, the configuration relationship between each installation location and each port can be obtained and stored in the server positioning device.
[0034] In the present disclosure, the server positioning device can obtain the above configuration relationship in a variety of ways. For example, a technician who is responsible for configuring ports for each installation location can enter the configuration relationship between each installation location and each port into the server positioning device; for another example, the server management device can send the configuration relationship to the server positioning device after receiving the configuration relationship between each port and each installation location entered by the technician. Of course, this example is only illustrative, and how to obtain the above configuration relationship can be determined by those skilled in the art according to actual conditions, and the present disclosure does not limit this.
[0035] In the present disclosure, after completing the port configuration, the technicians can deploy each server to each installation location by connecting each server to the port corresponding to each installation location. On this basis, the server positioning device can perform device positioning on any server when receiving the device information sent by any server through the connected target port after power-on.
[0036] In the present disclosure, different methods can be used to locate the server according to actual conditions.
[0037] In one embodiment, the ports of different switches may have the same port identifier. For example, switches A, B, and C may all include ports with port identifiers 1, 2, and 3. In this case, when acquiring the above configuration relationship, the server positioning device may acquire the port identifiers of the ports configured at each installation position and the switch identifier of the switch to which the corresponding port belongs, so as to establish a corresponding relationship among the installation position, the port identifier, and the switch identifier.
[0038] In this embodiment, the port configured at the corresponding installation position is represented based on the switch identifier and the port identifier. On this basis, when the server positioning device receives the device information sent by any server through the target port connected, it can search for the target installation position corresponding to the target port in the stored corresponding relationship according to the port identifier of the target port and the switch identifier of the switch to which the target port belongs, so as to serve as the installation position of any server.
[0039] In this embodiment, any server may be configured with a self-starting script for obtaining the switch identifier of the switch to which the port to which it is connected belongs, and the port identifier of the port. Then, after any server is started, the self-starting script can be run to obtain the port identifier of the port and the switch identifier of the switch from the corresponding switch through the connected target port. In this embodiment, the self-starting script can be deployed in the server in a variety of ways. For example, a boot file for creating a memory operating system can be pre-configured by a Dynamic Host Configuration Protocol (DHCP) server. On this basis, the boot file can be sent to any of the above-mentioned servers, so that any server can create a memory operating system provided with a self-starting script by running the boot file. Of course, this example is only illustrative. How to deploy the self-starting script to obtain the port identifier and the switch identifier from the switch to which the connected port belongs can be determined by those skilled in the art according to actual needs, and the present disclosure does not limit this.
[0040] In another embodiment, the port identifiers of all ports of different switches may be different. Then, in this embodiment, the above configuration relationship can be constructed by only obtaining the port identifiers of the ports configured at each installation position, that is, the constructed configuration relationship is the correspondence relationship between the installation position and the port identifier. On this basis, when receiving the device information sent by any server through the connected target port, the target installation position corresponding to the target port can be found in the above correspondence relationship only according to the port identifier of the target port.
[0041] Step 104: determine the found target installation location as the installation location of any one of the servers.
[0042] In the present disclosure, the found target installation location may be used as the installation location of any of the above servers to achieve the positioning of any of the servers.
[0043] In the present disclosure, the device information sent by any server may include the server identification of any server. Then, when the device information is received, the server identification of any server can be read, and the read server identification and the found target installation location can be associated and stored to mark the target installation location as the installation location of any server.
[0044] In the present disclosure, the server can be deployed in a cabinet placed in a computer room as in the related art. Then, when the technician configures the port, he usually configures the port in each rack position of the cabinet by wiring. Among them, each rack position in the cabinet has a unique corresponding rack position identification to characterize the position of the rack position in the cabinet. On this basis, after the technician deploys the port to each rack position, the server positioning device can obtain the rack position identification of each rack position and the port identification of the port set in each rack position to establish a corresponding relationship between the rack position identification and the port identification. In some feasible embodiments, the technician can either manually enter the corresponding relationship, or use an independent identification device to identify the identification of the rack position where each port is configured to obtain the corresponding relationship, and the present disclosure does not limit this.
[0045] After obtaining the correspondence between the rack position identifier and the port identifier, if device information is received from any server through the connected target port, the target rack position identifier corresponding to the port identifier of the target port can be searched in the stored correspondence to determine the target rack position corresponding to the target rack position identifier as the installation location of any server.
[0046] It should be noted that the server positioning device in the present disclosure can be any type of electronic device. For example, in a scenario where the server is deployed in a cabinet in a computer room, the server positioning device can be an information management system deployed in the computer room for recording information of each server; for another example, the server positioning device can be any server deployed in the computer room. It should be understood that any device that can be used to store and maintain the above-mentioned corresponding relationship can be used as the server positioning device in the present disclosure. Which type of electronic device is used as the server positioning device of the technical solution of the present disclosure can be determined by those skilled in the art according to actual needs, and the present disclosure does not limit this.
[0047] It should also be stated that the server in the present disclosure sends device information to the server positioning device through the connected target port after being powered on. The power-on here can be: the first power-on after the server is deployed to the corresponding installation location; it can also be the power-on again after the server is restarted, and the present disclosure does not limit this.
[0048] It can be seen from the above technical solution that, when the port configuration of each installation position is completed, the server positioning device can preferentially obtain the configuration relationship between each installation position and each port, and store the obtained configuration relationship. On this basis, when the server positioning device receives the device information sent by the target port connected after any server is powered on, it can search for the target installation position corresponding to the target port in the stored corresponding relationship to serve as the installation position of any server.
[0049] It should be understood that, since the present disclosure locates the server according to the port through which the server sends device information, when deploying the server, the technicians can determine the location of each server even if they deploy the server randomly, thus avoiding the problem of high deployment cost caused by the technicians strictly following the plan in the related art. In addition, the present disclosure does not require the use of additional equipment when locating the server, thus avoiding the problem of high positioning cost when the related art uses radio frequency identification technology to locate the server.
[0050] Next, the technical solution of the present disclosure is introduced by taking server positioning in a cabinet in a computer room as an example.
[0051] Figure 2 FIG. 1 is a flow chart of another server location method shown in an exemplary embodiment of the present disclosure. Figure 2 As shown, the method may include the following steps:
[0052] Step 201 : A technician connects cables between each rack position in a cabinet and a switch to complete port configuration.
[0053] In this embodiment, the technician may pre-wire the ports of the switch and the rack positions of the cabinet to deploy the ports included in the switch to different rack positions.
[0054] Step 202 , the technician enters the corresponding relationship between the switch ID, the port ID and the rack position number into the information system according to the configured switch ports of each rack position.
[0055] In this embodiment, each rack position in the cabinet corresponds to a unique rack position number. Then, after completing the port deployment, the technician can enter the corresponding relationship between the rack position number, the switch identifier, and the port identifier into the information system according to the deployment situation.
[0056] It should be noted that the information system in this embodiment refers to a system for maintaining relevant information of each server, which can be either a single device or a device cluster consisting of multiple devices. In a conventional computer room, this information system is usually configured, and this embodiment can use it as a server positioning device to locate the server installed in the cabinet.
[0057] Step 203: The information system maintains the entered correspondence.
[0058] In this embodiment, after the information system detects the corresponding relationship entered by the technician, it can maintain the corresponding relationship. For example, the maintained corresponding relationship can be shown in Table 1 below.
[0059] Rack number Switch ID Port ID A101 M1 1 A102 M1 2 …… …… …… B101 M1 8 B102 M2 1 B103 M2 2 …… …… ……
[0060] Table 1
[0061] In the above Table 1, the first row is used to represent "the port configured on the rack with rack number A101 is: port 1 in switch M1", and the meanings of other rows are similar, which will not be repeated here.
[0062] In step 204, the technicians install the servers in each rack position so that the servers can interact with the corresponding switches through the switch ports at the rack positions.
[0063] In this embodiment, after completing the port configuration and maintaining the above correspondence in the information system, the technicians can install each server in each rack position.
[0064] Step 205: The DHCP server sends the boot file of the memory operating system to each installed server through the switch.
[0065] In this embodiment, the DHCP server can establish a connection with each switch in advance, and the DHCP can pre-configure a boot file of "RAMOS (memory operating system) based on PXE (Preboot eXecution Environment)", wherein the memory operating system is provided with a self-starting script. On this basis, after the server is installed in any rack position of the cabinet, the DHCP server can send the boot file to the server, so that the server can create a memory operating system containing a self-starting script by running the boot file.
[0066] Step 206: Each server runs the boot file to create a memory operating system including a self-starting script.
[0067] Step 207: Each server starts a self-starting script to obtain the port identifier of the port and the switch identifier of the switch from the switch to which the connected port belongs.
[0068] In this embodiment, after creating a memory operating system including a self-starting script, the server can obtain the switch identifier of the switch to which it is connected and the port identifier of the connected port from the switch to which the connected port belongs by running the self-starting script.
[0069] Step 208: Each server sends device information including the acquired switch identifier, port identifier, and its own server identifier to the information system.
[0070] In this embodiment, after obtaining the port identifier of the port to which it is connected and the switch identifier of the switch to which it is connected, the server can send device information including the obtained port identifier, switch identifier, and its own server identifier to the information system.
[0071] It should be noted that the server identifier included in the device information may be any identification information that can uniquely identify the server, for example, the server identifier may be the SN number of the local machine, or a unique number based on a specific component of the local machine, such as a unique number of a CPU, etc. Which type of identification information is used as the server identifier of the server can be determined by those skilled in the art according to actual needs, and this embodiment does not limit this.
[0072] Step 209: the information system reads each identifier included in the device information.
[0073] In this embodiment, after receiving the device information, the information system can read each identifier included in the device information to determine the rack position where the corresponding server is installed.
[0074] Step 210: The information system searches for the corresponding rack position number in the maintained correspondence relationship based on the switch identifier and the port identifier.
[0075] For example, assume that the server ID included in the device information is SN128754631527, the switch ID is M2, and the port ID is 1. Then, according to the switch ID M2 and the port ID 1, the corresponding rack position number B102 can be found in the corresponding relationship shown in Table 1. At this point, it can be determined that the server with the server ID SN128754631527 is deployed in the rack position numbered B102.
[0076] Step 211: The information system associates and stores the found rack position number with the server identifier to determine the rack position corresponding to the rack position number as the installation location of the corresponding server.
[0077] Following the above example, this embodiment can associate and store M2, 1, and SN128754631527 to represent that the server with the server identifier SN128754631527 is deployed in the rack numbered B102.
[0078] It can be seen from the above technical solution that through the technical solution of this embodiment, it is only necessary to enter the correspondence between the port and the rack position into the information system during the port configuration stage that must be executed, so as to realize the positioning of the server, thereby avoiding the problem of high deployment cost caused by the need to strictly follow the plan for server deployment in related technologies, and also avoiding the problem of high positioning cost caused by the need to additionally install radio frequency signal readers and writers when related technologies use radio frequency identification technology for positioning.
[0079] Figure 3 FIG. 1 is a block diagram of a server positioning device according to an exemplary embodiment of the present disclosure. Figure 3 The device includes a searching unit 301 and a determining unit 302.
[0080] The searching unit 301 searches for a target installation position corresponding to the target port in the configuration relationship when receiving device information sent by the target port connected to any server after the server is powered on;
[0081] The determining unit 302 determines the found target installation location as the installation location of any one of the servers.
[0082] Optionally, the determining unit 302 is further configured to:
[0083] The server identifier of any server contained in the device information is read, and the read server identifier and the target installation location are associated and stored to mark the target installation location as the installation location of any server.
[0084] like Figure 4 As shown, Figure 4 is a block diagram of another server positioning device shown in an exemplary embodiment of the present disclosure. Figure 3 Based on the illustrated embodiment, it further includes: an acquisition unit 303.
[0085] Optionally, also include:
[0086] The acquisition unit 303 acquires the configuration relationship between each installation position and each port when the port configuration for each installation position is completed, and stores the acquired configuration relationship.
[0087] Optionally, the same port identifier exists between ports of different switches;
[0088] The acquisition unit 303 is further used to: acquire the port identifier of the port configured at each installation position and the switch identifier of the switch to which the corresponding port belongs, so as to establish a corresponding relationship among the installation position, the port identifier and the switch identifier;
[0089] The searching unit 301 is further configured to search the corresponding relationship for a target installation position corresponding to the target port according to the port identifier of the target port and the switch identifier of the target switch to which the target port belongs.
[0090] Optionally, a self-starting script is configured in any of the servers, and the self-starting script is used to obtain the port identifier of the target port and the switch identifier of the target switch from the switch to which the connected port belongs.
[0091] Optionally, any of the servers is configured with a boot file sent by a dynamic host configuration protocol server, so as to create a memory operating system provided with the self-starting script in any of the servers.
[0092] Optionally, the port identifiers of all ports of different switches are different;
[0093] The acquisition unit 303 is further used to: acquire the port identifier of the port configured at each installation position to establish a corresponding relationship between the installation position and the port identifier;
[0094] The searching unit 301 is further configured to search, according to the port identifier of the target port, the target installation position corresponding to the target port in the corresponding relationship.
[0095] Optional,
[0096] The acquisition unit 303 is further used to: acquire the rack position identifier of each rack position in the cabinet, and the port identifier of the port set in each rack position, so as to establish a corresponding relationship between the rack position identifier and the port identifier;
[0097] The searching unit 301 is further used to: search the corresponding relationship for a target rack position identifier corresponding to the port identifier of the target port;
[0098] The determining unit 302 is further configured to: determine the target rack position corresponding to the target rack position identifier as the installation position of any one of the servers.
[0099] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can refer to the partial description of the method embodiments. The device embodiments described above are only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the disclosed solution. A person of ordinary skill in the art can understand and implement it without paying any creative work.
[0100] Correspondingly, the present disclosure also provides a server positioning device, comprising: a processor; a memory for storing processor executable instructions; wherein the processor is configured to implement a server positioning method as described in any of the above embodiments, for example, the method may include: upon receiving device information sent through a connected target port after any server is powered on, searching for a target installation position corresponding to the target port in the configuration relationship; and determining the found target installation position as the installation position of any server.
[0101] Accordingly, the present disclosure also provides an electronic device, which includes a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors. The one or more programs include instructions for implementing a server positioning method as described in any of the above embodiments. For example, the method may include: upon receiving device information sent through a connected target port after any server is powered on, searching for a target installation position corresponding to the target port in the configuration relationship; and determining the found target installation position as the installation position of any server.
[0102] Figure 51 is a block diagram of an apparatus 500 for implementing a server location method according to an exemplary embodiment. For example, the apparatus 500 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0103] Reference Figure 5 , the device 500 may include one or more of the following components: a processing component 502 , a memory 504 , a power component 506 , a multimedia component 508 , an audio component 510 , an input / output (I / O) interface 512 , a sensor component 514 , and a communication component 516 .
[0104] The processing component 502 generally controls the overall operation of the device 500, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 502 may include one or more processors 520 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 502 may include one or more modules to facilitate the interaction between the processing component 502 and other components. For example, the processing component 502 may include a multimedia module to facilitate the interaction between the multimedia component 508 and the processing component 502.
[0105] The memory 504 is configured to store various types of data to support operations on the device 500. Examples of such data include instructions for any application or method operating on the device 500, contact data, phone book data, messages, pictures, videos, etc. The memory 504 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0106] The power supply component 506 provides power to the various components of the device 500. The power supply component 506 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 500.
[0107] The multimedia component 508 includes a screen that provides an output interface between the device 500 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 508 includes a front camera and / or a rear camera. When the device 500 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0108] The audio component 510 is configured to output and / or input audio signals. For example, the audio component 510 includes a microphone (MIC), and when the device 500 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 504 or sent via the communication component 516. In some embodiments, the audio component 510 also includes a speaker for outputting audio signals.
[0109] I / O interface 512 provides an interface between processing component 502 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0110] The sensor assembly 514 includes one or more sensors for providing various aspects of status assessment for the device 500. For example, the sensor assembly 514 can detect the open / closed state of the device 500, the relative positioning of components, such as the display and keypad of the device 500, the sensor assembly 514 can also detect the position change of the device 500 or a component of the device 500, the presence or absence of user contact with the device 500, the orientation or acceleration / deceleration of the device 500, and the temperature change of the device 500. The sensor assembly 514 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 514 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 514 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0111] The communication component 516 is configured to facilitate wired or wireless communication between the device 500 and other devices. The device 500 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, 4G LTE, 5G NR (New Radio) or a combination thereof. In an exemplary embodiment, the communication component 516 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 516 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0112] In an exemplary embodiment, the apparatus 500 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above methods.
[0113] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 504 including instructions, and the instructions can be executed by the processor 520 of the device 500 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0114] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the disclosure disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0115] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
[0116] The above description is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure shall be included in the scope of protection of the present disclosure.
Claims
1. A server positioning method, characterized in that: A server positioning device applied to an IDC computer room, wherein the server positioning device stores a configuration relationship between each installation position and each port, and the same port identifier exists between ports of different switches; the method comprises: When the port configuration for each installation position is completed, the configuration relationship between each installation position and each port is obtained, and the obtained configuration relationship is stored; Upon receiving device information sent by a target port connected to any server after power-on, searching the configuration relationship for a target installation position corresponding to the target port; Determine the found target installation location as the installation location of any one of the servers; The obtaining of the configuration relationship between each installation position and each port includes: obtaining the port identifier of the port configured at each installation position, the switch identifier of the switch to which the corresponding port belongs, and the rack position identifier of the rack position to which the installation position belongs, so as to establish a corresponding relationship among the rack position identifier, the port identifier, and the switch identifier; The searching for the target installation position corresponding to the target port in the configuration relationship includes: searching for a rack position number corresponding to the target port in the corresponding relationship according to a port identifier of the target port and a switch identifier of a target switch to which the target port belongs, and determining the rack position corresponding to the rack position number as the target installation position.
2. The method according to claim 1, characterized in that A self-starting script is configured in any of the servers, and the self-starting script is used to obtain the port identifier of the target port and the switch identifier of the target switch from the switch to which the connected port belongs.
3. The method according to claim 2, characterized in that Any of the servers is configured with a boot file sent by a dynamic host configuration protocol server, so as to create a memory operating system provided with the self-starting script in any of the servers.
4. The method according to claim 1, characterized in that: The step of determining the found target installation location as the installation location of any one of the servers includes: The server identifier of any server contained in the device information is read, and the read server identifier and the target installation location are associated and stored to mark the target installation location as the installation location of any server.
5. A server positioning device, characterized in that: A server positioning device applied to an IDC computer room, wherein the server positioning device stores the configuration relationship between each installation position and each port, and the same port identifier exists between ports of different switches; the device comprises: a search unit, which searches for a target installation position corresponding to the target port in the configuration relationship when receiving device information sent by the target port connected to any server after it is powered on; A determination unit, determining the found target installation location as the installation location of any one of the servers; The device also includes: An acquisition unit, which acquires a configuration relationship between each installation position and each port when completing the port configuration for each installation position, and stores the acquired configuration relationship; The acquisition unit is further used to: acquire the port identifier of the port configured at each installation position, the switch identifier of the switch to which the corresponding port belongs, and the rack position identifier of the rack position to which the installation position belongs, so as to establish a corresponding relationship among the rack position identifier, the port identifier, and the switch identifier; The search unit is further used to: search for a rack position number corresponding to the target port in the corresponding relationship according to the port identifier of the target port and the switch identifier of the target switch to which the target port belongs, and determine the rack position corresponding to the rack position number as the target installation position.
6. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor implements the method according to any one of claims 1 to 4 by running the executable instructions.
7. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instruction is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
