Resource allocation method, server, storage medium and program product

By obtaining the resource configuration information of the target port and using the predetermined granularity link to identify and allocate resources, the problem of inflexible PCIe port resource allocation in the server is solved, the rational allocation of resources and comprehensive identification are achieved, and resource waste and function loss are avoided.

CN119621349BActive Publication Date: 2025-09-26INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510157280.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-13
Publication Date
2025-09-26
Estimated Expiration
2045-02-13

AI Technical Summary

Technical Problem

In the prior art, the allocation of PCIe port resources of the server is not flexible enough, resulting in resource waste and function loss, especially when different types of expansion components are plugged in, resources cannot be reasonably allocated.

Method used

By obtaining the resource configuration information of the target port and based on the component information of the target extension component, a request is sent using a link with a predetermined granularity to identify and allocate resources, ensuring the adaptability of the resources to the extension component connected to the target port and avoiding resource waste.

Benefits of technology

It improves the rationality and adaptability of resource allocation, avoids resource waste, improves the comprehensiveness and versatility of identifying extension components, and enhances the accuracy and effectiveness of resource configuration information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119621349B_ABST
    Figure CN119621349B_ABST
Patent Text Reader

Abstract

The present invention provides a resource allocation method, server, storage medium, and program product, which can be applied to the field of server technology. The resource allocation method includes: obtaining resource configuration information; and allocating resources to a target port according to the resource configuration information, where the target port is connected to a target extension component; the resource configuration information includes resource information of the target port, where the resource information is determined based on component information of the target extension component, where the component information is determined by: sending a request through a link of the target port, where the request is for requesting component information, where the link is obtained by allocating channels of a predetermined granularity to the target port, where the granularity represents the number of channels in the link; and determining component information of the target extension component connected to the target port based on the obtained component information for the request and the port information of the target port.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of server technology, in particular to resource allocation technology, and more particularly to a resource allocation method, server, storage medium and program product. Background Art

[0002] PCIe (Peripheral Component Interconnect Express) is a high-speed serial computer expansion bus standard used to connect server motherboards and various expansion components. Different expansion components have different resource requirements. For example, a high-performance graphics card requires more resources to ensure data transmission speeds, while a low-performance expansion component may only require fewer resources.

[0003] In actual use, the rational allocation of resources has become a research focus. Summary of the Invention

[0004] In view of the above problems, the present invention provides a resource allocation method, a server, a storage medium and a program product for improving the rationality of resource allocation.

[0005] According to a first aspect of the present invention, a resource allocation method is provided, comprising: obtaining resource configuration information; and allocating resources to a target port according to the resource configuration information, wherein the target port is connected to a target extension component; wherein the resource configuration information includes resource information of the target port, and the resource information is determined based on component information of the target extension component; wherein the component information is determined in the following manner: sending a request through a link of the target port, wherein the request is used to request component information, and the link is obtained by allocating a channel of a predetermined granularity to the target port, and the granularity represents the number of channels in the link; and determining the component information of the target extension component connected to the target port based on the component information obtained for the request and the port information of the target port.

[0006] The second aspect of the present invention provides a resource allocation device, comprising: an acquisition module for acquiring resource configuration information; an allocation module for allocating resources to a target port according to the above resource configuration information, wherein the above target port is connected to a target extension component; wherein the above resource configuration information includes resource information of the above target port, and the above resource information is determined based on component information of the above target extension component; wherein the above component information is determined in the following manner: sending a request through a link of the above target port, wherein the above request is used to request component information, and the above link is obtained by allocating a channel of a predetermined granularity to the above target port, and the above granularity represents the number of channels in the above link; and determining the component information of the above target extension component connected to the above target port based on the component information obtained for the above request and the port information of the above target port.

[0007] A third aspect of the present invention provides a server, comprising: one or more processors; a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.

[0008] The fourth aspect of the present invention further provides a computer-readable storage medium having a computer program or instructions stored thereon, which implements the steps of the above method when the computer program or instructions are executed by a processor.

[0009] The fifth aspect of the present invention further provides a computer program product, comprising a computer program or instructions, which implement the steps of the above method when executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] The above contents and other objects, features and advantages of the present invention will become more apparent through the following description of the embodiments of the present invention with reference to the accompanying drawings, in which:

[0011] Figure 1 A schematic diagram of the structure of a server according to an embodiment of the present invention is shown;

[0012] Figure 2 A flow chart of a resource allocation method according to an embodiment of the present invention is shown;

[0013] Figure 3A A flowchart of determining component information according to an embodiment of the present invention is shown;

[0014] Figure 3B A flowchart of determining component information according to a related embodiment is shown;

[0015] Figure 4A A schematic diagram of a structure tree according to an embodiment of the present invention is shown;

[0016] Figure 4B A schematic diagram showing a component configuration table according to an embodiment of the present invention is shown;

[0017] Figure 5 A schematic diagram of a resource configuration table according to an embodiment of the present invention is shown;

[0018] Figure 6 A structural block diagram of a resource allocation device according to an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0019] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present invention. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of embodiments of the present invention. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concept of the present invention.

[0020] The terms used herein are only for describing specific embodiments and are not intended to limit the present invention. The terms "comprise", "include", etc. used herein indicate the presence of the features, steps, operations and / or components, but do not exclude the presence or addition of one or more other features, steps, operations or components.

[0021] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.

[0022] When expressions such as "at least one of A, B, and C, etc." are used, they should generally be interpreted in accordance with the meaning commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).

[0023] The server involved in the embodiment of the present invention is introduced below.

[0024] Figure 1 A schematic diagram of the structure of a server provided by an embodiment of the present invention. Figure 1As shown, the server 100 includes components such as a memory 110, a processor 120, and a baseboard management controller (BMC) 130. However, the present invention is not limited thereto. The server 100 may also include an expansion component 150 connected via a port 140. It will be understood by those skilled in the art that Figure 1 The structure of the server shown in the figure does not constitute a limitation on the server. The server provided by the embodiment of the present invention may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0025] The following combination Figure 1 Each component of the server 100 is introduced in detail.

[0026] The memory 110 may be used to store operating system instructions, data instructions, and data generated by the storage processor 120 when executing the operating system instructions to execute various functional applications of the server 100. The data instructions are used to indicate the operating instructions of the method flow. Optionally, the memory 110 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0027] It should be noted that Figure 1 This is just an example of the memory in the embodiment of the present invention, and the embodiment of the present invention does not limit the number and form of the memory 110.

[0028] The processor 120 is the control center of the server 100. It connects various components using various interfaces and lines. By running or executing operating system instructions stored in the memory 110 and accessing data stored in the memory 110, it executes various functions of the server 100 and processes data, thereby implementing various services based on the server 100. Optionally, the processor 120 may include one or more processing units, which may be a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit, a field-programmable gate array (FPGA), or other programmable logic device, without limitation herein.

[0029] BMC 130 is used to monitor and control the hardware of the server 100. For example, it can monitor the temperature, voltage and other information of the server 100, and make corresponding adjustments to ensure that the server 100 is in a normal operating state. When the server 100 is in an abnormal state, the server 100 can also be restarted by resetting. BMC130 can also record various hardware information and logs to prompt users who use the server 100 and locate faults. It should be noted that BMC130 is an independent device. It does not depend on other hardware in the server 100 (such as the processor 120 or the memory 110, etc.), nor does it depend on the most basic system software running on the server, such as the operating system (OS). However, BMC 130 can interact with the operating system, such as Figure 1 As shown, BMC 130 includes a BMC storage medium 131 and a BMC processor 132. BMC processor 132 interacts with the OS, enabling better management. BMC storage medium 131 is used to store instructions required by BMC 130 during operation and data generated during operation, such as resource configuration information in the embodiments of the present invention. BMC storage medium 131 can be flash memory, random access memory (RAM), or read-only memory (ROM), without limitation.

[0030] The server 100 also includes a PCIe port 140. The port 140 can provide a certain number of channels. For example, the port 140 can provide 16 channels. Each channel has a corresponding bandwidth, which can represent the data throughput that the channel can carry.

[0031] In an embodiment of the present invention, a physical connection can be achieved between the server 100 and the expansion component 150 through the port 140 in the server 100, thereby achieving data transmission between the server 100 and the expansion component 150. The expansion component 150 may include, but is not limited to, a graphics processor, a network card, a solid-state drive, a host bus adapter, etc.

[0032] The port 140 on the server generally adopts a PCIe x8 slot or a PCIe x16 slot, which is convenient for plugging in different types of expansion components 150 in the future. Even if the gold finger on the expansion component 150 is of x2 type or x4 type, it can also be plugged into a PCIex8 slot or a PCIe x16 slot.

[0033] However, currently, the processor 120 directly provides maximum resources, such as bandwidth, to PCIe x8 and x16 slots. This results in inflexible resource allocation when an expansion module 150 with a small number of lanes is inserted. For example, if an x8 expansion module 150 is plugged into a PCIe x16 port, the processor still allocates maximum resources to that port.

[0034] Once the processor allocates maximum resources to an expansion component with a small number of channels, it will lead to resource waste and loss of processor functionality.

[0035] In view of this, an embodiment of the present invention provides a resource allocation method. The resource allocation method provided in the embodiment of the present invention can automatically identify different types of expansion components plugged into a server and generate resource configuration information for a target port based on the component information of the expansion components. This resource configuration information can then be used to rationally configure resources for the target port, thereby improving the compatibility between the allocated resources and the target port and avoiding resource waste.

[0036] The following describes in detail the technical solutions provided by the embodiments of the present invention in conjunction with the accompanying drawings. In the following introduction, the technical solutions provided by the present invention are applied to Figure 1 As an example, the method can be performed by Figure 1 The processor 120 in the server 100 calls the computer program stored in the memory 110 for execution. In the following description, the method is described by taking the example of the server processor calling the computer program stored in the memory for execution.

[0037] The following will be passed Figure 2 、 Figure 3A 、 Figure 3B 、 Figure 4A 、 Figure 4B as well as Figure 5 The resource allocation method according to the embodiment of the present invention is described in detail.

[0038] Figure 2 A flow chart of a resource allocation method according to an embodiment of the present invention is shown.

[0039] like Figure 2 As shown, the resource allocation method of this embodiment includes operations S201 to S202.

[0040] In operation S201 , resource configuration information is acquired.

[0041] In operation S202, resources are allocated to the target port according to the resource configuration information.

[0042] The target port is connected to the target expansion component.

[0043] The target port may include a PCIe port, a root port located directly in the server, or a sub-port physically connected to the root port via an expansion connector such as a riser (vertical network interface card).

[0044] Target expansion components can include PCIe devices, such as graphics processors, network cards, solid-state drives, host bus adapters, etc. Any expansion component that is physically connected to the target port will suffice.

[0045] The target expansion component may include a root expansion component and a sub-expansion component. The root expansion component may include an expansion component connected to a root port. The sub-expansion component may include an expansion component connected to a target port via an expansion connector.

[0046] Resource configuration information can include resource information for the target port. This resource information is determined based on the component information of the target extension component. The component information is obtained via a link with a predetermined granularity for the target port. The granularity represents the number of lanes in the link.

[0047] For example, resources may include bandwidth, but are not limited thereto, and may also include software resources, hardware resources, storage resources, etc.

[0048] The resource information of the target port in the resource configuration information is determined based on the component information of the target extension component, and can indicate the resource information required for running the target extension component. Allocating resources to the target port can indicate allocating resources to the target extension component via the target port. Configuring resources for the target port according to the resource configuration information can improve the compatibility between the allocated resources and the target extension component connected to the target port, avoid the problem of causing waste of resources, and thus improve the rationality of allocating resources.

[0049] Exemplarily, the granularity represents the number of channels in the link. The predetermined granularity may represent the minimum number of channels in the link.

[0050] Communication with different types of expansion components can be established via links of predetermined granularity. By acquiring component information about expansion components transmitted by expansion components connected to the link at the target port, component information of all expansion components connected to the target port is obtained as the component information of the target expansion component.

[0051] According to an embodiment of the present invention, resource configuration information of a target port is determined based on the identified component information of a target extension component, thereby improving the pertinence and flexibility of the resource configuration information.

[0052] In addition, during each server startup, there is no need to redetermine the resource configuration information. Instead, it is only necessary to obtain the resource configuration information and allocate resources to the target port according to the resource configuration information, thereby improving allocation efficiency while avoiding repeated operations of determining resource configuration information.

[0053] Additionally, component information is determined by sending a request via a link to a target port. The request is used to request component information, and the link is obtained by allocating channels of a predetermined granularity to the target port, where the granularity represents the number of channels in the link. Based on the component information obtained for the request and the port information of the target port, component information of the target extension component connected to the target port is determined.

[0054] By allocating the target port to a link of a predetermined granularity, and thereby obtaining information fed back by the extension component that matches the link of the predetermined granularity, it is possible to identify multiple extension components of different types, avoid the problem of incomplete identification of the target extension component, improve the comprehensiveness and versatility of identifying the extension component, and thereby improve the accuracy and effectiveness of the resource configuration information.

[0055] The resource allocation method is described above. The following describes in detail how to identify the target extension component of the target port.

[0056] According to an embodiment of the present invention, when executing Figure 2 Before operation S201 , the resource allocation method may further include an operation of determining a predetermined granularity of the link based on a device type of a target device where the target port is located.

[0057] The target device may include a server, but is not limited thereto, and may also include a processor of the server, such as a CPU, as long as it is a device configured with a target port.

[0058] The device type can be determined based on the target device and used to characterize the device attribute information of the target device. For example, device types can be categorized based on device type, such as computer types and server types, such as cloud computing server types. However, this is not limited to this. Device types can also be categorized based on device usage, such as image processing or data storage. Any method that can distinguish multiple different target devices is sufficient.

[0059] For example, if the target device is a computer, the number of channels in the link with the predetermined granularity is determined to be 1, for example, the channel is X1. Links can be allocated to the X16 target port at the predetermined granularity of X1 channels, resulting in 16 1-channel links. If the target device is a server, the number of channels in the link with the predetermined granularity is determined to be 2, for example, the channel is X2. Links can be allocated to the X16 target port at the predetermined granularity of X2 channels, resulting in 8 2-channel links.

[0060] According to embodiments of the present invention, link granularity is divided according to the device type of the target device, which can adapt to the different types of external expansion components. This allows all external expansion components connected to the target port to be identified using links of predetermined granularity, thereby improving the accuracy and versatility of external expansion component identification. Furthermore, determining the predetermined granularity of links based on device type improves flexibility and the efficiency of determining resource information for the target port.

[0061] The following describes how to determine the component information of the target extended component using a link of predetermined granularity.

[0062] According to an embodiment of the present invention, after performing the operations of determining a predetermined granularity and allocating links to target ports according to the predetermined granularity, the resource allocation method may further include the following operations.

[0063] For example, the request is sent through the link of the target port. Based on the acquired component information for the request and the port information of the target port, the component information of the target extension component connected to the target port is determined.

[0064] There is no restriction on the type of request, as long as it is sent over the link to the expansion component physically connected to the target port.

[0065] The request is used to request component information. Links are obtained by allocating channels of a predetermined granularity to the target ports. The component information of the target extended component can be determined from the component information in the request.

[0066] In the case where the number of channels of the link is less than the number of channels of the extended component, the same multiple component information for the request may be obtained.

[0067] The obtained component information for the request can be identified to obtain an identification result. If the identification result indicates that identical component information exists, the identical component information is deduplicated to obtain processed component information. Based on the processed component information and the port information of the target port, the component information connected to the target port is determined.

[0068] By deduplication processing, duplicate data is filtered out, reducing the amount of data for subsequent processing while improving the accuracy of determining the component information of the target extension component.

[0069] The component information may include component attribute information for characterizing the target extended component, but is not limited thereto, and may also include component function information, as long as the component information can uniquely identify the extended component.

[0070] Optionally, the component information may include addressing mechanism information of the expansion component. For example, when the expansion component is a PCIe device, the component information may include BDF (Bus, Device, Function) information.

[0071] The Bus Number can be an 8-bit field that represents the bus number that the PCIe device is on. The target port can support up to 256 buses.

[0072] Device Number can be a 5-bit field that represents the device number on a particular bus. Each bus supports up to 32 PCIe devices, which can be numbered from 0 to 31.

[0073] Function Number can be a 3-bit field used to indicate the function number of the PCIe device.

[0074] The BDF information may be used as component information, and based on the component information of the plurality of PCIe devices and the port information of the target port, the component information of the target expansion component connected to the target port may be determined.

[0075] According to an embodiment of the present invention, by utilizing a link of predetermined granularity that can establish communication with different PCIe devices, a request for obtaining component information is sent to multiple PCIe devices of different types. This allows each PCIe device to be quickly located, and the PCIe devices connected to the target port to be accurately screened, and at least one PCIe device connected to the target port to be used as a target extension component. This improves the recognition accuracy and efficiency of the target extension component, while also improving the comprehensiveness of the recognition of different types of PCIe devices, thereby improving the versatility of the resource allocation method.

[0076] Figure 3A A flowchart for determining component information according to an embodiment of the present invention is shown.

[0077] like Figure 3AAs shown, the X16 port can be assigned a predetermined granularity of X2 link 310 with lane 330, resulting in links 0 through 7. The PCIe devices 320 connected to the port include PCIe-1 for X2, PCIe-2 for X2, PCIe-3 for X4, and PCIe-4 for X8. A request is sent to the PCIe devices connected to the port via links 0 through 7, and eight pieces of feedback information are obtained based on the request for component information. Based on the eight pieces of feedback information, it is determined that the extended components include PCIe-1 for X2, PCIe-2 for X2, PCIe-3 for X4, and PCIe-4 for X8.

[0078] Figure 3B A flowchart of determining component information according to a related embodiment is shown.

[0079] like Figure 3B As shown, the number of channels of the port and the PCIe device 320 connected to the port are the same as Figure 3A Same as Figure 3A The difference is, Figure 3B In the example, links 310' are allocated to the port at the granularity of X4 lanes 330', resulting in links 0 through 3. A request is sent to the PCIe device 320 connected to the port via links 0 through 3, and four pieces of feedback information are obtained based on the request for component information. Based on these four pieces of feedback information, it is determined that the expansion components include PCIe-1 for X2, PCIe-3 for X4, and PCIe-4 for X8.

[0080] and Figure 3B Compared to the method of determining component information shown in Figure 3A As shown, by obtaining component information through a link of predetermined granularity, the PCIe device of the smallest granularity channel that may be connected to the port can be used to identify it, thereby avoiding loss of valid information, improving recognition accuracy, and improving recognition versatility.

[0081] The above describes how to obtain component information. The following describes how to determine the target extension component connected to the target port.

[0082] According to an embodiment of the present invention, the component information may include component attribute information.

[0083] For example, component attribute information may include information such as a bus number and a device number, but is not limited thereto. It may also include information about the corresponding relationship between the expansion component and the root port. Any information that characterizes the connection relationship between the expansion component and the port will suffice.

[0084] The root port information included in the component information of the extended component may be matched with the port information of the target port. If the root port information included in the component information matches the port information of the target port, the extended component may be determined to be the target extended component.

[0085] For example, taking the component information as: [0000:00]-00.0-1c.0-

[01] - 00.0 as an example, 0000:00 represents the port bus number of the port, 00 in 00.0 represents the port device number of the port, 0 in 00.0 represents the function number of the port, 1c in 1c.0 represents the device number of the extension component, and 0 in 1c.0 represents the device function number of the extension component;

[01] represents the bus number of another extension component, which is used to indicate that the extension component with bus number 01 is mounted under the extension component with device number 1c and function number 0.

[0086] In addition, the feedback information may further include: LnkCap: Port #0, Speed ​​8GT / s, Width x16. This feedback information may indicate that the maximum link capability of the PCIe device supports a speed of 8GT / s and a bandwidth of x16, and the port number is 0.

[0087] There is no limitation on the type of feedback information, as long as it can uniquely identify the extension component and represent the relationship between the extension component and the target port.

[0088] According to an embodiment of the present invention, resource information of a target port may be determined based on component information of a target extension component of the target port.

[0089] For example, the resource information of the target port may be determined based on component function information in the component information of the target extension component.

[0090] The component function information may represent information about the functions that the target extension component can extend, and resources used to run the target extension component may be determined based on the component function information.

[0091] Based on the component function information of the target extension component, the resource information of the target port is determined accurately and precisely.

[0092] According to another embodiment of the present invention, a configuration relationship between a target extension component and a target port may be determined, and resource information of the target port may be determined based on the configuration relationship and component function information of the target extension component.

[0093] For example, the weight is determined based on the configuration relationship, and the resource information of the target port is determined based on the weight and component function information, for example, by performing a weighted summation on the weight and component function information.

[0094] Determining the target port's resource information based on the configuration relationship and component function information can improve the effectiveness of determining the target port's resource information by combining the configuration relationship between the target extension component and the target port based on the component function information. This avoids the problem of insufficient allocated resources caused by connecting through an extension connector.

[0095] Exemplarily, based on the configuration relationship, it can be determined that the target extension component includes a root extension component and a child extension component.

[0096] It can be understood that the root extension component is connected to the target port, and the child extension component is connected to the target port through the extension connector.

[0097] Determining the resource information of the target port may include: obtaining resource information about the target port in the resource configuration information based on component function information of the root extension component and component function information of the child extension component.

[0098] The component function information of the root extension component and the component function information of the child extension component can be directly added to obtain the resource information about the target port in the resource configuration information, but the present invention is not limited thereto.

[0099] You can also determine the resource information of the target port in the following manner.

[0100] For example, based on the resource type of the resource, the weights of the root extension component and the sub-extension component are determined. Based on the weights of the root extension component and the sub-extension component and the component function information of the root extension component and the sub-extension component, the resource information about the target port in the resource configuration information is obtained.

[0101] Different weights are set for the root extension component and the sub-extension component. The component function information of the root extension component and the component function information of the sub-extension component are weighted and summed to obtain resource information about the target port in the resource configuration information.

[0102] Optionally, when the resource is bandwidth, the aforementioned weighted summation method can be used to obtain the target port's resource information. However, this is not limiting. Different methods can also be developed based on the resource type to determine the target port's resource information. Any method that can obtain the target port's resource information based on the component function information of the root extension component and the component function information of the child extension component will suffice.

[0103] It should be noted that resource configuration information can be generated based on the resource information of the target port. For example, the resource information of the target port can be directly used as the resource configuration information. However, this is not limiting. If the target device includes multiple ports, resource configuration information can also be generated based on the resource information of each of the multiple ports. This is sufficient as long as the resource configuration information includes the resource information of each of the multiple ports installed on the target device.

[0104] According to an embodiment of the present invention, the resource type is combined with the component function information of the target extension component to determine the resource information of the target port, which is then combined with the hardware scenario to determine different calculation methods based on different configuration relationships, thereby improving the accuracy of resource configuration while increasing targeting.

[0105] The above describes how to determine resource configuration information. The following describes how to determine the reference factor-configuration relationship of resource configuration information.

[0106] Alternatively, the port information in the component information and the port information of the target port can be used to determine whether the extension component is the target extension component of the target port. However, this is not limiting. Alternatively, the port information in the component information can be used to determine whether the target port and the target extension component are directly connected.

[0107] For example, determining component information of a target extension component connected to the target port based on the obtained component information for the request and the port information of the target port may include determining a configuration relationship between the target extension component and the target port based on the obtained component information for the request and the port information of the target port. The configuration relationship indicates whether the target extension component is directly connected to the target port.

[0108] Direct connection can mean connection without an expansion connector. For example, the target expansion component is directly plugged into the slot of the target port. Indirect connection can mean connection through an expansion connector.

[0109] When the target port is directly connected to the target extension component, the target extension component is the root extension component of the target port. When the target port is connected to the target extension component through an extension connector, the target extension component is the child extension component of the target port.

[0110] Based on the configuration relationship, the connection relationship between the target extension component and the target port can be determined, and the resource information of the target port can be determined.

[0111] According to an embodiment of the present invention, by utilizing component attribute information in component information and port information of the target port, known information can be rationally utilized to determine not only whether a connection relationship exists between the extension component and the target port, but also whether the connection is direct. This improves the accuracy and effectiveness of determining the resource information of the target port.

[0112] The multiple ports configured on the target device may include the target port or other ports in addition to the target port, as long as they are ports configured on the target device.

[0113] In the case where the target device is provided with multiple ports, resource configuration information including resource information of each of the multiple ports may be determined in the following manner, thereby improving determination efficiency and accuracy.

[0114] According to an embodiment of the present invention, the resource allocation method may also determine resource configuration information in the following manner.

[0115] A request is sent via a link across multiple ports. The request is for component information, and the link is obtained by allocating channels of predetermined granularity to multiple ports. Component configuration information is determined based on the acquired component information for the request and the port information for each port. Resource configuration information is determined based on the component configuration information and component function information for the extension components connected to each port.

[0116] The expansion components connected to the plurality of ports respectively respond to the request and feed back component information via the link. The component information corresponding to the request is received via the link of the port.

[0117] The component configuration information may include the connection relationship between each port and each expansion component and the component information of each expansion component.

[0118] In this way, by sending requests to the links of multiple ports simultaneously, complete and comprehensive information can be obtained, thereby improving the effect of determining resource configuration information.

[0119] Exemplarily, when the component configuration information includes a structure tree, a structure tree may be generated for the requested component information.

[0120] For example, based on the obtained component information for the request and the port information of each port, the component configuration information is determined, which may include: determining the component node used to represent the extended component based on the component identifier in the component information. Determining the port node used to represent the port based on the port identifier in the port information. Determining the connection relationship between the extended component and the port based on the component information and the port information. Determining the edge used to represent the connection between the port and the extended component based on the connection relationship. Generate a structure tree based on the port nodes, component nodes and edges. The connection relationship represents whether the port and the extended component are connected. The nodes of the structure tree can represent the port and the extended component. The association relationship between multiple nodes can be represented by the edges of the structure tree. The extended component physically connected to the root port is the root extended component. The extended component connected to the root port through an extended connector is a child extended component.

[0121] Exemplarily, the resource configuration information may be determined by the following operations:

[0122] A request is sent through a link of multiple ports. A configuration relationship between the port and the expansion component is determined based on the obtained component information for the request and the port information of each of the multiple ports. Component configuration information is generated based on the configuration relationship and the component information of the expansion component.

[0123] The component configuration information may include a structure tree or a component configuration table. The component configuration information may include the configuration relationship between the port and the extended component, but is not limited thereto and may also include component information of the extended component.

[0124] Optionally, when the component configuration information includes a structure tree, generating the component configuration information based on the configuration relationship and the component information of the extended component may include: using the extended component and the port as nodes, respectively; and when it is determined based on the configuration relationship that the extended component and the port are directly connected, setting an edge between the node representing the extended component and the node representing the port. When it is determined based on the configuration relationship that the extended component and the port are not directly connected, setting a connector node representing the extended connector between the node representing the extended component and the node representing the port, and setting edges between the node representing the extended component and the node representing the extended connector, and between the node representing the port and the node representing the extended connector. A structure tree is obtained based on the nodes and edges. A connector node representing the extended connector may be determined based on the connector identifier of the extended connector. A structure tree is generated based on the connector node, the port node, the component node, the edge connecting the connector node and the port node, the edge connecting the connector node and the component node, and the node attributes of the component node.

[0125] Based on the component configuration information, the component function information of multiple extension components connected to the port is weighted and summed to determine the resource information of the port. Based on the resource information of each of the multiple ports, the resource configuration information including the resource information of the target port is determined.

[0126] The multiple ports include a target port. The configuration relationship may include whether the component and the extension component are connected, and if connected, whether the component and the extension component are directly connected.

[0127] The node attributes may include component information of the extended component, but are not limited thereto. They may also include attribute identifiers used to characterize the component information of the extended component. As long as the node attributes are determined based on the component information of the extended component, they are sufficient.

[0128] Figure 4A A schematic diagram of a structure tree according to an embodiment of the present invention is shown.

[0129] like Figure 4A As shown, the structure tree may include component nodes, such as first component node 401 and second component node 405, represented by circles. It also includes port node 402, represented by a rectangular box. First component node 401 and port node 402 are directly connected, as represented by edge 403, which represents the connection relationship. Port node 402 and second component node 405 are indirectly connected, but are indirectly connected via connector component 404, represented by a triangle.

[0130] According to an embodiment of the present invention, the structure tree generated in the above manner can increase the information volume of the structure tree, ensure the integrity of the structure tree as component configuration information, and improve the visualization effect.

[0131] A structure tree can be generated based on component information and target port information. A structure tree can be generated based on the configuration relationships between all expansion components and ports, but this is not limited to this. A configuration table can also be generated based on the configuration relationships between target expansion components and target ports.

[0132] For example, the component configuration information includes a component configuration table.

[0133] When the component configuration information includes a component configuration table, determining the component configuration information based on the acquired component information for the request and the port information of each port may include: determining a connection relationship between the port and the extended component based on the component information and the port information; and generating the component configuration table based on the connection relationship between the port and the extended component, component information in the component information, such as the port information in the component information, and the port information.

[0134] Figure 4BA schematic diagram of a component configuration table according to an embodiment of the present invention is shown.

[0135] like Figure 4B As shown, the component configuration table includes the port information of the root port, such as the root port's port device number 410 and the root port identifier 420. Based on the root port's port device number 410 and identifier 420, it can be determined whether the corresponding extension component is the target extension component of the root port.

[0136] The component configuration table may also include component information, such as the component device number 430 of the extended component, but is not limited to this. It may also include component function information 440 of the extended component and a configuration relationship 450 indicating whether it is directly connected. The directly connected configuration relationship 450 can be represented by identifier 0, and the not directly connected configuration relationship can be represented by identifier 1.

[0137] Based on all component information, you can determine all configuration relationships between ports and extension components, generating a component configuration table or structure tree. When determining resource configuration information or generating new versions of resource configuration information, you can directly obtain the corresponding information from the component configuration table or structure tree. By aggregating all data, you can improve the processing efficiency and accuracy of subsequent operations.

[0138] According to an embodiment of the present invention, component information is used to jointly determine the configuration relationship between the target port and the target extension component, and known information is reasonably used to improve processing efficiency while increasing the accuracy of resource information of the target port.

[0139] The component information of the target extension component of the target port can be determined from the structure tree or the configuration table. The resource information of the target port is determined based on the configuration relationship and the component function information in the component information of the target extension component. The resource configuration information is generated based on the resource information of the target port.

[0140] Figure 5 A schematic diagram of a resource configuration table according to an embodiment of the present invention is shown.

[0141] like Figure 5 As shown, a resource configuration table may be generated as resource configuration information, in which information such as actual links 510 used by target expansion components, such as PCIe1, PCIe2, and PCIe3 devices, and resources 520 allocated to corresponding links are identified.

[0142] The actual links used by PCIe1 components are Link 0 and Link 1. The actual links used by PCIe2 components are Link 2 and Link 3. The actual links used by PCIe3 components are Link 4 to Link 7.

[0143] Taking bandwidth as an example, the bandwidth allocated to the PCIe component connected to the target port is x4, the bandwidth allocated to the PCIe2 component is x4, and the bandwidth allocated to the PCIe3 component is x8.

[0144] This makes the resource allocation information comprehensive and accurate.

[0145] The above section explains how to determine the resource configuration information of the target port. The following section explains how to obtain the resource configuration information.

[0146] According to an embodiment of the present invention, obtaining resource configuration information includes obtaining the resource configuration information from a predetermined storage space. However, the present invention is not limited thereto. Obtaining resource configuration information may also include obtaining the resource configuration information from the predetermined storage space upon detecting that the first identifier representing the component has not been updated.

[0147] The resource configuration information may be stored in a predetermined storage space, and during the server startup process, the resource configuration information may be read from the predetermined storage space.

[0148] Optionally, the predetermined storage space may include a BMC storage medium, but is not limited thereto. It may also include a memory, as long as it can store resource configuration information.

[0149] During server startup or at predetermined intervals, the BMC processor can detect hardware, such as a target expansion component, to determine whether the target expansion component has been updated. If a first identifier indicating that the component has not been updated is detected, it can be determined that the target expansion component has not been updated and that the resource configuration information stored in the reserved storage space is the latest version of the resource configuration information. Resource allocation can then be performed directly based on this resource configuration information.

[0150] The first identifier may be stored in a storage space, and there is no limitation as long as it can be identified.

[0151] According to an embodiment of the present invention, compared with the method of directly allocating resources according to resource configuration information, allocating resources according to resource configuration information after determining that the component has not been updated can be combined with the component characteristics of the target extension component, such as easy-to-plug characteristics, to improve the accuracy and effectiveness of the resource configuration information.

[0152] The above section explains how to obtain resource configuration information in detail. The following section explains how to update resource configuration information.

[0153] According to an embodiment of the present invention, when it is detected that the second identifier used to represent a component has been updated, resource configuration information can be re-determined so that resources are allocated according to the new resource configuration information, thereby improving the accuracy and effectiveness of the resource configuration information.

[0154] According to another embodiment of the present invention, when a second identifier used to indicate that a component has been updated is detected, updated resource configuration information is determined. When it is determined that the updated resource configuration information does not match the resource configuration information, the resource configuration information is updated using the updated resource configuration information.

[0155] If it is determined that the updated version of the resource configuration information is not identical to the resource configuration information, it is determined that the updated version of the resource configuration information does not match the resource configuration information.

[0156] For example, if the resource information of the target port in the updated resource configuration information is different from the resource information of the target port in the resource configuration information, it can be determined that the two do not match. Alternatively, if the resource information of the expansion connector connected to the target port in the updated resource configuration information is different from the resource information of the expansion connector connected to the target port in the resource configuration information, it can be determined that the two do not match.

[0157] Optionally, the updated resource configuration information and the resource configuration information may be determined in the same manner.

[0158] Using the second identifier to determine whether the component has been updated can preliminarily determine whether the resource configuration information is valid, and using whether the updated version of the resource configuration information matches the resource configuration information to determine again whether the resource configuration information is valid. Multiple judgment results can be used to jointly determine whether the resource configuration information is valid, thereby making the update of the resource configuration information accurate and avoiding invalid processing of data.

[0159] Optionally, the updated resource configuration information can be determined in the same manner as the resource configuration information. However, this is not limiting. A different determination method can also be used to determine the updated resource configuration information, as long as the updated resource configuration information can be accurately and in real time determined.

[0160] According to other embodiments of the present invention, after determining the resource configuration information, the resource allocation method may further perform the following operations at predetermined time intervals.

[0161] For example, an identifier is obtained from a baseboard management controller (BMC) to indicate whether an expansion component has been updated. The identifier is determined based on a component update request received by the BMC and carries component attribute information of the updated expansion component. Upon detecting a second identifier indicating that the component has been updated, a request is sent via a link between multiple ports. The request is for component information, and the link is obtained by allocating a channel of predetermined granularity to the multiple ports. Based on the obtained component information for the request and the port information of each of the multiple ports, component configuration information is generated to indicate the configuration relationship between the expansion component and the port. Based on the component configuration information and the component information of the expansion component connected to the port, resource information of the port is determined. Based on the resource information of the port, updated resource configuration information is determined. The resource configuration information is obtained from a predetermined storage space. The updated resource configuration information is compared with the resource configuration information to obtain a comparison result. If, based on the comparison result, the updated resource configuration information is determined to be mismatched with the resource configuration information, the resource configuration information is updated using the updated resource configuration information.

[0162] Optionally, the component configuration information may include a structure tree or a component configuration table.

[0163] By using a link with a predetermined granularity to communicate with the expansion components connected to multiple ports, a request for component information is sent. Multiple expansion components of different types can be identified based on the obtained component information. This improves the accuracy and versatility of identifying updated expansion components. Furthermore, updated resource configuration information is determined based on the component configuration information, thereby improving the comprehensiveness and accuracy of the updated resource configuration information.

[0164] The following explains how to determine whether an extension has been updated.

[0165] According to an embodiment of the present invention, before obtaining resource configuration information, the resource allocation method may further include: determining whether the extension component has been updated. If it is determined that the extension component has been updated, an identifier indicating whether the extension component has been updated is updated. For example, if the extension component has not been updated, the identifier is a first identifier. If the extension component has been updated, the identifier is updated to a second identifier.

[0166] Updating the identifier can include modifying the component attribute information used to represent the extended component as needed. The component attribute information can be represented as an array, where each element represents the identifier of a boot device. These identifiers are automatically generated unique strings that represent specific boot devices, such as hard drives and USB devices.

[0167] The component attribute information can be sent to the BMC processor in the form of a request. After receiving feedback information indicating that the information has been received in response to the request, the BMC processor determines that the information has been received. Correspondingly, the BMC processor updates the identifier stored in the BMC memory for indicating whether the component is updated.

[0168] Based on the above resource allocation method, the present invention also provides a resource allocation device. Figure 6 The device is described in detail.

[0169] Figure 6 A structural block diagram of a resource allocation device according to an embodiment of the present invention is shown.

[0170] like Figure 6 As shown, the resource allocation device 600 of this embodiment includes an acquisition module 610 and an allocation module 620 .

[0171] The acquisition module 610 is configured to acquire resource configuration information. In one embodiment, the acquisition module 610 may be configured to execute the operation S201 described above, which will not be described in detail herein.

[0172] The allocation module 620 is configured to allocate resources to the target port according to the resource configuration information. The target port is connected to the target extension component. In one embodiment, the allocation module 620 can be configured to perform the operation S202 described above, which will not be described in detail here.

[0173] The resource configuration information includes resource information of the target port, and the resource information is determined based on component information of the target extension component.

[0174] The component information is determined in the following manner: sending a request through a link of a target port, wherein the request is used to request component information, and the link is obtained by allocating a channel of a predetermined granularity to the target port, and the granularity represents the number of channels in the link; and determining the component information of a target extension component connected to the target port based on the obtained component information for the request and the port information of the target port.

[0175] According to an embodiment of the present invention, the target extension component includes a root extension component and a sub-extension component. The root extension component is connected to the target port, and the sub-extension component is connected to the target port via an extension connector.

[0176] According to an embodiment of the present invention, the resource allocation apparatus further includes a first resource configuration module.

[0177] The first resource configuration module is configured to obtain resource information about the target port in the resource configuration information based on the component function information of the root extension component and the component function information of the child extension component. The component information includes the component function information.

[0178] According to an embodiment of the present invention, the first resource configuration module includes: a weight determination submodule and a resource configuration submodule.

[0179] The weight determination submodule is used to determine the weights of the root extension component and the sub-extension component based on the resource type of the resource. The resource configuration submodule is used to obtain resource information about the target port in the resource configuration information based on the weights of the root extension component and the sub-extension component and the component function information of the root extension component and the sub-extension component.

[0180] According to an embodiment of the present invention, determining the component information of the target extension component connected to the target port based on the obtained component information for the request and the port information of the target port includes: performing information identification on the obtained component information for the request to obtain an identification result; when the identification result indicates the existence of identical component information, deduplicating the identical component information to obtain processed component information; and determining the component information connected to the target port based on the processed component information and the port information of the target port.

[0181] According to an embodiment of the present invention, the first component determination module includes: a first relationship determination submodule.

[0182] The first relationship determination submodule is configured to determine a configuration relationship between a target extension component and a target port based on the requested component information and the port information of the target port, wherein the configuration relationship indicates whether the target extension component and the target port are directly connected.

[0183] According to an embodiment of the present invention, the resource allocation apparatus further includes a granularity determination module.

[0184] The granularity determination module is configured to determine a predetermined granularity based on a device type of a target device where the target port is located.

[0185] According to an embodiment of the present invention, the resource allocation apparatus further includes: a second request module, a second component determination module, and a second resource configuration module. The second request module is configured to send a request via a link between multiple ports. The request is used to request component information, and the link is obtained by allocating channels of predetermined granularity to the multiple ports. The second component determination module is configured to determine component configuration information based on the acquired component information for the request and the port information of each port. The second resource configuration module is configured to determine resource configuration information based on the component configuration information and component function information of the extension components connected to each port.

[0186] According to an embodiment of the present invention, the component configuration information includes a structure tree.

[0187] According to an embodiment of the present invention, the second component determination module includes: a first node determination submodule, a second node determination submodule, a second relationship determination submodule, an edge determination submodule, and a first generation submodule.

[0188] The first node determination submodule is configured to determine a component node representing an extended component based on a component identifier in the component information. The second node determination submodule is configured to determine a port node representing a port based on a port identifier in the port information. The second relationship determination submodule is configured to determine a connection relationship between an extended component and a port based on the component information and the port information, where the connection relationship indicates whether the extended component and the port are connected. The edge determination submodule is configured to determine an edge representing a connection between a port and an extended component based on the connection relationship. The first generation submodule is configured to generate a structure tree based on the port nodes, component nodes, and edges.

[0189] According to an embodiment of the present invention, the first generating submodule includes: a node determining unit and a generating unit.

[0190] The node determination unit is configured to, when it is determined based on the connection relationship that the port and the extended component are connected via an extended connector, determine a connector node representing the extended connector based on the connector identifier of the extended connector. The generation unit is configured to generate a structure tree based on the connector node, the port node, the component node, the edge connecting the connector node and the port node, the edge connecting the connector node and the component node, and the component node attributes of the component node. The component node attributes are determined based on the component information of the extended component.

[0191] According to an embodiment of the present invention, the component configuration information includes a component configuration table.

[0192] The second component determination module includes a third relationship determination submodule and a second generation submodule. The third relationship determination submodule is configured to determine a connection relationship between a port and an extended component based on the component information and the port information. The second generation submodule is configured to generate a component configuration table based on the connection relationship between the port and the extended component, the component function information in the component information, and the port information.

[0193] According to an embodiment of the present invention, the acquisition module includes: an acquisition submodule.

[0194] The acquisition submodule is configured to acquire resource configuration information from a predetermined storage space when it is detected that the first identifier used to represent that the component has not been updated.

[0195] According to an embodiment of the present invention, the resource configuration device further includes: an identifier acquisition module, a third request module, a third component determination module, a third resource configuration module, a first update module, a comparison module and a second update module.

[0196] The identifier acquisition module is configured to obtain, from the baseboard management controller, an identifier indicating whether an extended component has been updated. The identifier is determined based on a component update request received by the baseboard management controller and carries component attribute information of the updated extended component. The third request module is configured to, upon detecting a second identifier indicating that a component has been updated, send a request via a link between multiple ports. The request is for component information, and the link is obtained by allocating channels of a predetermined granularity to multiple ports. The third component determination module is configured to generate component configuration information indicating the configuration relationship between the extended component and the port based on the obtained component information for the request and the port information of each of the multiple ports. The third resource configuration module is configured to determine the resource information of the port based on the component configuration information and the component information of the extended component connected to the port. The first update module is configured to determine updated resource configuration information based on the resource information of the port. The comparison module is configured to compare the updated resource configuration information with the resource configuration information to obtain a comparison result. The second update module is configured to update the resource configuration information using the updated resource configuration information if, based on the comparison result, the updated resource configuration information and the resource configuration information do not match.

[0197] According to embodiments of the present invention, any multiple modules in the acquisition module 610 and the allocation module 620 can be combined into a single module, or any one of them can be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules can be combined with at least part of the functionality of other modules and implemented in a single module. According to embodiments of the present invention, at least one of the acquisition module 610 and the allocation module 620 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented in hardware or firmware through any other reasonable means of circuit integration or packaging, or can be implemented in any one of the three implementation methods of software, hardware, and firmware, or any appropriate combination of any of these. Alternatively, at least one of the acquisition module 610 and the allocation module 620 can be at least partially implemented as a computer program module that, when executed, performs the corresponding functionality.

[0198] The present invention also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments, or may exist independently and not incorporated into the device / apparatus / system. The computer-readable storage medium carries one or more programs, which, when executed, implement the method according to the embodiments of the present invention.

[0199] According to an embodiment of the present invention, a computer-readable storage medium may be a non-volatile computer-readable storage medium, such as, but not limited to, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0200] The embodiments of the present invention further include a computer program product, which includes a computer program containing program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to cause the computer system to implement the method provided by the embodiments of the present invention.

[0201] When the computer program is executed by a processor, the above functions defined in the system / device of the embodiment of the present invention are performed. According to the embodiment of the present invention, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0202] In one embodiment, the computer program may be stored on a tangible storage medium, such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may be transmitted and distributed in the form of a signal over a network medium, downloaded and installed via a communication component, and / or installed from a removable medium. The program code contained in the computer program may be transmitted using any suitable network medium, including but not limited to wireless, wired, or any suitable combination thereof.

[0203] In such an embodiment, the computer program can be downloaded and installed from a network via the communication portion, and / or installed from a removable medium. When the computer program is executed by the processor, the above-described functions defined in the system of the embodiment of the present invention are performed. According to the embodiment of the present invention, the systems, devices, means, modules, units, etc. described above can be implemented by computer program modules.

[0204] According to an embodiment of the present invention, the program code for executing the computer program provided by the embodiment of the present invention can be written in any combination of one or more programming languages. Specifically, these computer programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, languages ​​such as Java, C++, Python, "C" or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect via the Internet).

[0205] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0206] It will be understood by those skilled in the art that the features described in the various embodiments of the present invention may be combined and / or coupled in various ways, even if such combinations or couplings are not explicitly described in the present invention. In particular, the features described in the various embodiments of the present invention may be combined and / or coupled in various ways without departing from the spirit and teachings of the present invention. All such combinations and / or couplings fall within the scope of the present invention.

Claims

1. A resource allocation method, characterized in that: The method comprises: Obtain resource configuration information; and Allocating resources to a target port according to the resource configuration information, wherein the target port is connected to a target extension component; Wherein, the resource configuration information includes resource information of the target port; The resource information of the target port is determined in the following manner: Sending a request through a link of the target port, wherein the request is for requesting component information, the link being obtained by allocating channels of a predetermined granularity to the target port, the granularity representing the number of channels in the link; determining component information of the target extension component connected to the target port based on the obtained component information for the request and the port information of the target port; the target extension component includes a root extension component and a child extension component, the root extension component being connected to the target port, and the child extension component being connected to the target port via an extension connector; Determining the root extension component and the child extension component from the target extension component based on a configuration relationship between the target extension component and the target port, wherein the configuration relationship indicates whether the target extension component and the target port are directly connected, and the configuration relationship is determined based on component information for the request and port information of the target port; The resource information about the target port in the resource configuration information is obtained based on the component function information of the root extension component and the component function information of the child extension component, wherein the component information includes component function information.

2. The method according to claim 1, characterized in that The obtaining, based on the component function information of the root extension component and the component function information of the child extension component, resource information about the target port in the resource configuration information includes: Determining the respective weights of the root extension component and the child extension component based on the resource type of the resource; and The resource information about the target port in the resource configuration information is obtained based on the respective weights of the root extension component and the sub-extension component and the respective component function information of the root extension component and the sub-extension component.

3. The method according to claim 1, characterized in that The determining, based on the acquired component information for the request and the port information of the target port, the component information of the target extension component connected to the target port includes: Performing information identification on the obtained component information for the request to obtain an identification result; If the recognition result indicates that identical component information exists, deduplication of the identical component information is performed to obtain processed component information; and Based on the processed component information and the port information of the target port, the component information connected to the target port is determined.

4. The method according to claim 3, characterized in that The step of determining the component information of the target extension component connected to the target port based on the acquired component information for the request and the port information of the target port further includes: Based on the component information for the request and the port information of the target port, a configuration relationship between the target extension component and the target port is determined.

5. The method according to claim 1, wherein The method further comprises: Sending a request through a link of multiple ports, wherein the request is for requesting component information, and the link is obtained by allocating channels of the predetermined granularity to the multiple ports; Determining component configuration information based on the acquired component information for the request and the port information of each of the ports; and The resource configuration information is determined based on the component configuration information and component function information of the extension components connected to each of the ports.

6. The method according to claim 5, characterized in that The component configuration information includes a structure tree; The determining component configuration information based on the acquired component information for the request and the port information of each port includes: Determining a component node for representing the extended component based on the component identifier in the component information; Determining a port node for representing the port based on the port identifier in the port information; Determining a connection relationship between the extension component and the port based on the component information and the port information, wherein the connection relationship indicates whether the extension component is connected to the port; Based on the connection relationship, determining an edge for representing the connection between the port and the expansion component; and The structure tree is generated based on the port nodes, the component nodes and the edges.

7. The method according to claim 6, characterized in that The generating the structure tree based on the port nodes, the component nodes and the edges includes: When it is determined based on the connection relationship that the port and the expansion component are connected via an expansion connector, determining a connector node for representing the expansion connector based on the connector identifier of the expansion connector; The structure tree is generated based on the connector node, the port node, the component node, the edge connecting the connector node and the port node, the edge connecting the connector node and the component node, and the component node attributes of the component node, wherein the component node attributes are determined based on the component information of the extended component.

8. The method according to claim 5, characterized in that The component configuration information includes a component configuration table; The determining component configuration information based on the acquired component information for the request and the port information of each port includes: Determining a connection relationship between a port and an extended component based on the component information and the port information; and The component configuration table is generated based on the connection relationship between the port and the extended component, the component function information in the component information, and the port information.

9. The method according to claim 1 or 3, characterized in that The method further comprises: The predetermined granularity is determined based on a device type of a target device at which the target port is located.

10. The method according to claim 1, characterized in that The obtaining of resource configuration information includes: In the case of detecting that the first identifier used to represent that the component is not updated, the resource configuration information is obtained from a predetermined storage space.

11. The method according to claim 1 or 10, characterized in that The method further comprises: Obtaining, from a baseboard management controller, an identifier for indicating whether the extended component has been updated, wherein the identifier is determined based on a component update request, the component update request received by the baseboard management controller carrying component attribute information of the updated extended component; When a second identifier for indicating that a component has been updated is detected, sending a request for component information through a link of a plurality of ports, wherein the link is obtained by allocating channels of the predetermined granularity to the plurality of ports; generating component configuration information for characterizing a configuration relationship between an extended component and a port based on the acquired component information for the request and the port information of each of the plurality of ports; Determining resource information of the port based on the component configuration information and component information of the extended component connected to the port; Determining updated resource configuration information based on the resource information of the port; Comparing the updated resource configuration information with the resource configuration information to obtain a comparison result; and If it is determined based on the comparison result that the updated version of the resource configuration information does not match the resource configuration information, the resource configuration information is updated using the updated version of the resource configuration information.

12. A server comprising: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 11.

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

14. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.

Citation Information

Patent Citations

  • Bus bandwidth allocation method and device, server, electronic equipment and storage medium

    CN119166560A