Equipment resource management method, related system and storage medium

By adopting a separation model of physical configuration resources and functional configuration resources in resource pooling technology, fine-grained management and allocation of resource devices are achieved, solving the problems of low resource utilization and insufficient flexibility in existing technologies, and improving resource utilization and allocation flexibility.

CN120762879APending Publication Date: 2025-10-10HUAWEI TECH CO LTD
View PDF 11 Cites 0 Cited by

Patent Information

Application Number
CN202510689007.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-04-27
Filing Date
2023-08-30
Publication Date
2025-10-10

AI Technical Summary

Technical Problem

The resource pooling technology in the existing technology has a coarse resource allocation granularity, resulting in low resource utilization and insufficient flexibility, and cannot be efficiently managed and allocated to multiple user hosts.

Method used

A device resource management system based on a model that separates physical configuration resources from functional configuration resources is adopted. Through the management host, resource discovery, management, and allocation are performed at the functional configuration resource (VF level) granularity, achieving fine-grained allocation of resource devices.

Benefits of technology

It improves resource utilization and allocation flexibility, so that multiple functional configuration resources of the same resource device can be allocated to different user hosts to meet the needs of different hosts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120762879A_ABST
    Figure CN120762879A_ABST
Patent Text Reader

Abstract

The invention discloses a device resource management method, a related system and a storage medium, the system can comprise at least one user host, at least one resource device and a management host, each resource device comprises a first entity and at least one second entity, and the total number of the second entities is N; the first entity comprises a physical configuration resource, and the one or more second entities comprise a function configuration resource generated after the physical configuration resource is configured; the management host allocates the N second entities to the at least one user host for use according to a resource allocation strategy, and the target user host allocates L second entities; and the target user host registers the L second entities and uses the L second entities. According to the resource allocation method and device, the second entity in the resource equipment can be used as a unit to allocate to different user hosts, the resource allocation granularity is finer, the resource utilization rate is higher, and the resource allocation flexibility is higher.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application. The application number of the original application is 202311128158.2, and the original application date is August 30, 2023. The entire content of the original application is incorporated into this application by reference. Technical Field

[0002] The present application relates to the field of computer technology, and in particular to a device resource management method, related system, and storage medium. Background Art

[0003] With the continuous advancement of computer technology, related applications across various industries are emerging in an endless stream, and massive amounts of data are impacting the entire data center industry at an unprecedented growth rate. Consequently, data center builders are forced to re-examine information technology (IT) system architecture with a new mindset. Traditional rack servers have shown signs of fatigue when dealing with large-scale business models. For example, when running certain resource-intensive applications, traditional rack servers are inefficient and also affect server density (e.g., the number of servers per unit space). Furthermore, in traditional rack servers, different types of resources suffer from lifecycle asynchrony. For example, central processing units (CPUs) are developing at the fastest rate, doubling their performance every two to three years. Storage technology, on the other hand, is developing more slowly. When a traditional rack server is offline due to storage failure, its CPU may still be able to meet demand, but it will be offline along with the traditional rack server due to storage failure, resulting in a waste of CPU performance and power consumption.

[0004] To address these issues, many companies in the industry have begun researching new server architectures. For example, Intel's Rack Scale Architecture (RSA) and Google's collaboration with the University of California Berkeley on the Warehouse Scale Computer (WSC) have both chosen a common approach: server resource pooling. Resource pooling involves pooling several key server resources, such as CPU, memory, storage, and I / O. This pooling model facilitates management and scalability, reducing operational and maintenance costs. From the perspective of the operating system (OS) or business software, the server still appears to be a traditional server, consisting of a CPU, memory, hard drive, and network interface card. However, a major challenge facing resource pooling is how to make resources available to multiple user hosts. Specifically, determining resource configuration and management strategies involves identifying, recording, allocating, and reclaiming resources.

[0005] Currently, resource management solutions for resource pooling technology are still under exploration. Summary of the Invention

[0006] The embodiments of the present application provide a device resource management method, related system and storage medium, which can enable multiple user hosts to share the resources of a resource device after resource pooling is realized, and the resource allocation granularity of the resource device is finer and the resource utilization rate is higher, and resources can be flexibly allocated according to the needs of the user host.

[0007] In the first aspect, an embodiment of the present application provides a device resource management method, which can be applied to a management host in a device resource management system, wherein the device resource management system also includes at least one user host and at least one resource device; each resource device in the at least one resource device includes a first entity and at least one second entity; the first entity includes a physical configuration resource; the at least one second entity includes a functional configuration resource generated after the physical configuration resource is configured; the at least one resource device includes a total of N second entities, where N is an integer greater than 1; the method includes: obtaining a resource allocation strategy; the resource allocation strategy is used to determine that L second entities among the N second entities are allocated to a target user host in the at least one user host; L is a positive integer less than or equal to N; sending first configuration information to the target user host; the first configuration information is used to notify the target user host to register the L second entities.

[0008] In the prior art, the model of PCIe devices is physical function (PF) + virtual function (VF), where PCIe devices are discovered, managed, and allocated with physical functions (which include comprehensive PCIe functions) as the minimum granularity. Therefore, the allocation granularity of resource devices in the prior art is at the PF level, so that multiple VFs created by a certain PF can only be allocated to the same user host for use. The allocation granularity is coarse, the resource allocation flexibility is insufficient, and the resource utilization rate is also low. In an embodiment of the present application, a management system for resource devices based on a model of separation of physical configuration resources and functional configuration resources (i.e., a first entity + one or more second entities) is provided. The management host in the system can allocate the second entity of the resource device as the minimum resource allocation granularity to different user hosts in the system according to the resource allocation policy. These user hosts can use them after registering the allocated second entities, that is, the management host can perform resource discovery, management and allocation at the granularity of the second entity of the resource device. Since the second entity in the embodiment of the present application includes the functional configuration resources of the resource device, which belongs to the VF-level resources, compared with the method of allocating PF-level resources in the prior art, the embodiment of the present application allocates resources at the granularity of the second entity, and the allocation granularity is finer, the resource utilization rate is higher, and the multiple second entities corresponding to the first entity can be allocated to different user hosts for use, and the resource allocation flexibility is higher.

[0009] In a possible implementation, the method further includes: scanning the device resource management system to discover the at least one user host and the at least one resource device.

[0010] In an embodiment of the present application, before obtaining a resource allocation strategy, the management host may first scan the device resource management system to discover each user host and resource device in the system, thereby providing a basis for allocating resources of the resource device to the user host.

[0011] In one possible implementation, the scanning of the device resource management system to discover the at least one user host and the at least one resource device includes: sending an enumeration message in the device resource management system; the enumeration message is used to discover the devices in the device resource management; receiving enumeration response messages respectively sent by the at least one user host and the at least one resource device in response to the enumeration message; and determining the at least one user host and the at least one resource device based on the enumeration response message.

[0012] In an embodiment of the present application, after sending an enumeration message in the system, the management host can receive enumeration response messages sent by each user host and resource device in the system in response to the enumeration message, and then discover each user host and resource device in the system, obtain information about each device, and provide a prerequisite for subsequent resource allocation.

[0013] In a possible implementation, the acquiring the resource allocation policy includes: acquiring a resource requirement of a target user host among the at least one user host; and determining the resource allocation policy based on the resource requirement.

[0014] In an embodiment of the present application, the resource allocation strategy of the management host can be determined based on the resource requirements of the target user host, thereby achieving resource allocation according to demand, improving the flexibility of resource allocation and resource utilization.

[0015] In a possible implementation manner, the method further includes: configuring entity identity identifiers and / or authority identifiers for the L second entities.

[0016] In the embodiment of the present application, after scanning and discovering each resource device, the management host can obtain the device information of each resource device. To facilitate resource allocation and resource usage security, the management host can configure entity identity identifiers and / or permission identifiers for the second entities in each resource device, making it easier for the user host to distinguish different second entities and confirm access rights to the second entities.

[0017] In a possible implementation manner, the first configuration information includes one or more of the globally unique identifiers, entity identities, or authority identifiers of the L second entities.

[0018] In an embodiment of the present application, when the management host notifies the target user host through the first configuration information to register the L allocated second entities, it can configure one or more of the globally unique identifiers, entity identity identifiers or authority identifiers of these second entities in the first configuration information, so that the target user host can distinguish different second entities based on this information, or determine the access rights of the second entities.

[0019] In a possible implementation, the method further includes: sending second configuration information to the target user host; the second configuration information is used to notify the target user host to deregister one or more second target entities among the L second entities.

[0020] In an embodiment of the present application, after the management host allocates L second entities of at least one resource device to the target user host, it can notify it through the second configuration information to deregister some or all of these second entities, thereby recovering the allocated resources and facilitating the subsequent allocation of these second entities to other user hosts.

[0021] In a possible implementation manner, the second configuration information includes one or more of a globally unique identifier, an entity identity identifier, or an authority identifier of the one or more second target entities.

[0022] In an embodiment of the present application, when the management host notifies the target user host through the second configuration information to deregister some or all of the L allocated second entities, one or more of the globally unique identifiers, entity identity identifiers or authority identifiers of these second entities can be configured in the second configuration information, so that the target user host can distinguish different second entities based on this information, or determine the access rights of the second entities.

[0023] In one possible implementation, the sending of the second configuration information to the target user host includes: sending the second configuration information to the target user host when the resource allocation policy changes; or sending the second configuration information to the target user host when a failure occurs in one or more second target entities or a resource device to which the one or more second target entities belong.

[0024] In an embodiment of the present application, the management host can notify the target user host to deregister the second entity through the second configuration information when the resource allocation policy changes, or the allocated second entity fails, or the resource equipment to which these second entities belong fails, to ensure that the resources in the system can be allocated and used normally.

[0025] In a possible implementation, the method further includes: when the resource allocation policy changes, resetting the one or more second target entities, and clearing entity identifications and / or authority identifications of the one or more second target entities.

[0026] In an embodiment of the present application, the management host can reset one or more second entities that need to be recovered and clear their entity identity identifiers and / or authority identifiers when the resource allocation policy changes, so as to facilitate the subsequent allocation of these resources to other user hosts.

[0027] In one possible implementation, the method further includes: configuring a network address for the physical port of the target user host; and sending the first configuration information to the target user host includes: sending the first configuration information to the target user host based on the network address of the physical port of the target user host.

[0028] In an embodiment of the present application, after scanning and discovering each device in the system, the management host can configure a network address for the physical port of the target user host, and subsequent communication messages between the management host and the target user host can be routed and transmitted based on this network address. This is different from the existing technology that is based on memory addresses and does not require additional complex table lookups and conversions, thereby reducing latency and bandwidth overhead.

[0029] In the second aspect, an embodiment of the present application provides a device resource management method, which can be applied to a target user host in a device resource management system, wherein the device resource management system includes a management host, at least one user host and at least one resource device, and the target user host is any one of the at least one user host; each resource device in the at least one resource device includes a first entity and at least one second entity; the first entity includes a physical configuration resource; the at least one second entity includes a functional configuration resource generated after the physical configuration resource is configured; the at least one resource device includes a total of N second entities, where N is an integer greater than 1; the method includes: receiving first configuration information sent by the management host; determining L second entities allocated based on the first configuration information; the L second entities are part or all of the N second entities; L is a positive integer less than or equal to N; and registering the L second entities.

[0030] In an embodiment of the present application, the management host can allocate N second entities of at least one resource device to at least one user host for use, determine to allocate L second entities to the target user host for use and send the first configuration information, and the target user host can determine the allocated L second entities based on the received first configuration information, and then register and use these second entities. That is, the management host can perform resource discovery, management and allocation at the granularity of the second entity of the resource device, wherein, since the second entity in the embodiment of the present application includes the functional configuration resources of the resource device, which belongs to the VF level resource, compared with the method of allocating at the PF level in the prior art, the embodiment of the present application allocates resources at the granularity of the second entity, and the allocation granularity is finer, the resource utilization rate is higher, and the multiple second entities corresponding to the first entity can be allocated to different user hosts for use, and the resource allocation flexibility is higher.

[0031] In a possible implementation, registering the L second entities includes: creating local devices for the L second entities; loading a device driver for the local device, and establishing a communication channel from the local device to the L second entities through the device driver.

[0032] In a possible implementation manner, the method further includes: enabling and using the L second entities.

[0033] In a possible implementation manner, the method further includes: receiving an enumeration message sent by the management host; and sending an enumeration response message to the management host in response to the enumeration message.

[0034] In a possible implementation manner, the method further includes: sending a resource requirement to the management host.

[0035] In a possible implementation, the method further includes: receiving second configuration information sent by the management host; determining one or more second target entities to be deregistered among the L second entities based on the second configuration information; and deregistering the one or more second target entities.

[0036] In a possible implementation, the deregistering the one or more second target entities includes: unloading a device driver loaded for a local device; the local device is a device node created for the one or more second target entities; and deleting the local device.

[0037] In a possible implementation manner, the second configuration information includes one or more of a globally unique identifier, an entity identity identifier, or an authority identifier of the one or more second target entities.

[0038] In a possible implementation manner, the first configuration information includes one or more of the globally unique identifiers, entity identities, or authority identifiers of the L second entities.

[0039] In the third aspect, an embodiment of the present application provides a device resource management method, which is characterized in that it can be applied to resource devices in a device resource management system, and the device resource management system also includes a management host; the method includes: receiving an enumeration message sent by the management host; the enumeration message is used to discover the devices in the device resource management; sending an enumeration response message to the management host in response to the enumeration message; the enumeration response message is used to report information of the resource device.

[0040] In a possible implementation manner, the enumeration response message includes a globally unique identifier of the target resource device.

[0041] In a fourth aspect, an embodiment of the present application provides a device resource management system, the system comprising at least one user host, at least one resource device and a management host, wherein: each resource device in the at least one resource device comprises a first entity and at least one second entity; the first entity comprises a physical configuration resource, and the at least one second entity comprises a functional configuration resource generated after the configuration of the physical configuration resource; the at least one resource device comprises at least one first entity and N second entities in total, where N is an integer greater than 1; the management host is used to obtain a resource allocation policy, and allocate the N second entities to the at least one user host as needed according to the resource allocation policy; wherein the target user host is allocated L second entities, the L second entities corresponding to the Q first entities in the at least one first entity, and the target user host is any one of the at least one user host; L is a positive integer less than or equal to N; the target user host is used to register the L second entities.

[0042] In a possible implementation, the management host is further configured to scan the device resource management system to discover the at least one user host and the at least one resource device.

[0043] In one possible implementation, the management host is specifically used to: send an enumeration message in the device resource management system, and receive enumeration response messages sent by the at least one user host and the at least one resource device respectively in response to the enumeration message; determine the at least one user host and the at least one resource device based on the enumeration response message; the at least one user host and the at least one resource device are used to receive the enumeration message and send enumeration response information to the management host in response to the enumeration message.

[0044] In a possible implementation, the management host is specifically configured to: obtain resource requirements of a target user host among the at least one user host; determine the resource allocation policy based on the resource requirements; and the target user host is configured to send the resource requirements to the management host.

[0045] In a possible implementation manner, the management host is further configured to: configure entity identity identifiers and / or authority identifiers for the L second entities.

[0046] In one possible implementation, the management host is further used to: send first configuration information to the target user host; the first configuration information is used to notify the target user host to register the L second entities, and the first configuration information includes one or more of the globally unique identifiers, entity identity identifiers or authority identifiers of the L second entities; the target user host is used to: receive the first configuration information sent by the management host; determine the allocated L second entities based on the first configuration information; the L second entities are part or all of the N second entities; L is a positive integer less than or equal to N; and register the L second entities.

[0047] In one possible implementation, the management host is further used to: send second configuration information to the target user host; the second configuration information is used to notify the target user host to deregister one or more second target entities among the L second entities, and the second configuration information includes one or more of the globally unique identifiers, entity identity identifiers or authority identifiers of the one or more second target entities; the target user host is further used to: receive the second configuration information sent by the management host; determine one or more second target entities to be deregistered among the L second entities based on the second configuration information; and deregister the one or more second target entities.

[0048] In one possible implementation, the management host is specifically used to: send the second configuration information to the target user host when the resource allocation policy changes; or send the second configuration information to the target user host when the one or more second target entities or the resource equipment to which the one or more second target entities belong fails.

[0049] In a possible implementation, the management host is further configured to: when the resource allocation policy changes, reset the one or more second target entities, and clear entity identifications and / or authority identifications of the one or more second target entities.

[0050] In one possible implementation, the target resource device among the at least one resource device includes P second entities among the N second entities; the management host is specifically used to: allocate the P second entities to the at least one user host for use; wherein the L second entities allocated to the target user host include part or all of the P second entities; the L second entities come from the same or different resource devices among the at least one resource device.

[0051] In an embodiment of the present application, when the management host allocates the second entities included in multiple resource devices in the system, it can allocate the second entity included in the target resource device to multiple user hosts in the system for use, wherein the target resource device can be any one or any several resource devices among the multiple resource devices, so that the target user host among the multiple user hosts is allocated one or more second entities that meet the needs. These second entities that meet the needs can be provided by one resource device or by different resource devices, further improving the flexibility of resource allocation.

[0052] In one possible implementation, the management host is specifically configured to: when P is equal to 1, allocate the P second entities to the target user host for use; or, when P is equal to 1, allocate the P second entities to the target user host for use within a first period of time, and allocate the P second entities to other user hosts for use within a second period of time; the other user hosts are user hosts other than the target user host among the at least one user host.

[0053] In an embodiment of the present application, the management host allocates the P second entities included in the target resource device to multiple user hosts in the system for use. If P is 1, the management host can allocate the P second entities to the target user host for use, or allocate them to the target user host for use in a certain time period. In other time periods after the target user host uses them, the P second entities can be allocated to other user hosts for use, thereby further improving resource utilization.

[0054] In one possible implementation, the management host is specifically configured to: when P is greater than 1, allocate the P second entities to the target user host for use; or, when P is greater than 1, allocate S second entities among the P second entities to the target user host for use, and allocate some or all of the other (PS) second entities among the P second entities to other user hosts for use; the other user hosts are user hosts other than the target user host among the at least one user host.

[0055] In an embodiment of the present application, when the management host allocates P second entities included in the target resource device to multiple user hosts in the system for use, if P is greater than 1, the management host can allocate all of the P second entities to the target user host for use, or, can allocate a part of the P second entities to the target user host for use, and allocate the other part of the second entities to other user hosts for use, thereby further improving the flexibility of resource allocation and resource utilization.

[0056] In a possible implementation, the system further includes: a switching device configured to connect the at least one user host, the management host, and the at least one resource device.

[0057] In an embodiment of the present application, by adding a switching device, the various devices in the device resource management system can be connected through the switching device. The switching device can provide a large number of ports, and there is no need to directly establish a connection between the at least one user host, the management host and the at least one resource management, thereby saving and protecting the physical ports of the various devices, making it convenient for the system to expand the number of user hosts (Host) and resource devices, and enhancing the scalability of the system.

[0058] In a possible implementation, the at least one user host, the at least one resource device, the management host, and the physical ports of the switching device are respectively configured with network addresses, and the network addresses are used to determine transmission routes of communication messages in the system.

[0059] In an embodiment of the present application, the management host can configure a network address for the physical port of each device in the system, so that the communication messages in the system can be routed based on the network address. Different from the prior art method in which communication messages are routed based on the memory address and the bus domain ID (or the switch port ID), the switching device can forward the communication message based on the network address carried in the communication message without performing a table lookup conversion between the memory address and the bus domain ID (or the switch port ID), thereby reducing the delay overhead caused by the table lookup conversion. In addition, when the switching device in the prior art converts between the memory address and the switch port ID, it is also necessary to convert the communication message (such as a TLP message) into a message and carry the source and destination IDs in the message to complete the message transmission, which consumes additional bandwidth resources. However, the embodiment of the present application is based on a routing mechanism based on the network address, and does not need to convert the communication message into a message, thereby reducing the consumption of bandwidth resources.

[0060] In a possible implementation, each of the N second entities is configured with a globally unique identifier and / or an entity identity; the globally unique identifier is used to distinguish different second entities, and the entity identity is used to distinguish different second entities.

[0061] In an embodiment of the present application, each of the plurality of second entities in the system may be configured with a globally unique identifier and / or entity identity to distinguish between different second entities. The length of the entity identity may be determined based on the total number of second entities across all resource devices within the domain, or based on the number of second entities across a particular resource device among all resource devices, thereby effectively reducing the resources used to distinguish between different entities.

[0062] In one possible implementation, each user host of the at least one user host is configured with a first authority identifier, and each second entity of the N second entities is configured with a second authority identifier; the access rights of each user host to each second entity are determined based on the first authority identifier and the second authority identifier.

[0063] In an embodiment of the present application, the management host can configure an authority identifier for each user host and each second entity to confirm whether the user host has the authority to access the second entity, thereby ensuring the security of the resources included in the resource devices in the system (i.e., one or more second entities included in each resource device).

[0064] In one possible implementation, the physical configuration resources include one or more of public configuration management resources, resource configuration management resources, and interconnection configuration management resources; the functional configuration resources include one or more of artificial intelligence resources, memory resources, and network resources.

[0065] In an embodiment of the present application, the physical configuration resources and functional configuration resources of the resource device are separated. The management host can configure and manage the physical configuration resources and allocate the functional configuration resources of the resource device to the user host for use, so that the user host can use one or more of artificial intelligence resources, memory resources and network resources without having to manage the public configuration management resources, resource configuration management resources and interconnection configuration management resources of the resource device, so that the management host can allocate resources with finer granularity and reduce the complexity of the user host.

[0066] In the fifth aspect, an embodiment of the present application provides a device resource management method, which can be applied to a management host in a device resource management system, wherein the device resource management system includes at least one user host, at least one resource device and a management host, and each resource device in the at least one resource device includes a first entity and one or more second entities; the first entity includes a physical configuration resource; the one or more second entities include functional configuration resources generated after the physical configuration resource is configured; the at least one resource device includes a total of at least one first entity and N second entities, where N is an integer greater than 1; the method may include: allocating the N second entities to the at least one user host for use as needed; wherein the target user host is allocated L second entities, the L second entities correspond to the Q first entities in the at least one first entity, and the target user host is any one of the at least one user host; L is a positive integer less than or equal to N.

[0067] In one possible implementation, the target resource device in the at least one resource device includes P second entities among the N second entities; allocating the N second entities to the at least one user host for use as needed includes: allocating the P second entities to the at least one user host for use; wherein the L second entities allocated to the target user host include part or all of the P second entities; and the L second entities come from the same or different resource devices in the at least one resource device.

[0068] In a possible implementation, allocating the P second entities to the at least one user host for use includes: when P is equal to 1, allocating the P second entities to the target user host for use; or, when P is equal to 1, allocating the P second entities to the target user host for use within a first period of time, and allocating the P second entities to other user hosts for use within a second period of time; the other user hosts are user hosts other than the target user host among the at least one user host.

[0069] In a possible implementation, allocating the P second entities to the at least one user host for use includes: when P is greater than 1, allocating the P second entities to the target user host for use; or, when P is greater than 1, allocating S second entities among the P second entities to the target user host for use, and allocating some or all of the other (PS) second entities among the P second entities to other user hosts for use; the other user hosts are user hosts other than the target user host among the at least one user host.

[0070] In a possible implementation, the system further includes a switching device, and the method further includes: connecting the at least one user host, the management host, and the at least one resource device through the switching device.

[0071] In a possible implementation, the at least one user host, the at least one resource device, the management host, and the physical ports of the switching device are respectively configured with network addresses, and the network addresses are used to determine transmission routes of communication messages in the system.

[0072] In a possible implementation, each of the N second entities is configured with a globally unique identifier and / or an entity identity; the globally unique identifier is used to distinguish different second entities, and the entity identity is used to distinguish different second entities.

[0073] In one possible implementation, each user host of the at least one user host is configured with a first authority identifier, and each second entity of the N second entities is configured with a second authority identifier; the access rights of each user host to each second entity are determined based on the first authority identifier and the second authority identifier.

[0074] In one possible implementation, the physical configuration resources include one or more of public configuration management resources, resource configuration management resources, and interconnection configuration management resources; the functional configuration resources include one or more of artificial intelligence resources, memory resources, and network resources.

[0075] In one possible implementation, the method further includes: determining the L second entities from the N second entities, and determining the target user host from the at least one user host; sending first configuration information of the L second entities to the target user host; the first configuration information is used to notify the target user host to establish communication channels to the L second entities based on the Q first entities.

[0076] In a possible implementation, the method further includes: sending second configuration information of the L second entities to the target user host; the second configuration information is used to notify the target user host to deregister the communication channel to the L second entities.

[0077] In a sixth aspect, an embodiment of the present application provides a device resource management method, which can be applied to a target user host in a device resource management system, wherein the device resource management system includes at least one user host, at least one resource device and a management host, and each resource device in the at least one resource device includes a first entity and one or more second entities; the first entity includes a physical configuration resource; the one or more second entities include functional configuration resources generated after the physical configuration resource is configured; the target user host is any one of the at least one user host; the at least one resource device includes at least one first entity and N second entities in total, where N is an integer greater than 1; the method includes: receiving first configuration information of L second entities sent by the management host; the L second entities are the second entities among the N second entities, and the first configuration information is used to notify the target user host to establish communication channels to the L second entities based on the Q first entities respectively; the Q first entities are the first entities corresponding to the L second entities in the at least one first entity; communication channels to the L second entities are established based on the Q first entities, and the L second entities are used through the communication channels.

[0078] In one possible implementation, the method further includes: receiving second configuration information of the L second entities sent by the management host; the second configuration information is used to notify the target user host to cancel the communication channel to the L second entities; and responding to the second configuration information to cancel the communication channel to the L second entities.

[0079] In one possible implementation, the communication channels established to the L second entities respectively based on the Q first entities include: creating local devices for the L second entities according to the first configuration information of the L second entities sent by the management host; loading a device driver for the local device, and establishing a communication channel from the local device to the L second entities through the device driver.

[0080] In one possible implementation, the response to the second configuration information to deregister the communication channels to the L second entities includes: uninstalling the device driver according to the second configuration information of the L second entities sent by the management host; the device driver is the driver of the local device created by the target user host for the L second entities; deleting the local device corresponding to the device driver, and deregistering the communication channel from the local device to the L second entities.

[0081] In one possible implementation, the at least one resource device and the physical port of the target user host are respectively configured with a network address; the method further includes: sending a communication message to any one of the L second entities through the communication channel; the transmission route of the communication message is determined based on the network address of the at least one resource device and the physical port of the target user host.

[0082] In one possible implementation, the first configuration information and the second configuration information include a globally unique identifier and / or entity identity of each of the L second entities; the globally unique identifier is used to distinguish different second entities, and the entity identity is used to distinguish different second entities.

[0083] In a possible implementation, the first configuration information further includes the permission identifier, and the permission identifier is used to determine whether the target user host has permission to access the L second entities.

[0084] In a seventh aspect, the present application provides a communication device, which can be applied to a management host in a device resource management system, the device resource management system comprising at least one user host, at least one resource device and a management host, each of the at least one resource device comprising a first entity and one or more second entities; the first entity comprising a physical configuration resource; the one or more second entities comprising a functional configuration resource generated after the physical configuration resource is configured; the at least one resource device comprising at least one first entity and N second entities in total, N being an integer greater than 1, the device comprising: a processing unit configured to obtain a resource allocation strategy; the resource allocation strategy being used to determine that L second entities of the N second entities are allocated to a target user host of the at least one user host; L being a positive integer less than or equal to N; a transceiver configured to send first configuration information to the target user host; the first configuration information being used to notify the target user host to register the L second entities.

[0085] In a possible implementation, the transceiver is further configured to scan the device resource management system to discover the at least one user host and the at least one resource device.

[0086] In a possible implementation, the transceiver is further configured to send an enumeration message in the device resource management system; the enumeration message being used to discover devices in the device resource management system; receive enumeration response messages respectively sent by the at least one user host and the at least one resource device in response to the enumeration message; and determine the at least one user host and the at least one resource device based on the enumeration response messages.

[0087] In a possible implementation, the processing unit is specifically configured to obtain resource requirements of a target user host of the at least one user host; and determine the resource allocation strategy based on the resource requirements.

[0088] In a possible implementation, the processing unit is further configured to configure entity identity and / or permission identity for the L second entities.

[0089] In a possible implementation, the first configuration information comprises one or more of a globally unique identifier, entity identity or permission identity of the L second entities.

[0090] In a possible implementation, the transceiver is further configured to send second configuration information to the target user host; the second configuration information being used to notify the target user host to unregister one or more second target entities of the L second entities.

[0091] In a possible implementation manner, the second configuration information includes one or more of a globally unique identifier, an entity identity identifier, or an authority identifier of the one or more second target entities.

[0092] In one possible implementation, the transceiver unit is specifically used to send the second configuration information to the target user host when the resource allocation strategy changes; or, when the one or more second target entities or the resource equipment to which the one or more second target entities belong fails, to send the second configuration information to the target user host.

[0093] In a possible implementation, the processing unit is further configured to reset the one or more second target entities and clear entity identification identifiers and / or authority identifiers of the one or more second target entities when the resource allocation policy changes.

[0094] In a possible implementation, the processing unit is further used to configure a network address for the physical port of the target user host; the transceiver unit is specifically used to send the first configuration information to the target user host based on the network address of the physical port of the target user host.

[0095] In one possible implementation, the processing unit is specifically configured to allocate the N second entities to the at least one user host for use as needed; wherein the target user host is allocated L second entities, the L second entities corresponding to Q first entities in the at least one first entity, and the target user host is any one of the at least one user host; and L is a positive integer less than or equal to N.

[0096] In one possible implementation, the target resource device among the at least one resource device includes P second entities among the N second entities; the processing unit is specifically used to: allocate the P second entities to the at least one user host for use; wherein the L second entities allocated to the target user host include part or all of the P second entities; the L second entities come from the same or different resource devices among the at least one resource device.

[0097] In one possible implementation, the processing unit is specifically configured to: when P is equal to 1, allocate the P second entities to the target user host for use; or, when P is equal to 1, allocate the P second entities to the target user host for use within a first period of time, and allocate the P second entities to other user hosts for use within a second period of time; the other user hosts are user hosts other than the target user host among the at least one user host.

[0098] In one possible implementation, the processing unit is specifically configured to: when P is greater than 1, allocate the P second entities to the target user host for use; or, when P is greater than 1, allocate S second entities among the P second entities to the target user host for use, and allocate some or all of the other (PS) second entities among the P second entities to other user hosts for use; the other user hosts are user hosts other than the target user host among the at least one user host.

[0099] In a possible implementation, the system further includes a switching device, and the processing unit is further configured to connect the at least one user host, the management host, and the at least one resource device via the switching device.

[0100] In a possible implementation, the at least one user host, the at least one resource device, the management host, and the physical ports of the switching device are respectively configured with network addresses, and the network addresses are used to determine transmission routes of communication messages in the system.

[0101] In a possible implementation, each of the N second entities is configured with a globally unique identifier and / or an entity identity; the globally unique identifier is used to distinguish different second entities, and the entity identity is used to distinguish different second entities.

[0102] In one possible implementation, each user host of the at least one user host is configured with a first authority identifier, and each second entity of the N second entities is configured with a second authority identifier; the access rights of each user host to each second entity are determined based on the first authority identifier and the second authority identifier.

[0103] In one possible implementation, the physical configuration resources include one or more of public configuration management resources, resource configuration management resources, and interconnection configuration management resources; the functional configuration resources include one or more of artificial intelligence resources, memory resources, and network resources.

[0104] In an eighth aspect, the application provides a communication device applicable to a target user host in a device resource management system, the device resource management system comprising at least one user host, at least one resource device, and a management host, each of the at least one resource device comprising a first entity and one or more second entities; the first entity comprising a physical configuration resource; the one or more second entities comprising a functional configuration resource generated after being configured by the physical configuration resource; the target user host being any one of the at least one user host; the at least one resource device comprising at least one first entity and N second entities in total, N being an integer greater than 1; the device comprising: a transceiving unit configured to receive first configuration information sent by the management host, and determine L second entities allocated based on the first configuration information; L being a positive integer less than or equal to N; the L second entities being second entities of the N second entities, the first configuration information being used to notify the target user host to register the L second entities, and establish communication channels to the L second entities based on Q first entities respectively; the Q first entities being first entities of the at least one first entity corresponding to the L second entities; and a processing unit configured to register the L second entities, establish communication channels to the L second entities based on the Q first entities respectively, and use the L second entities through the communication channels.

[0105] In a possible implementation, the processing unit is specifically configured to create a local device for the L second entities; load a device driver for the local device, and establish a communication channel of the local device to the L second entities through the device driver.

[0106] In a possible implementation, the processing unit is further configured to enable and use the L second entities.

[0107] In a possible implementation, the transceiving unit is further configured to receive an enumeration message sent by the management host; and send an enumeration response message to the management host for the enumeration message.

[0108] In a possible implementation, the transceiving unit is further configured to send resource requirements to the management host.

[0109] In a possible implementation, the transceiving unit is further configured to receive second configuration information sent by the management host, and determine one or more second target entities to be unregistered in the L second entities based on the second configuration information; the second configuration information being used to notify the target user host to unregister the one or more second target entities; and the processing unit is further configured to unregister the one or more second target entities in response to the second configuration information.

[0110] In one possible implementation, the processing unit is specifically used to: create local devices for the L second entities based on the first configuration information of the L second entities sent by the management host; load a device driver for the local device, and establish a communication channel from the local device to the L second entities through the device driver.

[0111] In a possible implementation, the processing unit is specifically configured to: unload a device driver loaded for a local device; the local device is a device node created for the one or more second target entities; and delete the local device.

[0112] In one possible implementation, the at least one resource device and the physical port of the target user host are respectively configured with a network address; the transceiver unit is further used to: send a communication message to any one of the L second entities through the communication channel; the transmission route of the communication message is determined based on the network address of the at least one resource device and the physical port of the target user host.

[0113] In a possible implementation manner, the second configuration information includes one or more of a globally unique identifier, an entity identity identifier, or an authority identifier of the one or more second target entities.

[0114] In a possible implementation manner, the first configuration information includes one or more of the globally unique identifiers, entity identities, or authority identifiers of the L second entities.

[0115] In the ninth aspect, the present application provides a communication device, which can be applied to resource equipment in a device resource management system. The device resource management system also includes a management host, and the device includes: a transceiver unit for receiving an enumeration message sent by the management host; the enumeration message is used to discover the equipment in the device resource management; an enumeration response message is sent to the management host in response to the enumeration message; the enumeration response message is used to report information of the resource equipment.

[0116] In a possible implementation manner, the enumeration response message includes a globally unique identifier of the target resource device.

[0117] In the tenth aspect, an embodiment of the present application provides a computer-readable storage medium for storing computer software instructions used by a system / device / apparatus for implementing a device resource management method provided by one or more of the above aspects, which includes a program designed to execute the above aspects.

[0118] In the eleventh aspect, an embodiment of the present application provides a computer program, which includes instructions. When the computer program is executed by a computer, the computer can execute a process executed by a system / device / apparatus for implementing a device resource management method provided by one or more of the above-mentioned aspects.

[0119] In a twelfth aspect, an embodiment of the present application provides a terminal device, comprising a processor configured to support the terminal device in implementing the corresponding functions of the device resource management method provided in the first, second, third, fifth, or sixth aspects. The terminal device may further include a memory coupled to the processor and storing program instructions and data necessary for the terminal device. The terminal device may further include a communication interface for the terminal device to communicate with other devices or a communication network.

[0120] In a thirteenth aspect, an embodiment of the present application provides a terminal device, comprising a logic circuit configured to support the terminal device in implementing the corresponding functions of the device resource management method provided in the first, second, third, fifth, or sixth aspects. The terminal device may further include a storage circuit coupled to the logic circuit to store program instructions and data necessary for the terminal device. The terminal device may further include an interface for the terminal device to communicate with other devices or a communication network.

[0121] In a fourteenth aspect, an embodiment of the present application provides a chip system, which includes a processor for supporting a device to implement the functions involved in the first, second, third, fifth, or sixth aspects above, for example, generating or processing the information involved in the above-mentioned device resource management method. In one possible design, the chip system also includes a memory, which is used to store program instructions and data necessary for the device. The chip system can be composed of a chip, or it can include a chip and other discrete devices.

[0122] In the fifteenth aspect, an embodiment of the present application provides a server, comprising a communication interface, a memory, and a processor; the communication interface, the memory, and the processor are coupled, the communication interface is used for the server to communicate with other devices or a communication network, the memory is used to store computer program code, and the computer program code includes computer instructions. When the processor reads the computer instructions from the memory, the server executes any possible implementation method as in the first aspect, the second aspect, the third aspect, the fifth aspect, or the sixth aspect.

[0123] In the sixteenth aspect, an embodiment of the present application provides a vehicle-mounted device, including a communication interface, a memory and a processor; the communication interface, the memory and the processor are coupled, the communication interface is used for the vehicle-mounted device to communicate with other devices or a communication network, and the memory is used to store computer program code, the computer program code includes computer instructions, and when the processor reads the computer instructions from the memory, the vehicle-mounted device executes any possible implementation method such as the first aspect, the second aspect, the third aspect, the fifth aspect or the sixth aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0124] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the background technology, the drawings required for use in the embodiments of the present application or the background technology will be described below.

[0125] Figure 1a It is a schematic diagram of the system structure based on the PCI bus domain.

[0126] Figure 1b This is another schematic diagram of the system structure based on the PCI bus domain.

[0127] Figure 1c The diagram is a schematic diagram of a system structure based on a PCIe bus domain.

[0128] Figure 2 This is a schematic diagram of the system structure based on CXL.

[0129] Figure 3a This is a schematic diagram of the architecture of a device resource management system provided in an embodiment of the present application.

[0130] Figure 3b This is a schematic diagram of the architecture of a data center provided in an embodiment of the present application.

[0131] Figure 3c This is a schematic diagram of a device protocol layered structure provided in an embodiment of the present application.

[0132] Figure 4 This is a structural diagram of a resource device provided in an embodiment of the present application.

[0133] Figure 5 This is a schematic diagram of the architecture of another device resource management system provided in an embodiment of the present application.

[0134] Figure 6 This is a structural diagram of the intercommunication of multiple device resource management systems provided in an embodiment of the present application.

[0135] Figure 7 This is a flow chart of a device resource management method provided in an embodiment of the present application.

[0136] Figure 8is a flow diagram of a resource registration provided by an embodiment of the present application.

[0137] Figure 9 is a flow diagram of a resource deregistration provided by an embodiment of the present application.

[0138] Figure 10 is a structural diagram of a communication apparatus provided by an embodiment of the present application.

[0139] Figure 11 is a structural diagram of another communication apparatus provided by an embodiment of the present application.

[0140] Figure 12 is a structural diagram of another communication apparatus provided by an embodiment of the present application.

[0141] Figure 13 is a structural diagram of yet another communication apparatus provided by an embodiment of the present application. DETAILED DESCRIPTION

[0142] The embodiments of the present application will be described below with reference to the accompanying drawings.

[0143] The terms "first", "second", "third", and "fourth" and the like in the description and in the claims of the present specification are used for distinguishing between similar elements and not necessarily described in a particular order. Furthermore, the terms "comprise", "include", "contain", and "have" and their conjugates, as used in the present specification, are intended to cover a non-exclusive inclusion. For example, a process, method, system, product, or apparatus that comprises a list of steps or units are not necessarily limited to the listed steps or units, but can optionally further include additional steps or units not listed, or can also include steps or units inherent to the process, method, system, product, or apparatus.

[0144] Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in one or more embodiments of the application. The appearances of the phrase "in an embodiment" in various places in the specification are not necessarily referring to the same embodiment, nor are they necessarily all directed to the same embodiment, or are they necessarily all mutually exclusive or alternative embodiments. It is expressly understood that the embodiments described herein are merely examples from a whole class of comparable embodiments which those skilled in the art will readily appreciate. It is further expressly understood that the description and the examples in this application are inclusive of equivalents and alternatives wherever the context and the conditions permit.

[0145] As used in this specification, the terms "component," "module," "system," and the like are used to represent computer-related entities, hardware, firmware, a combination of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process running on a processor, a processor, an object, an executable file, an execution thread, a program, and / or a computer. By way of illustration, both an application running on a computing device and a computing device can be a component. One or more components can reside in a process and / or an execution thread, and a component can be located on a computer and / or distributed between two or more computers. In addition, these components can be executed from various computer-readable media having various data structures stored thereon. Components can communicate, for example, via local and / or remote processes based on signals having one or more data packets (e.g., data from two components interacting with another component on a local system, a distributed system, and / or a network, such as the Internet interacting with other systems via signals).

[0146] First, some terms in this application are explained to facilitate understanding by those skilled in the art.

[0147] (1) A globally unique identifier (GUID) is a digital identifier that can be generated by an algorithm, and its binary length is generally 128 bits. GUID is mainly used to distinguish different nodes or devices in a network or system with multiple nodes or multiple computer devices, because ideally, no computer or computer cluster will generate two identical GUIDs. However, although GUID is generally 128 bits, its total number can reach 2^128, and the probability of randomly generating two identical GUIDs is very small, but it is not guaranteed to be 0. Therefore, the algorithm used to generate GUID can usually add non-random parameters (such as time) to ensure that GUID duplication does not occur. In the embodiment of the present application, the management host can determine the number of user hosts, resource devices, and entities (including first entities and second entities) included in the resource devices within the domain based on the GUID, and can distinguish different second entities based on the GUID and allocate the second entities to the user host for use. In addition, in some possible implementations, the management host (or user host) can also determine the device type of the resource device (or second entity) based on the GUID.

[0148] (2) Entity identifier (EID). In the embodiment of the present application, the management host may configure an EID for the second entity in the resource device to distinguish different second entities. The length of the EID may be determined based on the total number of second entities in all resource devices in the domain or the number of second entities in a particular resource device among all resource devices. Compared with using a GUID to distinguish different second entities, this method uses fewer resources.

[0149] (3) The permission identifier can also be a partition identifier (PID). In an embodiment of the present application, the management host can additionally configure a PID for the user host within the domain and the second entity of each resource device to determine the access rights of each user host within the domain to each second entity.

[0150] (4) In this application, "plurality" means two or more. "and / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the related objects are in an "or" relationship.

[0151] First, we analyze and propose the specific technical problems that this application aims to solve. The current resource management solutions include the following solutions: Solution 1 and Solution 2:

[0152] Solution 1: In the X86 system architecture, peripheral devices can be connected to the processor system (corresponding to a host) through the peripheral component interconnect (PCI) bus or the peripheral component interconnect-express (PCIe) bus. Figure 1a , Figure 1a It is a system structure diagram based on PCI bus domain. PCI Host Bridge is used to isolate the memory domain of the processor system from the PCI bus domain (corresponding to Figure 1a The PCI Host Bus in the processor system completes the data exchange between the processor system and the PCI devices. A processor system can have multiple PCI Root Bridges. Each PCI Root Bridge (such as Figure 1a PCI RB) can manage a PCI bus (such as Figure 1aEach PCI Bus has a PCI bus tree mounted under it. All PCI devices on the same PCI bus tree belong to the same PCI bus domain.

[0153] Because a PCI device belongs to a PCI bus domain, and a PCI bus domain is usually attached to a host bus domain. Therefore, the processor system can discover and enumerate all PCI devices attached to the PCI bus tree one by one along the PCI bus. Figure 1b , Figure 1b This is another system structure diagram based on the PCI bus domain. To avoid conflicts, all PCI devices need to be encoded. PCI devices are usually distinguished by a three-segment code, namely the bus number (BusNumber), device number (Device Number), and function number (Function Number), referred to as BDF. Based on the BDF, the processor system can uniquely identify a PCI device. For example, (Bus0, Dev0, Func0), (Bus0, Dev1, Func0), (Bus0, Dev2, Func0), (Bus1, Dev0, Func0), (Bus2, Dev1, Func0), (Bus2, Dev2, Func0), etc. can all identify a unique PCI device. Among them, (Bus0, Dev1, Func0) corresponds to the end node (End Point), and (Bus0, Dev2, Func0) corresponds to virtual PCI-to-PCI (Virtual P2P).

[0154] In the above structure, the PCI device will only be discovered and used by one user host (Host), and other hosts cannot discover and use it. In addition, the PCIe protocol defines that memory read and write messages are routed based on the PCI bus domain address. Therefore, in a multi-host scenario, the scenario includes multiple Root Bridges, which also includes multiple sets of PCI bus addresses, and message ID routing cannot be directly supported. For example, memory read and write messages are routed based on the Bus ID. When there are multiple hosts, there will be multiple PCI bus domains. The bus domain ID may be confused due to duplication, and therefore message ID routing cannot be directly supported.

[0155] Similarly, a PCIe device will only be discovered and used by one host, and other hosts cannot discover and use it. In order to enable PCIe devices to support the use of multiple hosts, the PCIe protocol defines the multi-root I / O virtualization (MR-IOV) feature, also known as the multi-root IO virtualization feature. Its essence is to decompose a physical PCIe bus domain into multiple virtual PCIe bus domains. Multiple processor systems can correspond to these multiple virtual PCIe bus domains to achieve isolation of different virtual PCIe bus domains. For reference, Figure 1c , Figure 1c This is a diagram of a system architecture based on PCIe bus domains, including a switch device that supports MR-IOV. After virtualization configuration, the switch can include multiple root ports (RPs, such as RP1, RP2, and RP3) and multiple groups of P2P (PCI-to-PCI) bridges (such as P2P1, P2P2, and P2P3). Each group of P2Ps forms a PCIe bus domain. These multiple PCIe bus domains have independent address spaces, allowing the host to achieve isolated access to peripheral devices. The MR-IOV architecture simplifies the data center structure but increases the complexity of the switch. Peripheral devices also need to provide MR-IOV support (i.e., MRA PCIe devices).

[0156] Solution 2: Device management based on the Compute Express Link (CXL) protocol is based on PCIe and supports multiple hosts while being compatible with PCIe. The CXL protocol introduces a fabric manager (FM) to manage peripheral devices and hosts within the entire domain, and is responsible for allocating peripheral devices to different hosts. Figure 2 , Figure 2 This is a diagram of a CXL-based system architecture. A peripheral device can be a physical device. A physical device (such as a multi-logic device (MLD)) can be divided into multiple logical devices (such as LD-ID0, LD-ID1, ..., LD-IDx). The FM (typically running on the baseboard management controller (BMC)) can assign LD-ID0 to Host A and LD-ID1 to Host B. Hosts A and B are unaware of the logical device IDs; the CXL switch performs the assignment and conversion.

[0157] In multi-host scenarios, different hosts have different address spaces. From the host's perspective, memory accesses issued by the host remain the same as the PCIe protocol, routing based on the memory address. The subsequent CXL 3.0 protocol introduced an ID routing mechanism. The FM assigns an ID number to each port on the CXL switch, allowing packets to be routed to their destinations on the switch network based on the ID. While this ID routing mechanism improves the scalability of the CXL switch, supporting the expansion of multiple switch levels and the connection of more peripheral devices and hosts, it does require the addition of a table on the CXL switch to convert between host memory addresses and IDs, and requires the conversion of transaction layer packets (TLPs) into messages that carry the source and destination IDs.

[0158] The above solution has the following disadvantages:

[0159] Disadvantage 1: Limited host scale and poor scalability. In solution 1, hosts and peripheral devices communicate based on static logical pathways established by the switch. As the number of hosts increases, the switch needs to establish more static logical pathways to support communication between them. This significantly increases the complexity of the switch, and high-complexity switches face significant hardware challenges. Therefore, the host scale is limited. In solution 2, the CXL protocol specifies that a physical device can be divided into a maximum of 16 logical devices (e.g., ID0-ID15), meaning it can only support a maximum of 16 hosts.

[0160] Disadvantage 2: Peripheral device resources are statically allocated to different user hosts, resulting in limited flexibility. In Solution 1, the logical path established by the switch between the host and the peripheral device is static. In Solution 2, the relationship between the peripheral device resources managed by the FM and the host is static. Because the CXL switch does not support rebinding ports to different zones (such as VCS), any change in the relationship between peripheral device resources and user hosts may require a reboot of the switch used for routing and forwarding. The FM and host must deregister the peripheral device and refresh the routing table, resulting in a complex process.

[0161] Disadvantage 3: The allocation granularity of peripheral device resources is not fine enough. For solution one, the device model of a PCI device or PCIe device is a physical function (PF) and a virtual function (VF), namely PF+VF. The physical function is a comprehensive PCIe function that can be discovered, managed, and processed like any other PCIe device. The physical function can be used to configure and control PCIe devices; the virtual function is a PCI function associated with the physical function. Unlike the physical function, the virtual function can only configure its own behavior and is created by the physical function. Therefore, the resources of the peripheral device can only be allocated to different user hosts at the PF granularity, and the allocation at the VF granularity cannot be achieved. For solution two, the device management of the CXL protocol is still based on PCIe, and the device model is also PF+VF, which cannot achieve allocation at the VF granularity.

[0162] Disadvantage 4: Complex table lookups and conversions are required on the switch, adding additional overhead. For solution 1, when the processor system communicates with peripheral devices through the virtual PCIe bus domain, the switch must convert memory addresses and virtual PCIe bus domain IDs, increasing conversion latency. Solution 2 requires adding a table to the CXL switch to convert between host memory addresses and IDs, and converting TLPs into messages. This introduces additional table lookups and conversion latency, consuming additional bandwidth.

[0163] To this end, the present application proposes a device resource management system and related methods, which can realize resource pooling of resource devices, so that multiple user hosts can share the resources of a resource device, and the resource granularity of the resource device is VF level granularity (the resource granularity of the prior art is PF level), that is, the management host can allocate the resources of the resource device to the user host according to a finer resource granularity, and then flexibly allocate resources according to the needs of the user host, with high resource utilization; at the same time, the management resources of the resource device can be managed by the management host, and the user host no longer needs to manage the management resources of the resource device, thereby reducing the complexity of the user host. In addition, the management host can assign network addresses to the physical ports of each device in the system, and the system can transmit messages through a routing mechanism based on network addresses, so that when the number of user hosts (and resource devices) increases, a larger number of user hosts (and resource devices) can be supported by expanding the routing table, rather than by continuously increasing the complexity of the switch to achieve expansion, with good scalability. At the same time, the switch can transmit messages based on the source and destination network addresses without the need for additional complex table lookup and conversion, thereby reducing latency and bandwidth overhead. Moreover, the management host in the system can dynamically allocate resources of resource devices according to changes in resource allocation strategies or the status of resource devices, thus having good flexibility.

[0164] To better understand the device resource management method and related systems provided in the embodiments of the present application, the system architecture and / or application scenarios of the device resource management system provided in the embodiments of the present application are described below. It is understood that the system architecture and application scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application.

[0165] The following describes the architecture of the device resource management system according to the embodiment of the present application in conjunction with the accompanying drawings. Figure 3a , Figure 3a This is a schematic diagram of the architecture of a device resource management system provided in an embodiment of the present application. The device resource management system may include one or more user hosts (i.e., at least one user host, taking four user hosts as an example, including Host0, Host1, Host2, and Host3), a management host, and one or more resource devices (i.e., at least one resource device, taking five resource devices as an example, including Device0, Device1, Device2, Device3, and Device4).

[0166] A user host generally refers to a device with a CPU and memory that can host or run a separate operating system (OS). A user host can correspond to a physical server (including a processor and internal memory) or one of one or more virtual user hosts virtualized from a physical server. To process tasks or data, a user host typically uses resources from a resource device.

[0167] Resource devices, also known as peripheral devices, include external storage devices (such as hard disks, disks, tape drives, etc.), network cards, sound cards, graphics cards, built-in modems, built-in asymmetric digital subscriber line (ADSL) modems, USB 2.0 cards, IEEE 1394 cards, integrated drive electronics (IDE) interface cards, redundant array of independent disks (RAID) cards, TV cards, video capture cards, and a wide variety of other expansion cards. When a user host wants to process certain tasks or data, it generally needs to use resources in the resource device. For example, the user host can use a disk to store operating systems, system files, batch-processed data, and established databases; for another example, the user host can use a tape drive to save records of received and sent information for archiving, as well as for program debugging and fault testing. For example, any of the at least one user host can occupy the resources of the resource device by using the second entity in the resource device, thereby processing certain tasks or data. In an embodiment of the present application, the device resource management system may include at least one resource device, and each resource device may include a first entity and one or more second entities (i.e., at least one second entity). The first entity includes the physical configuration resources of the resource device, and the one or more second entities include the functional configuration resources generated after the physical configuration resources of the resource device are configured. The above-mentioned at least one resource device may include at least one first entity and N second entities in total. Optionally, each resource device may correspond to a physical device, or may correspond to one of one or more logical devices virtualized on a physical device. Optionally, each resource device may also have one or more physical ports. When a user host accesses the device resources (such as the first entity and / or the second entity) in the resource device, the access request message entering from any port can access the required device resources, that is, these ports are shared by multiple device resources. The system can distribute multiple device resources to different user hosts for use. In this case, the multiple device resources have a certain degree of isolation. That is, a resource device in an embodiment of the present application can implement multiple ports, and resource devices can communicate with each other through these ports. The first entity (Function entity 0) or the second entity (Function entity 1, 2, 3, ...) can be understood as an isolated set of device resources. Software can access the resources of the first entity or the second entity through the port interconnection between resource devices (Device).

[0168] The management host can be a separate physical server (including a processor and a memory) or can correspond to one of one or more virtual hosts obtained by virtualization on a physical server. The management host generally carries independent management software (for example, a fabric manager (FM)). Understandably, when the user host carries the management software (for example, the FM), it is also a management host, that is, a host can be both a management host and a user host. The management host can be used to allocate resources (that is, the second entity) of a resource device in the device resource management system to one or more user hosts in the system. Alternatively, the management host can register or unregister the internal resources of the resource device according to changes in the allocation strategy or the state of the resource device, and dynamically allocate the resources of the resource device to the user host. Exemplarily, the management host can allocate the N second entities to the at least one user host according to the demand (or the resource allocation strategy), and the target user host can be allocated L second entities.

[0169] For the convenience of understanding, the application scenarios of the device resource management system provided by the embodiments of the present application will be exemplarily described below. For example, the scenario of application to a data center can be referred to Figure 3b , Figure 3b is a schematic diagram of an architecture of a data center provided by an embodiment of the present application. The data center (DC) 01 generally refers to a physical space in which centralized processing, storage, transmission, exchange and management of information are realized. It can generally include servers (for example, servers 1 and 2), network devices, storage devices and the like. In addition, it can also include other basic devices and other devices (not shown in the figure) that provide specific services for the servers.

[0170] Among them, the server can be a separate server (for example, servers 1 and 2) or a server cluster (for example, a server cluster composed of servers 1 and 2) including multiple servers. The server generally includes a CPU and a memory. The network device can be a router, a switch and a network interface card (NIC) and the like, which is used to provide network services for the server. The storage device is a device used to store information and provides data storage services for the server. Generally, information is digitized and then stored in a medium using electrical, magnetic or optical methods, such as a hard disk, a memory card and the like. Other basic devices can include various devices that can ensure that the data center 01 can work normally, such as network security devices (for example, firewalls), power supply devices (for example, uninterruptible power supplies UPS), refrigeration devices (for example, air conditioners), fire-fighting devices (for example, smoke sensing systems, fire extinguishers) and the like.

[0171] The management host provided in the embodiment of the present application can correspond to a server device in the data center 01, such as server 1 or server 2; the management host can also correspond to a server cluster, such as a server cluster consisting of server 1 and server 2; the management host can also correspond to one of the multiple hosts virtualized on a server device, for example, three hosts are virtualized on server 1, where the host with serial number 1 can be the management host. Similarly, the user host provided in the embodiment of the present application can correspond to a server device in the data center 01, such as server 1 or server 2; the user host can also correspond to a server cluster, such as a server cluster consisting of server 1 and server 2 (or a cluster consisting of other servers); the user host can also correspond to one of the multiple hosts virtualized on a server device, for example, three hosts are virtualized on server 1, where the hosts with serial numbers 2 and / or 3 can be the user host. In addition, the resource devices provided in the embodiment of the present application can correspond to various devices in the data center 01 used to provide services to the server, including network devices (such as network cards), storage devices (such as hard disks) and other devices that provide specific services to the server (such as modems, acquisition cards and various expansion cards, etc., not shown in the figure). It should be noted that some of the other basic devices in the data center 01 may also be resource devices, such as firewall devices. The classification of device types in the figure is only for ease of understanding and does not constitute a specific limitation.

[0172] The layered protocol structure of various devices in the device resource management system provided in the embodiment of the present application can refer to the open system interconnection (OSI) model, such as Figure 3c As shown, Figure 3c This is a schematic diagram of a device protocol layered structure provided in an embodiment of the present application. The protocol layering of device A and device B may include a device core, a transaction layer, a transport layer, a network layer, a data link layer, a physical layer, etc. from top to bottom. Among them, device A may be a management host, a user host or a resource device in the above-mentioned device resource management system, and device B may be a management host, a user host or a resource device in the above-mentioned device resource management system. Device A and device B are different devices.

[0173] Among them, the physical layer is the lowest layer, which is responsible for the interface or the link between devices, is the connection between physical interfaces, can be understood as corresponding to the physical layer in the OSI seven-layer model in the network, determines the physical characteristics of the interface, such as point-to-point serial connection, micro-differential signal drive, hot plug, configurable bandwidth, etc. The physical layer can complete the transmission of the original bit stream between adjacent nodes, that is, it is responsible for sending and receiving data in the form of a bit stream.

[0174] The data link layer ensures reliable and correct transmission of data packets, that is, it makes some preparations for physical transmission, for example, it can add sequence numbers and suffixes to the data packets, and it can also send redundant check codes to the transaction layer.

[0175] The network layer is responsible for managing network addresses, locating devices, determining routes, etc. This layer establishes a connection between two nodes through IP addressing, selects appropriate routes and switching nodes for the packets sent by the transport layer of the source end, and correctly transmits them to the transport layer of the destination end according to the address. Optionally, the behavior of the application embodiment in which the management host allocates network addresses to each device in the system can occur at this layer.

[0176] The transport layer is responsible for splitting and combining data, and implementing end-to-end logical connections. The transport layer establishes an end-to-end link, and the role of the transport layer is to provide end-to-end reliable and transparent data transmission services for upper layer protocols, including handling error control and flow control issues. This layer hides the details of lower layer data communication from the upper layer, so that the upper layer user only sees a source-to-destination data path that can be controlled and set by the user, which is reliable.

[0177] The transaction layer mainly performs synchronous memory access, asynchronous memory read and write, message exchange, and function entity ID configuration. The transaction layer accepts read and write requests from the device core and establishes a request packet for this purpose to the transport layer, network layer, data link layer, and physical layer. Generally, requests are executed separately, and some request packets require a response packet. The device core can also accept the response packet after sending the request and associate it with the original software request. Usually, the transaction layer receives data from the device core and encapsulates it into a TLP (Transaction Layer Packet) and then sends it to the transport layer, network layer, and data link layer. In addition, the transaction layer can also receive data packets from the transport layer and then forward them to the device core.

[0178] The device core, also known as the application layer or function layer, is responsible for bus / device management, memory maintenance, unified asynchronous memory access, unified function calls, etc. The device core provides the transaction layer with the necessary information required to generate TLPs through core logic and local software, such as various data requests, resource configuration instructions, device management instructions, etc. The various types of information involved in the device resource management method provided in the embodiments of the present application (such as first configuration information, second configuration information, etc.) can be generated when the device core performs bus / device management (including resource allocation, resource registration, resource deregistration, etc.), and sent to the transaction layer for encapsulation, then submitted to the transport layer and network layer for processing, and then finally sent out through the data link layer and physical layer. The receiving end is the opposite step, with the data first passing through the physical layer and then sent upward to the data link layer, network layer, transport layer, and transaction layer. Exemplarily, during the transmission of data (such as the first configuration information), the device core of the management host converts the data format into a message format acceptable to the transaction layer and sends it to the transaction layer. The transaction layer generates corresponding data packets, which can be stored in the corresponding buffer and then continue to transmit the data packets to the transport layer and network layer. The transport layer and network layer add their own headers to the data packets. The data packets are then handed over to the data link layer. The data link layer adds a sequence number (Seq Num) and suffix check to the data packets transmitted from the upper layer to check the correctness of the data at the receiving end. Finally, the data is encoded at the physical layer and transmitted to the target user host through the link. Accordingly, the data received by the target user host first passes through the physical layer and is then sent upward to the data link layer, network layer, transport layer and transaction layer. Finally, the device core can determine the second entity to be allocated based on the first configuration information, and register and use the second entity. Optionally, some functions of the device core can also be deployed on the transaction layer, that is, some functions implemented by the device core are integrated into the transaction layer for implementation, which is not specifically limited here. Exemplarily, there may be some interfaces above the device core, such as software programming interfaces and firmware interfaces. The software programming interfaces may include asynchronous communication libraries, memory access management libraries, bus / device driver frameworks, unified function call libraries, etc. The firmware interfaces may include distributed BIOS interfaces, domain manager interfaces, etc.

[0179] In a possible implementation, the target resource device in the at least one resource device includes P second entities in the N second entities, see Figure 4 , Figure 4This is a structural diagram of a resource device provided by an embodiment of the present application. The resource device may include a first entity and P second entities. The management host may allocate the above-mentioned P second entities to the above-mentioned at least one user host for use. The L second entities allocated to the target user host include part or all of the above-mentioned P second entities. In other words, the management host may allocate part or all of the above-mentioned P second entities to the target user host. Exemplarily, when P is equal to 1, the management host may allocate the above-mentioned P second entities to the target user host for use; or, when P is equal to 1, the management host may allocate the above-mentioned P second entities to the target user host for use within the first time, and allocate the above-mentioned P second entities to other user hosts for use within the second time. When P is greater than 1, the above-mentioned P second entities are allocated to the target user host for use; or, when P is greater than 1, the S second entities among the above-mentioned P second entities are allocated to the target user host for use, and part or all of the other (PS) second entities among the above-mentioned P second entities are allocated to other user hosts for use, wherein the other user hosts are user hosts other than the target user host in the above-mentioned at least one user host, such as Figure 4 As shown, the management host allocates the second entity 1 to Host0 (target user host), and allocates the second entity 2 and the second entity 3 to Host1 (other user host).

[0180] In a possible implementation, the above-mentioned device resource management system may further include a switching device (eg, a switch), see Figure 5 , Figure 5 This is a schematic diagram of the architecture of another device resource management system provided in an embodiment of the present application. The switching device can be used to connect the at least one user host, management host, and at least one resource management. The switching device can provide a large number of ports. By adding switching devices, the at least one user host, management host, and at least one resource management can be connected without directly establishing a connection, saving and protecting the physical ports of each of the above devices, and facilitating the expansion of the number of user hosts and resource devices in the above system. In addition, the switching device can also forward communication messages (such as packets) for each device in the above system.

[0181] Optionally, the management host can configure network addresses for the physical ports of the at least one user host, the management host, and the at least one resource management (which may also include a switching device), respectively, so that the communication messages between the at least one user host, the management host, and the at least one resource management can be routed based on the network addresses of each physical port. In the prior art, the transmission of communication messages is based on the memory address and the virtual PCIe bus domain ID (or the port ID of the CXL Switch) for routing addressing, which requires the Switch to perform complex table lookup and conversion, which will cause additional delay and bandwidth consumption. Compared with the above routing scheme, the embodiment of the present application can determine the transmission route of the communication message based on the network address configured for the physical port of each device. For example, the communication message (such as a message) can include the network addresses of the source port and the destination port. When forwarding the communication message, the switching device routes it according to the network addresses of the source port and the destination port, thereby realizing communication between the devices without the need for additional table lookup and conversion, and the delay and bandwidth overhead are low.

[0182] It should be noted that there are multiple hosts in the device resource management system, and each host has an independent memory address space. The memory address space of each host is often the same (for example, the memory address space is 0-4GB), so the communication messages in the system cannot be routed using memory addresses like the PCIe architecture, otherwise confusion will occur. In the embodiment of the present application, a routing mechanism based on network address can be adopted, that is, the message can carry the network address instead of the memory address. For example, after the management host scans the devices in the domain, it can assign a network address to the physical port of each device and establish a routing table for the entire domain. Among them, the routing table can specify the forwarding port of each destination network address on the switching device; or, if the resource device includes the function of Switch, the routing table can also specify the forwarding port of each destination network address on the resource device.

[0183] It should also be noted that the routing mechanism based on network addresses also makes it possible for devices in different domains (which may correspond to different device resource management systems) to communicate with each other. Figure 6 , Figure 6is a structural schematic diagram of intercommunication of a plurality of device resource management systems provided by an embodiment of the present application, wherein domain 1 comprises a plurality of user hosts, one management host, a plurality of resource devices and switching devices, domain 2 comprises a plurality of user hosts, one management host, a plurality of resource devices and switching devices, different domains can be assigned with different network address ranges, for example, the network address range used by the physical ports of each device in domain 1 is 00000000-11110000, the network address range used by the physical ports of each device in domain 2 is 11110001-11111111, domain 1 and domain 2 can perform data transmission through a network protocol (for example, transmission control protocol (TCP)). Understandably, the communication message (for example, a packet) sent from one end of communication will be forwarded based on the destination network address when passing through the switch network, the transaction layer domain segment of the packet will not change, and the message content above the link layer will not be changed, so that when the packet reaches the destination, the controller at the destination side can still correctly analyze the transaction layer domain segment of the packet. When the communication message involves devices under different domains, some domain segments of the transport layer may be changed, but the transaction layer domain segment is generally not changed.

[0184] Optionally, the management host can distinguish a plurality of second entities (i.e., N second entities) included in at least one resource device in the device resource management system through a globally unique identifier (GUID), the GUID is a device identifier and is globally unique, and the length is generally 128 bits. Through configuration, the GUID can not only distinguish different resource devices, but also distinguish the entities (such as the first entity and one or more second entities) included in each resource device. In addition, the management host can also discover and determine how many devices exist in the domain and which type of device belongs to based on the GUID when scanning in the domain.

[0185] Optionally, in order to distinguish a plurality of second entities (i.e., N second entities) included in at least one resource device in the device resource management system, the management host can also configure an entity identity identifier (EID) for each second entity in the system, and then different second entities can be distinguished through the EID. The length of the EID can be determined according to the total number of second entities of all resource devices in the domain or the number of second entities of a certain resource device among all resource devices. Compared with the method of distinguishing different second entities by using the GUID, fewer resources are required.

[0186] Exemplarily, the length of the EID is determined according to the total number of all second entities. For example, the total number of second entities of all resource devices in the domain is 16, and the management host can distinguish all second entities in the domain through 4-bit data. For another example, if the total number of second entities of all resource devices in the domain is 32, the management host can distinguish all second entities in the domain through 5-bit data. Exemplarily, the length of the EID can also be determined according to the number of second entities included in a certain resource device. The number of second entities included in the resource device is generally more than the number of second entities included in other resource devices. For example, the device resource management system includes 3 resource devices (Device1, Device2 and Device3), and Device1 includes the largest number of second entities (for example, 5). Then the management host can distinguish all second entities in the domain through 5-bit data, wherein the first two bits of the 5-bit data can be used to distinguish different resource devices, and the last three bits can be used to distinguish different second entities in the same resource device. Compared with the method of using GUID to distinguish different second entities, the method of distinguishing different second entities by configuring EID in the embodiment of the present application uses fewer resources. It is understood that the purpose of configuring an EID is to distinguish different second entities. The specific configuration method can refer to other methods and is not specifically limited here. It is understood that when there are a large number of second entities in the system and the resources required to configure EIDs to distinguish different second entities are greater than GUIDs, the GUID can be used to distinguish the second entities without configuring an EID.

[0187] It should be noted that after the management host configures EID for each second entity, when the communication ends of the communication message (such as a message) in the device resource management system involve a second entity, the message can also include the EID of the second entity, so that after the switching device routes the message to the corresponding resource device according to the network address of the source port and the destination port, the resource device can find the corresponding second entity according to the EID included in the message, thereby completing the routing of the message.

[0188] In one possible implementation, in order to ensure the security of the resources included in the resource devices in the system (i.e., one or more second entities included in each resource device), the management host can configure an authority identifier (i.e., a first authority identifier, or a first partition identity identifier) ​​for each user host in the above-mentioned at least one user host. At the same time, the management host also configures an authority identifier (i.e., a second authority identifier, or a second partition identity identifier) ​​for each of the N second entities included in the above-mentioned at least one resource device. Whether a user host in the above-mentioned at least one user host has the authority to access a second entity in the above-mentioned N second entities can be determined based on the authority identifier of the user host (i.e., the first authority identifier) ​​and the authority identifier of the second entity (i.e., the second authority identifier). Optionally, when the values ​​of the first authority identifier and the second authority identifier are the same, the user host corresponding to the first authority identifier can access the second entity corresponding to the second authority identifier; or, the user host corresponding to the higher-priority authority identifier can access the second entity corresponding to the lower-priority authority identifier. Exemplarily, the above-mentioned device resource management system may include 3 user hosts (for example, Host1, Host2 and Host3), and at least one resource device includes 5 second entities (for example, second entity 1, second entity 2, second entity 3, second entity 4 and second entity 5), wherein the permission identifier of user host 1 is configured as 1, the permission identifier of user host 2 is configured as 3, and the permission identifier of user host 3 is configured as 5; the permission identifier of second entity 1 is configured as 1, the permission identifier of second entity 2 is configured as 3, the permission identifier of second entity 3 is configured as 2, the permission identifier of second entity 4 is configured as 1, and the permission identifier of second entity 5 is configured as 4. If the permission identifier of the user host is the same as the permission identifier of the second entity, the user host can access the second entity. In this case, user host 1 can access second entity 1 and second entity 4, both of which have the same permission identifier of 1. If the priority corresponding to the permission identifier of the user host is higher than or equal to the priority corresponding to the permission identifier of the second entity, the user host can access the second entity. In this case, user host 1 can access any one of the above five second entities (taking the lower the permission identifier value, the higher the priority, as an example, when the permission identifier is configured to 1, the user host has the highest priority).

[0189] In one possible implementation, the management host can configure entity identity identifiers and / or permission identifiers for the user host, the first entity, and the N second entities in the device resource management system; or, optionally, the management host can also configure entity identity identifiers and / or permission identifiers only for the user host and the N second entities in the device resource management system. That is, the management host can assign an ID (i.e., entity identity identifier and / or permission identifier) ​​to each of all user hosts and entities (including the first entity and the second entity, or only the second entity) in the management system, which is used to uniquely identify the host or entity within the system, thereby achieving unified and equal management of user hosts and resource devices. For example, when allocating resources to a user host, the user host can be identified by its entity identity identifier and / or permission identifier, thereby achieving the function of sending configuration information (e.g., first configuration information and / or second configuration information, etc.) to it, wherein the specific content of how to configure the entity identity identifier and / or permission identifier for the second entity can be found in the relevant description in the embodiments of the present application, which will not be repeated here. Furthermore, when the management host also configures an entity identity identifier and / or authority identifier for the first entity, the identifier can be used by the management host to quickly locate and obtain the physical configuration resources in the first entity, so as to improve the efficiency of the management host in determining resource allocation strategies or related configuration information (such as first configuration information and / or second configuration messages).

[0190] Optionally, the first entity may include physical configuration resources of a resource device, and one or more second entities corresponding to the first entity may include functional configuration resources.

[0191] In one possible implementation, the first entity may be responsible for managing common device management functions such as device interconnection, availability, and serviceability (RAS), and hot swapping. Optionally, the first entity may also carry specific business functions. The physical configuration resources included in the first entity may also be referred to as physical resource configuration information, or physical resource management information. Furthermore, the first entity has the management function of the physical components of resource devices (such as unified bus (UB) devices). For example, the first entity (Function entity 0) includes managed resource device link layer information, address configuration of each port of the resource device (Device), routing table configuration information, etc. At the same time, the first entity may also be responsible for functions such as power consumption configuration of resource devices, entity (Function entity) resource configuration, and device RAS information management configuration. Optionally, the physical configuration resources may specifically include one or more of resource configuration management resources (also referred to as resource configuration management or resource configuration management information), public configuration management resources (also referred to as public configuration information), and interconnection configuration management resources (also referred to as interconnection management information).

[0192] Exemplarily, resource configuration management resources (i.e., resource configuration management) may correspond to the configuration of various IDs and physical resource information in resource devices. The configuration of various IDs may include the ID configuration of one or more second entities corresponding to the first entity (e.g., GUID, EID, PID, etc.), and the physical resource information may include the number of second entities supported (i.e., corresponding) by the first entity. For example, resource configuration management resources may specifically include device resources, such as the number of first and second entities, the number of ports, etc.; device capabilities, such as congestion control and hot swapping; and the size of the device configuration space for the first and second entities.

[0193] Exemplarily, public configuration management resources (i.e., public configuration information) may correspond to features supported by resource devices, enable switches, and public interrupts, etc. Among them, features supported by resource devices may be the size of supported messages, the size of pages, and the size of the address space of the second entity, etc.; enable switches may be switches for certain capabilities of the resource device, such as fault reporting capability; and public interrupts may be interrupts for physical faults of the resource device. For example, public configuration information may specifically be device version ID, GUID, etc., low-power configuration, reset configuration, interrupt configuration, RAS management configuration, etc. Understandably, public configuration management resources may also include other public configurations or resources, which are not listed here one by one.

[0194] For example, interconnection configuration management resources (i.e., interconnection management information) may include physical link management and interconnection address management for resource devices. Physical link management may include links between ports on resource devices and ports on other devices; interconnection address management may include network addresses configured by the management host for physical ports on resource devices. For example, interconnection management information may include device routing tables and / or destination port lookup tables.

[0195] In one possible implementation, the second entity can be used to carry the specific business functions of the device. Specifically, the functional configuration resources included in the second entity, that is, the functional configuration resources generated after the configuration of the above-mentioned physical configuration resources, are used to provide one or more business functions for the user host, such as AI computing functions, memory functions, storage functions, network functions, etc. Exemplarily, the functional configuration resources may specifically include one or more of artificial intelligence (AI) resources, memory resources, storage resources and network resources. Taking the example that the functional configuration resources include artificial intelligence (AI) resources, memory resources and network resources, the user host can use the above-mentioned AI resources, memory resources and network resources through the task queue resources within the AI ​​resources, memory resources and network resources. Exemplarily, AI resources are used to perform calculations and processing of AI tasks, such as AI resources such as processors (CPUs), matrix multipliers, or neural network processors (NPUs); memory resources are used to temporarily store instructions or data required for the calculation process in the system (i.e., the device resource management system in the embodiment of the present application, hereinafter referred to as the system for ease of description), and to exchange data with other external memories, and can be used as a storage medium for temporary data of the operating system or other running programs. For example, memory resources are one or more of dynamic random access memory (DRAM), static random access memory (SRAM), synchronous dynamic random access memory (SDRAM), etc.; network resources are used to provide network services for the system and realize communication between the system and the network, such as network resources such as routers, switches, and network interface cards (NICs); storage resources will not lose their stored content after the system is powered off, and can be used for long-term storage of instructions and data involved in system operation, such as boot programs, operating systems, applications, and data, etc., and can specifically include Flash flash memory (e.g., NAND flash memory, NOR flash memory, etc.), universal flash memory (universal flash memory, etc.), and so on. One or more of: storage (UFS), embedded multimedia card eMMC, universal flash storage multi-chip package uMCP memory, embedded multimedia card multi-chip package eMCP memory, solid-state drive (SSD), etc. It is understandable that before the user host uses the above resources, one or more second entities included in the resource device can be enabled, reset controlled, configured with capabilities and basic configurations, and configured with address space and interrupts, thereby clarifying the configuration of AI resources, memory resources, and network resources in the resource device.

[0196] Exemplarily, the Function entity in the resource device (such as a physical device) is coded according to a natural sequence, identified from 0, and the coding is required to be continuous. For example, if a physical device implements n functional entities, the xth Function entity is numbered Function entity x-1 (x-1∈[0, n-1]), that is, the Function entity is coded as Functionentity 0, Function entity 1…Function entity n-1, wherein Function entity0 is the first entity in the embodiment of the present application, and the Function entity other than Function entity 0 is the second entity in the embodiment of the present application. Furthermore, the first entity and the second entity in the embodiment of the present application can be understood as the units by which the resource device divides its own resources. The resource device allows the user host to perform a finer-grained division of resources. It is possible that some Function entities rely on the configuration of a certain type of resource to provide services at the same time. It should be noted that although multiple second entities (such as Function entity1, 2, 3, etc.) belong to the configuration management of a Function entity0, the resource device does not require these second entities (such as Function entity1, 2, 3, etc.) to have the same function.

[0197] In one possible implementation, a first entity (Function entity 0) must exist within a resource device (e.g., a physical device). Besides possessing the device resources corresponding to its functions, this first entity can also manage the configuration of the physical device's network and link layers, as well as the configuration of other second entities (Function entity 1...Function entity N-1). For example, software can configure network and link layer information through the interface provided by Function entity 0.

[0198] In one possible implementation, the physical configuration resources included in the first entity (Function entity 0) may be carried in registers of the first entity, that is, the first entity may include multiple register groups, each register group being used to store different management information or configuration information. For example, the first entity may include a function entity control capability register group, which may provide a configuration interface for the first entity and / or the second entity (Function entity), and the register group may describe the number of managed Function entities and the overall enablement status of the Function entities.

[0199] For example, under the management of a hypervisor (e.g., management software running on a management host), certain first entities and / or second entities (Function entities) can be assigned to a virtual machine for use, reducing hypervisor intervention in service data flows and achieving IO performance nearly identical to that of a bare metal machine. The function entity's data plane can interact directly with the virtual machine; however, for security reasons, the management plane must be controlled by the hypervisor. The data plane may include memory-mapped I / O (MMIO), interrupts, and device service data flows. The management plane primarily manages device function entities, primarily through access to the configuration space. Different function entities within a resource device can be assigned to different virtual machines. A function entity can also be uninstalled from a virtual machine and, after a series of security processes (such as a function entity reset), reallocated to another virtual machine. Each function entity does not affect each other, providing a certain degree of security isolation. Function entities within a resource device can have different functions, such as one with network functionality and another with storage functionality.

[0200] It can be understood that based on the resource device model that separates physical configuration resources and functional configuration resources in the embodiment of the present application, after the resource devices are pooled, each user host no longer needs to manage the resource configuration management resources, public configuration management resources, and interconnection configuration management resources of the resource device, but only needs to use the AI ​​resources, memory resources, and network resources within the resource device. Among them, when the user host wants to use a second entity or communicate with a second entity, it can be achieved through the communication channel established for the first entity corresponding to the second entity. That is to say, when the user host needs to use the functional configuration resources of the resource device or communicate with the functional configuration resources, it can be achieved through the communication channel established for the physical configuration resources of the resource device.

[0201] The above describes the architecture of the device resource management system according to the embodiment of the present application. For ease of understanding, the following further describes the methods and processes of the device resource management system according to the embodiment of the present application.

[0202] See Figure 7 , Figure 7 This is a flow chart of a device resource management method provided by an embodiment of the present application, which can be applied to the above Figure 3a or Figure 5 The management host in and any one of the at least one user host. In other words, the above Figure 3a or Figure 5 The management host and any one of the at least one user host can be used to support and execute Figure 7 Part or all of the related steps shown in . Among them, step S700-step S701 includes the following:

[0203] Step S700: The management host allocates N second entities to at least one user host according to demand.

[0204] The management host is used to manage at least one user host and at least one resource device in the device resource management system, and allocate resources of at least one resource device to at least one user host. Each resource device in the at least one resource device includes a first entity and one or more second entities (i.e., at least one second entity); the first entity includes physical configuration resources; the one or more second entities include functional configuration resources generated after the physical configuration resources are configured; the at least one resource device may include at least one first entity and N second entities in total. Exemplarily, the management host may allocate the N second entities to the at least one user host based on requirements (such as functional requirements, bandwidth requirements, etc.) or a determined resource allocation strategy. The target user host may be allocated L second entities, and these L second entities correspond to Q of the at least one first entities. The target user host may be any one of the at least one user host. Understandably, one requirement may correspond to one or more second entities in a resource device, or may correspond to multiple second entities in multiple resource devices. In other words, the management host can allocate one or more second entities included in a resource device to a user host to meet the needs of the user host; and when the needs of a user host need to be met by using second entities in different resource devices, the management host can also allocate these second entities to the user host to meet the needs of the user host.

[0205] In one possible implementation, the target resource device in the at least one resource device includes P second entities among the N second entities. The specific method for allocating the N second entities to the at least one user host as needed may be to allocate the P second entities of the target resource device to the at least one user host. The L second entities allocated to the target user host include some or all of the P second entities of the target resource device, the L second entities are from the same or different resource devices in the at least one resource device, and P is a positive integer greater than or equal to 1 and less than or equal to N.

[0206] Exemplarily, the management host can allocate P second entities included in the target resource device to at least one user host in the following manners: when P is equal to 1, the P second entities are allocated to the target user host for use; or, when P is equal to 1, the P second entities are allocated to the target user host for use within a first period of time, and the P second entities are allocated to other user hosts for use within a second period of time; the other user hosts are user hosts other than the target user host among the at least one user host, and the first period of time and the second period of time are different, that is, the management host can allocate the second entities included in the target resource device to different user hosts at different periods of time. When P is greater than 1, the P second entities are allocated to the target user host for use; or, when P is greater than 1, S of the P second entities are allocated to the target user host for use, and some or all of the other (PS) of the P second entities are allocated to other user hosts for use; the other user hosts are user hosts other than the target user host among the at least one user host, that is, the management host can allocate the second entities included in the resource device to the same or different user hosts.

[0207] In one possible implementation, the device resource management system may further include a switching device that can connect at least one user host, a management host, and at least one resource device in the system. The management host can configure network addresses for the at least one user host, at least one resource device, and the physical ports of the switching device, thereby enabling communication messages in the system to be routed based on the network addresses. For a description of this, please refer to the aforementioned architecture description and will not be repeated here.

[0208] Optionally, the N second entities included in the at least one resource device mentioned above can be configured with a globally unique identifier (GUID) and / or an entity identity identifier (EID), so that the user host in the system can distinguish different second entities based on the GUID or EID. For related descriptions, please refer to the relevant content in the above architecture description and will not be repeated here.

[0209] Optionally, the management host may further configure permission identifiers (i.e., first permission identifiers) for each of the N second entities included in the at least one resource device to implement different second entities. Correspondingly, the management host may configure permission identifiers (i.e., second permission identifiers) for multiple user hosts in the system, and then determine, based on the first permission identifier and the second permission identifier, whether the user host corresponding to the first permission identifier has permission to access the second entity corresponding to the second permission identifier.

[0210] Optionally, when the management host allocates the N second entities including the at least one resource device to the at least one user host, the management host can first determine L second entities (i.e., L second entities included in a target resource device, the target resource device can be one or multiple) from the N second entities, and determine a target user host (the target user host can be one or multiple) from the at least one user host, and then send configuration information (i.e., first configuration information) of the L second entities to the target user host, to notify the target user host to establish communication channels to the L second entities. The first configuration information can include GUID, EID, PID, and the like.

[0211] Optionally, after the management host allocates the L second entities to the target user host, the management host can also recycle the L second entities according to actual conditions. For example, the management host can additionally send configuration information (i.e., second configuration information) of the L second entities to the target user host, to notify the target user host to log out the communication channels to the L second entities. The second configuration information can include GUID, EID, and the like.

[0212] Step S701: The target user host uses the allocated L second entities.

[0213] Before using the L second entities, the target user host can first establish communication channels to the L second entities based on the Q first entities corresponding to the L second entities according to the first configuration information sent by the management host, so that the target user host can use the L second entities through the communication channels.

[0214] Optionally, when the target user host uses the L second entities, if the target user host receives the second configuration information sent by the management host, the target user host can log out the communication channels to the L second entities, so as to release the L second entities, and the management host can allocate the L second entities to other user hosts.

[0215] Optionally, when a user host (e.g., the target user host) wants to use a second entity in a resource device, the user host can apply to the management host, and after obtaining the access right, the user host can configure the register of the second entity, and then use the resource corresponding to the second entity.

[0216] In one possible implementation, before step S700, the device resource management method further includes step S702: the management host scans the devices in the domain and assigns a network address to the physical port of each device. This allows the communication messages between the various devices in the domain to determine the transmission route based on the network address. For example, when the target user host sends a message to a second entity among the L second entities, the transmission route of the message can be determined based on the network address of the physical port of the target user host and the physical port of the resource device (one of the at least one resource device) where the second entity is located.

[0217] It should be noted that the activation of the bus in the device resource management system requires the management host to complete the scanning and discovery (or enumeration) of devices within the domain. The purpose of enumeration is to scan, discover, and identify devices in the domain from the starting point (the management host, or FM), draw the topology, and provide the necessary information for subsequent routing configuration and resource allocation. The enumeration results must be complete and non-duplicated. For example, the enumeration of the entire domain is initiated by the management host (FM). The FM can obtain device information by sending enumeration messages at the transport layer and then receiving enumeration response messages from other devices. This allows it to discover all devices (including resource devices, user hosts, etc.) and their topological relationships within the domain.

[0218] Optionally, when a device is first enumerated, the device itself has not yet been configured with a network address. The management host can then configure network addresses for all connected devices through an enumeration configuration message (or, enumeration management message). For example, the enumeration configuration message can carry the device's GUID information. When a device receives a network address configuration message, it can first compare the GUID information in the message to confirm that it matches its own GUID before accepting the network address configuration request, thereby preventing network address mismatches.

[0219] Understandably, each domain has a boundary, and within a boundary range there is generally a management host (FM), which is responsible for the enumeration, discovery, and management allocation of all devices in the domain. At the same time, a domain can also act as a node, connecting to other domains through external ports, such as connecting to a larger domain. At this time, this external port serves as the boundary of the domain, and the management host (FM) in the domain will no longer continue to enumerate outward when scanning this external port. For the FM in the upper-level domain, the lower-level domain as a whole can be regarded as a node. The FM of the upper-level domain will discover this node during the enumeration process, but will not continue to enumerate inward, nor will it directly manage the devices in the node. Instead, it will communicate with the FM in the node to implement the application, registration, and access of each device in the node.

[0220] Furthermore, upon discovering (enumerating) devices within the domain, the management host (FM) can obtain a topological diagram of the entire network. This allows the FM to perform routing calculations based on the device interconnections to obtain a full routing table, thereby establishing communication pathways between devices. For example, routing calculations can be implemented locally by the FM using a hierarchical routing approach. Each device maintains a local routing table that describes the relationship between the destination device address and local ports, indicating which local ports can reach the destination device. After a message is sent from that port, subsequent devices along the route can forward the message hop-by-hop according to the local routing table, ultimately reaching the destination device. Routing calculations can be implemented by traversing all reachable paths. The core operation is to deeply traverse all paths to find all reachable paths to the destination device, supporting features such as the shortest path, multipath, and loop breaking. Furthermore, after completing the full routing calculations, the FM can distribute the assigned device network addresses and routing configurations to each device for configuration. Once the configuration is complete, the entire network is established, and devices within the network can access and communicate with each other using the device network addresses.

[0221] For ease of understanding, the following describes the resource registration and deregistration process involved in the above-mentioned device resource management method. First, the resource registration process is described. Figure 8 , Figure 8 This is a schematic diagram of a resource registration process provided by an embodiment of the present application. The resource registration process can be applied to the above Figure 3a or Figure 5 The management host, user host and resource equipment in the above. In other words, Figure 3a or Figure 5 The management host, user host and resource devices in the can be used to support and execute Figure 8 Some or all of the relevant steps shown in Figure 8 Steps S800 to S804 in the embodiment include the following:

[0222] Step S800: The management host obtains a resource allocation policy.

[0223] The resource allocation strategy can be determined by the management software FM according to the requirements of each user host and the resource device condition of the domain, and then one or more second entities of a certain resource device in the domain can be assigned to a certain Host. For example, the management host can determine to assign L second entities in the N second entities to a target user host in the at least one user host based on the resource allocation strategy; L is a positive integer less than or equal to N; or it can be understood that the management host can assign the N second entities to the at least one user host according to the resource allocation strategy, and the target user host can be assigned L second entities, which correspond to Q in the at least one first entity. The target user host can be any one of the at least one user host. For example, the management host can assign second entity 1 and second entity 2 of the third resource device (such as Device2) in the five resource devices to Host0 in the four user hosts.

[0224] Alternatively, the management host can determine the resource allocation strategy based on the resource requirement of the target user host, or determine the resource allocation strategy according to the strategy file (or requirement file) input by the administrator. For example, the management host can obtain the resource requirement of the target user host, and then determine the resource allocation strategy based on the resource requirement, and then determine which L second entities in the N second entities are assigned to the target user host. Understandably, in addition to obtaining the resource requirement of the target user host, the management host can also obtain the resource requirement of other user hosts in the system, and determine the resource allocation strategy in combination with the resource requirements of multiple user hosts, which is not limited here. It should be noted that when the management host allocates the N second entities, it can also first consider the condition of the second entity (or the resource device to which the second entity belongs) to make a decision, for example, if a second entity fails, it is not allocated at the moment, and it can be allocated after the failure is recovered. Understandably, one requirement can correspond to one or more second entities in one resource device, or correspond to multiple second entities in multiple resource devices. In other words, the management host can allocate one or more second entities included in one resource device to a certain user host to meet the requirement of the user host; and when the requirement of a certain user host needs to use second entities in different resource devices to meet the requirement, the management host can also allocate these second entities to the user host to meet the requirement of the user host.

[0225] Optionally, before determining the allocation scheme, the management host can first scan the devices in the entire domain to determine the number of each type of device, thereby discovering the at least one user host and the at least one resource device (and possibly also the switching device) in the system, and can allocate a network address to each physical port of the devices, to provide a basis for subsequent determination of the allocation scheme for the resource device and the communication message transmission route. Illustratively, first, the management host can send an enumeration message in the device resource management system, which is equivalent to the management host actively broadcasting to the surrounding resource devices, user hosts, switching devices, etc. "I am here, you can find me". Then, correspondingly, the resource devices, user hosts, and switching devices in the system can send an enumeration response message to the management host in response to the enumeration message, which is equivalent to reporting to the management host "I am a certain device, I...". Finally, the management host can determine the at least one user host and the at least one resource device (and possibly also the switching device) after receiving the enumeration response messages sent by different devices. Optionally, the enumeration response messages sent by different devices can carry their respective GUIDs, so that the management host can distinguish between different devices and determine the device type of different devices.

[0226] Step S801: The management host sends first configuration information to the target user host.

[0227] As can be understood, the management host can notify the target user host to register the L second entities allocated by the above-mentioned first configuration information.

[0228] In one possible implementation, the management host can first configure entity identity and / or permission identity for the L second entities before sending the above-mentioned first configuration information. As can be understood, the management host can also configure EIDs and / or PIDs for multiple second entities included in multiple resource devices.

[0229] Optionally, the first configuration information can include the GUID, EID, and PID of the L second entities. As can be understood, the first configuration information can also include the network address of the physical port of the resource device to which the L second entities belong, so that the target user host can communicate with the resource device according to the network address, and then find the L second entities. As can also be understood, the management host can first configure a network address for the physical port of the target user host before sending the first configuration information, and then send the above-mentioned first configuration information to the target user host based on the network address.

[0230] Optionally, the management host can configure a network address for the target user host before sending the first configuration information, and based on the network address of the target user host, send the first configuration information to the target user host. Exemplarily, the target user host may have multiple physical ports (ports). For example, the target user host has 4 physical ports, but 5 network addresses can be configured for it, wherein each of the 4 physical ports is configured with a network address, and then a virtual network address is configured. These 5 addresses are all network addresses and can be used to locate the target user host. That is, not only the network address of the physical port can be located to the target user host, but the virtual network address can also be located to the target user host. Therefore, the management host can not only configure the network address for the physical port of the target user host, but also configure the virtual network address for it. Correspondingly, not only the first configuration information can be sent through the network address of the physical port, but also the first configuration information can be sent through the virtual network address. The embodiments of the present application do not specifically limit this.

[0231] Step S802: The target user host receives the first configuration information sent by the management host.

[0232] Step S803: The target user host determines the allocated L second entities based on the first configuration information.

[0233] Step S804: The target user host registers the L second entities.

[0234] Optionally, when the target user host registers the L second entities, it may first create local devices for each of the L second entities, then load device drivers for the local devices, and then establish communication channels between the local devices and the L second entities through the device drivers. It is understood that the device type of the local device created for the second entity is the same as the device type corresponding to the second entity, which may be a storage device, a network device, or the like. For example, the target user host may determine the device type corresponding to the second entity based on its globally unique identifier, and thus determine the device type of the local device to be created.

[0235] Optionally, after registering the L second entities, the target user host can enable and use the L second entities. For example, after registration, the target user host can send configuration information to the L second entities to initialize the L second entities, such as allocating interrupts, allocating memory base addresses, and other configurations related to device types (or services, such as graphics cards, hard drives, or network cards). Finally, the target user host can use the L second entities normally.

[0236] Optionally, in step S800, the target user host may first report its resource requirements to the management host. For example, the resource requirements reported by the target user host may be the number of second entities of which device type or types, which is not specifically limited here.

[0237] Exemplarily, in the above-mentioned resource registration process, the management host can discover, deploy and control each device based on the internally deployed management software (such as resource management, resourcemanager) for device resource pool management. The resource device can communicate with the management software deployed in the management host through the internally deployed bus-attached device local framework (fabric attach device local framework, FAD local framework) component to realize resource reporting and registration. Similarly, the user host can communicate device information and resources with the management software deployed in the management host through the internally deployed bus-attached device remote framework (FAD remote framework) component, and is responsible for creating local devices. Optionally, the communication between the above components can be carried out at the transport layer. For ease of understanding, the following is an exemplary description of the behavior of each device in the resource registration process:

[0238] On the management host:

[0239] 1) Scan each device in the domain and assign a Network Address to the ports of all discovered devices, and assign an EID and / or PID to the second entity.

[0240] 2) The management software for the device resource pool manages the resources reported by the resource device based on the FAD local framework component. For example, the management software communicates with the FAD local framework component to manage and control the Function entity component (i.e., the second entity) through the device created locally by the resource device.

[0241] 3) Determine a resource allocation strategy, and allocate and register a second entity in the device resource pool to a user host (ie, a target user host) that is to use the capability through management software.

[0242] Resource device side:

[0243] 1) Enable the Function entity (i.e., the second entity) through the driver interface of the resource device and create the device locally;

[0244] 2) Add a driver (FAD local device driver) for the newly created local device, initialize the local device as a FAD local device (local device), and register it with the FAD local service (local server) framework.

[0245] On the user host side:

[0246] 1) The FAD remote framework component deployed inside the user host can obtain the information of the resource device according to the resource device communication address and resource device description specified by the management host.

[0247] 2) The FAD remote framework component of the user host creates a FAD remote device based on the obtained resource device information. In other words, it creates a device in the local operating system and registers it with the bus built by the operating system for management and use.

[0248] 3) The user host loads the device driver for the FAD remote device and initializes it as a function device.

[0249] 4) The user host uses the interface provided by the function device at the function layer to use the second entity in the resource device.

[0250] It should be noted that after the above resource registration process steps S800 to S804, a resource deregistration process may also be included. That is, after a resource is registered and used by a target user host, it may also be deregistered by the target user host so that other user hosts can register and use it again.

[0251] The following describes the resource deregistration process. Figure 9 , Figure 9 This is a schematic diagram of a resource cancellation process provided by an embodiment of the present application. The resource cancellation process can be applied to the above Figure 3a or Figure 5 The management host, user host and resource equipment in the above. In other words, Figure 3a or Figure 5 The management host, user host and resource devices in the can be used to support and execute Figure 9 Some or all of the relevant steps shown in Figure 9 Steps S900 to S903 in the embodiment include the following:

[0252] Step S900: The management host sends second configuration information to the target user host.

[0253] Optionally, the management host may notify the target user host through the second configuration information to deregister one or more second target entities among the L second entities allocated in step S803. For example, when a resource allocation policy changes or a resource device (or second entity) fails, the management host may reclaim one or more second entities currently allocated to the target user host, so as to reassign one or more second entities that can meet the needs of each user host according to the new resource allocation policy. It is understandable that the second configuration information may be sent based on the network address of the physical port of the target user host.

[0254] Optionally, when the resource allocation policy changes, the management host may reclaim all currently allocated second entities in the device resource management system. Specifically, this involves sending second configuration information for all second entities to the target user host. The target user host may be any one or more user hosts in the system. Alternatively, the management host may first compare the new resource allocation policy with the old resource allocation policy to determine which second entities do not need to be reclaimed and which do. The management host then sends the second configuration information to the target user host for the second entities that need to be reclaimed, thereby notifying the target user host to deregister the second entities that need to be reclaimed. In other words, the one or more second target entities may be all currently allocated second entities or a subset of all currently allocated second entities that need to be reclaimed. The second configuration information may include information such as the GUID and EID of the one or more second target entities, and may also include PID information. It should be noted that if the resource allocation policy changes, the management host may first reset the second entities, clearing their EID and PID information, before sending the second configuration information. It is understandable that the management host can reset all second entities or only the second entities that need to be recovered, which is not specifically limited here. Optionally, when the resource allocation policy changes, one or more second target entities can be reset, and the entity identity identifier (such as EID) and / or authority identifier (such as PID) of the one or more second target entities can be invalidated. For example, the second target entity can be temporarily invalidated by configuring the accompanying information (such as Vlaue value) bound to the EID or PID of the second target entity to 0, or by directly configuring the value of the EID or PID of the second target entity to all 0s.

[0255] Optionally, when a resource device (or second entity) fails, the management host may reclaim the allocated but failed resource device (or second entity) to ensure that the user host can process tasks or data normally. Whether a resource device (or second entity) has failed can be discovered by the management host through periodic or aperiodic scanning of devices within the domain, or can be discovered and reported to the management host by the user host, switching device, or other resource device communicating with the resource device (or second entity), and is not specifically limited here.

[0256] Step S901: The target user host receives the second configuration information sent by the management host.

[0257] Step S902: The target user host determines one or more second target entities to be deregistered from the L second entities based on the second configuration information.

[0258] Step S903: The target user host deregisters the one or more second target entities.

[0259] It is understandable that the process of the target user host deregistering the second entity can be the opposite of the process of registering the second entity. After receiving the second configuration information, the target user host can first uninstall the device driver. The device driver can be the driver corresponding to the local device created by the target user host for the above-mentioned one or more second entities. When uninstalling the device driver, the target user host can reclaim the driver resources, memory resources, interrupt resources, etc. configured for use of these second entities. Then, the target user host can delete the local devices created for the above-mentioned one or more second entities and deregister the communication channel. The local device is a node device established locally by the target user host for the use of the above-mentioned second entities. It is understandable that after the target user host deregisters the communication channel, the above-mentioned second entities will be released and will no longer occupy these resources, so that the management host can then allocate these second entities to other user hosts (if these second entities or the resource devices to which they belong are not faulty).

[0260] For example, during the resource deregistration process, the management software for device resource pool management deployed within the management host, the fabric attach device local framework (FAD local framework) component deployed within the resource device, and the fabric attach device remote framework (FAD remote framework) component deployed within the user host can communicate at the transport layer to complete the resource deregistration. For ease of understanding, the following is an exemplary description of the behavior of each device during the resource deregistration process:

[0261] On the management host:

[0262] 1) Recover the allocated resource of the resource device, and set the state of the resource device (or the second entity) to be used.

[0263] 2) Communicate with the FAD local framework component in the resource device through the management software, and reset the resource device (or the second entity) when the resource device (or the second entity) is not used by a user, and clear the device state and information.

[0264] Resource device side:

[0265] 1) The FAD local framework component in the resource device receives the control message from the FM, and performs configuration management on the second entity of the resource device.

[0266] 2) Detect and manage the link layer and the network layer, and the FAD local framework component can actively notify the FM to stop using the resource of the resource device when an unrecoverable abnormality occurs in the resource device (or the second entity).

[0267] User host side:

[0268] 1) When the user host no longer uses the resource of the resource device, first recover the allocated resource in the local operating system, and disconnect the connection established with the local device of the resource device. For example, uninstall the device driver, and destroy the local device structure.

[0269] 2) When the user host no longer uses the resource of the resource device, communicate with the management software of the FM through the FAD remote framework component, and notify the FM that the user host no longer uses the resource of the resource device.

[0270] In summary, in the embodiments of the present application, it is possible to implement resource pooling of devices, support multiple user hosts to share the resources of a resource device, and the resource granularity of the resource device is the VF level granularity (the resource granularity of the prior art is the PF level), which can allocate more fine-grained resources to user hosts, and then flexibly allocate resources according to the needs of the user hosts, with high resource utilization; at the same time, the management resources of the resource device can be managed by the management host, and the user host no longer needs to manage the management resources of the resource device, and the complexity of the user host is reduced. Among them, the system can transmit messages through a routing mechanism based on network addresses. When the number of user hosts increases, a larger number of user hosts can be supported by expanding the routing table, which has good scalability. Moreover, the management host in the system can dynamically allocate the resources of the resource device, which is flexible. In addition, the system uses a mechanism for message transmission based on a routing table based on a network address, so that the Switch can transmit according to the network addresses of the source and destination without the need for additional complex table lookups and conversions, thereby reducing latency and bandwidth overhead.

[0271] It should be noted that the relevant description of the device resource management method process described in the embodiments of the present application can be found in the relevant description in the above embodiments and will not be repeated here.

[0272] The above content describes the device resource management system and related methods provided by this application. In order to facilitate the implementation of the above solutions of the embodiments of this application, the embodiments of this application also provide corresponding devices.

[0273] The present application divides the functional modules of the device according to the above-mentioned system and method embodiments. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in this application is schematic and is only a logical functional division. There may be other division methods in actual implementation. The device of the embodiment of the present application will be described below with reference to the accompanying drawings.

[0274] See Figure 10 , Figure 10 This is a schematic diagram of the structure of a communication device provided in an embodiment of the present application. The communication device 10 can be used to implement the function of managing the host in the above method embodiment, and thus can also achieve the beneficial effects possessed by the above method embodiment. In the embodiment of the present application, the communication device 10 can be as follows Figure 3a or Figure 5 The management host shown may also be a module (such as a chip) applied to the management host.

[0275] like Figure 10As shown, the communication device 10 can include a processing unit 100 and a transceiver unit 101. Wherein the communication device can be applied to a management host in a device resource management system, the device resource management system including at least one user host, at least one resource device, and the management host, each of the at least one resource device including a first entity and one or more second entities; the first entity including a physical configuration resource; the one or more second entities including a functional configuration resource generated after the physical configuration resource is configured; the at least one resource device including a total of at least one first entity and N second entities, N being an integer greater than 1;

[0276] The processing unit 100 is configured to obtain a resource allocation strategy; the resource allocation strategy is used to determine that L second entities in the N second entities are allocated to a target user host in the at least one user host; L is a positive integer less than or equal to N;

[0277] The transceiver unit 101 is configured to send first configuration information to the target user host; the first configuration information is used to notify the target user host to register the L second entities.

[0278] In a possible implementation, the transceiver unit 101 is further configured to scan the device resource management system to discover the at least one user host and the at least one resource device.

[0279] In a possible implementation, the transceiver unit 101 is further configured to send an enumeration message in the device resource management system; the enumeration message is used to discover devices in the device resource management system;

[0280] Receive enumeration response messages respectively sent by the at least one user host and the at least one resource device in response to the enumeration message;

[0281] Determine the at least one user host and the at least one resource device based on the enumeration response messages.

[0282] In a possible implementation, the processing unit 100 is specifically configured to obtain resource requirements of a target user host in the at least one user host;

[0283] Determine the resource allocation strategy based on the resource requirements.

[0284] In a possible implementation, the processing unit 100 is further configured to configure entity identity and / or permission identity for the L second entities.

[0285] In a possible implementation manner, the first configuration information includes one or more of the globally unique identifiers, entity identities, or authority identifiers of the L second entities.

[0286] In a possible implementation, the transceiver unit 101 is further configured to send second configuration information to the target user host; the second configuration information is used to notify the target user host to deregister one or more second target entities among the L second entities.

[0287] In a possible implementation manner, the second configuration information includes one or more of a globally unique identifier, an entity identity identifier, or an authority identifier of the one or more second target entities.

[0288] In a possible implementation, the transceiver unit 101 is specifically configured to send the second configuration information to the target user host when the resource allocation policy changes; or

[0289] When the one or more second target entities or the resource devices to which the one or more second target entities belong fail, the second configuration information is sent to the target user host.

[0290] In a possible implementation, the processing unit 100 is further configured to reset the one or more second target entities and clear entity identification identifiers and / or authority identifiers of the one or more second target entities when the resource allocation policy changes.

[0291] In a possible implementation, the processing unit 100 is further configured to configure a network address for the physical port of the target user host;

[0292] The transceiver unit 101 is specifically configured to send the first configuration information to the target user host based on the network address of the physical port of the target user host.

[0293] The processing unit 100 can be specifically used to allocate the N second entities to the at least one user host for use as needed; wherein, the target user host is allocated L second entities, the L second entities correspond to Q first entities in the at least one first entity, and the target user host is any one of the at least one user host; L is a positive integer less than or equal to N.

[0294] In a possible implementation, the target resource device in the at least one resource device includes P second entities in the N second entities; and the processing unit 100 is specifically configured to:

[0295] The P second entities are allocated to the at least one user host for use; wherein the L second entities allocated to the target user host include part or all of the P second entities; and the L second entities come from the same or different resource devices among the at least one resource device.

[0296] In a possible implementation, the processing unit 100 is specifically configured to:

[0297] When P is equal to 1, the P second entities are allocated to the target user host for use; or,

[0298] When P is equal to 1, the P second entities are allocated to the target user host for use within a first time, and the P second entities are allocated to other user hosts for use within a second time; the other user hosts are user hosts other than the target user host among the at least one user host.

[0299] In a possible implementation, the processing unit 100 is specifically configured to:

[0300] When P is greater than 1, the P second entities are allocated to the target user host for use; or,

[0301] When P is greater than 1, S second entities among the P second entities are allocated to the target user host for use, and some or all of the other (PS) second entities among the P second entities are allocated to other user hosts for use; the other user hosts are user hosts other than the target user host among the at least one user host.

[0302] In a possible implementation, the system further includes a switching device, and the processing unit 100 is further configured to:

[0303] The at least one user host, the management host and the at least one resource device are connected via the switching device.

[0304] In a possible implementation, the at least one user host, the at least one resource device, the management host, and the physical ports of the switching device are respectively configured with network addresses, and the network addresses are used to determine transmission routes of communication messages in the system.

[0305] In a possible implementation, each of the N second entities is configured with a globally unique identifier and / or an entity identity; the globally unique identifier is used to distinguish different second entities, and the entity identity is used to distinguish different second entities.

[0306] In one possible implementation, each user host of the at least one user host is configured with a first authority identifier, and each second entity of the N second entities is configured with a second authority identifier; the access rights of each user host to each second entity are determined based on the first authority identifier and the second authority identifier.

[0307] In one possible implementation, the physical configuration resources include one or more of public configuration management resources, resource configuration management resources, and interconnection configuration management resources; the functional configuration resources include one or more of artificial intelligence resources, memory resources, and network resources.

[0308] See Figure 11 , Figure 11 1 is a schematic diagram of the structure of another communication device provided in an embodiment of the present application. The communication device 11 can be used to implement the function of the target user host in the above method embodiment, and thus can also achieve the beneficial effects possessed by the above method embodiment. In the embodiment of the present application, the communication device 11 can be as follows Figure 3a or Figure 5 Any one of the one or more user hosts shown may also be a module (such as a chip) applied to the user host.

[0309] like Figure 11 As shown, the communication device 11 may include a transceiver unit 110 and a processing unit 111. The communication device may be applied to a target user host in a device resource management system, wherein the device resource management system includes at least one user host, at least one resource device, and a management host, wherein each resource device in the at least one resource device includes a first entity and one or more second entities; the first entity includes a physical configuration resource; the one or more second entities include functional configuration resources generated after the physical configuration resource is configured; the target user host is any one of the at least one user host; the at least one resource device includes at least one first entity and N second entities in total, where N is an integer greater than 1; the device includes:

[0310] The transceiver unit 110 is configured to receive first configuration information of L second entities sent by the management host, and determine the L allocated second entities based on the first configuration information; L is a positive integer less than or equal to N; the L second entities are second entities among the N second entities, the first configuration information is used to notify the target user host to register the L second entities, and to establish communication channels to the L second entities based on the Q first entities; the Q first entities are first entities among the at least one first entity corresponding to the L second entities;

[0311] The processing unit 111 is configured to register the L second entities, establish communication channels to the L second entities based on the Q first entities, and use the L second entities through the communication channels.

[0312] In a possible implementation, the processing unit 111 is specifically configured to create a local device for the L second entities;

[0313] A device driver is loaded for the local device, and a communication channel is established from the local device to the L second entities through the device driver.

[0314] In a possible implementation, the processing unit 111 is further configured to enable and use the L second entities.

[0315] In a possible implementation, the transceiver unit 110 is further configured to receive an enumeration message sent by the management host;

[0316] Send an enumeration response message to the management host in response to the enumeration message.

[0317] In a possible implementation, the transceiver unit 110 is further configured to send resource requirements to the management host.

[0318] In a possible implementation, the transceiver unit 110 is further configured to receive second configuration information sent by the management host, and determine one or more second target entities to be deregistered from the L second entities based on the second configuration information; the second configuration information is used to notify the target user host to deregister the one or more second target entities;

[0319] The processing unit 111 is further configured to deregister the one or more second target entities in response to the second configuration information.

[0320] In a possible implementation, the processing unit 111 is specifically configured to:

[0321] Creating local devices for the L second entities according to the first configuration information of the L second entities sent by the management host;

[0322] A device driver is loaded for the local device, and a communication channel is established from the local device to the L second entities through the device driver.

[0323] In a possible implementation, the processing unit 111 is specifically configured to:

[0324] Unloading a device driver loaded for a local device; the local device being a device node created for the one or more second target entities;

[0325] Delete the local device.

[0326] In a possible implementation, the at least one resource device and the physical port of the target user host are respectively configured with a network address; and the transceiver unit 110 is further configured to:

[0327] A communication message is sent to any one of the L second entities through the communication channel; a transmission route of the communication message is determined based on the network addresses of the at least one resource device and the physical port of the target user host.

[0328] In a possible implementation manner, the second configuration information includes one or more of a globally unique identifier, an entity identity identifier, or an authority identifier of the one or more second target entities.

[0329] In a possible implementation manner, the first configuration information includes one or more of the globally unique identifiers, entity identities, or authority identifiers of the L second entities.

[0330] It is understandable that the specific descriptions of the transceiver unit and the processing unit shown in the above device embodiment are only examples. For the specific functions or execution steps of the transceiver unit and the processing unit, please refer to the above method embodiment and will not be described in detail here.

[0331] The above describes the communication device of the embodiment of the present application. The following describes the possible product forms of the communication device. It should be understood that any Figure 10 or Figure 11 Any form of product that has the functions of the communication device described above falls within the scope of protection of the embodiments of the present application. It should also be understood that the following description is only an example and does not limit the product form of the communication device of the embodiments of the present application to this.

[0332] In one possible implementation, the above Figure 10 or Figure 11In the communication device shown, the processing unit 100 or the processing unit 111 can be one or more processors, and the transceiver unit 101 or the transceiver unit 110 can be a transceiver. In the embodiment of the present application, the processor and the transceiver can be coupled, and the embodiment of the present application does not limit the connection method between the processor and the transceiver. During the execution of the above method, the process of sending information in the above method can be understood as the process of the processor outputting the above information. When outputting the above information, the processor outputs the above information to the transceiver so that the transceiver can transmit it. After being output by the processor, the above information may need to undergo other processing before reaching the transceiver. Similarly, the process of receiving information in the above method can be understood as the process of the processor receiving the input information. When the processor receives the input information, the transceiver receives the above information and inputs it into the processor. Furthermore, after the transceiver receives the above information, the above information may need to undergo other processing before being input into the processor.

[0333] See also Figure 12 , Figure 12 FIG3 is a schematic diagram of the structure of another communication device provided in an embodiment of the present application. The communication device 30 may be the communication device 10 or the communication device 11, or a chip therein. Figure 12 Only the main components of the communication device 30 are shown. In addition to the processor 1001 and the transceiver 1002, the communication device 30 may further include a memory 1003 and an input and output device (not shown).

[0334] Processor 1001 is primarily used to process communication protocols and communication data, control the entire communication device, execute software programs, and process software program data. Memory 1003 is primarily used to store software programs and data. Transceiver 1002 may include control circuitry and an antenna. The control circuitry is primarily used to convert baseband signals into radio frequency signals and process radio frequency signals. The antenna is primarily used to transmit and receive radio frequency signals in the form of electromagnetic waves. Input / output devices, such as a touch screen, display, and keyboard, are primarily used to receive user input and output data to the user.

[0335] When the communication device is powered on, the processor 1001 can read the software program in the memory 1003, interpret and execute the instructions of the software program, and process the data of the software program. When data needs to be sent wirelessly, the processor 1001 performs baseband processing on the data to be sent and outputs the baseband signal to the radio frequency circuit. The radio frequency circuit performs radio frequency processing on the baseband signal and then transmits the radio frequency signal to the outside in the form of electromagnetic waves through the antenna. When data is sent to the communication device, the radio frequency circuit receives the radio frequency signal through the antenna, converts the radio frequency signal into a baseband signal, and outputs the baseband signal to the processor 1001. The processor 1001 converts the baseband signal into data and processes the data.

[0336] In another implementation, the RF circuit and antenna may be provided independently of the processor performing baseband processing. For example, in a distributed scenario, the RF circuit and antenna may be remotely arranged independent of the communication device.

[0337] The transceiver 1002 may include a receiver and a transmitter, wherein the receiver is configured to perform a receiving function (or operation) and the transmitter is configured to perform a transmitting function (or operation), and the transceiver is configured to communicate with other devices / apparatuses via a transmission medium.

[0338] The processor 1001 , the transceiver 1002 , and the memory 1003 may be connected via a communication bus.

[0339] Exemplarily, when the communication device 30 is used to execute the steps, methods, or functions executed by the above-mentioned communication device 10, the processor 1001 is used to obtain a resource allocation strategy; the resource allocation strategy is used to determine to allocate L second entities among the N second entities to a target user host among the at least one user host; L is a positive integer less than or equal to N; the transceiver 1002 is used to send first configuration information to the target user host; the first configuration information is used to notify the target user host to register the L second entities.

[0340] Exemplarily, when the communication device 30 is used to execute the steps, methods or functions executed by the above-mentioned communication device 11, the transceiver 1002 is used to receive the first configuration information sent by the management host, and determine the allocated L second entities based on the first configuration information; L is a positive integer less than or equal to N; the L second entities are the second entities among the N second entities, and the first configuration information is used to notify the target user host to establish communication channels to the L second entities based on the Q first entities; the Q first entities are the first entities corresponding to the L second entities in the at least one first entity; the processor 1001 is used to register the L second entities, establish communication channels to the L second entities based on the Q first entities, and use the L second entities through the communication channels.

[0341] It is understandable that for the detailed description of the processor and transceiver, please refer to Figure 10 or Figure 11 The description of the processing unit and the transceiver unit shown will not be repeated here.

[0342] Optionally, processor 1001 may include a transceiver for implementing receiving and transmitting functions. For example, the transceiver may be a transceiver circuit, an interface, or an interface circuit. The transceiver circuit, interface, or interface circuit for implementing the receiving and transmitting functions may be separate or integrated. The transceiver circuit, interface, or interface circuit may be used for reading and writing code / data, or may be used for transmitting or delivering signals.

[0343] Optionally, the processor 1001 may store instructions, which may be computer programs. The computer programs run on the processor 1001 to enable the communication device 30 to perform the method described in the above method embodiment. The computer program may be fixed in the processor 1001. In this case, the processor 1001 may be implemented by hardware.

[0344] In one implementation, the communication device 30 may include a circuit that can implement the functions of sending, receiving, or communicating in the aforementioned method embodiments. The processor and transceiver described in this application can be implemented on an integrated circuit (IC), an analog IC, a radio frequency integrated circuit (RFIC), a mixed signal IC, an application specific integrated circuit (ASIC), a printed circuit board (PCB), an electronic device, etc. The processor and transceiver can also be manufactured using various IC process technologies, such as complementary metal oxide semiconductor (CMOS), N-type metal oxide semiconductor (nMetal-oxide-semiconductor, NMOS), P-type metal oxide semiconductor (positive channel metal oxide semiconductor, PMOS), bipolar junction transistor (bipolar junction transistor, BJT), bipolar CMOS (BiCMOS), silicon germanium (SiGe), gallium arsenide (GaAs), etc.

[0345] It is understandable that the communication device shown in the embodiment of the present application may also have Figure 12 The embodiments of the present application do not limit the number of components, etc. The methods executed by the processor and transceiver described above are only examples, and the specific steps executed by the processor and transceiver can be referred to the introduction of the method embodiments above.

[0346] In another possible implementation, Figure 10 or Figure 11 In the communication device shown, the processing unit 100 or the processing unit 111 may be one or more logic circuits, and the transceiver unit 101 or the transceiver unit 110 may be an input / output interface, or may be called a communication interface, or an interface circuit, or an interface, etc. Alternatively, the sending unit may be an output interface, and the receiving unit may be an input interface, and the sending unit and the receiving unit may be integrated into one unit, such as an input / output interface. Figure 13 , Figure 13 This is a structural diagram of another communication device provided in an embodiment of the present application. Figure 13As shown, the communication device 40 includes a logic circuit 901 and an interface 902. That is, the processing unit 100 or the processing unit 111 can be implemented by the logic circuit 901, and the transceiver unit 101 or the transceiver unit 110 can be implemented by the interface 902. The logic circuit 901 can be a chip, a processing circuit, an integrated circuit or a system on chip (SoC) chip, etc., and the interface 902 can be a communication interface, an input / output interface, a pin, etc. For example, Figure 13 The communication device 40 is taken as an example as a chip, and the chip includes a logic circuit 901 and an interface 902 .

[0347] In the embodiment of the present application, the logic circuit and the interface may also be coupled to each other. The embodiment of the present application does not limit the specific connection method between the logic circuit and the interface.

[0348] Exemplarily, when the communication device 40 is used to execute the method, function, or step executed by the above-mentioned communication device 10, the logic circuit 901 is used to obtain a resource allocation strategy; the resource allocation strategy is used to determine to allocate L second entities among the N second entities to a target user host among the at least one user host; L is a positive integer less than or equal to N; the interface 902 is used to send first configuration information to the target user host; the first configuration information is used to notify the target user host to register the L second entities.

[0349] Exemplarily, when the communication device 40 is used to execute the steps, methods or functions executed by the above-mentioned communication device 11, the interface 902 is used to receive the first configuration information sent by the management host, and determine the allocated L second entities based on the first configuration information; L is a positive integer less than or equal to N; the L second entities are the second entities among the N second entities, and the first configuration information is used to notify the target user host to register the L second entities, and establish communication channels to the L second entities based on the Q first entities; the Q first entities are the first entities corresponding to the L second entities in the at least one first entity; the logic circuit 901 is used to register the L second entities, establish communication channels to the L second entities based on the Q first entities, and use the L second entities through the communication channels.

[0350] It is understood that for the detailed description of the logic circuit 901 and the interface 902, please refer to Figure 10 or Figure 11 The description of the processing unit and the transceiver unit shown will not be repeated here.

[0351] It can be understood that the communication device shown in the embodiment of the present application can implement the method provided in the embodiment of the present application in the form of hardware, or can implement the method provided in the embodiment of the present application in the form of software, etc., and the embodiment of the present application is not limited to this.

[0352] for Figure 13 The specific implementation methods of the various embodiments shown can also refer to the above embodiments and will not be described in detail here.

[0353] In addition, an embodiment of the present application further provides a computer-readable storage medium, which stores computer program code. When the above-mentioned processor executes the computer program code, the computer executes the method in any of the aforementioned embodiments.

[0354] The present application also provides a terminal device, which may be in the form of a chip product. The terminal device includes a processor configured to support the terminal device in implementing the corresponding functions of the method in any of the aforementioned embodiments. The terminal device may also include a memory coupled to the processor and storing program instructions and data necessary for the terminal device. The terminal device may also include a communication interface for communicating with other devices or a communication network.

[0355] An embodiment of the present application further provides a computer program product, which, when executed on a computer, enables the computer to execute the method in any of the aforementioned embodiments.

[0356] An embodiment of the present application provides a chip system that includes a processor for supporting a device in implementing the functions described in any of the above embodiments, such as generating or processing information used in the device resource management method. In one possible design, the chip system also includes a memory for storing program instructions and data necessary for the device. The chip system can be composed of a single chip or can include a chip and other discrete components.

[0357] An embodiment of the present application provides a server, including a communication interface, a memory, and a processor; the communication interface, the memory, and the processor are coupled, the communication interface is used for the server to communicate with other devices or a communication network, the memory is used to store computer program code, and the computer program code includes computer instructions. When the processor reads the computer instructions from the memory, the server executes the corresponding function of the method in any of the aforementioned embodiments.

[0358] An embodiment of the present application provides a vehicle-mounted device, including a communication interface, a memory and a processor; the communication interface, the memory and the processor are coupled, the communication interface is used for the vehicle-mounted device to communicate with other devices or a communication network, the memory is used to store computer program code, and the computer program code includes computer instructions. When the processor reads the computer instructions from the memory, the vehicle-mounted device executes the corresponding function of the method in any of the aforementioned embodiments.

[0359] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0360] It should be noted that for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps may be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.

[0361] In the several embodiments provided in this application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the above-mentioned units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

[0362] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present application.

[0363] In addition, the functional units in the embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0364] The integrated unit described above, if realized in the form of a software function unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on such understanding, the technical solutions of the present application essentially or say the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc., and specifically can be a processor in the computer device) to execute all or part of the steps of the above-mentioned methods of various embodiments of the present application. Among them, the aforementioned storage medium can include: a U disk, a mobile hard disk, a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), and various storage program codes.

[0365] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A device resource management method, characterized in that: A management host applied to a device resource management system, the device resource management system further comprising at least one user host and M resource devices; each of the M resource devices comprising a first entity and at least one second entity; the first entity comprising a physical configuration resource; the at least one second entity comprising a functional configuration resource generated after configuration of the physical configuration resource; The M resource devices include a total of N second entities, where N is an integer greater than 1 and M is an integer greater than 0; the method includes: Sending first configuration information to a target user host; the first configuration information is used to notify the target user host to register the L second entities; the target user host is one of the at least one user host, the L second entities are second entities allocated to the target user host from the N second entities, and L is a positive integer less than or equal to N.

2. The method according to claim 1, wherein The method further comprises: Scan the device resource management system to discover the at least one user host and the M resource devices.

3. The method according to claim 2, wherein The scanning of the device resource management system to discover the at least one user host and the M resource devices includes: Sending an enumeration message in the device resource management system; the enumeration message is used to discover the at least one user host and the M resource devices in the device resource management system; receiving enumeration response messages respectively sent by the at least one user host and the M resource devices in response to the enumeration message; The at least one user host and the M resource devices are determined based on the enumeration response message.

4. The method according to any one of claims 1 to 3, wherein The method further comprises: Obtain a resource allocation strategy; the resource allocation strategy is used to determine to allocate L second entities among the N second entities to the target user host.

5. The method according to claim 4, wherein The obtaining of resource allocation strategy includes: Obtaining resource requirements of a target user host among the at least one user host; The resource allocation strategy is determined based on the resource demand.

6. The method according to any one of claims 1 to 5, wherein The method further comprises: An entity identity and / or authority identifier is configured for the at least one user host, the first entity, and the N second entities, respectively; or, an entity identity and / or authority identifier is configured for the at least one user host and the N second entities, respectively.

7. The method according to any one of claims 1 to 6, wherein The first configuration information includes one or more of the globally unique identifiers, entity identities, or authority identifiers of the L second entities.

8. The method according to any one of claims 1 to 7, wherein The method further comprises: Sending second configuration information to the target user host; the second configuration information is used to notify the target user host to deregister one or more second target entities among the L second entities.

9. The method according to claim 8, wherein The second configuration information includes one or more of a globally unique identifier, an entity identity identifier, or an authority identifier of the one or more second target entities.

10. The method according to claim 8 or 9, characterized in that The sending the second configuration information to the target user host includes: When the resource allocation policy changes, sending the second configuration information to the target user host; or, When the one or more second target entities or the resource devices to which the one or more second target entities belong fail, the second configuration information is sent to the target user host.

11. The method according to any one of claims 8 to 10, wherein: The method further comprises: When the resource allocation policy changes, the one or more second target entities are reset, and the entity identity identifiers and / or authority identifiers of the one or more second target entities are invalidated.

12. The method according to any one of claims 1 to 11, wherein The method further comprises: Configuring a network address for the target user host; The sending the first configuration information to the target user host includes: Based on the network address of the target user host, the first configuration information is sent to the target user host.

13. A device resource management method, characterized in that: A target user host is applied to a device resource management system, the device resource management system comprising a management host, at least one user host, and M resource devices, the target user host being one of the at least one user host; each of the M resource devices comprising a first entity and at least one second entity; the first entity comprising a physical configuration resource; the at least one second entity comprising a functional configuration resource generated after configuration of the physical configuration resource; The M resource devices include a total of N second entities, where N is an integer greater than 1 and M is an integer greater than 0; the method includes: receiving first configuration information sent by the management host; Determining L allocated second entities based on the first configuration information; the L second entities are second entities allocated to the target user host from the N second entities; L is a positive integer less than or equal to N; Register the L second entities.

14. The method according to claim 13, wherein The registering the L second entities includes: Creating a local device for the L second entities; A device driver is loaded for the local device, and a communication channel is established from the local device to the L second entities through the device driver.

15. The method according to claim 13 or 14, characterized in that The method further comprises: The L second entities are enabled and used.

16. The method according to any one of claims 13 to 15, wherein: The method further comprises: Receiving an enumeration message sent by the management host; Send an enumeration response message to the management host in response to the enumeration message.

17. The method according to any one of claims 13 to 16, wherein: The method further comprises: Receive the entity identity and / or authority identifier configured by the management host.

18. The method according to any one of claims 13 to 17, wherein: The method further comprises: Sending resource requirements to the management host.

19. The method according to any one of claims 13 to 18, wherein The method further comprises: receiving second configuration information sent by the management host; Determining one or more second target entities to be deregistered among the L second entities based on the second configuration information; The one or more second target entities are deregistered.

20. The method according to claim 19, wherein The deregistering the one or more second target entities includes: Unloading a device driver loaded for a local device; the local device being a device node created for the one or more second target entities; Delete the local device.

21. The method according to any one of claims 19-20, wherein The second configuration information includes one or more of a globally unique identifier, an entity identity identifier, or an authority identifier of the one or more second target entities.

22. The method according to any one of claims 13 to 21, wherein The first configuration information includes one or more of a globally unique identifier, an entity identity identifier, or an authority identifier of the target user host and the L second entities.

23. A device resource management method, characterized in that: A resource device applied to a device resource management system, wherein the device resource management system further includes a management host and at least one user host; the method comprises: receiving an enumeration message sent by the management host; the enumeration message is used to discover the at least one user host and the at least one resource device in the device resource management system; An enumeration response message is sent to the management host in response to the enumeration message; the enumeration response message is used to report the information of the resource device.

24. The method according to claim 23, wherein The enumeration response message includes a globally unique identifier of the target resource device.

25. A device resource management system, characterized in that: The system includes at least one user host, M resource devices and a management host, wherein: Each of the M resource devices includes a first entity and at least one second entity; the first entity includes a physical configuration resource, and the at least one second entity includes a functional configuration resource generated after the physical configuration resource is configured; the M resource devices include a total of N second entities, where N is an integer greater than 1 and M is an integer greater than 0; The management host is configured to send first configuration information to a target user host; the first configuration information is used to notify the target user host to register the L second entities; the target user host is one of the at least one user host, the L second entities are second entities allocated to the target user host from the N second entities, and L is a positive integer less than or equal to N; The target user host is configured to receive the first configuration information and register the L second entities based on the first configuration information.

26. The system of claim 25, wherein: The management host is further used to: Scan the device resource management system to discover the at least one user host and the M resource devices.

27. The system of claim 26, wherein: The management host is specifically used to: Sending an enumeration message in the device resource management system, and receiving enumeration response messages respectively sent by the at least one user host and the M resource devices in response to the enumeration message; Determining the at least one user host and the M resource devices based on the enumeration response message; The at least one user host and the M resource devices are configured to receive the enumeration message and send enumeration response information to the management host in response to the enumeration message.

28. The system according to any one of claims 25 to 27, wherein: The management host is further used to: Obtain a resource allocation strategy; the resource allocation strategy is used to determine to allocate L second entities among the N second entities to the target user host.

29. The system of claim 28, wherein: The management host is specifically used to: Obtaining resource requirements of a target user host among the at least one user host; determining the resource allocation strategy based on the resource demand; The target user host is used to send resource requirements to the management host.

30. The system according to any one of claims 25 to 29, wherein: The system further comprises: A switching device is used to connect the at least one user host, the management host and the M resource devices.

31. The system according to any one of claims 25 to 30, wherein: The management host is further used to: An entity identity and / or authority identifier is configured for the at least one user host, the first entity, and the L second entities; or an entity identity and / or authority identifier is configured for the at least one user host and the N second entities, respectively.

32. The system according to any one of claims 25 to 31, wherein: The management host is further used to: Sending first configuration information to the target user host; the first configuration information is used to notify the target user host to register the L second entities, the first configuration information including one or more of the globally unique identifiers, entity identity identifiers, or authority identifiers of the L second entities; The target user host is used to: receiving first configuration information sent by the management host; Determine L allocated second entities based on the first configuration information; the L second entities are part or all of the N second entities; L is a positive integer less than or equal to N; Register the L second entities.

33. The system according to any one of claims 25 to 32, wherein: The management host is further used to: Sending second configuration information to the target user host; the second configuration information is used to notify the target user host to deregister one or more second target entities among the L second entities, the second configuration information including one or more of a globally unique identifier, an entity identity identifier, or an authority identifier of the one or more second target entities; The target user host is further used to: receiving second configuration information sent by the management host; Determining one or more second target entities to be deregistered among the L second entities based on the second configuration information; The one or more second target entities are deregistered.

34. The system of claim 33, wherein: The management host is specifically used to: When the resource allocation policy changes, sending the second configuration information to the target user host; or, When the one or more second target entities or the resource devices to which the one or more second target entities belong fail, the second configuration information is sent to the target user host.

35. The system according to claim 33 or 34, wherein: The management host is further used to: When the resource allocation policy changes, the one or more second target entities are reset, and the entity identity identifiers and / or authority identifiers of the one or more second target entities are invalidated.

36. The system according to any one of claims 25 to 35, wherein: The at least one user host, the M resource devices, the management host and the switching device are respectively configured with a network address, and the network address is used to determine a transmission route of a communication message in the system.

37. A computer-readable storage medium, characterized in that The method comprises instructions which, when executed on a computer, cause the computer to perform the method according to any one of claims 1 to 24.

38. A device, characterized in that The method comprises a module or a unit for executing the method according to any one of claims 1 to 24.

39. A terminal device, characterized in that: The terminal device comprises a processor and a memory, wherein the memory is used to store program code, and when the program code is executed by the processor, the terminal device implements the method according to any one of claims 1 to 24.

40. A chip system, characterized in that: The chip system includes at least one processor, a memory and an interface circuit. The memory, the interface circuit and the at least one processor are interconnected through lines. Instructions are stored in the at least one memory. When the instructions are executed by the processor, the method described in any one of claims 1 to 24 is implemented.

Citation Information

Patent Citations

  • Device identifier selection

    CN102473155A

  • Multi-root I / O (Input / Output) virtualization sharing method and system

    CN102707991A

  • Input / output (I / O) resource management method for multi-root I / O virtualization sharing system

    CN102722414A

  • Control method based on UI interface, control device based on UI interface, control equipment based on UI interface and storage medium

    CN110575667A

  • Message forwarding method, computer equipment and intermediate equipment

    CN110955517A