Device slot identification method, electronic device and storage medium

By using the contact position of the adapter card and the positioning contact group on the device slot, the problem of poor equipment usage flexibility is solved, and the flexible identification and maintenance of the device slot is realized, which facilitates the various configurations of the device. need.

CN118708035BActive Publication Date: 2024-11-08INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411213459.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-11-08
Estimated Expiration
2044-08-30

AI Technical Summary

Technical Problem

The existing equipment slot identification methods have poor flexibility in the use of equipment, which limits the scalability and maintenance flexibility of equipment.

Method used

By installing an adapter card on the expansion slot and setting a positioning contact group on the structural bracket, slot indication information is generated using the contact position between the metal exposed copper area and the positioning contact, automatic identification of the device slot is achieved without the need for fixing. Topology and multiple adapter cards.

Benefits of technology

It improves the flexibility of equipment use and maintenance convenience, reduces production and maintenance costs, and realizes flexible identification of equipment slots.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118708035B_ABST
    Figure CN118708035B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a device slot identification method, an electronic device and a storage medium, wherein the method comprises: when there is a mounted expansion port with an expansion device mounted in multiple expansion ports, obtaining slot indication information stored in a designated register of an associated adapter card, obtaining target slot indication information, the associated adapter card is an adapter card connecting the mounted expansion port and the expansion device mounted on the mounted expansion port, the target slot indication information is generated based on the position of the positioning contact in contact with the metal copper-exposed area of ​​the associated adapter card in the first positioning contact group to which it belongs, and the target slot indication information is used to identify the slot position of the expansion slot in which the associated adapter card is installed; by parsing the target slot indication information, determining the expansion slot in which the associated adapter card is installed in multiple expansion slots. Through the present application, the problem of poor flexibility in device use in the device slot identification method in the related art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computers, and in particular, to a device slot identification method, an electronic device, and a storage medium. Background Art

[0002] Some electronic devices have many expansion slots for installing expansion devices required by users, and the installed expansion devices can be mounted on the expansion ports of the electronic devices. When maintaining and reconfiguring electronic devices, it is necessary to know the location of these expansion devices, so it is necessary to identify the device slots on the server.

[0003] In order to facilitate device slot identification, a fixed topology structure can be used in related technologies, that is, the expansion port of the electronic device corresponds to the expansion slot on the device chassis one by one, and all configurations of the electronic device use this correspondence. However, in the above device slot identification method, all configurations of the electronic device must be used according to the established topology, which limits the flexibility of device use.

[0004] It can be seen that the device slot identification method in the related art has the problem of poor flexibility in device use. Summary of the invention

[0005] The embodiments of the present application provide a device slot identification method, an electronic device, and a storage medium, so as to at least solve the problem of poor flexibility in device use in the device slot identification method in the related art.

[0006] According to one aspect of an embodiment of the present application, a device slot identification method is provided, which is applied to an electronic device, wherein the electronic device includes a processing component and a structural support, the processing component includes a plurality of expansion ports, the structural support has a plurality of expansion slots, an expansion slot among the plurality of expansion slots is installed with an adapter card, the expansion port among the plurality of expansion ports is used to connect an expansion device mounted on an expansion port among the plurality of expansion ports through an adapter card installed on a corresponding expansion slot among the plurality of expansion slots, the structural support has a plurality of first positioning contact groups corresponding to the plurality of expansion slots, the metal copper-exposed areas of the adapter cards installed on different expansion slots among the plurality of expansion slots contact the positioning contacts of the corresponding first positioning contact groups in the first positioning contact groups to which they belong. The position in is at least partially different; the method comprises: in the case where there is a mounted expansion port of the mounted expansion device among the multiple expansion ports, obtaining slot indication information stored in a designated register of the associated adapter card to obtain target slot indication information, wherein the associated adapter card is an adapter card connecting the mounted expansion port and the expansion device mounted on the mounted expansion port, the target slot indication information is generated based on the position of the positioning contact in contact with the metal copper-exposed area of ​​the associated adapter card in the first positioning contact group to which it belongs, and the target slot indication information is used to identify the slot position of the expansion slot in which the associated adapter card is installed; by parsing the target slot indication information, determining the expansion slot in which the associated adapter card is installed among the multiple expansion slots.

[0007] According to another aspect of the embodiment of the present application, an electronic device is further provided, the electronic device comprising a processing component and a structural support, the processing component comprising a plurality of expansion ports, the structural support having a plurality of expansion slots, an expansion slot among the plurality of expansion slots having an adapter card installed thereon, the expansion port among the plurality of expansion ports being used to connect an expansion device mounted on an expansion port among the plurality of expansion ports through an adapter card installed on a corresponding expansion slot among the plurality of expansion slots, the structural support having a plurality of first positioning contact groups corresponding to the plurality of expansion slots, the metal copper-exposed areas of the adapter cards installed on different expansion slots among the plurality of expansion slots being in contact with the corresponding first positioning contact group having positions in the first positioning contact group to which they belong being at least partially different, and the In the embodiment, the electronic device further comprises: an execution component, which is used to obtain slot indication information stored in a designated register of an associated adapter card when there is a mounted expansion port with a mounted expansion device among the multiple expansion ports, and obtain target slot indication information, wherein the associated adapter card is an adapter card connecting the mounted expansion port and the expansion device mounted on the mounted expansion port, and the target slot indication information is generated based on the position of the positioning contact in contact with the metal copper-exposed area of ​​the associated adapter card in the first positioning contact group to which it belongs, and the target slot indication information is used to identify the slot position of the expansion slot in which the associated adapter card is installed; by parsing the target slot indication information, the expansion slot in which the associated adapter card is installed among the multiple expansion slots is determined.

[0008] According to another aspect of an embodiment of the present application, a structural bracket is further provided, wherein the structural bracket is used to fix adapter cards installed on multiple expansion slots on the structural bracket and expansion devices mounted by the adapter cards installed on the multiple expansion slots; wherein the structural bracket has multiple first positioning contact groups corresponding to the multiple expansion slots, and in different first positioning contact groups among the multiple first positioning contact groups, the positions of the positioning contacts used to contact the metal copper exposed areas of the adapter cards installed on the corresponding expansion slots are at least partially different in the first positioning contact groups to which they belong.

[0009] According to another aspect of an embodiment of the present application, an adapter card is also provided, wherein the adapter card is used to be installed in an expansion slot on a structural support of an electronic device, and to connect an expansion port on a processing component of the electronic device and an expansion device mounted in the expansion slot where the adapter card is installed; wherein the adapter card has a metal exposed copper area, and the metal exposed copper area is used to contact a positioning contact in a first positioning contact group on the structural support of the electronic device, and the adapter card is further used to generate slot indication information based on the position of the positioning contact contacted by the metal exposed copper area in the first positioning contact group, and store the generated slot indication information in a designated register of the adapter card.

[0010] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0011] According to the present application, a metal copper-exposed area is provided on an adapter card installed on an expansion slot, and a positioning contact group is provided on a structural support. The positions of the positioning contacts contacted by the metal copper-exposed areas of adapter cards installed on different expansion slots are at least partially different in the positioning contact group to which they belong. Therefore, the adapter card can generate slot indication information based on the positions of the positioning contacts contacted by its metal copper-exposed area in the positioning contact group to which it belongs. The generated slot indication information can indicate the expansion slot in which it is installed (the slot position of the expansion slot). When an expansion port is mounted with an expansion device, the expansion slot in which the associated adapter card is installed can be determined by using the slot indication information stored in the adapter card associated with the mounted expansion device, thereby realizing device slot identification. The above-mentioned device slot identification method does not need to fix the connection relationship between the expansion port and the expansion slot. It only needs to identify the expansion slot connected to the expansion port when the expansion port has a mounted expansion device. This can solve the problem of poor flexibility in device use in the device slot identification method in the related art, thereby achieving the effect of improving the flexibility in device use. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 It is a hardware structure block diagram of a server device of a device slot identification method according to an embodiment of the present application.

[0013] Figure 2 It is a schematic diagram of an optional server PCIe slot according to an embodiment of the present application.

[0014] Figure 3 It is a schematic diagram of an optional correspondence between ports and slots according to an embodiment of the present application.

[0015] Figure 4It is a schematic diagram of an optional chassis and PCIe module according to an embodiment of the present application.

[0016] Figure 5 This is a schematic diagram of an optional first positioning contact group according to an embodiment of the present application.

[0017] Figure 6 It is a flowchart of an optional device slot identification method according to an embodiment of the present application.

[0018] Figure 7 It is a schematic diagram of an optional structural support according to an embodiment of the present application.

[0019] Figure 8 It is a schematic diagram of an optional identification circuit in a riser card according to an embodiment of the present application.

[0020] Fig. 9 It is a structural block diagram of a computer system of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0021] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0022] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0023] The method embodiments provided in the embodiments of the present application can be executed in a server device or a similar electronic device. Taking running on a server device as an example, Figure 1 1 is a hardware structure block diagram of a server device of a device slot identification method according to an embodiment of the present application. Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the above-mentioned server device may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above server device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0024] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the device slot identification method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the server device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0025] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the server device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0026] In this embodiment, a device slot identification method is provided, and the device slot identification method can be applied to electronic devices such as servers and terminal devices. Electronic devices can install the expansion devices required by users through expansion slots, and the installed expansion devices can be mounted on the expansion ports of electronic devices. When maintaining and reconfiguring electronic devices, it is necessary to know the locations of these expansion devices, so it is necessary to identify the device slots of the server. The above-mentioned expansion port can be a PCIe (Peripheral Component Interconnect Express, Peripheral Component Interconnect Express) port. Correspondingly, the expansion slot can be a PCIe slot (PCIe expansion slot), and the expansion device mounted through the PCIe slot can be a PCIe expansion device (for example, a network card, etc., which can be called a PCIe peripheral). For other types of expansion ports, expansion slots and expansion devices, the device slot identification method in this embodiment is also applicable. The above-mentioned expansion port can be an expansion port of a processing component of an electronic device, for example, an expansion port of a CPU (Central Processing Unit, central processing unit), and can also be an expansion port of other processing components (for example, a micro control unit), which is not limited in this embodiment.

[0027] Taking servers as an example, with the development of the Internet industry and the large-scale application of cloud computing and big data technologies, the demand for servers is also increasing significantly. The scalability of servers is an important technical indicator of servers. The current scalable peripherals of servers mainly include hard disks and PCIe devices. Among them, various expansion cards that meet the PCIe standard add a variety of special functions to the server. Usually, servers have many PCIe slots for installing PCIe expansion devices required by users. When maintaining and reconfiguring (modifying the configuration) the server, it is necessary to know the location of these PCIe devices. Therefore, the identification of PCIe device slots is an important requirement in server operation and maintenance.

[0028] For example, Figure 2 As shown in the figure, a server has 6 PCIe slots, namely, PCIe1~PCIe6 (i.e., PCIe slot 1~PCIe slot 6), which can be installed with 6 PCIe standard network cards. When a network card fails, it is necessary to know which PCIe slot the network card is installed in, so that the operation and maintenance personnel can perform repair and replacement. Therefore, the server management system needs to be able to identify the PCIe slot where each PCIe expansion device on the server is installed.

[0029] In the related art, in order to identify the device slot, a fixed topology structure can be used, that is, the expansion port of the electronic device corresponds to the expansion slot on the device chassis one by one, and all configurations of the electronic device use this correspondence. However, in the above device slot identification method, all configurations of the electronic device need to be used according to the established topology, which limits the flexibility of device use.

[0030] Taking the server as an example, in the server design, a fixed PCIe topology can be used, that is, the PCIe port of the CPU on the server motherboard corresponds to the PCIe slot on the server chassis, and all configurations of the server use this correspondence. Figure 3 As shown in the figure, there are two CPUs on the motherboard, and each CPU has three PCIe ports with x16 bandwidth. In server design, the PCIe ports of the CPU are fixed to the PCIe slots on the chassis one by one through the traces, connectors or cables on the PCB (Printed Circuit Board). That is, in all configurations, the PCIe peripheral is inserted in PCIe slot 1, and the device is connected to PCIe port 1 of CPU0. Through the above fixed mapping relationship, the management system can know which PCIe slot the PCIe expansion device is installed in.

[0031] However, although the above solution can realize PCIe slot identification, it limits the flexibility of server use. All configurations need to be used according to the established PCIe topology, which has obvious disadvantages in the environment where a server needs to be used for multiple purposes.

[0032] In order to solve the above problem, a FRU (Field Replaceable Unit) unit can be added to the adapter card of the expansion slot, and the slot information of the corresponding adapter card is stored in the FRU. The number of adapter cards corresponding to the number of expansion slots is designed. In this way, the expansion port of the processing component on the mainboard can be connected to any adapter card through a cable (equivalent to connecting to the corresponding expansion slot). By obtaining the slot information stored in the FRU, it can be known which expansion slot the adapter card is in, and thus which expansion slot the expansion device is mounted in.

[0033] For example, a FRU unit can be added to a Riser (an example of an adapter card) card. The FRU unit stores the slot information of the PCIe slot where the corresponding Riser card is installed. The number of Riser cards is designed according to the number of PCIe slots. In this way, the PCIe port of the CPU on the motherboard can be connected to any Riser card (that is, connected to any PCIe slot) through a cable. The control system can know which expansion slot the Riser card is installed in by obtaining the FRU information, and thus know which expansion slot the PCIe expansion device is hung in. Here, the Riser card is a PCB adapter board fixed on the PCIe slot bracket, and the PCIe peripherals are installed on the Riser card.

[0034] Although the above solution has a flexible topology and can meet the needs of various server configurations, it requires the design of multiple adapter cards (for example, riser cards), which easily leads to material stagnation and increases the production and maintenance costs of electronic equipment.

[0035] In order to at least partially solve the above problems, in this embodiment, a metal copper-exposed area is set on the adapter card installed on the expansion slot and a positioning contact group is set on the structural support. The metal copper-exposed areas of the adapter cards installed on different expansion slots contact the positioning contacts in the corresponding positioning contact groups in a manner that is at least partially different. The adapter card can generate slot indication information based on the position of the positioning contacts contacted by its metal copper-exposed area in the corresponding positioning contact group. The generated slot indication information can indicate the expansion slot installed (the slot position of the expansion slot); when an expansion port is mounted with an expansion device, the expansion slot where the associated adapter card is installed can be determined through the slot indication information stored in the adapter card associated with the mounted expansion device, thereby realizing device slot identification. The above device slot identification method does not require a fixed connection relationship between the expansion port and the expansion slot, nor does it require the design of multiple adapter cards. It can not only increase the flexibility of device use, but also facilitate equipment maintenance, and has little impact on production and maintenance costs.

[0036] The device slot identification method in this embodiment can be applied to an electronic device, wherein the electronic device includes a processing component and a structural support, the processing component includes a plurality of expansion ports, the structural support has a plurality of expansion slots, and an adapter card is installed in an expansion slot among the plurality of expansion slots, that is, the correspondence between the expansion port, the expansion slot, and the adapter card can be a one-to-one correspondence. For each expansion port, it can be used to connect the mounted expansion device through the adapter card installed in the corresponding expansion slot, and the correspondence between the expansion port, the expansion slot, the adapter card, and the expansion setting can also be a one-to-one correspondence.

[0037] The structural support is a support for fixing the adapter card and the expansion device. In addition to providing the above-mentioned support function, it can also provide position information. The provided position information can be slot indication information, which can be used to indicate the slot position of the expansion slot where the corresponding adapter card is installed. To this end, a plurality of first positioning contact groups can be provided on the structural support, each expansion slot can correspond to a first positioning contact group, and there can be a one-to-one correspondence between the expansion slots in the plurality of expansion slots and the first positioning contact groups in the plurality of first positioning contact groups. The metal copper-exposed areas of the adapter cards installed on different expansion slots in the plurality of expansion slots and the positioning contacts contacted by the corresponding first positioning contact groups have at least partially different positions in the first positioning contact groups to which they belong. Here, the structural support can be fixed on the chassis of the electronic device, so the expansion slots on the structural support can also be understood as the expansion slots on the chassis.

[0038] Optionally, the adapter card can be a riser card (i.e., PCIe adapter card, PCIe external card), which can transfer the PCIe signal on the motherboard to its corresponding PCIe slot. When the gold finger (a row of contact points on the PCIe peripheral) on the PCIe peripheral (i.e., PCIe expansion device) is inserted into the PCIe slot of the riser card, the PCIe signal on the motherboard can be connected to the PCIe peripheral. The PCIe peripheral, riser card and structural bracket are assembled and fixed on the chassis for use. Figure 4 As shown, Figure 4 An exemplary positional relationship between a PCIe peripheral, a structural support, a structural support, and a chassis is shown. Here, a PCIe slot is a position on a structural support where a PCIe expansion device can be installed. The structural support can be made of metal, and the PCIe peripheral and the riser card are fixed to the chassis by screws or bayonet.

[0039] Optionally, the number of point contacts included in each first positioning contact group may be the same, for example, Figure 5 As shown, M riser cards are allowed to be installed on the side wall of the structural support, each riser card corresponds to a first positioning contact group, each first positioning contact group includes N positioning contacts, and each first positioning contact group allows the corresponding metal copper exposed area of ​​the adapter card to contact the positioning contact ( Figure 5 The positions of the positioning contacts (marked in medium gray) in the first positioning contact group are at least partially different. Here, the metal exposed copper area can contact the positioning contact by forming a path with the positioning contact. Correspondingly, the positioning contacts that are not allowed to contact the metal exposed copper area of ​​the corresponding adapter card can be omitted. In this case, the number of positioning contacts included in different first positioning contact groups can be different, as long as the corresponding adapter card can recognize different slot indication information.

[0040] Figure 6 is a flow chart of an optional device slot identification method according to an embodiment of the present application, such as Figure 6 As shown, the process includes the following steps S602 to S604.

[0041] Step S602: if there is a mounted expansion port with a mounted expansion device among the multiple expansion ports, obtain slot indication information stored in a designated register of the associated adapter card to obtain target slot indication information.

[0042] In this embodiment, when there is a need for identification, an expansion port on which an expansion device is mounted can be detected among multiple expansion ports. If a mounted expansion port is detected, that is, an expansion port on which an expansion device is mounted, the slot indication information stored in the designated register of the associated adapter card can be obtained to obtain the target slot indication information. Here, the associated adapter card is an adapter card that connects the mounted expansion port and the expansion device mounted on the mounted expansion port, and the expansion slot in which the associated adapter card is installed can be the associated expansion slot. The mounted expansion port and the associated adapter card can be connected via a communication bus, and via the communication bus, the slot indication information stored in the designated register of the associated adapter card, that is, the target slot indication information, can be obtained.

[0043] The target slot indication information is generated based on the position of the positioning contact in contact with the metal copper exposed area of ​​the associated adapter card in the first positioning contact group to which it belongs. Since the positions of the positioning contacts in contact with the metal copper exposed areas of different adapter cards in the first positioning contact group to which they belong are at least partially different, the generated slot indication information will also be different. The slot indication information can be used to identify the slot position of the expansion slot in which the corresponding associated card is installed. For the target slot indication information, it can be used to identify the slot position of the associated expansion slot. Optionally, the above-mentioned designated register can be an IO (Input / Output) Expander register, or it can be other designated registers, as long as it can store the above-mentioned slot indication information.

[0044] Step S604: determining the expansion slot in which the associated adapter card is installed among the multiple expansion slots by parsing the target slot indication information.

[0045] After the target slot indication information is obtained, the obtained target slot indication information can be parsed, and the above parsing can be parsed based on the correspondence between the slot indication information and the slot position of the expansion slot. The slot indication information includes multiple different parts, and the different parts are used to indicate a kind of position information of the corresponding expansion slot. For example, for the expansion slots arranged in a matrix, part of the indication information indicates the row information of the expansion slot, and part of the indication information indicates the column information of the expansion slot. Through the above parsing process, the expansion slot in which the associated adapter card is installed among the multiple expansion slots can be determined, that is, the slot position of the associated expansion slot.

[0046] It should be noted that in order to realize automatic identification of expansion slots (for example, PCIe slots), in this embodiment, slot information (i.e., slot indication information) is obtained through the chassis structure and hardware circuit, and the slot position of the expansion device (for example, PCIe peripheral) is deduced through the identification system (the system that runs the device slot identification method in this embodiment can be called a slot identification system) to realize automatic identification of expansion slots by electronic devices (for example, automatic identification of PCIe slots by servers), which increases the flexibility of equipment use, facilitates user operation and maintenance, and has low cost.

[0047] Through the above steps, in the case that there is a mounted expansion port with an expansion device mounted on the multiple expansion ports, the slot indication information stored in the designated register of the associated adapter card is obtained to obtain the target slot indication information, wherein the associated adapter card is an adapter card connecting the mounted expansion port and the expansion device mounted on the mounted expansion port, the target slot indication information is generated based on the position of the positioning contact in contact with the metal copper-exposed area of ​​the associated adapter card in the first positioning contact group to which it belongs, and the target slot indication information is used to identify the slot position of the expansion slot in which the associated adapter card is installed; by parsing the target slot indication information, the expansion slot in which the associated adapter card is installed among the multiple expansion slots is determined, thereby solving the problem of poor flexibility in device use in the device slot identification method in the related art and improving the flexibility in device use.

[0048] In some exemplary embodiments, the plurality of expansion slots are divided into a plurality of expansion slot groups, and the division of the expansion slot groups may be based on the slot positions of the expansion slots. For example, the plurality of expansion slot groups may correspond to a plurality of bracket regions, and the plurality of bracket regions may be divided by splitting the structural bracket into a plurality of bracket parts, or the plurality of expansion slots may be divided into a plurality of expansion slot groups based on the slot positions of the expansion slots, and the division is based on the slot positions of the expansion slots in each expansion slot group.

[0049] For example, Figure 2 As shown, PCIe1~PCIe6 on the server can be divided into two expansion slot groups, wherein PCIe1~PCIe3 is one group and PCIe4~PCIe6 is one group. The position area corresponding to PCIe1~PCIe3 on the structural bracket can be a bracket area (which can be a left bracket), and the position area corresponding to PCIe4~PCIe6 can be a bracket area (which can be a right bracket).

[0050] For each first positioning contact group, it can be divided into a first sub-positioning contact group and a second sub-positioning contact group, the first sub-positioning contact group is used to identify the position of the corresponding expansion slot in the expansion slot group to which it belongs, and the second sub-positioning contact group is used to identify the expansion slot group to which the corresponding expansion slot belongs. Accordingly, the slot indication information of an expansion slot can be determined based on the position of the positioning contact in the corresponding first sub-positioning contact group that allows contact with the metal copper exposed area in the first sub-positioning contact group to which it belongs, and the position of the positioning contact in the corresponding second sub-positioning contact group that allows contact with the metal copper exposed area in the second sub-positioning contact group to which it belongs, which can be a positioning code, and the number of bits of the code is consistent with the number of positioning contacts contained in the corresponding first positioning contact group. The positioning contact here is a contact used to position the expansion slot, which can be realized by a protruding contact and a non-protruding contact.

[0051] Optionally, the metal copper-exposed area of ​​the adapter card installed on the expansion slot in the same expansion slot group and the corresponding first sub-positioning contact group contacted by the positioning contact in the first sub-positioning contact group are at least partially different in position, and the metal copper-exposed area of ​​the adapter card installed on the expansion slot in the same expansion slot group and the corresponding second sub-positioning contact group contacted by the positioning contact in the second sub-positioning contact group are at the same position. The metal copper-exposed area of ​​the adapter card installed on the expansion slot in different expansion slot groups and the corresponding second sub-positioning contact group contacted by the positioning contact in the second sub-positioning contact group are at least partially different in position. The expansion slot can be uniquely identified by the combination of the first sub-positioning contact group and the second sub-positioning contact group.

[0052] Optionally, the structural support can be fixed on the chassis of the electronic device, and the structural support also has a plurality of second positioning contact groups corresponding to the plurality of expansion slot groups. In the second sub-positioning contact group included in the first positioning contact group corresponding to each expansion slot group, the positioning contact for contacting the metal copper-exposed area of ​​the adapter card contacts the chassis bottom of the chassis through the positioning contact in the second positioning contact group corresponding to each expansion slot group. The chassis and internal support of the electronic device are both made of metal, and the electronic device is connected to the ground after being put on the shelf. After the circuit in the circuit board inside the chassis contacts the chassis or the metal structural member, it is equivalent to being grounded. Through the above design, the positioning contact for contacting the metal copper-exposed area of ​​the adapter card can be grounded through the positioning contact (hereinafter referred to as the effective positioning contact) in the second positioning contact group corresponding to each expansion slot group (which can be understood as the bracket area), so that the level of the position where the metal copper-exposed area of ​​the adapter card contacts the effective positioning contact is different from the level of other positions, thereby improving the convenience of slot indication information identification.

[0053] For example, the structural support plays a fixed supporting role, the riser card is fixed on the side wall of the structural support, and the structural support is fixed on the chassis. For the above structural support, when the riser card is installed on the side wall of the support, there will be a metal spring or contact on the side wall of the support to contact the riser card, and there will also be a metal spring or contact at the lower end of the side wall of the support to contact the bottom of the chassis, and the metal spring or contact on the support is used to provide position information.

[0054] like Figure 7 As shown, the server has 6 PCIe slots, which are divided into two groups (3 PCIe slots in each group) and distributed on the left and right brackets (corresponding to the bracket area mentioned above). If the server system recognizes that a PCIe device is inserted, it is necessary to determine which slot 1 to 6 the PCIe device is installed in. To this end, the column positioning and row positioning of the expansion slot can be determined first, that is, knowing where the expansion slot is located on the structural bracket (column positioning), and whether it is on the left bracket or the right bracket (row positioning).

[0055] Take the left bracket as an example. There are PCIe1~3 on the left bracket. Figure 7 The three dotted boxes on the side wall of the middle bracket are the installation locations of the three riser cards, corresponding to the three PCIe slots. Figure 7 The riser card and PCIe slot in the PCIe card correspond one to one, that is, there is one PCIe slot on a riser card. Here, in addition to the functions of a traditional bracket, the structural bracket also has three groups of positioning contacts, namely, the riser card column positioning contacts (an example of the first sub-positioning contact group), the riser card row positioning contacts (an example of the second sub-positioning contact group), and the bracket row positioning contacts (an example of the second positioning contact group). Each group of positioning contacts has 3 bits (the number of positioning contacts can be increased or decreased according to the number of slots to be positioned, as long as the encoding can cover the number of slots).

[0056] There are three column positioning contacts for the riser card, from left to right, column 1, column 2, and column 3 (indicating the position in a column). When the riser card is installed in the PCIe1 position, contact column 1 ( Figure 7 The gray marked locating contacts in the riser card column locating contacts make contact with the riser card, columns 2 and 3 ( Figure 7 The white marked positioning contacts in the riser card column positioning contacts in the PCIe slot do not contact the riser card; when the riser card is installed in the PCIe2 position, contact column 2 contacts the riser card, and column 1 and column 3 do not contact the riser card. In this way, when the riser card is installed in different positions in the column direction, the contacts are different, which can be used as the column identification of the PCIe slot position.

[0057] There are three row positioning contacts on the riser card, row 1, row 2, and row 3 from left to right. When a riser card is installed in any of the PCIe1, 2, and 3 positions, contact row 1 ( Figure 7 The gray marked locating contacts in the riser row locating contacts in the middle) are in contact with the riser, rows 2 and 3 ( Figure 7 The white marked positioning contacts in the riser row positioning contacts in the riser card are not in contact with the riser card. Since the riser cards in these three positions are all on the same bracket, their corresponding rows are the same (here, the bracket on the left is defined as row 1). The three PCIe slots on row 1 are connected together and connected to the bracket row positioning contacts.

[0058] There are three row positioning contacts of the bracket, from left to right, row 1, row 2 and row 3. When the bracket is installed on the chassis, the row positioning contacts of the bracket will contact the chassis base. Figure 7 After the left bracket in the middle is installed, contact row 1 contacts the chassis base, and contact rows 2 and 3 do not contact the chassis base. In this way, the row identification of the contacts is different when the structural bracket is installed in the row direction of the chassis base.

[0059] Through the positioning contact configuration in this embodiment, the slot indication information stored in the designated register of the adapter card installed on each expansion slot is a positioning code generated based on the positioning contact contacted by the metal copper-exposed area of ​​the adapter card installed on each expansion slot, that is, a positioning code generated based on the position of the positioning contact contacted by the metal copper-exposed area of ​​the adapter card installed on each expansion slot in the positioning contact group to which it belongs.

[0060] In this embodiment, for each expansion slot, the corresponding slot indication information is certain, and does not depend on the connection relationship with the expansion port or whether an adapter card is installed. Therefore, a code mapping table can be pre-configured to record the corresponding relationship between the expansion slots in the multiple expansion slots and the corresponding positioning codes. Correspondingly, by parsing the target slot indication information, determining the expansion slot in which the associated adapter card is installed in the multiple expansion slots includes: using the target slot indication information to query the preset code mapping table, and determining the queried expansion slot as the expansion slot in which the associated adapter card is installed.

[0061] Optionally, for each adapter card, after being installed in the corresponding expansion slot, the slot indication information to be stored can be determined. Therefore, the slot indication information can be determined and stored in the designated register at any time after the adapter card is installed in the expansion slot.

[0062] For example, in addition to providing the function of connecting PCIe peripherals to the CPU PCIe port, the riser card also converts the position information on the structural support into a digital signal through the circuit and sends it to the slot identification system, and the slot identification system can determine the slot position of the required PCIe peripheral through the position information. When the riser card is installed in the PCIe1~6 slot position, the positioning code corresponding to each riser card can be determined. The coding information of the 6 PCIe slots on the server can be saved in the slot coding mapping table shown in Table 1.

[0063] Table 1

[0064]

[0065] As can be seen from Table 1, the PCIe slot corresponds to the row and column positioning code of the slot. As long as the recognition system obtains the positioning code transmitted by the riser card, the PCIe slot where the riser card is installed can be known, and thus the position of the PCIe peripheral installed on the riser card can be known.

[0066] Through this embodiment, different positioning contact groups are used to identify the expansion slot group to which the expansion slot where the adapter card is installed belongs and its position in the expansion slot group, which can facilitate expansion slot positioning and improve the convenience and accuracy of expansion slot identification.

[0067] In some exemplary embodiments, among the multiple first positioning contact groups, the first positioning contact group corresponding to the associated adapter card is the associated positioning contact group, and the metal copper exposed area of ​​the associated adapter card includes a group of first contact points for contacting the positioning contacts in the first sub-positioning contact group in the associated positioning contact group, and a group of second contact points for contacting the positioning contacts in the second sub-positioning contact group in the associated positioning contact group. For the associated adapter card, after being installed in the associated expansion slot, it can determine the slot position information corresponding to the associated expansion slot, that is, the target slot position information, and store the determined target slot position information in a designated register thereon. The above steps can be performed by a processing chip of the associated adapter card. Optionally, the processing chip can be an IO Expander chip, and the designated register is an IO Expander register.

[0068] The above-mentioned processing chip may include a group of first pins and a group of second pins, wherein the group of first pins corresponds to the first sub-positioning contact group in the associated positioning contact group, and may be connected to a group of first contact points, and the group of second pins corresponds to the second sub-positioning contact group in the associated positioning contact group, and may be connected to a group of second contact points. Since the level of the positioning contact in contact with the metal copper-exposed area of ​​the associated adapter card is different from the level of the positioning contact not in contact with the metal copper-exposed area of ​​the associated adapter card, for a group of first pins, the pin level of the first pin in contact with the corresponding positioning contact by the connected first contact point is different from the pin level of the first pin in contact with the corresponding positioning contact by the connected first contact point; for a group of second pins, the pin level of the second pin in contact with the corresponding positioning contact by the connected second contact point is different from the pin level of the second pin in contact with the corresponding positioning contact by the connected second contact point.

[0069] In this embodiment, the expansion slot group to which the associated expansion slot belongs can be determined based on the pin levels of different second pins in a group of second pins, and the position of the associated expansion slot in the expansion slot group to which it belongs can be determined based on the pin levels of different first pins in a group of first pins, thereby realizing slot identification. Correspondingly, before obtaining the slot indication information stored in the designated register of the associated adapter card, the method further includes: determining the pin levels of a group of first pins and the pin levels of second pins through a processing chip; and generating target slot indication information according to the pin levels of a group of first pins and the pin levels of the second pins.

[0070] For example, in addition to providing the function of connecting PCIe peripherals to the CPU PCIe port, the riser card also converts the position information on the structural bracket into a digital signal through the circuit and sends it to the identification system. When the riser card is installed on the bracket, there will be a metal copper area on its PCB corresponding to the row and column contacts on the bracket. After the metal copper area contacts the bracket contacts, it forms a closed loop with the relevant circuit group on the riser card, converting the position information into a digital coding signal and sending it to the identification system. The server chassis and internal brackets are both metal. After the server is installed on the rack, it is connected to the ground. The circuits in the circuit board inside the chassis are equivalent to grounding after contacting the chassis or metal structural parts.

[0071] Combination Figure 8 The identification circuit in the riser card shown in the figure, when the riser card is installed in the PCIe slots 1 to 6, the IO Expander chip pin level on the riser card is different, and the encoding information read through the I2C (Inter-Integrated Circuit) is also different. The encoding information of the six slots on the server is shown in Table 1.

[0072] When the riser card is installed in the uppermost PCIe slot of the left bracket, the pins 1 and 4 of the IO Expander of the riser card circuit are in contact with the column positioning contact 1 of the riser card and the row positioning contact 1 of the riser card on the structural bracket, and the pins are equivalent to grounding, the level is pulled down, and the level of other bits is still high due to the presence of pull-up resistors. If the riser card is installed in the middle position of the right bracket, the pins 2 and 5 of the IO Expander of the riser card circuit are in contact with the column positioning contact 2 of the riser card and the row positioning contact 2 of the riser card on the structural bracket, and the pins are equivalent to grounding, the level is pulled down, and the level of other bits is still high due to the presence of pull-up resistors. In this way, when the riser is installed on the structural bracket, the level of the IO Expander chip pins in the riser card will change. This level change is transmitted to the slot identification system as digital information through the I2C bus for slot identification. The slot identification system here can be a system for performing device slot identification, which can be the aforementioned management system.

[0073] Here, the position identification (i.e., position information) is automatically formed according to the position where the riser card and the structural bracket are installed, and the designed circuit (such as Figure 8 As shown in the figure, the position identifier is converted into digital coding information, and the slot identification system automatically identifies the PCIe slot through this coding information. The structural bracket and riser card in this solution can be installed at any design location, and the PCIe port on the motherboard can be connected to any PCIe slot according to actual needs without the need for fixing, making the server very flexible to use. At the same time, the riser card and structural bracket can be used in any PCIe slot, and there is no need to use one for each PCIe slot. Since only one riser card and structural bracket are needed, production installation is convenient, production costs are saved, and boring and sluggish problems caused by excessive materials are avoided.

[0074] Through this embodiment, by setting pins corresponding to different sub-positioning contact groups and performing slot identification based on the detected pin levels, the convenience and efficiency of slot identification can be improved.

[0075] In some exemplary embodiments, determining that there is a mounted expansion port with an expansion device mounted on the multiple expansion ports can be done at any desired time. Optionally, in this embodiment, when the electronic device is turned on, each expansion port in the multiple expansion slots can be scanned by BIOS (Basic Input / Output System) to determine whether each expansion port has an expansion device mounted on it.

[0076] For example, after the server is powered on, the BIOS may scan all PCIe ports of the CPU to see if there are any PCIe devices mounted on them.

[0077] Through this embodiment, the expansion slot where the expansion device is mounted is detected when the device is powered on, so that the expansion device can be conveniently used based on the slot identification result during the operation of the device, thereby improving the timeliness of information acquisition.

[0078] In some exemplary embodiments, the expansion port and the adapter card installed on the expansion slot can be connected via a sideband signal bus. Correspondingly, for a scenario where there is a mounted expansion port with an expansion device mounted on multiple expansion ports, the slot indication information stored in the designated register of the associated adapter card is obtained to obtain the target slot indication information, including: accessing the designated register of the associated adapter card via the sideband signal bus of the mounted expansion port to obtain the slot indication information stored in the designated register of the associated adapter card to obtain the target slot indication information.

[0079] The above-mentioned sideband signal bus can be a bus used to transmit sideband signals between the expansion port and the adapter card. The sideband signal is a signal used to transmit specific information between devices. These signals are usually used to assist the main communication protocol. For different expansion ports and adapter card types, the sideband signal bus used can be the same or different. The above-mentioned sideband signal bus can include but is not limited to at least one of the following: I2C, I3C (Improved I2C, improved integrated circuit bus), and can also include other buses, which are not limited in this embodiment.

[0080] For example, the IO Expander register on the corresponding Riser card may be accessed through the sideband signal bus of the PCIe port on which the PCIe device is mounted, thereby reading the positioning code information stored therein.

[0081] Through this embodiment, the designated register of the adapter card is accessed through the sideband signal bus to obtain the slot indication information stored therein, which can reduce the impact of slot identification on the operation of the electronic device and improve the performance of the device operation.

[0082] In some exemplary embodiments, determining whether there is an expansion port for a mounted expansion device can be performed by BIOS, and obtaining slot indication information can be performed by BMC (Baseboard Management Controller). In the above manner, the BMC can perform slot identification without affecting the operation of the main operating system. In this case, the aforementioned slot identification system can be run by the BMC.

[0083] Correspondingly, in the case where there is a mounted expansion port with a mounted expansion device among the multiple expansion ports, accessing the designated register of the associated adapter card via the sideband signal bus of the mounted expansion port includes: sending a notification message to the baseboard management controller via the basic input and output system; in response to the received notification message, accessing the designated register of the first adapter card via the sideband signal bus of the mounted expansion port through the baseboard management controller. The above notification message can be used to notify the baseboard management controller to access the designated register of the associated adapter card, which can be a specific instruction, and the specific instruction can be sent to the BMC via an interrupt signal.

[0084] For example, if a device is mounted on a PCIe port, the BIOS notifies the BMC to access the IO Expander register on the corresponding Riser through the sideband signal bus of the PCIe port. The BMC obtains the encoding information stored in the IO Expander register on the corresponding Riser card and compares it with the mapping table shown in Table 1 to obtain the PCIe slot where the corresponding Riser card is installed.

[0085] Through this embodiment, when an expansion port with an expansion device mounted thereon is detected, the BMC performs slot identification without affecting the operation of the main operating system, thereby reducing the impact of slot identification on the operation of the electronic device and improving the performance of the device operation.

[0086] In some exemplary embodiments, the sideband signal bus used to access the specified register of the expansion card can be an integrated circuit bus, which can take into account other signals transmitted on the electronic device (the integrated circuit bus can transmit multiple signals) while taking into account the existing device versions, thereby reducing the cost of equipment upgrades.

[0087] Correspondingly, for the case where there is a mounted expansion port with a mounted expansion device among multiple expansion ports, accessing the designated register of the associated adapter card via the sideband signal bus of the mounted expansion port includes: accessing the designated register of the associated adapter card via the integrated circuit bus of the mounted expansion port.

[0088] For example, the BIOS notifies the BMC to access the IO Expander register on the corresponding Riser card through the I2C bus of the PCIe port where the device is mounted.

[0089] Through this embodiment, the designated register of the adapter card is accessed through the integrated circuit bus, which can take into account other signals transmitted on the electronic device and the existing device version, thereby reducing the cost of device upgrades and improving the compatibility of slot identification.

[0090] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0091] In another aspect of the embodiments of the present application, an electronic device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.

[0092] In this embodiment, the electronic device includes a processing component and a structural support, the processing component includes a plurality of expansion ports, the structural support has a plurality of expansion slots, an expansion slot among the plurality of expansion slots is installed with an adapter card, the expansion port among the plurality of expansion ports is used to connect the expansion device mounted on the expansion port among the plurality of expansion ports through the adapter card installed on the corresponding expansion slot among the plurality of expansion slots, the structural support has a plurality of first positioning contact groups corresponding to the plurality of expansion slots, and the metal copper-exposed areas of the adapter cards installed on different expansion slots among the plurality of expansion slots are at least partially different in position in the first positioning contact group to which the positioning contacts contacted by the corresponding first positioning contact group belong. The component that performs device slot identification may be an execution component of the electronic device, and the execution component may be the aforementioned processing component, or may be another component independent of the processing component (for example, the processing component is a CPU, and the execution component is a BMC). Correspondingly, steps S602 and S604 in the aforementioned embodiment may be performed by the execution component.

[0093] The above-mentioned execution component can be used to obtain the slot indication information stored in the designated register of the associated adapter card to obtain the target slot indication information when there is a mounted expansion port with a mounted expansion device among the multiple expansion ports, wherein the associated adapter card is an adapter card connecting the mounted expansion port and the expansion device mounted on the mounted expansion port, and the target slot indication information is generated based on the position of the positioning contact in contact with the metal copper-exposed area of ​​the associated adapter card in the first positioning contact group to which it belongs, and the target slot indication information is used to identify the slot position of the expansion slot in which the associated adapter card is installed; by parsing the target slot indication information, the expansion slot in which the associated adapter card is installed among the multiple expansion slots is determined.

[0094] Through this embodiment, when there is a mounted expansion port with an expansion device mounted on it among multiple expansion ports, the slot indication information stored in the designated register of the associated adapter card is obtained to obtain the target slot indication information, wherein the associated adapter card is an adapter card connecting the mounted expansion port and the expansion device mounted on the mounted expansion port, the target slot indication information is generated based on the position of the positioning contact in contact with the metal copper-exposed area of ​​the associated adapter card in the first positioning contact group to which it belongs, and the target slot indication information is used to identify the slot position of the expansion slot in which the associated adapter card is installed; by parsing the target slot indication information, the expansion slot in which the associated adapter card is installed among multiple expansion slots is determined, thereby solving the problem of poor flexibility in device use in the device slot identification method in the related art and improving the flexibility in device use.

[0095] In some exemplary embodiments, a plurality of expansion slots are divided into a plurality of expansion slot groups, each of a plurality of first positioning contact groups is divided into a first sub-positioning contact group and a second sub-positioning contact group, the first sub-positioning contact group in each first positioning contact group is used to identify the position of the corresponding expansion slot in the expansion slot group to which it belongs, the second sub-positioning contact group in each first positioning contact group is used to identify the expansion slot group to which the corresponding expansion slot belongs, and the metal copper-exposed area of ​​the riser card installed on the expansion slot in the same expansion slot group contacts the positioning contacts of the corresponding first sub-positioning contact group in the first sub-positioning contact group. The positions of the metal exposed copper areas of the adapter cards installed on the expansion slots in the same expansion slot group and the positioning contacts contacted by the corresponding second sub-positioning contact group are at least partially different in position in the second sub-positioning contact group to which they belong; the metal exposed copper areas of the adapter cards installed on the expansion slots in different expansion slot groups and the positioning contacts contacted by the corresponding second sub-positioning contact group are at least partially different in position in the second sub-positioning contact group to which they belong; the slot indication information stored in the designated register of the adapter card installed on each expansion slot is a positioning code generated based on the positioning contacts contacted by the metal exposed copper areas of the adapter card installed on each expansion slot.

[0096] Optionally, the execution component is also used to use the target slot indication information to query a preset coding mapping table, and determine the queried expansion slot as the expansion slot in which the associated adapter card is installed, wherein the coding mapping table is used to record the correspondence between the expansion slots in multiple expansion slots and the corresponding positioning codes.

[0097] In some exemplary embodiments, among multiple first positioning contact groups, a first positioning contact group corresponding to an associated adapter card is an associated positioning contact group, the associated adapter card includes a processing chip, the processing chip includes a group of first pins and a group of second pins, a group of first pins are connected to a group of first contact points on the metal copper exposed area of ​​the associated adapter card for contacting positioning contacts in a first sub-positioning contact group in the associated positioning contact group, and a group of second pins are connected to a group of second contact points on the metal copper exposed area of ​​the associated adapter card for contacting positioning contacts in a second sub-positioning contact group in the associated positioning contact group.

[0098] Optionally, the processing chip determines the pin level of a group of first pins and the pin level of a second pin, wherein, in a group of first pins, the pin level of the first pin whose connected first contact point contacts the corresponding positioning contact is different from the pin level of the first pin whose connected first contact point does not contact the corresponding positioning contact, and in a group of second pins, the pin level of the second pin whose connected second contact point contacts the corresponding positioning contact is different from the pin level of the second pin whose connected second contact point does not contact the corresponding positioning contact; and the target slot indication information is generated according to the pin level of a group of first pins and the pin level of the second pin.

[0099] In some exemplary embodiments, the structural support is fixed to a chassis of the electronic device, and the structural support also has a plurality of second positioning contact groups corresponding one by one to the plurality of expansion slot groups, and in the second sub-positioning contact group included in the first positioning contact group corresponding to each of the plurality of expansion slot groups, the positioning contacts for contacting the metal copper exposed area of ​​the adapter card contact the chassis bottom of the chassis through the positioning contacts in the second positioning contact group corresponding to each expansion slot group.

[0100] In some exemplary embodiments, the execution component is also used to access the designated register of the associated adapter card via the sideband signal bus of the mounted expansion port when there is a mounted expansion port with a mounted expansion device among multiple expansion ports, so as to obtain the slot indication information stored in the designated register of the associated adapter card and obtain the target slot indication information.

[0101] In some exemplary embodiments, a basic input / output system is run on the electronic device, and the execution component is a baseboard management controller; wherein the basic input / output system is used to send a notification message to the baseboard management controller when there is a mounted expansion port with a mounted expansion device among multiple expansion ports, wherein the notification message is used to notify the baseboard management controller to access a specified register of an associated adapter card; the baseboard management controller is used to access the specified register of the first adapter card via the sideband signal bus of the mounted expansion port in response to the received notification message.

[0102] In some exemplary embodiments, the execution component is further configured to access a designated register of the associated riser card via an integrated circuit bus of a mounted expansion port when there is a mounted expansion port with a mounted expansion device among the plurality of expansion ports.

[0103] In some exemplary embodiments, a basic input / output system is run on the electronic device, wherein the basic input / output system is used to scan each expansion port in a plurality of expansion slots when the electronic device is turned on to determine whether an expansion device is mounted on each expansion port.

[0104] In some exemplary embodiments, the electronic device is a server, the processing component is a central processing unit, an expansion port among the multiple expansion ports is a PCIe port, an expansion slot among the multiple expansion slots is a PCIe slot, and an adapter card installed on an expansion slot among the multiple expansion slots is a PCIe adapter card.

[0105] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0106] In another aspect of the embodiments of the present application, a structural support is provided. The structural support is used to implement the above-mentioned embodiments and preferred implementation modes, and those that have been described will not be repeated here.

[0107] In an exemplary embodiment, a structural support is used to fix adapter cards installed on multiple expansion slots on the structural support and expansion devices mounted by the adapter cards installed on the multiple expansion slots; wherein the structural support has multiple first positioning contact groups corresponding to the multiple expansion slots, and in different first positioning contact groups among the multiple first positioning contact groups, the positions of the positioning contacts used to contact the metal copper exposed areas of the adapter cards installed on the corresponding expansion slots are at least partially different in the first positioning contact groups to which they belong.

[0108] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0109] In another aspect of the embodiments of the present application, an adapter card is provided. The adapter card is used to implement the above embodiments and preferred implementation modes, and those that have been described will not be repeated here.

[0110] In an exemplary embodiment, an adapter card is used to be installed in an expansion slot on a structural support of an electronic device, and to connect an expansion port on a processing component of the electronic device and an expansion device mounted in the expansion slot through the adapter card; wherein the adapter card has a metal exposed copper area, the metal exposed copper area is used to contact with a positioning contact in a first positioning contact group on the structural support of the electronic device, and the adapter card is also used to generate slot indication information based on the position of the positioning contact in the first positioning contact group contacted by the metal exposed copper area, and store the generated slot indication information in a designated register of the adapter card.

[0111] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0112] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided. The computer-readable storage medium includes a stored program, wherein the program executes the steps of any of the above method embodiments when it is run.

[0113] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, at least one of the following: a USB flash drive, a RAM (Random Access Memory), a ROM (Read-Only Memory), a mobile hard disk, a magnetic disk, or an optical disk, and other media that can store computer programs.

[0114] According to another aspect of the embodiments of the present application, there is further provided an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to execute the steps in any of the above method embodiments through the computer program.

[0115] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0116] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0117] According to another aspect of the embodiment of the present application, a computer program product is provided, the computer program product comprising a computer program / instruction, the computer program / instruction comprising a program code for executing the method shown in the flowchart. Fig. 9 The computer program can be downloaded and installed from the network through the communication part 909, and / or installed from the removable medium 911. When the computer program is executed by the central processor 901, various functions provided by the embodiments of the present application are executed. The serial numbers of the embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments.

[0118] refer to Fig. 9 , Fig. 9 It is a structural block diagram of a computer system of an optional electronic device according to an embodiment of the present application. Fig. 9 The computer system structure block diagram of the electronic device used to implement the embodiment of the present application is schematically shown. Fig. 9 As shown, the computer system 900 includes a central processing unit 901 (CPU), which can perform various appropriate actions and processes according to the program stored in the read-only memory 902 (ROM) or the program loaded from the storage part 908 to the random access memory 903 (RAM). Various programs and data required for system operation are also stored in the random access memory 903. The central processing unit 901, the read-only memory 902 and the random access memory 903 are connected to each other through a bus 904. The input / output interface 905 (Input / Output interface, i.e., I / O interface) is also connected to the bus 904.

[0119] The following components are connected to the input / output interface 905: an input section 906 including a keyboard, a mouse, etc.; an output section 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN card, a modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the input / output interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as needed so that a computer program read therefrom is installed into the storage section 908 as needed.

[0120] In particular, according to an embodiment of the present application, the process described in each method flow chart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer readable medium, and the computer program contains a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 909, and / or installed from the removable medium 911. When the computer program is executed by the central processor 901, various functions defined in the system of the present application are executed.

[0121] It should be noted that Fig. 9 The computer system 900 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0122] Obviously, those skilled in the art should understand that the modules or steps of the above-mentioned embodiments of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. In this way, the embodiments of the present application are not limited to any specific combination of hardware and software.

[0123] The above are only preferred embodiments of the present application and are not intended to limit the embodiments of the present application. For those skilled in the art, the embodiments of the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the embodiments of the present application shall be included in the protection scope of the embodiments of the present application.

Claims

1. A device slot identification method, characterized in that: Applied to an electronic device, the electronic device comprises a processing component and a structural support, the processing component comprises a plurality of expansion ports, the structural support has a plurality of expansion slots, an expansion slot among the plurality of expansion slots is installed with an adapter card, the expansion port among the plurality of expansion ports is used to connect an expansion device mounted on an expansion port among the plurality of expansion ports through an adapter card installed on a corresponding expansion slot among the plurality of expansion slots, the structural support has a plurality of first positioning contact groups corresponding to the plurality of expansion slots, and the metal copper-exposed areas of the adapter cards installed on different expansion slots among the plurality of expansion slots and the corresponding first positioning contact groups have positioning contacts that are contacted by the positioning contacts at least partially different in the first positioning contact groups to which they belong; The method comprises: In the case that there is a mounted expansion port of the mounted expansion device among the multiple expansion ports, the slot indication information stored in the designated register of the associated adapter card is acquired to obtain the target slot indication information, wherein the associated adapter card is an adapter card connecting the mounted expansion port and the expansion device mounted on the mounted expansion port, the target slot indication information is generated based on the position of the positioning contact in contact with the metal copper-exposed area of ​​the associated adapter card in the first positioning contact group, and the target slot indication information is used to identify the slot position of the expansion slot where the associated adapter card is installed; The expansion slot in which the associated adapter card is installed among the multiple expansion slots is determined by parsing the target slot indication information.

2. The method according to claim 1, characterized in that The multiple expansion slots are divided into multiple expansion slot groups, each of the multiple first positioning contact groups is divided into a first sub-positioning contact group and a second sub-positioning contact group, the first sub-positioning contact group in each of the first positioning contact groups is used to identify the position of the corresponding expansion slot in the corresponding expansion slot group, the second sub-positioning contact group in each of the first positioning contact groups is used to identify the expansion slot group to which the corresponding expansion slot belongs, and the metal copper-exposed area of ​​the adapter card installed on the expansion slot in the same expansion slot group and the corresponding first sub-positioning contact group contact the positioning contact in the first sub-positioning contact group to which it belongs. The metal copper-exposed area of ​​the adapter card installed on the expansion slot in the same expansion slot group and the positioning contacts contacted by the corresponding second sub-positioning contact group are at the same position in the second sub-positioning contact group, and the metal copper-exposed area of ​​the adapter card installed on the expansion slot in different expansion slot groups and the positioning contacts contacted by the corresponding second sub-positioning contact group are at least partially different in position in the second sub-positioning contact group, and the slot indication information stored in the designated register of the adapter card installed on each of the multiple expansion slots is a positioning code generated based on the positioning contacts contacted by the metal copper-exposed area of ​​the adapter card installed on each expansion slot; The step of parsing the target slot indication information to determine the expansion slot in which the associated riser card is installed among the multiple expansion slots includes: The target slot indication information is used to query a preset coding mapping table, and the queried expansion slot is determined as the expansion slot in which the associated adapter card is installed, wherein the coding mapping table is used to record the correspondence between the expansion slots in the multiple expansion slots and the corresponding positioning codes.

3. The method according to claim 2, characterized in that Among the plurality of first positioning contact groups, the first positioning contact group corresponding to the associated adapter card is the associated positioning contact group, the associated adapter card includes a processing chip, the processing chip includes a group of first pins and a group of second pins, the group of first pins is connected to a group of first contact points on the metal copper-exposed area of ​​the associated adapter card for contacting with positioning contacts in a first sub-positioning contact group in the associated positioning contact group, and the group of second pins is connected to a group of second contact points on the metal copper-exposed area of ​​the associated adapter card for contacting with positioning contacts in a second sub-positioning contact group in the associated positioning contact group; Before acquiring the slot indication information stored in the designated register of the associated adapter card, the method further includes: Determining the pin level of the group of first pins and the pin level of the second pin by the processing chip, wherein, in the group of first pins, the pin level of the first pin whose connected first contact point contacts the corresponding positioning contact is different from the pin level of the first pin whose connected first contact point does not contact the corresponding positioning contact, and in the group of second pins, the pin level of the second pin whose connected second contact point contacts the corresponding positioning contact is different from the pin level of the second pin whose connected second contact point does not contact the corresponding positioning contact; The target slot indication information is generated according to the pin levels of the group of first pins and the pin level of the second pin.

4. The method according to claim 2, characterized in that: The structural support is fixed on the chassis of the electronic device, and the structural support also has a plurality of second positioning contact groups corresponding one by one to the plurality of expansion slot groups. In the second sub-positioning contact group included in the first positioning contact group corresponding to each of the plurality of expansion slot groups, the positioning contacts for contacting the metal copper exposed area of ​​the adapter card contact the chassis bottom of the chassis through the positioning contacts in the second positioning contact group corresponding to each of the expansion slot groups.

5. The method according to claim 1, characterized in that In the case that there is a mounted expansion port of the mounted expansion device among the multiple expansion ports, obtaining the slot indication information stored in the designated register of the associated adapter card to obtain the target slot indication information includes: In the case that there is a mounted expansion port with a mounted expansion device among the multiple expansion ports, the designated register of the associated adapter card is accessed via the sideband signal bus of the mounted expansion port to obtain the slot indication information stored in the designated register of the associated adapter card to obtain the target slot indication information.

6. The method according to claim 5, characterized in that In the case that there is a mounted expansion port of the mounted expansion device among the multiple expansion ports, accessing the designated register of the associated riser card via the sideband signal bus of the mounted expansion port includes: In the case that there is a mounted expansion port of the mounted expansion device among the multiple expansion ports, sending a notification message to the baseboard management controller through the basic input and output system, wherein the notification message is used to notify the baseboard management controller to access the designated register of the associated riser card; In response to the received notification message, the baseboard management controller accesses a designated register of the first riser card via a sideband signal bus of the mounted expansion port.

7. The method according to claim 5, characterized in that In the case that there is a mounted expansion port of the mounted expansion device among the multiple expansion ports, accessing the designated register of the associated riser card via the sideband signal bus of the mounted expansion port includes: In the case that there is a mounted expansion port of the mounted expansion device among the plurality of expansion ports, a designated register of the associated riser card is accessed via the integrated circuit bus of the mounted expansion port.

8. The method according to claim 1, characterized in that The method further comprises: When the electronic device is turned on, each expansion port in the plurality of expansion slots is scanned by a basic input / output system to determine whether an expansion device is mounted on each expansion port.

9. The method according to any one of claims 1 to 8, characterized in that The electronic device is a server, the processing component is a central processing unit, the expansion port among the multiple expansion ports is a PCIe port, the expansion slot among the multiple expansion slots is a PCIe slot, and the adapter card installed on the expansion slot among the multiple expansion slots is a PCIe adapter card.

10. An electronic device, characterized in that: The electronic device comprises a processing component and a structural support, the processing component comprises a plurality of expansion ports, the structural support has a plurality of expansion slots, an expansion slot among the plurality of expansion slots is installed with an adapter card, the expansion port among the plurality of expansion ports is used to connect an expansion device mounted on an expansion port among the plurality of expansion ports through an adapter card installed on a corresponding expansion slot among the plurality of expansion slots, the structural support has a plurality of first positioning contact groups corresponding to the plurality of expansion slots, the metal copper-exposed areas of the adapter cards installed on different expansion slots among the plurality of expansion slots and the positioning contacts contacted by the corresponding first positioning contact groups have positions in the first positioning contact groups to which they belong at least partially different, wherein: The electronic device also includes: an execution component, which is used to obtain slot indication information stored in a designated register of an associated adapter card to obtain target slot indication information when there is a mounted expansion port with a mounted expansion device among the multiple expansion ports, wherein the associated adapter card is an adapter card connecting the mounted expansion port and the expansion device mounted on the mounted expansion port, and the target slot indication information is generated based on the position of the positioning contact in contact with the metal copper-exposed area of ​​the associated adapter card in the first positioning contact group to which it belongs, and the target slot indication information is used to identify the slot position of the expansion slot in which the associated adapter card is installed; by parsing the target slot indication information, the expansion slot in which the associated adapter card is installed among the multiple expansion slots is determined.

11. The electronic device according to claim 10, characterized in that: The multiple expansion slots are divided into multiple expansion slot groups, each of the multiple first positioning contact groups is divided into a first sub-positioning contact group and a second sub-positioning contact group, the first sub-positioning contact group in each of the first positioning contact groups is used to identify the position of the corresponding expansion slot in the corresponding expansion slot group, the second sub-positioning contact group in each of the first positioning contact groups is used to identify the expansion slot group to which the corresponding expansion slot belongs, and the metal copper-exposed area of ​​the adapter card installed on the expansion slot in the same expansion slot group and the corresponding first sub-positioning contact group contact the positioning contact in the first sub-positioning contact group to which it belongs. The metal copper-exposed area of ​​the adapter card installed on the expansion slot in the same expansion slot group and the positioning contacts contacted by the corresponding second sub-positioning contact group are at the same position in the second sub-positioning contact group, and the metal copper-exposed area of ​​the adapter card installed on the expansion slot in different expansion slot groups and the positioning contacts contacted by the corresponding second sub-positioning contact group are at least partially different in position in the second sub-positioning contact group, and the slot indication information stored in the designated register of the adapter card installed on each of the multiple expansion slots is a positioning code generated based on the positioning contacts contacted by the metal copper-exposed area of ​​the adapter card installed on each expansion slot; The execution component is also used to use the target slot indication information to query a preset coding mapping table, and determine the queried expansion slot as the expansion slot in which the associated adapter card is installed, wherein the coding mapping table is used to record the correspondence between the expansion slots in the multiple expansion slots and the corresponding positioning codes.

12. The electronic device according to claim 11, characterized in that: Among the plurality of first positioning contact groups, the first positioning contact group corresponding to the associated adapter card is the associated positioning contact group, the associated adapter card includes a processing chip, the processing chip includes a group of first pins and a group of second pins, the group of first pins is connected to a group of first contact points on the metal copper-exposed area of ​​the associated adapter card for contacting with positioning contacts in a first sub-positioning contact group in the associated positioning contact group, and the group of second pins is connected to a group of second contact points on the metal copper-exposed area of ​​the associated adapter card for contacting with positioning contacts in a second sub-positioning contact group in the associated positioning contact group; The processing chip determines the pin level of the group of first pins and the pin level of the second pin, wherein, in the group of first pins, the pin level of the first pin whose connected first contact point contacts the corresponding positioning contact is different from the pin level of the first pin whose connected first contact point does not contact the corresponding positioning contact, and the pin level of the second pin whose connected second contact point contacts the corresponding positioning contact is different from the pin level of the second pin whose connected second contact point does not contact the corresponding positioning contact; The target slot indication information is generated according to the pin levels of the group of first pins and the pin level of the second pin.

13. A structural support, characterized in that: The structural support is used to fix the adapter cards installed on the multiple expansion slots on the structural support and the expansion devices mounted by the adapter cards installed on the multiple expansion slots; Wherein, the structural support has a plurality of first positioning contact groups corresponding to the plurality of expansion slots, and in different first positioning contact groups among the plurality of first positioning contact groups, the positions of the positioning contacts used to contact the metal copper exposed areas of the adapter card installed on the corresponding expansion slot are at least partially different in the first positioning contact groups to which they belong.

14. An adapter card, characterized in that: The adapter card is used to be installed in an expansion slot on a structural support of an electronic device, and to connect an expansion port on a processing component of the electronic device and an expansion device mounted in the expansion slot where the adapter card is installed; The adapter card has a metal copper-exposed area, which is used to contact a positioning contact in a first positioning contact group on a structural support of the electronic device. The adapter card is also used to generate slot indication information based on the position of the positioning contact in the first positioning contact group contacted by the metal copper-exposed area, and store the generated slot indication information in a designated register of the adapter card.

15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method according to any one of claims 1 to 9 when executed by a processor.