Resource allocation method, server, storage medium and program product

By acquiring and analyzing resource configuration information and combining channel allocation with predetermined granularity, the problem of inflexible resource allocation in the prior art is solved, and more efficient resource utilization and adaptability are achieved.

CN119621349AActive Publication Date: 2025-03-14INSPUR SUZHOU INTELLIGENT TECH CO LTD

Patent Information

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

AI Technical Summary

Technical Problem

In the prior art, when allocating server resources, it is difficult to flexibly adjust resource allocation, resulting in resource waste and functional loss, especially when different types of extension components are plugged in.

Method used

By obtaining resource configuration information, including resource information of the target port, determining resource configuration information based on component information of the target extension component, and allocating resources through a channel of a predetermined granularity, to achieve more flexible resource allocation.

Benefits of technology

Improve the adaptability and efficiency of resource allocation, avoid resource waste, and ensure the best utilization of processor functions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119621349A_ABST
    Figure CN119621349A_ABST
Patent Text Reader

Abstract

The invention provides a resource allocation method, a server, a storage medium and a program product, which can be applied to the technical field of servers. The resource allocation method comprises the following steps: acquiring resource configuration information; performing resource allocation on a target port according to the resource configuration information, wherein the target port is connected with the target extension component; the resource configuration information comprises resource information of the target port, the resource information is determined based on component information of the target extension component, and the component information is determined by the following steps: sending a request through a link of the target port, the request being used for requesting the component information, the link being obtained by allocating a channel with a predetermined granularity to the target port, and the channel being used for allocating the component information to the target port; the granularity represents the number of channels in the link; and based on the obtained component information for the request and the port information of the target port, determining component information of a target extension component connected with 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, a server, a storage medium and a program product. Background Art

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

[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, there is provided a resource allocation method, 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, the link is obtained by allocating a channel of a predetermined granularity to the target port, the granularity representing 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, used to acquire resource configuration information; an allocation module, used to allocate 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 on which a computer program or instruction is stored, and the steps of the above method are implemented when the above computer program or instruction is executed by a processor.

[0009] The fifth aspect of the present invention also provides a computer program product, including 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 showing 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] Below, 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 concepts 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 existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.

[0021] All terms (including technical and scientific terms) used herein 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 using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression 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 a memory 110, a processor 120, a baseboard management controller (BMC) 130 and other components. However, it is not limited thereto. It may also include an expansion component 150 connected via a port 140. Those skilled in the art will understand 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 those shown in the figure, or combine certain components, or arrange the components differently.

[0025] Combine the following 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 when the storage processor 120 runs the operating system instructions to execute various functional applications of the server 100. Among them, the data instructions are used to indicate the operation instructions of the method flow. Optionally, the memory 110 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0027] It should be noted that Figure 1 This is only 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, and uses various interfaces and lines to connect various components, and executes various functions of the server 100 and processes data by running or executing operating system instructions stored in the memory 110, and calling data stored in the memory 110, thereby realizing 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 devices, which are not limited here.

[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. BMC 130 can also record various hardware information and logs to prompt users who use the server 100 and locate faults. It should be noted that BMC 130 is an independent device. It does not rely on other hardware in the server 100 (such as the processor 120 or the memory 110, etc.), nor does it rely 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, and interacts with the OS through the BMC processor 132, which can play a better management role. BMC storage medium 131 is used to store instructions required by BMC 130 when running and data generated when running, such as resource configuration information in the embodiment of the present invention. The BMC storage medium 131 can be a flash memory (flash), a random access memory (RAM), or a read-only memory (ROM), etc., which is not limited here.

[0030] The server 100 also includes a PCIe type 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 through the port 140 in the server 100 and the expansion component 150, 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] Port 140 on the server generally uses a PCIe x8 slot or a PCIe x16 slot, which is convenient for later plugging in different types of expansion components 150. 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 the PCIe x8 slot and the PCIe x16 slot with the maximum resources, such as bandwidth, which results in that the allocated resources cannot be flexibly adjusted when the expansion component 150 with a small number of lanes is inserted. For example, when the x8 expansion component 150 is plugged into the PCIe x16 port, the processor still allocates the maximum resources to the 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 function.

[0035] In view of this, an embodiment of the present invention provides a resource allocation method. In the resource allocation method provided by the embodiment of the present invention, different types of expansion components plugged into the server can be automatically identified, and based on the component information of the expansion components, resource configuration information of the target port is generated, so that the resource configuration information is used to reasonably configure resources for the target port, thereby improving the adaptability between the allocated resources and the target port and avoiding the problem of resource waste.

[0036] The technical solution provided by the embodiment of the present invention is described in detail below with reference to the accompanying drawings. In the following introduction, the technical solution provided by the present invention is applied to Figure 1 As an example, the method can be performed by Figure 1 The processor 120 in the server 100 is shown to call the computer program stored in the memory 110 for execution. In the following description, the method is described by taking the example that the processor of the server calls 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. The target port may include a root port directly in the server, or a sub-port physically connected to the root port through an expansion connector such as a riser (vertical network card).

[0044] The target expansion component may include a PCIe device, such as a graphics processor, a network card, a solid-state drive, a host bus adapter, etc. Any expansion component that is physically connected to the target port will do.

[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 the target port via an expansion connector.

[0046] The resource configuration information may include resource information of the target port. The resource information is determined based on the component information of the target extension component. The component information is obtained via a link (link) with a predetermined granularity of the target port (port). The granularity characterizes the number of channels (lanes) in the link (lane).

[0047] Exemplarily, the resource may include bandwidth, but is 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 expansion component, and can indicate the resource information required for running the target expansion component. Allocating resources for the target port can indicate allocating resources for the target expansion component through the target port. Configuring resources for the target port according to the resource configuration information can improve the adaptability between the target expansion component that the resources allocated are connected to the target port, avoid the problem that causes 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 can be established with different types of expansion components through links of predetermined granularity. Component information about expansion components transmitted by expansion components connected to the link is obtained through the link of the target port, thereby obtaining component information of all expansion components connected to the target port as component information of the target expansion component.

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

[0052] In addition, during each startup of the server, there is no need to redetermine the resource configuration information. Instead, the resource configuration information needs to be obtained and resources allocated to the target port according to the resource configuration information, thereby improving allocation efficiency and avoiding repeated operations of determining resource configuration information.

[0053] In addition, the component information is determined by sending a request through a link of the 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, and the granularity represents the number of channels in the link. Based on the obtained 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.

[0054] By allocating the target port to a link of a predetermined granularity, and thereby obtaining information fed back by an 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, and 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 the operation S201 shown, 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 is used to characterize the device attribute information of the target device. For example, the device type can be divided according to the device type, such as the device type including computer type, server type such as cloud computing server type, etc. However, it is not limited to this. The device type can also be divided according to the device purpose, such as image processing, data storage, etc. As long as it can distinguish different multiple target devices.

[0059] For example, when the device type of the target device is a computer type, the number of channels in the link with a predetermined granularity of 1 is determined, for example, the channel is X1. The target port of X16 can be allocated a link with a predetermined granularity of X1 channel, and 16 links with 1 channel are obtained. When the device type of the target device is a server type, the number of channels in the link with a predetermined granularity of 2 is determined, for example, the channel is X2. The target port of X16 can be allocated a link with a predetermined granularity of X2 channel, and 8 links with 2 channels are obtained.

[0060] According to an embodiment of the present invention, the granularity of the link is divided according to the device type of the target device, which can be adapted to different multiple component types of the external expansion component, and then all external expansion components connected to the target port can be identified using the link of the predetermined granularity to obtain the target expansion component, thereby improving the accuracy and versatility of identifying the external expansion component. In addition, determining the predetermined granularity of the link according to the device type can improve the flexibility and efficiency of determining the resource information of the target port.

[0061] The following will describe how to determine the component information of the target extended component using a link of a 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] The type of request is not limited, as long as it is sent over the link to the expansion component that is physically connected to the target port.

[0065] The request is used to request component information. The link is obtained by allocating channels of predetermined granularity to the target ports respectively. Thus, the component information of the target extended component can be determined from the component information for 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 may be identified to obtain an identification result. When the identification result indicates that the same component information exists, the same 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] Through 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 it is component information that can uniquely identify the extended component.

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

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

[0072] Device Number can be a 5-bit field that indicates 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 extension component connected to the target port may be determined.

[0075] According to an embodiment of the present invention, by utilizing a link of a 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, so that each PCIe device can be quickly located, and then the PCIe devices connected to the target port can be accurately screened, and then at least one PCIe device connected to the target port can be used as a target extension component, thereby improving the recognition accuracy and efficiency of the target extension component and 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 port of X16 can be allocated with a predetermined granularity of channel 330 as link 310 of X2, and link 0-link 7 is obtained. The PCIe device 320 connected to the port includes PCIe-1 of X2, PCIe-2 of X2, PCIe-3 of X4, and PCIe-4 of X8. Through link 0 to link 7, a request is sent to the PCIe device connected to the port, and 8 feedback information based on the request for requesting component information is obtained. Based on the 8 feedback information, it is determined that the extended components include the component information of PCIe-1 of X2, PCIe-2 of X2, PCIe-3 of X4, and PCIe-4 of X8.

[0078] Figure 3B A flowchart for 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, the link 310' is allocated to the port according to the granularity of the X4 channel 330', and the link 0 to link 3 are obtained. Through the link 0 to link 3, a request is sent to the PCIe device 320 connected to the port, and 4 feedback information based on the request for requesting component information is obtained. Based on the 4 feedback information, it is determined that the extended components include the component information of PCIe-1 of X2, PCIe-3 of X4, and PCIe-4 of X8.

[0080] and Figure 3B Compared with the method of determining component information shown in Figure 3A As shown, by obtaining component information through a link of a 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] Exemplarily, the 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 on the correspondence between the expansion component and the root port, as long as it is information that characterizes the connection relationship between the expansion component and the port.

[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. When the root port information included in the component information matches the port information of the target port, the extended component is 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 also include: LnkCap: Port #0, Speed ​​8GT / s, Width x16. The 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 characterize 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 according to the component function information in the component information of the target extended component.

[0090] The component function information may represent information about functions that can be extended by the target extension component. The 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, the configuration relationship between the target extension component and the target port can be determined. Based on the configuration relationship and component function information of the target extension component, the resource information of the target port is determined.

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

[0094] Based on the configuration relationship and component function information, the resource information of the target port is determined. On the basis of the component function information, the configuration relationship between the target extension component and the target port can be considered in combination, thereby improving the effectiveness of determining the resource information of the target port. Avoid the problem of insufficient resources allocated due to connection 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 sub-extension component is connected to the target port through the extension connector.

[0097] Determining the resource information of the target port may include: obtaining the 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.

[0098] The component function information of the root extension component and the component function information of the child extension component may 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] The resource information of the target port can also be determined in the following manner.

[0100] For example, based on the resource type of the resource, the weights of the root expansion component and the sub-expansion component are determined. Based on the weights of the root expansion component and the sub-expansion component and the component function information of the root expansion component and the sub-expansion 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 the resource information about the target port in the resource configuration information.

[0102] Optionally, in the case where the resource is bandwidth, the above-mentioned weighted summation method can be used to obtain the resource information of the target port. However, it is not limited to this. Different methods can also be formulated based on the resource type of the resource to determine the resource information of the target port. As long as the method can obtain the resource information of the target port based on the component function information of the root extension component and the component function information of the child extension component.

[0103] It should be noted that the resource configuration information can be generated based on the resource information of the target port. For example, the resource information of the target port is directly used as the resource configuration information. However, it is not limited to this. In the case where the target device includes multiple ports, the resource configuration information can also be generated based on the resource information of each of the multiple ports. As long as the resource configuration information includes the resource information of each of the multiple ports loaded 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 improving 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] Optionally, the port information in the component information and the port information of the target port can be used to determine whether the extended component is the target extended component of the target port. However, it is not limited thereto. It is also possible to determine whether the target port and the target extended component are directly connected based on the port information in the component information.

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

[0108] Direct connection can be characterized as not being connected through an expansion connector. For example, the target expansion component is directly plugged into the slot of the target port. Not directly connected can be characterized as being connected 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 sub-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 then the resource information of the target port can be determined.

[0111] According to the embodiment of the present invention, by using the component attribute information in the component information and the port information of the target port, known information can be reasonably used to not only determine whether there is a connection relationship between the extended component and the target port, but also whether they are directly connected, thereby improving 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, and in addition to the target port, may also include other ports, as long as they are ports configured on the target device.

[0113] In the case where the target device is provided with multiple ports, the resource configuration information including the resource information of each of the multiple ports may be determined in the following manner, thereby improving the determination efficiency and the determination 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] The request is sent through a link of multiple ports. The request is used to request component information, and the link is obtained by allocating a channel of a predetermined granularity to multiple ports. Based on the obtained component information for the request and the port information of each port, the component configuration information is determined. Based on the component configuration information and the component function information of the extended component connected to each port, the resource configuration information is determined.

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

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

[0118] In this way, complete and comprehensive information can be obtained by sending requests to the links of multiple ports at the same time, 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: based on the component identifier in the component information, determining the component node used to characterize the extended component. Based on the port identifier in the port information, determining the port node used to characterize the port. Based on the component information and the port information, determining the connection relationship between the extended component and the port. Based on the connection relationship, determining the edge used to characterize the connection between the port and the extended component. Based on the port nodes, component nodes and edges, a structure tree is generated. The connection relationship characterizes whether the port and the extended component are connected. The nodes of the structure tree can characterize 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 sub-extension component.

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

[0122] The request is sent through the links of the multiple ports. Based on the acquired component information for the request and the port information of each of the multiple ports, the configuration relationship between the port and the extended component is determined. Based on the configuration relationship and the component information of the extended component, component configuration information is generated.

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

[0124] Optionally, in the case where the component configuration information includes a structure tree, the component configuration information is generated based on the configuration relationship and the component information of the extended component, which may include: taking the extended component and the port as nodes respectively, and 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 directly connected. In the case where 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 an edge 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. Based on the nodes and the edges, a structure tree is obtained. The connector node used to represent the extended connector can be determined based on the connector identifier of the extended connector. Based on the connector node, the port node, the component node, the edge used to connect the connector node and the port node, the edge used to connect the connector node and the component node, and the node attributes of the component node, a structure tree is generated.

[0125] Based on the component configuration information, the component function information of multiple extended 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 plurality of ports includes a target port. The configuration relationship may include whether the component and the extended component are connected, and if connected, whether the component and the extended component are directly connected.

[0127] The node attribute may include component information of the extended component, but is not limited thereto. It may also include an attribute identifier for characterizing the component information of the extended component, as long as the node attribute is determined based on the component information of the extended component.

[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 a first component node 401 and a second component node 405, which are represented by a circle. It also includes a port node 402, which is represented by a rectangular box. The first component node 401 and the port node 402 are directly connected, represented by an edge 403 representing the connection relationship. The port node 402 and the second component node 405 are not directly connected, and are indirectly connected by a connector component 404. The connector component 404 is represented by a triangle.

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

[0131] A structure tree may be generated through component information and port information of a target port. A structure tree may be generated based on configuration relationships between all extension components and ports. However, this is not limited thereto. A configuration table may also be generated through configuration relationships between a target extension component and a target port.

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

[0133] In the case where 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. Generating the component configuration table based on the connection relationship between the port and the extended component, the 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 port device number 410 of the root port and the identifier 420 of the root port. According to the port device number 410 and the identifier 420 of the root port, 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 that represents whether they are directly connected. A directly connected configuration relationship 450 can be represented by identifier 0, and a non-directly connected configuration relationship can be represented by identifier 1.

[0137] All configuration relationships between ports and extension components can be determined based on all component information, and a component configuration table or structure tree can be generated. When determining resource configuration information or generating new resource configuration information, the corresponding information can be directly obtained from the component configuration table or structure tree, and all data can be aggregated to 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 improving 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 the resource configuration table, 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 the PCIe1 component are link 0 and link 1. The actual links used by the PCIe2 component are link 2 and link 3. The actual links used by the PCIe3 component 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 of the PCIe2 component is X4, and the bandwidth of the PCIe3 component is X8.

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

[0145] The above describes in detail how to determine the resource configuration information of the target port. The following describes how to obtain the resource configuration information.

[0146] According to an embodiment of the present invention, acquiring resource configuration information includes: acquiring resource configuration information from a predetermined storage space. However, it is not limited thereto. Acquiring resource configuration information may also include: acquiring resource configuration information from a predetermined storage space when a first identifier used to characterize that a component is not updated is detected.

[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, and may also include a memory, as long as it can store resource configuration information.

[0149] During the server startup process or at a predetermined time interval, the BMC processor can detect the hardware, such as the target expansion component. Determine whether the target expansion component has been updated. In the case of detecting the first identifier used to characterize that the component has not been updated, it can be determined that the target expansion component has not been updated, and the resource configuration information stored in the predetermined storage space is the latest version of the resource configuration information. Resources can be directly allocated according to the 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 component characteristics of the target extension component, such as easy plug-in characteristics, to improve the accuracy and effectiveness of the resource configuration information.

[0152] The above describes in detail how to obtain resource configuration information, and the following 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 indicate that the component has been updated, the resource configuration information can be re-determined so as to allocate resources 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 the second identifier used to indicate that the component has been updated is detected, the 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] When 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. It can also be determined that 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.

[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 again determine 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 may be determined in the same manner as the resource configuration information, but is not limited thereto. The updated resource configuration information may also be determined in a different manner, as long as the updated resource configuration information can be determined accurately and in real time.

[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 for characterizing whether an extended component has been updated is obtained from a baseboard management controller. The identifier is determined based on a component update request, and the component update request received by the baseboard management controller carries component attribute information of the updated extended component. In the case where a second identifier for characterizing that the component has been updated is detected, a request is sent through a link of multiple ports. The request is used to request component information, and the link is obtained by allocating a channel of a predetermined granularity to multiple ports. Based on the obtained component information for the request and the port information of each of the multiple ports, component configuration information for characterizing the configuration relationship between the extended component and the port is generated. Based on the component configuration information and the component information of the extended component connected to the port, resource information of the port is determined. Based on the resource information of the port, an updated version of resource configuration information is determined. The resource configuration information is obtained from a predetermined storage space. The updated version of the resource configuration information is compared with the resource configuration information to obtain a comparison result. In the case where 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.

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

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

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

[0165] According to an embodiment of the present invention, before executing the acquisition of 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 used to characterize 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 may include the following operations: modifying the component attribute information used to characterize the extended component according to the requirements. The component attribute information may be represented by an array, where each element represents an identifier of a boot device. These identifiers are automatically generated unique strings that represent specific boot devices, such as hard disks, USB devices, etc.

[0167] The component attribute information can be sent to the BMC processor in the form of a request, and 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 used to acquire resource configuration information. In one embodiment, the acquisition module 610 can be used to perform the operation S201 described above, which will not be described in detail here.

[0172] The allocation module 620 is used 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 used to perform the operation S202 described above, which will not be repeated 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 through an extension connector.

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

[0177] The first resource configuration module is used 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 component information obtained for the request and the port information of the target port includes: performing information identification on the component information obtained 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 used to determine the configuration relationship between the target extension component and the 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 device further includes a granularity determination module.

[0184] The granularity determination module is used 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 device further includes: a second request module, a second component determination module and a second resource configuration module. The second request module is used to send a request through a link of multiple ports. The request is used to request component information, and the link is obtained by allocating a channel of a predetermined granularity to multiple ports. The second component determination module is used 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 used to determine resource configuration information based on the component configuration information and the component function information of the extended component 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 used to determine the component node used to characterize the extended component based on the component identifier in the component information. The second node determination submodule is used to determine the port node used to characterize the port based on the port identifier in the port information. The second relationship determination submodule is used to determine the connection relationship between the extended component and the port based on the component information and the port information, and the connection relationship characterizes whether the extended component is connected to the port. The edge determination submodule is used to determine the edge used to characterize the connection between the port and the extended component based on the connection relationship. The first generation submodule is used to generate a structure tree based on the port node, the component node and the edge.

[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 used to determine the connector node used to characterize the extended connector based on the connector identifier of the extended connector when it is determined based on the connection relationship that the port and the extended component are connected through the extended connector. The generation unit is used to generate a structure tree based on the connector node, the port node, the component node, the edge used to connect the connector node and the port node, the edge used to connect the connector node and the component node, and the component node attribute of the component node. The component node attribute is 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 used to determine the connection relationship between the port and the extended component based on the component information and the port information. The second generation submodule is used 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 used 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 used to acquire an identifier for indicating whether the extended component has been updated from the baseboard management controller. The identifier is determined based on the component update request, and the component update request received by the baseboard management controller carries the component attribute information of the updated extended component. The third request module is used to send a request through the link of multiple ports when a second identifier for indicating that the component has been updated is detected. The request is used to request component information, and the link is obtained by allocating a channel of a predetermined granularity to multiple ports. The third component determination module is used to generate component configuration information for indicating the configuration relationship between the extended component and the port based on the component information obtained for the request and the port information of each of the multiple ports. The third resource configuration module is used 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 used to determine the updated version of the resource configuration information based on the resource information of the port. The comparison module is used to compare the updated version of the resource configuration information with the resource configuration information to obtain a comparison result. The second update module is used to update the resource configuration information using the updated version of the resource configuration information when it is determined based on the comparison result that the updated version of the resource configuration information does not match the resource configuration information.

[0197] According to an embodiment of the present invention, any multiple modules in the acquisition module 610 and the allocation module 620 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment 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 by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware and firmware or in any appropriate combination of any of them. 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, and when the computer program module is run, the corresponding function can be executed.

[0198] The present invention also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiment; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present invention is implemented.

[0199] According to an embodiment of the present invention, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is 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, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, apparatus or device.

[0200] The embodiment of the present invention also includes a computer program product, which includes a computer program, and the computer program contains 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 enable the computer system to implement the method provided by the embodiment of the present invention.

[0201] When the computer program is executed by the 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 rely on a tangible storage medium such as an optical storage device, a magnetic storage device, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of a signal on a network medium, and downloaded and installed through a communication part, and / or installed from a removable medium. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0203] In such an embodiment, the computer program can be downloaded and installed from a network through a communication part, and / or installed from a removable medium. When the computer program is executed by a processor, the above-mentioned functions defined in the system of an embodiment of the present invention are performed. According to an embodiment of the present invention, the system, device, means, module, unit, etc. described above can be implemented by a computer program module.

[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 computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the 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 (e.g., using an Internet service provider to connect through the Internet).

[0205] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order 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 flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0206] It will be appreciated by those skilled in the art that the features described in the various embodiments of the present invention may be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in the present invention. In particular, without departing from the spirit and teachings of the present invention, the features described in the various embodiments of the present invention may be combined and / or combined in various ways. All of these combinations and / or combinations 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, and the resource information is determined based on component information of the target extension component; The component information 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 is obtained by allocating channels of a predetermined granularity to the target port, the granularity representing the number of channels in the link; and Based on the acquired component information 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.

2. The method according to claim 1, characterized in that The target extension component includes a root extension component and a sub-extension component, wherein 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; The method further comprises: 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 is obtained, wherein the component information includes component function information.

3. The method according to claim 2, characterized in that The obtaining the 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 includes: Determining 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.

4. 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 comprises: Performing information identification on the obtained component information for the request to obtain an identification result; When 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.

5. The method according to claim 4, 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, wherein the configuration relationship indicates whether the target extension component and the target port are directly connected.

6. The method according to claim 1, characterized in that The method further comprises: Sending a request through a link of a plurality of ports, wherein the request is for requesting component information, and the link is obtained by allocating channels of the predetermined granularity to the plurality of 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 extended components connected to each of the ports.

7. The method according to claim 6, 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: Determine, based on the component identifier in the component information, a component node for representing the extended component; Determine a port node for representing the port based on the port identifier in the port information; Determine, based on the component information and the port information, a connection relationship between the extended component and the port, wherein the connection relationship indicates whether the extended 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.

8. The method according to claim 7, characterized in that The step of 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 extension component are connected via an extension connector, a connector node for characterizing the extension connector is determined based on a connector identifier of the extension 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.

9. The method according to claim 6, 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.

10. The method according to claim 1 or 4, 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.

11. The method according to claim 1, characterized in that: The obtaining of resource configuration information includes: In the case where a first identifier used to indicate that a component is not updated is detected, the resource configuration information is acquired from a predetermined storage space.

12. The method according to claim 1 or 11, characterized in that: The method further comprises: Acquire an identifier for indicating whether the extended component has been updated from a baseboard management controller, wherein the identifier is determined based on a component update request, and the component update request received by the baseboard management controller carries component attribute information of the updated extended component; In case of detecting a second identifier for indicating that a component has been updated, 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; Based on the acquired component information for the request and the port information of each of the plurality of ports, generating component configuration information for characterizing the configuration relationship between the extended component and the port; Determining resource information of the port based on the component configuration information and component information of an 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 In a case where 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.

13. 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 12.

14. 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 12 are implemented.

15. 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 12 are implemented.

Citation Information

Patent Citations

  • Server bandwidth allocation method and device, electronic equipment and storage medium

    CN116260725A

  • Method and device for determining incidence relation between functions

    CN117112010A

  • Bandwidth resource control method and device, storage medium and electronic device

    CN117135055A

  • Component construction method and equipment of algorithm model and medium

    CN117669127A

  • Dynamic management method and device of communication resources, electronic equipment and storage medium

    CN118612164A

Cited By

  • Port resource scheduling method and electronic equipment

    CN121029366A