Resource allocation method and related equipment

By dividing the communication resources within the peripheral controller into smaller-granularity communication resource units and flexibly configuring them according to the needs of the peripheral devices, the problems of insufficient communication performance and resource waste of the peripheral devices are solved, and efficient resource utilization is achieved.

CN120704867APending Publication Date: 2025-09-26HYGON INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510740892.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-04
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

The problem of insufficient communication performance or resource waste of peripheral devices in the prior art is mainly due to the overly rigid configuration of peripheral communication resources, which results in resource allocation not matching the needs of the peripheral devices.

Method used

By dividing the communication resources within the peripheral controller into smaller-granularity communication resource units and flexibly configuring them based on the needs of the peripheral devices, it ensures that the resource units match the device requirements and avoids resource waste.

Benefits of technology

This ensures that while ensuring the communication performance of the equipment, it avoids resource waste and improves resource utilization efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120704867A_ABST
    Figure CN120704867A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a resource configuration method and related equipment, and the method comprises the steps: obtaining a resource configuration request of to-be-configured equipment, the resource configuration request being used for requesting a target number of communication resource units; wherein the communication resource unit comprises a preset number of peripheral communication resources, and the peripheral communication resources in a peripheral controller are configured to a plurality of communication resource units; the target number of communication resource units are matched with peripheral communication resource requirements of the to-be-configured device; allocating a target number of communication resource units to the to-be-configured device; wherein the communication resource units allocated to the to-be-configured device are located in one or more peripheral controllers; and configuring the allocated target number of communication resource units to the to-be-configured device. According to the embodiment of the invention, resource waste can be avoided while the communication performance of equipment is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technology, and specifically to a resource configuration method and related equipment. Background Art

[0002] Peripheral devices refer to various external hardware devices connected to the computer host, such as printers, monitors, storage devices, coprocessors (such as field programmable gate arrays FPGA, graphics processing units GPU, general-purpose graphics processors GPGPU), etc. They exchange data with the computer through interfaces, expand the computer's functions, and provide users with rich input, output and storage capabilities.

[0003] Peripheral devices connect to the host computer's on-chip bus via a peripheral controller to communicate with the host computer. Specifically, the peripheral controller is equipped with peripheral communication resources such as control circuits, cache circuits, and wiring circuits for peripheral device communication. The peripheral devices communicate with the peripheral controller based on the peripheral communication resources.

[0004] However, access to peripheral devices may result in insufficient communication performance or waste of resources. Summary of the Invention

[0005] In view of this, an embodiment of the present application provides a resource configuration method and related equipment, which can ensure the communication performance of the device while avoiding resource waste.

[0006] To achieve the above objectives, the embodiments of the present application provide the following technical solutions.

[0007] In a first aspect, an embodiment of the present application provides a resource configuration method, including:

[0008] Obtaining a resource configuration request for a device to be configured, the resource configuration request being used to request a target number of communication resource units; wherein the communication resource units include a preset number of peripheral communication resources, and the peripheral communication resources within a peripheral controller are configured into multiple communication resource units; the target number of communication resource units matches the peripheral communication resource requirements of the device to be configured;

[0009] Allocating a target number of communication resource units to the device to be configured; wherein the communication resource units allocated to the device to be configured are located in one or more peripheral controllers;

[0010] The allocated target number of communication resource units is configured to the device to be configured.

[0011] Optionally, obtaining a resource configuration request of a device to be configured includes:

[0012] Determine peripheral communication resource requirements of the device to be configured based on device information of the device to be configured;

[0013] Determining the number of communication resource units that match the communication resource requirements of the peripheral device, and using the determined number as a target number;

[0014] Based on the determined target quantity, a resource allocation request is generated.

[0015] Optionally, allocating a target number of communication resource units to the device to be configured includes:

[0016] Determining whether there are available communication resource units greater than or equal to the target number; the available communication resource units are idle communication resource units, or redundant communication resource units temporarily allocated to other peripheral devices, the redundant communication resource units being used to indicate communication resource units of peripheral devices that are temporarily allocated again to the allocated communication resource units;

[0017] A target number of communication resource units are selected from available communication resource units and allocated to the device to be configured.

[0018] Optionally, selecting a target number of communication resource units from the available communication resource units and allocating them to the device to be configured is specifically, based on a preset selection rule, selecting a target number of communication resource units and allocating them to the device to be configured;

[0019] The selection rules include: giving priority to allocating available continuous communication resource units within the same peripheral controller, where the continuous communication resource units are physically adjacent communication resource units, or are communication resource units with continuous identification numbers in terms of unit identification; when there are no available and continuous communication resource units within the same peripheral controller, giving priority to allocating communication resource units within adjacent peripheral controllers.

[0020] Optionally, configuring the allocated target number of communication resource units to the to-be-configured device includes:

[0021] Configuring a mapping address of the device to be configured, and mapping the address of the device to be configured to the allocated communication resource unit;

[0022] The connection relationship of the device to be configured is configured, and the device to be configured is connected to the allocated communication resource unit.

[0023] Optionally, when there are redundant communication resource units in the allocated communication resource units,

[0024] The step of configuring the mapping address of the device to be configured and mapping the address of the device to be configured to the allocated communication resource unit further includes: simultaneously updating the mapping address of the peripheral device corresponding to the redundant communication resource unit, and excluding the redundant communication resource unit from the address mapping of the peripheral device;

[0025] The step of configuring the connection relationship of the device to be configured and connecting the device to be configured to the allocated communication resource unit also includes: simultaneously updating the connection relationship of the peripheral device corresponding to the redundant communication resource unit, and excluding the redundant communication resource unit from the connection relationship of the peripheral device.

[0026] Optionally, after configuring the allocated target number of communication resource units to the to-be-configured device, the method further includes:

[0027] Turn off the remaining idle communication resource units;

[0028] Alternatively, the remaining idle communication resource units are reallocated to the peripheral devices, wherein the reallocated communication resource units are used as redundant communication resource units; and the allocated redundant communication resource units are configured to the peripheral devices.

[0029] Optionally, the remaining idle communication resource units are reallocated to peripheral devices, specifically: the redundant communication resource units are reallocated to a second preset number of peripheral devices, wherein the second preset number is greater than or equal to 1 and less than or equal to the total number of peripheral devices in the computing device; the second preset number of peripheral devices is the second preset number of peripheral devices with the largest demand for peripheral communication resources.

[0030] In a second aspect, an embodiment of the present application provides a resource configuration device, including:

[0031] a request acquisition module, configured to acquire a resource configuration request from a device to be configured, the resource configuration request being configured to request a target number of communication resource units; wherein the communication resource units include a preset number of peripheral communication resources, and the peripheral communication resources within a peripheral controller are configured into a plurality of communication resource units; and the target number of communication resource units matches the peripheral communication resource requirements of the device to be configured;

[0032] A resource allocation module, configured to allocate a target number of communication resource units to the device to be configured; wherein the communication resource units allocated to the device to be configured are located in one or more peripheral controllers;

[0033] The resource configuration module is used to configure the allocated target number of communication resource units to the device to be configured.

[0034] In a third aspect, an embodiment of the present application provides a computing device comprising: at least one peripheral controller and at least one peripheral device; the computing device is used to execute the resource configuration method as described in the first aspect.

[0035] In a fourth aspect, an embodiment of the present application provides a storage medium, wherein the storage medium stores one or more computer-executable instructions, and the one or more computer-executable instructions can execute the resource configuration method as described in the first aspect.

[0036] In a fifth aspect, an embodiment of the present application provides a computer program comprising one or more computer-executable instructions, which, when executed, implement the resource configuration method as described in the first aspect.

[0037] An embodiment of the present application provides a resource configuration method and related equipment, wherein the resource configuration method includes: obtaining a resource configuration request of a device to be configured, the resource configuration request being used to request a target number of communication resource units; wherein the communication resource units include a preset number of peripheral communication resources, and the peripheral communication resources within a peripheral controller are configured to multiple communication resource units; the target number of communication resource units matches the peripheral communication resource requirements of the device to be configured; allocating a target number of communication resource units to the device to be configured; wherein the communication resource units allocated to the device to be configured are located in one or more peripheral controllers; and configuring the allocated target number of communication resource units to the device to be configured.

[0038] It can be seen that the embodiment of the present application allocates resources to the device to be configured based on the form of communication resource units, wherein a communication resource unit in a peripheral controller is configured to multiple communication resource units, thereby allocating peripheral communication resources with a smaller granularity, realizing flexible configuration of peripheral communication resources, so that the target number of communication resource units configured for the device to be configured matches the peripheral communication resource requirements of the device to be configured, thereby avoiding resource waste while ensuring the communication performance of the device. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without any creative work.

[0040] Figure 1 An optional framework diagram for a computing device;

[0041] Figure 2 Another optional framework diagram of a computing device;

[0042] Figure 3 A schematic diagram of the structure of a computing device provided in an embodiment of the present application;

[0043] Figure 4 An optional flow chart of a resource configuration method provided in an embodiment of the present application;

[0044] Figure 5 An optional flowchart of step S100 provided in an embodiment of the present application;

[0045] Figure 6 An optional flowchart of step S110 provided in an embodiment of the present application;

[0046] Figure 7 An optional flowchart of step S120 provided in an embodiment of the present application;

[0047] Figure 8 An optional example diagram of address interleaving mapping provided in an embodiment of the present application;

[0048] Figure 9 Another optional example diagram of a computing device provided in an embodiment of the present application;

[0049] Figure 10 This is a schematic diagram of an optional structure of the resource configuration device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0050] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0051] refer to Figure 1 An optional framework diagram of a computing device is shown, which may include a host and peripheral devices coupled to the host, wherein the host may include a processor, a DMA (direct memory access) device, etc., and the host and the peripheral devices may communicate based on a bus and an external interface.

[0052] It is understandable that the number of peripheral devices connected to the host can be one or more. Moreover, when there are many peripheral devices, the host can also cascade the peripheral devices to the host based on a switch cascade technology.

[0053] In order to realize the communication between the peripheral device and the host, the chip can be configured with circuit resources such as control circuits, cache circuits, and connection circuits for realizing communication with the peripheral device (hereinafter referred to as peripheral communication resources). Figure 2 Another optional framework diagram of a computing device is shown, in which peripheral communication resources can be configured in a peripheral controller and utilized based on the control of the peripheral controller. When the peripheral controller is connected to a single peripheral device, the peripheral communication resources in the peripheral controller are exclusively used by the peripheral device. When the peripheral controller is connected to multiple peripheral devices, the peripheral communication resources in the peripheral controller are shared by the multiple peripheral devices.

[0054] However, the inventor believes that due to the different types / models of peripheral devices, the latency and bandwidth requirements of different peripheral devices vary greatly. Accordingly, the requirements for corresponding peripheral communication resources are also different. The configuration of the existing scheme for peripheral communication resources is too rigid, resulting in the allocation of peripheral communication resources to the peripheral devices being too large or too small (for example, CXL peripheral devices are very prone to this problem. CXL is Compute Express Link, an open standard high-speed interconnection protocol). For example, a peripheral controller can connect to one or more peripheral devices, but a peripheral device is only allowed to connect to one peripheral controller. As a result, the upper limit of the peripheral communication resources allocated to the peripheral device is limited by the amount of peripheral communication resources in the peripheral controller. As a result, during the corresponding access process, insufficient peripheral communication resources are allocated, resulting in insufficient communication performance. Alternatively, for peripheral devices with smaller requirements, the peripheral controller can connect to multiple peripheral devices at the same time, but multiple peripheral devices share the peripheral communication resources of the peripheral controller, and the probability of the multiple peripheral devices being accessed at the same time is small, so that more often a small number of peripheral devices are accessed, and more often a small number of peripheral devices occupy a large amount of peripheral communication resources. Obviously, the existing solutions have the problem of insufficient communication performance or resource waste.

[0055] In view of this, the present application provides a resource configuration method and related equipment, the method comprising: obtaining a resource configuration request of a device to be configured, the resource configuration request being used to request a target number of communication resource units; wherein the communication resource units include a preset number of peripheral communication resources, and the peripheral communication resources within a peripheral controller are configured to multiple communication resource units; the target number of communication resource units matches the peripheral communication resource requirements of the device to be configured; allocating a target number of communication resource units to the device to be configured; wherein the communication resource units allocated to the device to be configured are located in one or more peripheral controllers; and configuring the allocated target number of communication resource units to the device to be configured.

[0056] It can be seen that the embodiment of the present application allocates resources to the device to be configured based on the form of communication resource units, wherein a communication resource unit in a peripheral controller is configured to multiple communication resource units, thereby allocating peripheral communication resources with a smaller granularity, realizing flexible configuration of peripheral communication resources, so that the target number of communication resource units configured for the device to be configured matches the peripheral communication resource requirements of the device to be configured, thereby avoiding resource waste while ensuring the communication performance of the device.

[0057] The solution proposed in this application is described in detail below.

[0058] refer to Figure 3 The schematic diagram of the structure of the computing device is shown as an example. Figure 3 As shown, the computing device may include a host and peripheral devices coupled to the host. The host includes a processor core, a DMA device, a peripheral controller, a peripheral cache, and other host devices. The processor core, DMA device, and other host devices can serve as access sources, interacting with the peripheral controller based on an on-chip network, and then interacting with the peripheral devices through the peripheral controller. The peripheral communication resources in the peripheral controller are configured as multiple communication resource units and connected to the peripheral devices based on a peripheral connection network. The other host devices may be, for example, other processor cores.

[0059] The peripheral controller is used to manage the peripheral resources and access processes of peripheral devices. There can be multiple or one peripheral controller. If there are multiple peripheral controllers, they can correspond one-to-one with peripheral devices, or one-to-many with peripheral devices, meaning one peripheral controller controls multiple peripheral devices. During the peripheral device access process, the peripheral controller is used to assign access tasks to the corresponding peripheral devices and, after receiving result data from the peripheral devices, feed the result data back to the requester.

[0060] The peripheral controller is configured with peripheral communication resources for realizing communication with peripheral devices, such as control circuits, cache circuits, connection circuits, etc. for realizing communication between peripheral devices. In an embodiment of the present application, the peripheral communication resources in the peripheral controller are divided into smaller-granularity communication resource units, so that in the corresponding resource allocation scenario, the peripheral communication resources can be allocated based on the needs of the peripheral devices, thereby avoiding resource waste while ensuring the communication performance of the device.

[0061] The communication resource unit can be understood as an independent unit including a preset number of peripheral communication resources, and the preset number of peripheral communication resources is at least the minimum unit for realizing peripheral communication. For example, the communication resource unit includes at least hardware resources for a communication path for realizing peripheral communication. In an optional example, the communication resource unit can also be configured as a unit including more peripheral communication resources, and this application does not make specific limitations here. In some optional examples, the peripheral communication resources can be evenly divided based on the total amount of the peripheral communication resources existing in the peripheral controller, and one portion of the peripheral communication resources can be configured to a communication resource unit, thereby dividing the peripheral communication resources in the peripheral controller into multiple communication resource units, and then allocating the peripheral communication resources based on the communication resource units.

[0062] It should be noted that the communication resource unit may include different hardware resources, such as cache resources, control resources, connection resources, etc. In a communication resource unit, different hardware resources can be matched and configured based on the actual transmission requirements of the data to achieve maximum resource utilization.

[0063] In an embodiment of the present application, the on-chip network can change the mapping configuration, so that the address mapping relationship can be configured based on the configuration relationship between the communication resource unit and the peripheral device, so as to form a transmission path from the on-chip network to the corresponding communication resource unit based on the corresponding mapping configuration.

[0064] Furthermore, in an embodiment of the present application, the peripheral connection network can configure a connection relationship, so that the communication resource unit and the peripheral device can be connected based on the configuration relationship between the communication resource unit and the peripheral device, so as to form a transmission path between the communication resource unit and the peripheral device based on the corresponding connection relationship.

[0065] In a further implementation, the present application also provides a corresponding resource configuration method, which can be applied to the above computing device, thereby realizing communication between the host and the peripheral device based on the communication resource unit configured for the peripheral device. Figure 4 An optional flow chart of a resource configuration method is shown, and the method may include:

[0066] Step S100: Obtain resource configuration request of the device to be configured;

[0067] The resource configuration request is used to request a target number of communication resource units; wherein the communication resource units include a preset number of peripheral communication resources, and the peripheral communication resources in a peripheral controller are configured into multiple communication resource units; the target number of communication resource units matches the peripheral communication resource requirements of the device to be configured;

[0068] The device to be configured can be understood as a peripheral device of a peripheral communication resource to be configured, and the peripheral device can be, for example, a storage device (such as a hard disk), a co-processing device (such as a field programmable gate array FPGA, a graphics processing unit GPU, a general-purpose graphics processor GPGPU), a communication device (such as a network card), a functional device (such as a printer), a display device, etc. Alternatively, in some optional examples, the device to be configured can also be classified based on the interconnection protocol of the interface, such as the PCIe (peripheral component interconnect express) protocol, the CXL protocol, etc. In a specific implementation, the device to be configured can be marked based on the device name or the device number, thereby indicating the corresponding device to be configured based on the corresponding mark.

[0069] It is understandable that the peripheral communication resource requirements may vary depending on the type of device being configured, or even if the devices are of the same type but different models. Therefore, flexible resource allocation based on the peripheral communication resource requirements can be performed to ensure device communication performance while avoiding resource waste.

[0070] It should be noted that the timing for the device to be configured to access the host may be before or after the start of the resource configuration process described in this application. If it is before the start, the device to be configured can perform connection control of the corresponding communication resource unit based on the configuration steps of the communication resource unit in the resource configuration process described in this application, thereby realizing the configuration of the communication resource unit; if it is after the end, the device to be configured can determine the interface corresponding to the configured communication resource unit based on the configuration steps of the communication resource unit in the resource configuration process described in this application, and then connect the device to be configured to the host based on the interface.

[0071] The resource configuration request may be generated based on the device information of the device to be configured. The device information is used to determine the peripheral communication resource requirements of the device to be configured. Figure 5 The optional flow chart of step S100 is shown, and this step may include the following process:

[0072] Step S101: determining peripheral communication resource requirements of the device to be configured based on the device information of the device to be configured;

[0073] In a specific example, the device information may include the type and model of the peripheral device, so that the peripheral communication resource requirements of the device to be configured can be determined based on the public information corresponding to the type and model of the peripheral device. Alternatively, the device information may directly include requirement information indicating the peripheral communication resource requirements, so that the peripheral communication resource requirements of the device to be configured can be determined based on the requirement information.

[0074] The device information may be determined based on user input, or may be automatically obtained based on an interface of the connected device to be configured in a scenario where the device to be configured is connected to the host before the resource configuration process described in this application begins.

[0075] Step S102: determining the number of communication resource units that match the communication resource requirements of the peripheral device, and using the determined number as a target number;

[0076] It is understandable that in a computing device, the preset number of peripheral communication resources configured in the communication resource unit is known, so that the number of communication resource units that match the peripheral communication resource requirements of the device to be configured can be determined.

[0077] Among them, the peripheral communication resource requirements may include requirements for different types of hardware resources, such as requirements for cache resources, control resources, and connection resources. Accordingly, when determining the number of communication resource units, the target number of communication resource units determined should meet the requirements of all types of hardware resources.

[0078] Taking the bandwidth requirement and delay requirement of the device to be configured as an example, the greater the bandwidth and / or the greater the delay, the greater the corresponding cache requirement. Accordingly, the target number of communication resource units required should meet the cache requirement.

[0079] Step S103: generating a resource allocation request based on the determined target quantity;

[0080] After determining the target number, a corresponding resource configuration request may be generated to request configuration of the target number of communication resource units.

[0081] It is understandable that in other examples, the target number can also be determined based on the quantity information of the communication resource units directly obtained, for example, obtaining the quantity information of the communication resource units input by the user to determine the target number of communication resource units, etc. This application does not make specific limitations here.

[0082] Continue to refer Figure 4 , executing step S110: allocating a target number of communication resource units to the device to be configured;

[0083] After determining the target number, communication resource units can be allocated to determine the communication resource units belonging to the device to be configured. The communication resource units allocated to the device to be configured can be located in one peripheral controller or in multiple peripheral controllers.

[0084] In an optional example, available continuous communication resource units within the same peripheral controller can be allocated preferentially. The continuous communication resource units can be physically located as adjacent communication resource units, or can be represented as communication resource units with continuous identification numbers in terms of unit identification. When there are no available and continuous communication resource units within the same peripheral controller, the communication resource units within the adjacent peripheral controller can be allocated preferentially.

[0085] In the specific implementation, refer to Figure 6 The optional flow chart of step S110 is shown, and this step may include the following process:

[0086] Step S111: Determine whether there are available communication resource units greater than or equal to the target number;

[0087] After determining the target number, the target number of available communication resource units can be confirmed. If they exist, step S112 is executed to allocate the communication resource units. If they do not exist, the resource configuration process can be exited and an error message can be fed back.

[0088] In a specific implementation, the available communication resource units can be idle communication resource units or redundant communication resource units temporarily allocated to other peripheral devices. If there are still remaining communication resource units after all devices to be configured have been allocated, to improve resource utilization efficiency, the remaining resource communication units can be reallocated to the peripheral devices to which the communication resource units have been allocated. The reallocated communication resource units can be referred to as redundant communication resource units, i.e., the redundant communication resource units are used to indicate communication resource units that have been temporarily reallocated to the peripheral devices to which the communication resource units have been allocated.

[0089] Step S112: Selecting a target number of communication resource units from the available communication resource units and allocating them to the device to be configured;

[0090] After determining the available communication resource units, a target number of communication resource units may be selected and allocated to the device to be configured based on a preset selection rule, wherein the selection rule may be the aforementioned priority allocation principle or may be allocated in sequence based on unit identification.

[0091] It can be understood that when there is a large resource demand, the embodiments of the present application can break the limitations of the peripheral controller and allocate communication resource units across the peripheral controller, thereby connecting the communication resource units in multiple peripheral controllers at the same time, avoiding the problem of insufficient communication performance of peripheral devices with large resource demands due to insufficient allocated peripheral communication resources.

[0092] Based on the one-to-one correspondence between the device to be configured and the communication resource unit, the peripheral device with smaller demand only occupies a small amount of the allocated communication resource unit, and no additional waste of resources is caused regardless of whether it is accessed or not.

[0093] Continue to refer Figure 4 , executing step S120: configuring the allocated target number of communication resource units to the device to be configured;

[0094] After the allocated communication resource units are determined, the communication resource units can be configured, including configuring the transmission path from the on-chip network to the corresponding communication resource units, and configuring the transmission path between the communication resource units and peripheral devices.

[0095] In a specific example, refer to Figure 7 The optional flow chart of step S120 is shown, and this step may include the following process:

[0096] Step S121: configuring a mapping address of the device to be configured, and mapping the address of the device to be configured to the allocated communication resource unit;

[0097] By configuring the address mapping rule of the device to be configured, access corresponding to the device to be configured can be addressed to the device to be configured based on the address mapping rule.

[0098] Among them, when there are multiple communication resource units, mapping can be performed based on address interleaving to ensure uniform access to communication resources, that is, addresses containing a first preset number are alternately mapped to different communication resource units. It can be understood that the first preset number is used to indicate the interleaving granularity of address interleaving. In an optional implementation, the first preset number is greater than or equal to 1 and less than or equal to the number of addresses corresponding to a memory page, so as to avoid too many consecutive addresses being mapped to the same communication resource unit and causing communication congestion.

[0099] In an optional example, the address interleaving method may be continuous interleaving or hash interleaving.

[0100] refer to Figure 8An optional example diagram of address interleaving mapping is shown. Taking the first preset number as 1 as an example, the device to be configured is shown as a peripheral device in the diagram after the resources are configured. The address range of peripheral device 0 in the diagram can be 0-7, and the allocated peripheral communication resources are communication resource unit 0 and communication resource unit 1. The address range of peripheral device 1 can be 8-19, and the allocated peripheral communication resources are communication resource unit 2, communication resource unit 3, communication resource unit 4 and communication resource unit 5. Accordingly, after address interleaving mapping, the addresses mapped after address interleaving of communication resource unit 0 are 0, 2, 4, 6; the addresses mapped after address interleaving of communication resource unit 1 are 1, 3, 5, 7; the addresses mapped after address interleaving of communication resource unit 2 are 8, 12, 16; the addresses mapped after address interleaving of communication resource unit 3 are 9, 13, 17; the addresses mapped after address interleaving of communication resource unit 4 are 10, 14, 18; and the addresses mapped after address interleaving of communication resource unit 4 are 11, 15, 19.

[0101] It should be noted that after configuring the mapping address of the device to be configured, the corresponding address is accessed based on the corresponding communication resource unit. In this scenario, it can also be understood that the configured communication resource unit is exclusively used by the device to be configured. Accordingly, different devices to be configured perform address mapping based only on their allocated communication resource units, and will not access the communication resource units corresponding to other devices.

[0102] It should be noted that when there is a redundant communication resource unit in the allocated communication resource unit, this step also updates the mapping address of the peripheral device corresponding to the redundant communication resource unit, and excludes the redundant communication resource unit from the address mapping of the peripheral device.

[0103] In a specific implementation, the mapping address of the peripheral device corresponding to the redundant communication resource unit is updated, and after excluding the redundant communication resource unit from the address mapping of the peripheral device, the remaining communication resource units are configured as communication resource units corresponding to the peripheral device.

[0104] Continue to refer Figure 7 , executing step S122: configuring the connection relationship of the device to be configured, connecting the device to be configured to the allocated communication resource unit;

[0105] By configuring the connection relationship of the device to be configured, the device to be configured can be accessed based on the connection relationship.

[0106] In a specific implementation, the connection relationship of the circuits in the peripheral connection network can be controlled based on the corresponding configuration information, thereby realizing the configuration of the connection relationship of the device to be configured.

[0107] In a further example, in a scenario where a switch exists, the peripheral device participates in the resource configuration process based on its corresponding device number. Accordingly, the peripheral device used as the device to be configured can indicate the device to be configured based on the device number, and then participate in the resource configuration process.

[0108] refer to Figure 9 Another optional example diagram of a computing device is shown. After the corresponding configuration process, the connection relationship corresponding to the peripheral connection network is as shown in the figure, wherein communication resource unit 0 can be configured to peripheral device 0, communication resource unit 1 and communication resource unit 2 can be configured to peripheral device 1, and communication resource unit 3, communication resource unit 4 and communication resource unit 5 can be configured to peripheral device 2 and peripheral device 3 based on the switch.

[0109] It should be noted that even when the configuration of peripheral devices is performed based on a switch, different devices are still configured in a one-to-one correspondence based on the device number and the corresponding communication resource unit, thereby exclusively occupying the corresponding communication resource unit.

[0110] It should be noted that when there is a redundant communication resource unit among the allocated communication resource units, this step also updates the connection relationship of the peripheral devices corresponding to the redundant communication resource unit, excluding the redundant communication resource unit from the connection relationship of the peripheral devices.

[0111] Specifically, excluding the redundant communication resource unit from the address mapping of the peripheral device can be achieved by controlling the connection relationship of circuits in the peripheral connection network.

[0112] In a further example, after the initial resource allocation, the embodiment of the present application can further shut down the remaining idle communication resource units to reduce the power consumption of the device, or the remaining idle communication resource units can be reallocated to peripheral devices to improve resource utilization. The reallocated communication resource units are used as redundant communication resource units, and the allocated redundant communication resource units are configured to the peripheral devices. In a specific example, in order to simplify the configuration process, the redundant communication resource units can be reallocated to a second preset number of peripheral devices, and the second preset number is greater than or equal to 1 and less than or equal to the total number of peripheral devices in the computing device, wherein the second preset number should not be too large to avoid the configuration process being too cumbersome.

[0113] In an optional example, the second preset number of peripheral devices may be the second preset number of peripheral devices with the largest demand for peripheral communication resources, thereby effectively utilizing relevant resources.

[0114] The following describes the resource configuration apparatus provided in the embodiments of the present application. The resource configuration apparatus described below can be considered to be the software or hardware functional modules required to implement the resource configuration method provided in the embodiments of the present application. The content of the resource configuration apparatus described below can be referenced in conjunction with the content of the method described above.

[0115] In an optional implementation, Figure 10 The following is an exemplary diagram showing an optional structural diagram of the resource configuration device provided in the embodiment of the present application, wherein the resource configuration device is used to implement the resource configuration method provided in the embodiment of the present application, such as Figure 10 As shown, the matching information generating device may include:

[0116] A request acquisition module 200 is configured to acquire a resource configuration request from a device to be configured, wherein the resource configuration request is configured to request a target number of communication resource units; wherein the communication resource units include a preset number of peripheral communication resources, and the peripheral communication resources within a peripheral controller are configured into multiple communication resource units; and the target number of communication resource units matches the peripheral communication resource requirements of the device to be configured;

[0117] A resource allocation module 210 is configured to allocate a target number of communication resource units to the device to be configured; wherein the communication resource units allocated to the device to be configured are located in one or more peripheral controllers;

[0118] The resource configuration module 220 is configured to configure the allocated target number of communication resource units to the device to be configured.

[0119] Optionally, the request acquisition module 200 is configured to acquire a resource configuration request of a device to be configured, including:

[0120] Determine peripheral communication resource requirements of the device to be configured based on device information of the device to be configured;

[0121] Determining the number of communication resource units that match the communication resource requirements of the peripheral device, and using the determined number as a target number;

[0122] Based on the determined target quantity, a resource allocation request is generated.

[0123] Optionally, the resource allocation module 210 is configured to allocate a target number of communication resource units to the device to be configured, including:

[0124] Determining whether there are available communication resource units greater than or equal to the target number; the available communication resource units are idle communication resource units, or redundant communication resource units temporarily allocated to other peripheral devices, the redundant communication resource units being used to indicate communication resource units of peripheral devices that are temporarily allocated again to the allocated communication resource units;

[0125] A target number of communication resource units are selected from available communication resource units and allocated to the device to be configured.

[0126] Optionally, the resource allocation module 210 is configured to select a target number of communication resource units from available communication resource units and allocate them to the device to be configured, specifically, based on a preset selection rule, selecting a target number of communication resource units and allocating them to the device to be configured;

[0127] The selection rules include: giving priority to allocating available continuous communication resource units within the same peripheral controller, where the continuous communication resource units are physically adjacent communication resource units, or are communication resource units with continuous identification numbers in terms of unit identification; when there are no available and continuous communication resource units within the same peripheral controller, giving priority to allocating communication resource units within adjacent peripheral controllers.

[0128] Optionally, the resource configuration module 220 is configured to configure the allocated target number of communication resource units to the to-be-configured device, including:

[0129] Configuring a mapping address of the device to be configured, and mapping the address of the device to be configured to the allocated communication resource unit;

[0130] The connection relationship of the device to be configured is configured, and the device to be configured is connected to the allocated communication resource unit.

[0131] Optionally, when there are redundant communication resource units in the allocated communication resource units,

[0132] The resource configuration module 220 is configured to configure the mapping address of the device to be configured, and in the step of mapping the address of the device to be configured to the allocated communication resource unit, further includes: simultaneously updating the mapping address of the peripheral device corresponding to the redundant communication resource unit, and excluding the redundant communication resource unit from the address mapping of the peripheral device;

[0133] The resource configuration module 220 is used to configure the connection relationship of the device to be configured, and the step of connecting the device to be configured to the allocated communication resource unit also includes: simultaneously updating the connection relationship of the peripheral device corresponding to the redundant communication resource unit, and excluding the redundant communication resource unit from the connection relationship of the peripheral device.

[0134] Optionally, the resource configuration module 220 is further configured to shut down the remaining idle communication resource units;

[0135] Alternatively, the resource allocation module 210 is further used to reallocate the remaining idle communication resource units to the peripheral device, wherein the reallocated communication resource units are used as redundant communication resource units; the resource configuration module 220 is further used to configure the allocated redundant communication resource units to the peripheral device.

[0136] Optionally, the resource allocation module 210 is also used to reallocate the remaining idle communication resource units to peripheral devices, specifically: reallocate the redundant communication resource units to a second preset number of peripheral devices, wherein the second preset number is greater than or equal to 1 and less than or equal to the total number of peripheral devices in the computing device; the second preset number of peripheral devices is the second preset number of peripheral devices with the largest demand for peripheral communication resources.

[0137] An embodiment of the present application also provides a computer device, which may include: at least one peripheral controller and at least one peripheral device; the computer device is used to execute the resource configuration method provided in the embodiment of the present application.

[0138] An embodiment of the present application further provides a storage medium, which stores one or more computer-executable instructions, and the one or more computer-executable instructions are used to execute the resource configuration method provided in the embodiment of the present application.

[0139] An embodiment of the present application also provides a computer program, comprising one or more computer-executable instructions, which, when executed, implement the resource configuration method provided in the embodiment of the present application.

[0140] The above describes multiple embodiment schemes provided by the embodiments of the present application. The various optional methods introduced in each embodiment scheme can be combined and cross-referenced with each other without conflict, thereby extending a variety of possible embodiment schemes, which can all be considered as embodiment schemes disclosed and open in the embodiments of the present application.

[0141] Although the embodiments of the present application are disclosed above, the present application is not limited thereto. Any person skilled in the art may make various changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims.

Claims

1. A resource configuration method, characterized in that: include: Obtaining a resource configuration request for a device to be configured, the resource configuration request being used to request a target number of communication resource units; wherein the communication resource units include a preset number of peripheral communication resources, and the peripheral communication resources within a peripheral controller are configured into multiple communication resource units; the target number of communication resource units matches the peripheral communication resource requirements of the device to be configured; Allocating a target number of communication resource units to the device to be configured; wherein the communication resource units allocated to the device to be configured are located in one or more peripheral controllers; The allocated target number of communication resource units is configured to the device to be configured.

2. The resource allocation method according to claim 1, characterized in that: The step of obtaining a resource configuration request of a device to be configured includes: Determine peripheral communication resource requirements of the device to be configured based on device information of the device to be configured; Determining the number of communication resource units that match the communication resource requirements of the peripheral device, and using the determined number as a target number; Based on the determined target quantity, a resource allocation request is generated.

3. The resource allocation method according to claim 1, characterized in that: The allocating a target number of communication resource units to the device to be configured includes: Determining whether there are available communication resource units greater than or equal to the target number; the available communication resource units are idle communication resource units, or redundant communication resource units temporarily allocated to other peripheral devices, the redundant communication resource units being used to indicate communication resource units of peripheral devices that are temporarily allocated again to the allocated communication resource units; A target number of communication resource units are selected from available communication resource units and allocated to the device to be configured.

4. The resource allocation method according to claim 3, characterized in that: The selecting a target number of communication resource units from the available communication resource units and allocating them to the device to be configured is specifically, based on a preset selection rule, selecting a target number of communication resource units and allocating them to the device to be configured; The selection rules include: giving priority to allocating available continuous communication resource units within the same peripheral controller, where the continuous communication resource units are physically adjacent communication resource units, or are communication resource units with continuous identification numbers in terms of unit identification; when there are no available and continuous communication resource units within the same peripheral controller, giving priority to allocating communication resource units within adjacent peripheral controllers.

5. The resource allocation method according to claim 1, characterized in that: The configuring the allocated target number of communication resource units to the to-be-configured device includes: Configuring a mapping address of the device to be configured, and mapping the address of the device to be configured to the allocated communication resource unit; The connection relationship of the device to be configured is configured, and the device to be configured is connected to the allocated communication resource unit.

6. The resource allocation method according to claim 1, characterized in that: When there are redundant communication resource units in the allocated communication resource units, The step of configuring the mapping address of the device to be configured and mapping the address of the device to be configured to the allocated communication resource unit further includes: simultaneously updating the mapping address of the peripheral device corresponding to the redundant communication resource unit, and excluding the redundant communication resource unit from the address mapping of the peripheral device; The step of configuring the connection relationship of the device to be configured and connecting the device to be configured to the allocated communication resource unit also includes: simultaneously updating the connection relationship of the peripheral device corresponding to the redundant communication resource unit, and excluding the redundant communication resource unit from the connection relationship of the peripheral device.

7. The resource allocation method according to claim 1, characterized in that: After configuring the allocated target number of communication resource units to the to-be-configured device, the method further includes: Turn off the remaining idle communication resource units; Alternatively, the remaining idle communication resource units are reallocated to the peripheral devices, wherein the reallocated communication resource units are used as redundant communication resource units; and the allocated redundant communication resource units are configured to the peripheral devices.

8. The resource allocation method according to claim 7, characterized in that: The redistribution of the remaining idle communication resource units to the peripheral devices is specifically: redistribution of the redundant communication resource units to a second preset number of peripheral devices, wherein the second preset number is greater than or equal to 1 and less than or equal to the total number of peripheral devices in the computing device; the second preset number of peripheral devices is the second preset number of peripheral devices with the largest demand for peripheral communication resources.

9. A resource allocation device, characterized in that: include: a request acquisition module, configured to acquire a resource configuration request from a device to be configured, the resource configuration request being configured to request a target number of communication resource units; wherein the communication resource units include a preset number of peripheral communication resources, and the peripheral communication resources within a peripheral controller are configured into a plurality of communication resource units; and the target number of communication resource units matches the peripheral communication resource requirements of the device to be configured; A resource allocation module, configured to allocate a target number of communication resource units to the device to be configured; wherein the communication resource units allocated to the device to be configured are located in one or more peripheral controllers; The resource configuration module is used to configure the allocated target number of communication resource units to the device to be configured.

10. A computing device, characterized in that include: At least one peripheral controller and at least one peripheral device; the computing device is used to execute the resource configuration method according to any one of claims 1-8.

11. A storage medium, characterized in that: The storage medium stores one or more computer-executable instructions, and the one or more computer-executable instructions can execute the resource configuration method according to any one of claims 1 to 8.

12. A computer program, characterized in that The method comprises one or more computer-executable instructions, and when the one or more computer-executable instructions are executed, the resource configuration method according to any one of claims 1 to 8 is implemented.