WO2024113884A1 - 外接设备的资源分配方法、装置、服务器及存储介质 - Google Patents

外接设备的资源分配方法、装置、服务器及存储介质 Download PDF

Info

Publication number
WO2024113884A1
WO2024113884A1 PCT/CN2023/107011 CN2023107011W WO2024113884A1 WO 2024113884 A1 WO2024113884 A1 WO 2024113884A1 CN 2023107011 W CN2023107011 W CN 2023107011W WO 2024113884 A1 WO2024113884 A1 WO 2024113884A1
Authority
WO
WIPO (PCT)
Prior art keywords
network card
identification information
resource allocation
special
startup mode
Prior art date
Application number
PCT/CN2023/107011
Other languages
English (en)
French (fr)
Inventor
王淑贤
姚藩益
王兵
谭钰琦
Original Assignee
苏州元脑智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 苏州元脑智能科技有限公司 filed Critical 苏州元脑智能科技有限公司
Publication of WO2024113884A1 publication Critical patent/WO2024113884A1/zh

Links

Definitions

  • the present application relates to the field of computer technology, and in particular to a resource allocation method for an external device, a resource allocation device, a server, and a computer non-volatile readable storage medium.
  • BIOS Basic Input Output System
  • BIOS Basic Input Output System
  • the network card device is a common device of the server, which is generally used to connect the server with network devices such as switches.
  • the purpose of the present application is to provide a resource allocation method for an external device, a resource allocation device, a server and a computer non-volatile readable storage medium to improve the reliability of resource allocation and avoid the problem of resource allocation errors.
  • the present application provides a resource allocation method for an external device, comprising:
  • Allocate resources to the currently connected devices based on the basic input and output system startup mode and the special device list.
  • determining identification information of all network card devices from the acquired external device information includes:
  • obtaining identification information of all network card devices from external device information includes:
  • the manufacturer identification information and the device identification information are obtained from the information of all network card devices and used as the corresponding identification information.
  • obtaining the external device information of all external devices through the peripheral component interconnection standard protocol includes:
  • the external device information of all external devices is obtained through the peripheral component interconnection standard protocol and the corresponding interface.
  • determining identification information of all network card devices from the acquired external device information includes:
  • the manufacturer identification information and the device identification information are used as corresponding identification information.
  • establishing a special device list based on the identification information includes:
  • identifying a special network card device from identification information includes:
  • the special network card device is identified based on the manufacturer identification information and the device identification information of the identification information.
  • identifying a special network card device from identification information includes:
  • the execution mode of all network card devices corresponding to the identification information is simulated to determine the network card devices that only support low-order resources, and the network card devices with low-order resources are used as special network card devices.
  • a special device list is established based on all identified special network card devices, including:
  • a special device list is established based on the manufacturer identification information and device identification information of the special network card device.
  • allocating resources to the currently connected device based on the startup mode of the basic input and output system and the special device list includes:
  • startup mode includes a 64-bit resource startup mode and a 32-bit resource startup mode;
  • Allocate resources to the currently connected network card devices based on the startup mode and special device list.
  • allocating resources to the currently connected network card device based on the startup mode and the special device list includes:
  • the startup mode is 64-bit resource startup mode, more than 32-bit resources are allocated to the currently connected network card device;
  • the startup mode is 32-bit resource startup mode
  • resources less than 32 bits are allocated to the network card devices that match the special device list.
  • allocating resources to the currently connected network card device based on the startup mode and the special device list includes:
  • the boot mode is UEFI mode
  • more than 32 bits of resources are allocated to the currently connected network card device
  • resources less than 32 bits are allocated to the network card devices matching the special device list, including:
  • it also includes:
  • obtaining a startup mode of a basic input/output system includes:
  • obtaining a startup mode of a basic input/output system includes:
  • it also includes:
  • the present application also provides a resource allocation device for an external device, comprising:
  • An identification information acquisition module used to determine the identification information of all network card devices from the acquired external device information
  • a list acquisition module used to establish a special device list based on identification information
  • the resource allocation module is used to allocate resources to the currently connected device based on the startup mode of the basic input and output system and the special device list.
  • the present application also provides a server, comprising:
  • a processor is used to implement the steps of the above resource allocation method when executing a computer program.
  • the present application also provides a computer non-volatile readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above resource allocation method are implemented.
  • the present application provides a method for allocating resources to external devices, including: determining identification information of all network card devices from the acquired external device information; establishing a special device list based on the identification information; and allocating resources to the currently connected device based on the startup mode of the basic input/output system and the special device list.
  • the present application also provides a resource allocation device for an external device, a server, and a computer non-volatile readable storage medium, which have the above beneficial effects and are not elaborated here.
  • FIG1 is a flow chart of a resource allocation method for an external device provided in an embodiment of the present application.
  • FIG2 is a flow chart of another method for allocating resources of an external device provided in an embodiment of the present application.
  • FIG3 is a schematic diagram of the structure of a resource allocation device for an external device provided in an embodiment of the present application.
  • FIG4 is a schematic diagram of the structure of a server provided in an embodiment of the present application.
  • FIG5 is a schematic diagram of the structure of a computer non-volatile readable storage medium provided in an embodiment of the present application.
  • the core of the present application is to provide a resource allocation method for an external device, a resource allocation device, a server and a computer non-volatile readable storage medium to improve the reliability of resource allocation and avoid the problem of resource allocation errors.
  • the server can be started through the network by starting with PXE (Preboot eXecution Environment).
  • PXE provides a boot method that can boot the server through the network, but the server needs to include a network card that can support PXE boot.
  • the server calls the PXE protocol in the network card Rom into the memory to execute the boot, and the PXE protocol downloads the remote file or boot item through the network to the local operation.
  • the BIOS boot mode of the server is divided into UEFI (Unified Extensible Firmware Interface) mode and Legacy (traditional boot mode under BIOS) mode
  • the OpRom (peripheral memory) of the network card is also divided into UEFI OpRom and Legacy OpRom.
  • Some network cards can support address spaces other than 32 bits in UEFI mode, but the OpRom of the network card device in Legacy mode cannot support address spaces other than 32 bits, and can only be allocated to address spaces within 32 bits to support the use of the PXE function of the network card. Therefore, resource allocation errors are prone to occur in the general resource allocation process, resulting in reduced reliability.
  • the present application provides a resource allocation method for external devices, which first obtains the identification information of all network card devices, then identifies a list of special devices, and finally allocates resources to the network card devices in special device situations based on the startup mode and the special device list, thereby avoiding errors in resource allocation and improving the effect and reliability of resource allocation.
  • the following describes a resource allocation method for an external device provided by the present application through an embodiment.
  • FIG. 1 is a flow chart of a resource allocation method for an external device provided in an embodiment of the present application.
  • the method may include:
  • this step is intended to determine the identification information of all network card devices from the acquired external device information.
  • the identification information of the network card device is determined so as to identify the network card device.
  • this step S101 may include:
  • Step 1 obtaining the external device information of all external devices through the peripheral component interconnection standard protocol
  • Step 2 Obtain identification information of all network card devices from the external device information.
  • this optional solution mainly explains how to obtain identification information.
  • the external device information of all external devices is obtained through the peripheral component interconnection standard protocol; and the identification information of all network card devices is obtained from the external device information.
  • step 2 may include:
  • Step 2.1 obtain the information of all network card devices from the external device information
  • Step 2.2 obtaining the manufacturer identification information and the device identification information from the information of all network card devices, and using them as the corresponding identification information.
  • this optional solution mainly explains how to obtain identification information.
  • the information of all network card devices is obtained from the external device information; the manufacturer identification information and device identification information are obtained from the information of all network card devices and used as the corresponding identification information.
  • step 1 may include:
  • the external device information of all external devices is obtained through the peripheral component interconnection standard protocol and the corresponding interface.
  • this optional solution mainly describes how to obtain external device information.
  • the external device information of all external devices is obtained through the peripheral component interconnection standard protocol and the corresponding interface.
  • step S101 may also include:
  • Step 3 determining the manufacturer identification information and device identification information of all connected network card devices from the acquired external device information
  • Step 4 Use the manufacturer identification information and the device identification information as corresponding identification information.
  • this optional solution mainly explains how to obtain identification information.
  • the manufacturer identification information and device identification information of all connected network card devices are determined from the obtained external device information; the manufacturer identification information and device identification information are used as corresponding identification information.
  • the manufacturer identification information and device identification information are directly obtained from the obtained information.
  • this step aims to establish a special device list based on identification information, wherein the special device (special network card device) refers to a network card device with limited resource allocation in the traditional startup mode.
  • the special device (special network card device) refers to a network card device with limited resource allocation in the traditional startup mode.
  • this step S102 may include:
  • Step 5 identifying the special network card device from the identification information
  • Step 6 Create a special device list based on all identified special network card devices.
  • this optional solution mainly explains how to obtain a special device list.
  • special network card devices are identified from identification information; a special device list is established based on all identified special network card devices. That is, special network card devices are first identified, and then a special device list is established. It can be understood that the special device list is used to record special network card devices.
  • special network card devices refer to network card devices with limited resource allocation in traditional startup mode.
  • step 5 may include:
  • the special network card device is identified based on the manufacturer identification information and the device identification information of the identification information.
  • this optional solution mainly explains how to obtain a special network card device.
  • the special network card device is identified based on the manufacturer identification information and the device identification information of the identification information.
  • step 5 may also include:
  • the execution mode of all network card devices corresponding to the identification information is simulated to determine the network card devices that only support low-order resources, and the network card devices with low-order resources are used as special network card devices.
  • this optional solution mainly explains how to obtain a special network card device.
  • the execution mode of all network card devices corresponding to the identification information is simulated to determine the network card devices that only support low-level resources, and the network card devices with low-level resources are used as special network card devices.
  • step 6 may include:
  • a special device list is established based on the manufacturer identification information and device identification information of the special network card device.
  • this optional solution mainly explains how to obtain a special device list.
  • a special device list is established based on the manufacturer identification information and device identification information of the special network card device.
  • S103 Allocate resources to the currently connected device based on the startup mode of the basic input and output system and the special device list.
  • this step aims to allocate resources to the currently connected device based on the startup mode of the basic input and output system and the special device list.
  • this step S103 may include:
  • Step 7 obtaining a startup mode of a basic input/output system; wherein the startup mode includes a 64-bit resource startup mode and a 32-bit resource startup mode;
  • Step 8 Allocate resources to the currently connected network card device based on the startup mode and the special device list.
  • this optional solution mainly explains how to allocate resources.
  • the startup mode of the basic input and output system is obtained; wherein the startup mode includes a 64-bit resource startup mode and a 32-bit resource startup mode; and resources are allocated to the currently connected network card device based on the startup mode and the special device list.
  • the 32-bit resource startup mode is the traditional startup mode, and there is a problem of limited resources in this startup mode.
  • step 8 may include:
  • the startup mode is 64-bit resource startup mode, more than 32-bit resources are allocated to the currently connected network card device;
  • the startup mode is 32-bit resource startup mode
  • resources less than 32 bits are allocated to the network card devices that match the special device list.
  • this optional solution mainly explains how to allocate resources in different startup modes.
  • the startup mode is 64-bit resource startup mode, resources above 32 bits are allocated to the currently connected network card device; when the startup mode is 32-bit resource startup mode, resources below 32 bits are allocated to the network card device matching the special device list.
  • step 8 may also include:
  • the boot mode is UEFI mode
  • more than 32 bits of resources are allocated to the currently connected network card device
  • this optional solution mainly explains how to allocate resources in different boot modes.
  • the boot mode is UEFI mode
  • resources above 32 bits are allocated to the currently connected network card device
  • the boot mode is Legacy mode
  • resources below 32 bits are allocated to the network card device matching the special device list.
  • the process of allocating resources less than 32 bits to the network card devices matching the special device list may include:
  • this optional solution mainly explains how to allocate resources in the traditional mode.
  • it is determined whether the identification information of the network card device matches the identification information in the special device list; if the identification information of the network card device matches the identification information in the special device list, resources below 32 bits are allocated to the network card device; if the identification information of the network card device matches the identification information in the special device list, resources below 32 bits are allocated to the network card device; When the identification information in the backup list does not match, more than 32 bits of resources are allocated to the network card device.
  • step 7 may include:
  • this optional solution mainly explains how to obtain the startup mode.
  • the startup mode of the basic input and output system is obtained through the system variable value.
  • step 7 may also include:
  • this optional solution mainly explains how to obtain the startup mode.
  • the startup mode of the basic input and output system is obtained through the GetVariable function.
  • the GetVariable function is the function for obtaining system variables in the UEFI mode.
  • this embodiment may also include:
  • this optional solution mainly describes how to start the system.
  • the system is started through the pre-start execution environment.
  • this embodiment first obtains the identification information of all network card devices, then identifies the special device list, and finally allocates resources to the network card devices in the special device case based on the startup mode and the special device list, thereby avoiding the problem of resource allocation errors and improving the effect and reliability of resource allocation.
  • FIG. 2 is a flow chart of another resource allocation method for an external device provided in an embodiment of the present application.
  • the method may include:
  • S205 Allocate resources to the currently connected network card device based on the startup mode and the special device list.
  • the basic input and output system as the lowest level and most direct hardware setting and control management of the server motherboard It can provide more simple usability functions for the server.
  • BIOS the visualization of some hardware device identification on the server can be realized, which can make the use of hardware devices more feasible.
  • the network card device is a common device of the server, which is generally used for the connection between the server and network devices such as switches.
  • the BIOS boot mode of the server is divided into UEFI and Legacy mode, and the OpRom of the network card is also divided into UEFI OpRom and Legacy OpRom.
  • Some network cards can support address spaces other than 32 bits in UEFI mode, but the OpRom of the network card device in Legacy mode cannot support address spaces other than 32 bits, and can only be allocated to address spaces within 32 bits to support the PXE function of the network card. Since the 32-bit address space resources are relatively limited, this embodiment provides a method for automatically detecting and allocating resources, allocating the network card to the high 32-bit resources in UEFI mode, and allocating to the low 32-bit resources in Legacy mode, ensuring that the network card can work normally in both UEFI and Legacy modes, and the PXE boot function is normally realized, and ensuring that the limited low 32-bit resources are not occupied too much.
  • this embodiment proposes a resource allocation method, which includes: obtaining the VID (Vendor Identification) and DID (Device Identification) of the network card device by acquiring PCI device information; identifying the VID and DID of devices that can only support resources below 32 bits in Legacy mode; and establishing an array List of the VID and DID of these special network card devices.
  • the BIOS boot mode is obtained through GetVariable; the BIOS boot mode is determined. If it is UEFI mode, more than 32-bit resources are allocated to the network card. If it is Legacy mode, the array List established according to the VID and DID of the special network card is loaded, and the VID and DID currently obtained from the PCI device information are compared with the established VID and DID array List. If the current PCI device information is consistent with the established VID and DID array List, it means that a special device is currently connected to the machine; finally, resources less than 32 bits are allocated to the special device.
  • the present application implements a method for automatically detecting network card information and controlling resource allocation.
  • the coding and operation of this method are simple. If you want to add or reduce devices, you can directly modify the VID and DID array List. It will not misidentify other devices and mistakenly allocate address space resources below 32 bits to other devices. It not only ensures the normal operation of the network card device, but also ensures that the overall scarce 32-bit resources are not mistakenly allocated to cause unnecessary trouble.
  • this embodiment first obtains the identification information of all network card devices, then identifies the special device list, and finally allocates resources to the network card devices in the special device case based on the startup mode and the special device list, thereby avoiding the problem of resource allocation errors and improving the effect and reliability of resource allocation.
  • the resource allocation device for an external device provided in an embodiment of the present application is introduced below.
  • the resource allocation device for an external device described below and the resource allocation method for an external device described above can be referred to each other.
  • FIG. 3 is a schematic diagram of the structure of a resource allocation device for an external device provided in an embodiment of the present application.
  • the method may include:
  • the identification information acquisition module 100 is used to determine the identification information of all network card devices from the acquired external device information;
  • a list acquisition module 200 used to establish a special device list based on identification information
  • the resource allocation module 300 is used to allocate resources to the currently connected device based on the startup mode of the basic input and output system and the special device list.
  • the identification information acquisition module 100 is specifically used to obtain the external device information of all external devices through the peripheral component interconnection standard protocol; and obtain the identification information of all network card devices from the external device information.
  • the process of obtaining identification information of all network card devices from the external device information may include:
  • the information of all network card devices is obtained from the external device information; the manufacturer identification information and the device identification information are obtained from the information of all network card devices and used as the corresponding identification information.
  • obtaining the external device information of all external devices through the peripheral component interconnection standard protocol may include:
  • the external device information of all external devices is obtained through the peripheral component interconnection standard protocol and the corresponding interface.
  • the identification information acquisition module 100 is specifically used to determine the manufacturer identification information and device identification information of all connected network card devices from the acquired external device information; and use the manufacturer identification information and device identification information as corresponding identification information.
  • the list acquisition module 200 is specifically used to identify special network card devices from identification information; and establish a special device list based on all identified special network card devices.
  • identifying a special network card device from the identification information may include:
  • the special network card device is identified based on the manufacturer identification information and the device identification information of the identification information.
  • identifying a special network card device from the identification information may include:
  • the execution mode of all network card devices corresponding to the identification information is simulated to determine the network card devices that only support low-order resources, and the network card devices with low-order resources are used as special network card devices.
  • a special device list is created based on all identified special network card devices, which may include:
  • a special device list is established based on the manufacturer identification information and device identification information of the special network card device.
  • the resource allocation module 300 is specifically used to obtain a startup mode of a basic input/output system, wherein the startup mode includes a 64-bit resource startup mode and a 32-bit resource startup mode; and to allocate resources to a currently connected network card device based on the startup mode and the special device list.
  • resource allocation for currently connected network card devices based on the startup mode and special device list may include:
  • startup mode is 64-bit resource startup mode
  • resources above 32 bits are allocated to the currently connected network card device; when the startup mode is 32-bit resource startup mode, resources below 32 bits are allocated to the network card device matching the special device list.
  • resource allocation for currently connected network card devices based on the startup mode and special device list may include:
  • boot mode When the boot mode is UEFI mode, resources above 32 bits are allocated to the currently connected network card device; when the boot mode is Legacy mode, resources below 32 bits are allocated to the network card device that matches the special device list.
  • resources less than 32 bits are allocated to the network card devices that match the special device list, which may include:
  • obtaining the startup mode of the basic input and output system may include:
  • get the basic input and output system startup mode including:
  • the device may further include:
  • the system startup module is used to start the system through the pre-start execution environment after resource allocation is completed.
  • this embodiment first obtains the identification information of all network card devices, then identifies the special device list, and finally allocates resources to the network card devices in the special device case based on the startup mode and the special device list, thereby avoiding the problem of resource allocation errors and improving the effect and reliability of resource allocation.
  • the present application also provides a server.
  • FIG. 4 is a schematic diagram of a structure of a server provided in an embodiment of the present application.
  • the server may include:
  • the processor is used to implement the steps of any one of the above-mentioned methods for allocating resources to an external device when executing a computer program.
  • the server may include: a processor 10, a memory 11, a communication interface 12 and a communication bus 13.
  • the processor 10, the memory 11, and the communication interface 12 all communicate with each other through the communication bus 13.
  • the processor 10 may be a central processing unit (CPU), an application specific integrated circuit, a digital signal processor, a field programmable gate array or other programmable logic devices, etc.
  • CPU central processing unit
  • application specific integrated circuit a digital signal processor
  • field programmable gate array a field programmable gate array or other programmable logic devices, etc.
  • the processor 10 can call the program stored in the memory 11. Specifically, the processor 10 can execute the abnormal IP identification method. The operation in the embodiment of the present invention.
  • the memory 11 is used to store one or more programs, which may include program codes, and the program codes include computer operation instructions.
  • the memory 11 at least stores programs for implementing the following functions:
  • Allocate resources to the currently connected devices based on the basic input and output system startup mode and the special device list.
  • the memory 11 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function, etc.; the data storage area may store data created during use.
  • the memory 11 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device or other volatile solid-state storage device.
  • the communication interface 12 may be an interface of a communication module, and is used to connect to other devices or systems.
  • FIG. 4 does not constitute a limitation on the server in the embodiment of the present application.
  • the server may include more or fewer components than those shown in FIG. 4 , or combine certain components.
  • this embodiment first obtains the identification information of all network card devices, then identifies the special device list, and finally allocates resources to the network card devices in the special device case based on the startup mode and the special device list, thereby avoiding the problem of resource allocation errors and improving the effect and reliability of resource allocation.
  • the present application further provides a computer non-volatile readable storage medium 50 on which a computer program 501 is stored.
  • a computer program 501 is executed by a processor, the steps of any of the above-mentioned resource allocation methods for an external device can be implemented.
  • the computer non-volatile readable storage medium 50 may include: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
  • the steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two.
  • the software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

Landscapes

  • Small-Scale Networks (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Stored Programmes (AREA)

Abstract

本申请公开了一种外接设备的资源分配方法,包括:从获取的外接设备信息中确定所有网卡设备的标识信息;基于所述标识信息建立特殊设备列表;基于基本输入输出系统的启动模式和所述特殊设备列表对当前接入的设备进行资源分配。通过先获取所有网卡设备的标识信息,然后识别出特殊设备列表,最后基于启动模式和特殊设备列表对特殊设备情况下的网卡设备进行资源分配,避免出现资源分配存在错误的问题,提高资源分配的效果和可靠性。本申请还公开了一种外接设备的资源分配装置、服务器以及计算机非易失性可读存储介质,具有以上有益效果。

Description

外接设备的资源分配方法、装置、服务器及存储介质
相关申请的交叉引用
本申请要求于2022年11月30日提交中国专利局,申请号为202211519340.6,申请名称为“一种外接设备的资源分配方法及相关装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机技术领域,特别涉及一种外接设备的资源分配方法、资源分配装置、服务器以及计算机非易失性可读存储介质。
背景技术
在计算机系统中,BIOS(Basic Input Output System)基本输入输出系统,作为服务器主板最底层的、最直接的硬件设置和控制的管理者,能为服务器提供更多简单的易用性功能,通过BIOS可以实现服务器上一些硬件设备识别的可视化,能使得硬件设备的使用更具可行性。其中,网卡设备是服务器的常用设备,一般是用于服务器与交换机等网络设备之间的连接。
相关技术在一般的资源分配过程中容易出现资源分配错误,导致可靠性降低的问题。
发明内容
本申请的目的是提供一种外接设备的资源分配方法、资源分配装置、服务器以及计算机非易失性可读存储介质,以提高资源分配的可靠性,避免出现资源分配错误的问题。
为解决上述技术问题,本申请提供一种外接设备的资源分配方法,包括:
从获取的外接设备信息中确定所有网卡设备的标识信息;
基于标识信息建立特殊设备列表;
基于基本输入输出系统的启动模式和特殊设备列表对当前接入的设备进行资源分配。
在一些实施例中,从获取的外接设备信息中确定所有网卡设备的标识信息,包括:
通过外设组件互联标准协议获取所有外接设备的外接设备信息;
从外接设备信息获取所有网卡设备的标识信息。
在一些实施例中,从外接设备信息获取所有网卡设备的标识信息,包括:
从外接设备信息中获取所有网卡设备的信息;
从所有网卡设备的信息中获取厂商标识信息和设备标识信息,并作为对应的标识信息。
在一些实施例中,通过外设组件互联标准协议获取所有外接设备的外接设备信息,包括:
通过外设组件互联标准协议和对应的接口获取所有外接设备的外接设备信息。
在一些实施例中,从获取的外接设备信息中确定所有网卡设备的标识信息,包括:
从获取的外接设备信息中确定所连接的所有网卡设备的厂商标识信息和设备标识信息;
将厂商标识信息和设备标识信息作为对应的标识信息。
在一些实施例中,基于标识信息建立特殊设备列表,包括:
从标识信息中识别出特殊网卡设备;
基于识别出的所有特殊网卡设备建立特殊设备列表。
在一些实施例中,从标识信息中识别出特殊网卡设备,包括:
基于标识信息的厂商标识信息和设备标识信息识别出特殊网卡设备。
在一些实施例中,从标识信息中识别出特殊网卡设备,包括:
对标识信息对应的所有网卡设备进行执行模式模拟,确定仅支持低位资源的网卡设备,并将低位资源的网卡设备作为特殊网卡设备。
在一些实施例中,基于识别出的所有特殊网卡设备建立特殊设备列表,包括:
基于特殊网卡设备的厂商标识信息和设备标识信息建立特殊设备列表。
在一些实施例中,基于基本输入输出系统的启动模式和特殊设备列表对当前接入的设备进行资源分配,包括:
获取基本输入输出系统的启动模式;其中,启动模式包括64位资源启动模式和32位资源启动模式;
基于启动模式和特殊设备列表对当前接入的网卡设备进行资源分配。
在一些实施例中,基于启动模式和特殊设备列表对当前接入的网卡设备进行资源分配,包括:
当启动模式为64位资源启动模式时,对当前接入的网卡设备分配32位以上的资源;
当启动模式为32位资源启动模式时,对与特殊设备列表匹配的网卡设备分配32位以下的资源。
在一些实施例中,基于启动模式和特殊设备列表对当前接入的网卡设备进行资源分配,包括:
当启动模式为UEFI模式时,对当前接入的网卡设备分配32位以上的资源;
当启动模式为Legacy模式时,对与特殊设备列表匹配的网卡设备分配32位以下的资源。
在一些实施例中,对与特殊设备列表匹配的网卡设备分配32位以下的资源,包括:
判断网卡设备的标识信息与特殊设备列表中的标识信息是否匹配;
若网卡设备的标识信息与特殊设备列表中的标识信息匹配,则对网卡设备分配32位以下的资源。
在一些实施例中,还包括:
当网卡设备的标识信息与特殊设备列表中的标识信息不匹配时,对网卡设备分配32位以上的资源。
在一些实施例中,获取基本输入输出系统的启动模式,包括:
通过系统变量值获取基本输入输出系统的启动模式。
在一些实施例中,获取基本输入输出系统的启动模式,包括:
通过GetVariable函数获取基本输入输出系统的启动模式。
在一些实施例中,还包括:
当资源分配完成后,通过预启动执行环境进行系统启动。
本申请还提供一种外接设备的资源分配装置,包括:
标识信息获取模块,用于从获取的外接设备信息中确定所有网卡设备的标识信息;
列表获取模块,用于基于标识信息建立特殊设备列表;
资源分配模块,用于基于基本输入输出系统的启动模式和特殊设备列表对当前接入的设备进行资源分配。
本申请还提供一种服务器,包括:
存储器,用于存储计算机程序;
处理器,用于执行计算机程序时实现如上的资源分配方法的步骤。
本申请还提供一种计算机非易失性可读存储介质,计算机非易失性可读存储介质上存储有计算机程序,计算机程序被处理器执行时实现如上的资源分配方法的步骤。
本申请所提供的一种外接设备的资源分配方法,包括:从获取的外接设备信息中确定所有网卡设备的标识信息;基于标识信息建立特殊设备列表;基于基本输入输出系统的启动模式和特殊设备列表对当前接入的设备进行资源分配。
通过先获取所有网卡设备的标识信息,然后识别出特殊设备列表,最后基于启动模式和特殊设备列表对特殊设备情况下的网卡设备进行资源分配,避免出现资源分配存在错误的问 题,提高资源分配的效果和可靠性。
本申请还提供一种外接设备的资源分配装置、服务器以及计算机非易失性可读存储介质,具有以上有益效果,在此不作赘述。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。
图1为本申请实施例所提供的一种外接设备的资源分配方法的流程图;
图2为本申请实施例所提供的另一种外接设备的资源分配方法的流程图;
图3为本申请实施例所提供的一种外接设备的资源分配装置的结构示意图;
图4为本申请实施例所提供的一种服务器的结构示意图;
图5为本申请实施例所提供的一种计算机非易失性可读存储介质的结构示意图。
具体实施方式
本申请的核心是提供一种外接设备的资源分配方法、资源分配装置、服务器以及计算机非易失性可读存储介质,以提高资源分配的可靠性,避免出现资源分配错误的问题。
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
相关技术中,通过PXE(Preboot eXecution Environment,预启动执行环境)启动能够使得服务器能够通过网络启动,PXE提供了一种引导方式,能够引导服务器通过网络启动,但是需要服务器包含能够支持PXE启动的网卡。当服务器引导PXE启动时,服务器将网卡Rom中的PXE协议调入内存执行引导,由PXE协议将远端的文件或启动项通过网络下载到本地运行。其中,服务器的BIOS引导模式分为UEFI(Unified Extensible Firmware Interface,统一可扩展固件接口)模式和Legacy(BIOS下传统启动模式)模式,网卡的OpRom(外围内存)也分为UEFI OpRom和Legacy OpRom两种模式。有部分网卡在UEFI模式下可以支持32位以外的地址空间,但是在Legacy模式下网卡设备的Oprom是无法支持32位以外的地址空间,只能分配到32位以内的地址空间才可以支持使用网卡的PXE功能。因此,在一般的资源分配过程中容易出现资源分配错误,导致可靠性降低的问题。
因此,本申请提供的一种外接设备的资源分配方法,通过先获取所有网卡设备的标识信息,然后识别出特殊设备列表,最后基于启动模式和特殊设备列表对特殊设备情况下的网卡设备进行资源分配,避免出现资源分配存在错误的问题,提高资源分配的效果和可靠性。
以下通过一个实施例,对本申请提供的一种外接设备的资源分配方法进行说明。
请参考图1,图1为本申请实施例所提供的一种外接设备的资源分配方法的流程图。
本实施例中,该方法可以包括:
S101,从获取的外接设备信息中确定所有网卡设备的标识信息;
可见,本步骤旨在从获取的外接设备信息中确定所有网卡设备的标识信息。
也就是,确定网卡设备的标识信息,以便将网卡设备进行识别。
进一步的,本步骤S101可以包括:
步骤1,通过外设组件互联标准协议获取所有外接设备的外接设备信息;
步骤2,从外接设备信息获取所有网卡设备的标识信息。
可见,本可选方案主要是说明如何获取标识信息。本可选方案中,通过外设组件互联标准协议获取所有外接设备的外接设备信息;从外接设备信息获取所有网卡设备的标识信息。
进一步的,在本申请的一些可选实施例中,上述步骤2可以包括:
步骤2.1,从外接设备信息中获取所有网卡设备的信息;
步骤2.2,从所有网卡设备的信息中获取厂商标识信息和设备标识信息,并作为对应的标识信息。
可见,本可选方案主要是说明如何获取标识信息。本可选方案中,从外接设备信息中获取所有网卡设备的信息;从所有网卡设备的信息中获取厂商标识信息和设备标识信息,并作为对应的标识信息。
进一步的,在本申请的一些可选实施例中,上述步骤1可以包括:
通过外设组件互联标准协议和对应的接口获取所有外接设备的外接设备信息。
可见,本可选方案主要是说明如何获取外接设备信息。本可选方案中,通过外设组件互联标准协议和对应的接口获取所有外接设备的外接设备信息。
进一步的,步骤S101也可以包括:
步骤3,从获取的外接设备信息中确定所连接的所有网卡设备的厂商标识信息和设备标识信息;
步骤4,将厂商标识信息和设备标识信息作为对应的标识信息。
可见,本可选方案主要是说明如何获取标识信息。本可选方案中,从获取的外接设备信息中确定所连接的所有网卡设备的厂商标识信息和设备标识信息;将厂商标识信息和设备标识信息作为对应的标识信息。也就是,直接从获取的信息中获取厂商标识信息和设备标识信息。
S102,基于标识信息建立特殊设备列表;
在S101的基础上,本步骤旨在基于标识信息建立特殊设备列表。其中,特殊设备(特殊网卡设备)是指在传统启动模式下分配资源受限的网卡设备。
进一步的,本步骤S102可以包括:
步骤5,从标识信息中识别出特殊网卡设备;
步骤6,基于识别出的所有特殊网卡设备建立特殊设备列表。
可见,本可选方案主要是说明如何获取特殊设备列表。本可选方案中,从标识信息中识别出特殊网卡设备;基于识别出的所有特殊网卡设备建立特殊设备列表。也就是,先识别出特殊网卡设备,然后建立特殊设备列表。可以理解,特殊设备列表用于记录特殊网卡设备。其中,特殊网卡设备是指在传统启动模式下分配资源受限的网卡设备。
进一步的,在本申请的一些可选实施例中,上述步骤5,可以包括:
基于标识信息的厂商标识信息和设备标识信息识别出特殊网卡设备。
可见,本可选方案主要是说明如何获取特殊网卡设备。本可选方案中,基于标识信息的厂商标识信息和设备标识信息识别出特殊网卡设备。
进一步的,在本申请的一些可选实施例中,上述步骤5也可以包括:
对标识信息对应的所有网卡设备进行执行模式模拟,确定仅支持低位资源的网卡设备,并将低位资源的网卡设备作为特殊网卡设备。
可见,本可选方案主要是说明如何获取特殊网卡设备。本可选方案中,对标识信息对应的所有网卡设备进行执行模式模拟,确定仅支持低位资源的网卡设备,并将低位资源的网卡设备作为特殊网卡设备。
进一步的,在本申请的一些可选实施例中,上述步骤6,可以包括:
基于特殊网卡设备的厂商标识信息和设备标识信息建立特殊设备列表。
可见,本可选方案主要是说明如何获取特殊设备列表。本可选方案中,基于特殊网卡设备的厂商标识信息和设备标识信息建立特殊设备列表。
S103,基于基本输入输出系统的启动模式和特殊设备列表对当前接入的设备进行资源分配。
在S102的基础上,本步骤旨在基于基本输入输出系统的启动模式和特殊设备列表对当前接入的设备进行资源分配。
进一步的,本步骤S103可以包括:
步骤7,获取基本输入输出系统的启动模式;其中,启动模式包括64位资源启动模式和32位资源启动模式;
步骤8,基于启动模式和特殊设备列表对当前接入的网卡设备进行资源分配。
可见,本可选方案主要是说明如何进行资源分配。本可选方案中,获取基本输入输出系统的启动模式;其中,启动模式包括64位资源启动模式和32位资源启动模式;基于启动模式和特殊设备列表对当前接入的网卡设备进行资源分配。其中,32位资源启动模式就是传统的启动模式,在该启动模式下存在资源受限的问题。
进一步的,在本申请的一些可选实施例中,上述步骤8,可以包括:
当启动模式为64位资源启动模式时,对当前接入的网卡设备分配32位以上的资源;
当启动模式为32位资源启动模式时,对与特殊设备列表匹配的网卡设备分配32位以下的资源。
可见,本可选方案主要是说明如何在不同的启动模式下分配资源。本可选方案中,当启动模式为64位资源启动模式时,对当前接入的网卡设备分配32位以上的资源;当启动模式为32位资源启动模式时,对与特殊设备列表匹配的网卡设备分配32位以下的资源。
进一步的,在本申请的一些可选实施例中,上述步骤8,也可以包括:
当启动模式为UEFI模式时,对当前接入的网卡设备分配32位以上的资源;
当启动模式为Legacy模式时,对与特殊设备列表匹配的网卡设备分配32位以下的资源。
可见,本可选方案主要是说明如何在不同的启动模式下分配资源。本可选方案中,当启动模式为UEFI模式时,对当前接入的网卡设备分配32位以上的资源;当启动模式为Legacy模式时,对与特殊设备列表匹配的网卡设备分配32位以下的资源。
其中,对与特殊设备列表匹配的网卡设备分配32位以下的资源的过程,可以包括:
判断网卡设备的标识信息与特殊设备列表中的标识信息是否匹配;若网卡设备的标识信息与特殊设备列表中的标识信息匹配,则对网卡设备分配32位以下的资源;当网卡设备的标识信息与特殊设备列表中的标识信息不匹配时,对网卡设备分配32位以上的资源。
可见,本可选方案主要是说明如何在传统模式下分配资源。本可选方案中,判断网卡设备的标识信息与特殊设备列表中的标识信息是否匹配;若网卡设备的标识信息与特殊设备列表中的标识信息匹配,则对网卡设备分配32位以下的资源;当网卡设备的标识信息与特殊设 备列表中的标识信息不匹配时,对网卡设备分配32位以上的资源。
进一步的,在本申请的一些可选实施例中,上述步骤7,可以包括:
通过系统变量值获取基本输入输出系统的启动模式。
可见,本可选方案主要是说明如何获取启动模式。本可选方案中,通过系统变量值获取基本输入输出系统的启动模式。
进一步的,在本申请的一些可选实施例中,上述步骤7,也可以包括:
通过GetVariable函数获取基本输入输出系统的启动模式。
可见,本可选方案主要是说明如何获取启动模式。本可选方案中,通过GetVariable函数获取基本输入输出系统的启动模式。其中,GetVariable函数就是UEFI模式中获取系统变量的函数。
进一步的,本实施例还可以包括:
当资源分配完成后,通过预启动执行环境进行系统启动。
可见,本可选方案主要是说明如何进行系统启动。本可选方案中,当资源分配完成后,通过预启动执行环境进行系统启动。
可见,本实施例通过先获取所有网卡设备的标识信息,然后识别出特殊设备列表,最后基于启动模式和特殊设备列表对特殊设备情况下的网卡设备进行资源分配,避免出现资源分配存在错误的问题,提高资源分配的效果和可靠性。
以下通过另一具体的实施例,对本申请提供的一种外接设备的资源分配方法做进一步说明。
请参考图2,图2为本申请实施例所提供的另一种外接设备的资源分配方法的流程图。
本实施例中,该方法可以包括:
S201,通过外设组件互联标准协议获取所有外接设备的外接设备信息;
S202,从外接设备信息获取所有网卡设备的标识信息;
S203,从标识信息中识别出特殊网卡设备;基于识别出的所有特殊网卡设备建立特殊设备列表;
S204,获取基本输入输出系统的启动模式;其中,启动模式包括UEFI模式和Legacy模式;
S205,基于启动模式和特殊设备列表对当前接入的网卡设备进行资源分配。
其中,基本输入输出系统,作为服务器主板最底层的、最直接的硬件设置和控制的管理 者,能为服务器提供更多简单的易用性功能,通过BIOS可以实现服务器上一些硬件设备识别的可视化,能使得硬件设备的使用更具可行性。其中,网卡设备是服务器的常用设备,一般是用于服务器与交换机等网络设备之间的连接。服务器的BIOS引导模式分为UEFI和Legacy模式,网卡的OpRom也分为UEFI OpRom和Legacy OpRom两种模式。有部分网卡在UEFI模式下可以支持32位以外的地址空间,但是在Legacy模式下网卡设备的Oprom是无法支持32位以外的地址空间,只能分配到32位以内的地址空间才可以支持使用网卡的PXE功能。由于32位地址空间资源较为有限,因此本实施例提供一种自动检测并分配资源的方法,在UEFI模式下将网卡分配到高32位资源,在Legacy模式下分配到低32位资源,保证在UEFI和Legacy两种模式下网卡均能正常工作,正常实现PXE启动功能,并且保证有限的低32位资源不被过多占用。
本实施例为了实现根据不同网卡信息和BIOS启动模式下实现网卡资源正确分配,提出一种资源分配方法,本实施例包括:通过获取PCI设备信息得到网卡设备的VID(Vendor Identification,厂商标识)和DID(Device Identification,设备标识);通过识别出在Legacy模式下只能支持32位以下资源的设备的VID、DID;将这些特殊网卡设备的VID、DID建立一个数组List。
然后,通过GetVariable的形式获取到BIOS的启动模式;判断BIOS启动模式,若为UEFI模式则对网卡分配32位以上资源,若为Legacy模式,则去加载按照特殊网卡VID、DID建立的数组List,对比当前从PCI设备信息中获取到的VID、DID和建立的VID、DID数组List,若当前PCI设备信息与建立的VID、DID数组List相一致,则表示目前机器上接有特殊设备;最后对特殊设备分配32位以下资源。
可见,本申请实现了一种自动检测网卡信息并实现控制资源分配的方法,此方法编码操作简单,如果想要增加设备或减少设备可直接通过修改VID、DID数组List即可,并不会误识别其它设备误将其它设备分配32位以下地址空间资源,既保证了网卡设备的正常工作,又保证了整体上不富裕的32位以下资源不被误分配出去造成不必要的麻烦。
可见,本实施例通过先获取所有网卡设备的标识信息,然后识别出特殊设备列表,最后基于启动模式和特殊设备列表对特殊设备情况下的网卡设备进行资源分配,避免出现资源分配存在错误的问题,提高资源分配的效果和可靠性。
下面对本申请实施例提供的外接设备的资源分配装置进行介绍,下文描述的外接设备的资源分配装置与上文描述的外接设备的资源分配方法可相互对应参照。
请参考图3,图3为本申请实施例所提供的一种外接设备的资源分配装置的结构示意图。
本实施例中,该方法可以包括:
标识信息获取模块100,用于从获取的外接设备信息中确定所有网卡设备的标识信息;
列表获取模块200,用于基于标识信息建立特殊设备列表;
资源分配模块300,用于基于基本输入输出系统的启动模式和特殊设备列表对当前接入的设备进行资源分配。
可选的,该标识信息获取模块100,具体用于通过外设组件互联标准协议获取所有外接设备的外接设备信息;从外接设备信息获取所有网卡设备的标识信息。
可选的,从外接设备信息获取所有网卡设备的标识信息的过程,可以包括:
从外接设备信息中获取所有网卡设备的信息;从所有网卡设备的信息中获取厂商标识信息和设备标识信息,并作为对应的标识信息。
可选的,通过外设组件互联标准协议获取所有外接设备的外接设备信息,可以包括:
通过外设组件互联标准协议和对应的接口获取所有外接设备的外接设备信息。
可选的,该标识信息获取模块100,具体用于从获取的外接设备信息中确定所连接的所有网卡设备的厂商标识信息和设备标识信息;将厂商标识信息和设备标识信息作为对应的标识信息。
可选的,该列表获取模块200,具体用于从标识信息中识别出特殊网卡设备;基于识别出的所有特殊网卡设备建立特殊设备列表。
可选的,从标识信息中识别出特殊网卡设备,可以包括:
基于标识信息的厂商标识信息和设备标识信息识别出特殊网卡设备。
可选的,从标识信息中识别出特殊网卡设备,可以包括:
对标识信息对应的所有网卡设备进行执行模式模拟,确定仅支持低位资源的网卡设备,并将低位资源的网卡设备作为特殊网卡设备。
可选的,基于识别出的所有特殊网卡设备建立特殊设备列表,可以包括:
基于特殊网卡设备的厂商标识信息和设备标识信息建立特殊设备列表。
可选的,该资源分配模块300,具体用于获取基本输入输出系统的启动模式;其中,启动模式包括64位资源启动模式和32位资源启动模式;基于启动模式和特殊设备列表对当前接入的网卡设备进行资源分配。
可选的,基于启动模式和特殊设备列表对当前接入的网卡设备进行资源分配,可以包括:
当启动模式为64位资源启动模式时,对当前接入的网卡设备分配32位以上的资源;当启动模式为32位资源启动模式时,对与特殊设备列表匹配的网卡设备分配32位以下的资源。
可选的,基于启动模式和特殊设备列表对当前接入的网卡设备进行资源分配,可以包括:
当启动模式为UEFI模式时,对当前接入的网卡设备分配32位以上的资源;当启动模式为Legacy模式时,对与特殊设备列表匹配的网卡设备分配32位以下的资源。
可选的,对与特殊设备列表匹配的网卡设备分配32位以下的资源,可以包括:
判断网卡设备的标识信息与特殊设备列表中的标识信息是否匹配;若网卡设备的标识信息与特殊设备列表中的标识信息匹配,则对网卡设备分配32位以下的资源。
可选的,获取基本输入输出系统的启动模式,可以包括:
通过系统变量值获取基本输入输出系统的启动模式。
可选的,获取基本输入输出系统的启动模式,包括:
通过GetVariable函数获取基本输入输出系统的启动模式。
可选的,该装置,还可以包括:
系统启动模块,用于当资源分配完成后,通过预启动执行环境进行系统启动。
可见,本实施例通过先获取所有网卡设备的标识信息,然后识别出特殊设备列表,最后基于启动模式和特殊设备列表对特殊设备情况下的网卡设备进行资源分配,避免出现资源分配存在错误的问题,提高资源分配的效果和可靠性。
本申请还提供了一种服务器,请参考图4,图4本申请实施例所提供的一种服务器的结构示意图,该服务器可包括:
存储器,用于存储计算机程序;
处理器,用于执行计算机程序时可实现如上述任意一种外接设备的资源分配方法的步骤。
如图4所示,为服务器的组成结构示意图,服务器可以包括:处理器10、存储器11、通信接口12和通信总线13。处理器10、存储器11、通信接口12均通过通信总线13完成相互间的通信。
在本申请实施例中,处理器10可以为中央处理器(Central Processing Unit,CPU)、特定应用集成电路、数字信号处理器、现场可编程门阵列或者其他可编程逻辑器件等。
处理器10可以调用存储器11中存储的程序,具体的,处理器10可以执行异常IP识别方法 的实施例中的操作。
存储器11中用于存放一个或者一个以上程序,程序可以包括程序代码,程序代码包括计算机操作指令,在本申请实施例中,存储器11中至少存储有用于实现以下功能的程序:
从获取的外接设备信息中确定所有网卡设备的标识信息;
基于标识信息建立特殊设备列表;
基于基本输入输出系统的启动模式和特殊设备列表对当前接入的设备进行资源分配。
在一种可能的实现方式中,存储器11可包括存储程序区和存储数据区,其中,存储程序区可存储操作系统,以及至少一个功能所需的应用程序等;存储数据区可存储使用过程中所创建的数据。
此外,存储器11可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件或其他易失性固态存储器件。
通信接口12可以为通信模块的接口,用于与其他设备或者系统连接。
当然,需要说明的是,图4所示的结构并不构成对本申请实施例中服务器的限定,在实际应用中服务器可以包括比图4所示的更多或更少的部件,或者组合某些部件。
可见,本实施例通过先获取所有网卡设备的标识信息,然后识别出特殊设备列表,最后基于启动模式和特殊设备列表对特殊设备情况下的网卡设备进行资源分配,避免出现资源分配存在错误的问题,提高资源分配的效果和可靠性。
如图5所示,本申请还提供了一种计算机非易失性可读存储介质50,该计算机非易失性可读存储介质50上存储有计算机程序501,计算机程序501被处理器执行时可实现如上述任意一种外接设备的资源分配方法的步骤。
该计算机非易失性可读存储介质50可以包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
对于本申请提供的计算机非易失性可读存储介质的介绍请参照上述方法实施例,本申请在此不做赘述。
说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。
专业人员还可以进一步意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
结合本文中所公开的实施例描述的方法或算法的步骤可以直接用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。
以上对本申请所提供的一种外接设备的资源分配方法、资源分配装置、服务器以及计算机非易失性可读存储介质进行了详细介绍。本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想。应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以对本申请进行若干改进和修饰,这些改进和修饰也落入本申请权利要求的保护范围内。

Claims (21)

  1. 一种外接设备的资源分配方法,其特征在于,包括:
    从获取的外接设备信息中确定所有网卡设备的标识信息;
    基于所述标识信息建立特殊设备列表;
    基于基本输入输出系统的启动模式和所述特殊设备列表对当前接入的设备进行资源分配。
  2. 根据权利要求1所述的资源分配方法,其特征在于,所述特殊设备列表用于记录特殊网卡设备。
  3. 根据权利要求1所述的资源分配方法,其特征在于,从获取的外接设备信息中确定所有网卡设备的标识信息,包括:
    通过外设组件互联标准协议获取所有外接设备的外接设备信息;
    从所述外接设备信息获取所有网卡设备的标识信息。
  4. 根据权利要求3所述的资源分配方法,其特征在于,从所述外接设备信息获取所有网卡设备的标识信息,包括:
    从所述外接设备信息中获取所有网卡设备的信息;
    从所有网卡设备的信息中获取厂商标识信息和设备标识信息,并作为对应的标识信息。
  5. 根据权利要求3所述的资源分配方法,其特征在于,通过外设组件互联标准协议获取所有外接设备的外接设备信息,包括:
    通过外设组件互联标准协议和对应的接口获取所有外接设备的外接设备信息。
  6. 根据权利要求1所述的资源分配方法,其特征在于,从获取的外接设备信息中确定所有网卡设备的标识信息,包括:
    从获取的外接设备信息中确定所连接的所有网卡设备的厂商标识信息和设备标识信息;
    将所述厂商标识信息和所述设备标识信息作为对应的标识信息。
  7. 根据权利要求1所述的资源分配方法,其特征在于,基于所述标识信息建立特殊设备列表,包括:
    从所述标识信息中识别出特殊网卡设备;
    基于识别出的所有所述特殊网卡设备建立所述特殊设备列表。
  8. 根据权利要求7所述的资源分配方法,其特征在于,从所述标识信息中识别出特殊网卡设备,包括:
    基于所述标识信息的厂商标识信息和设备标识信息识别出所述特殊网卡设备。
  9. 根据权利要求7所述的资源分配方法,其特征在于,从所述标识信息中识别出特殊网卡设备,包括:
    对所述标识信息对应的所有网卡设备进行执行模式模拟,确定仅支持低位资源的网卡设备,并将所述低位资源的网卡设备作为所述特殊网卡设备。
  10. 根据权利要求7所述的资源分配方法,其特征在于,基于识别出的所有所述特殊网卡设备建立所述特殊设备列表,包括:
    基于所述特殊网卡设备的厂商标识信息和设备标识信息建立所述特殊设备列表。
  11. 根据权利要求1所述的资源分配方法,其特征在于,基于基本输入输出系统的启动模式和所述特殊设备列表对当前接入的设备进行资源分配,包括:
    获取所述基本输入输出系统的启动模式;其中,启动模式包括64位资源启动模式和32位资源启动模式;
    基于所述启动模式和所述特殊设备列表对当前接入的网卡设备进行资源分配。
  12. 根据权利要求11所述的资源分配方法,其特征在于,基于所述启动模式和所述特殊设备列表对当前接入的网卡设备进行资源分配,包括:
    当所述启动模式为64位资源启动模式时,对所述当前接入的网卡设备分配32位以上的资源;
    当所述启动模式为32位资源启动模式时,对与所述特殊设备列表匹配的网卡设备分配32位以下的资源。
  13. 根据权利要求11所述的资源分配方法,其特征在于,基于所述启动模式和所述特殊设备列表对当前接入的网卡设备进行资源分配,包括:
    当所述启动模式为UEFI模式时,对所述当前接入的网卡设备分配32位以上的资源;
    当所述启动模式为Legacy模式时,对与所述特殊设备列表匹配的网卡设备分配32位以下的资源。
  14. 根据权利要求13所述的资源分配方法,其特征在于,对与所述特殊设备列表匹配的网卡设备分配32位以下的资源,包括:
    判断所述网卡设备的标识信息与所述特殊设备列表中的标识信息是否匹配;
    若所述网卡设备的标识信息与所述特殊设备列表中的标识信息匹配,则对所述网卡设备分配32位以下的资源。
  15. 根据权利要求14所述的资源分配方法,其特征在于,还包括:
    当所述网卡设备的标识信息与所述特殊设备列表中的标识信息不匹配时,对所述网 卡设备分配32位以上的资源。
  16. 根据权利要求11所述的资源分配方法,其特征在于,获取所述基本输入输出系统的启动模式,包括:
    通过系统变量值获取所述基本输入输出系统的启动模式。
  17. 根据权利要求11所述的资源分配方法,其特征在于,获取所述基本输入输出系统的启动模式,包括:
    通过GetVariable函数获取所述基本输入输出系统的启动模式。
  18. 根据权利要求1所述的资源分配方法,其特征在于,还包括:
    当资源分配完成后,通过预启动执行环境进行系统启动。
  19. 一种外接设备的资源分配装置,其特征在于,包括:
    标识信息获取模块,用于从获取的外接设备信息中确定所有网卡设备的标识信息;
    列表获取模块,用于基于所述标识信息建立特殊设备列表;
    资源分配模块,用于基于基本输入输出系统的启动模式和所述特殊设备列表对当前接入的设备进行资源分配。
  20. 一种服务器,其特征在于,包括:
    存储器,用于存储计算机程序;
    处理器,用于执行所述计算机程序时实现如权利要求1至18任一项所述的资源分配方法的步骤。
  21. 一种计算机非易失性可读存储介质,其特征在于,所述计算机非易失性可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至18任一项所述的资源分配方法的步骤。
PCT/CN2023/107011 2022-11-30 2023-07-12 外接设备的资源分配方法、装置、服务器及存储介质 WO2024113884A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211519340.6 2022-11-30
CN202211519340.6A CN115664953B (zh) 2022-11-30 2022-11-30 一种外接设备的资源分配方法及相关装置

Publications (1)

Publication Number Publication Date
WO2024113884A1 true WO2024113884A1 (zh) 2024-06-06

Family

ID=85019081

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/107011 WO2024113884A1 (zh) 2022-11-30 2023-07-12 外接设备的资源分配方法、装置、服务器及存储介质

Country Status (2)

Country Link
CN (1) CN115664953B (zh)
WO (1) WO2024113884A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115664953B (zh) * 2022-11-30 2023-05-26 苏州浪潮智能科技有限公司 一种外接设备的资源分配方法及相关装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107193760A (zh) * 2017-05-23 2017-09-22 郑州云海信息技术有限公司 一种避免pcie设备因地址空间分配导致功能异常的方法
CN112860330A (zh) * 2021-02-23 2021-05-28 浙江大华技术股份有限公司 安装操作系统的方法、装置、计算机设备和存储介质
CN113791905A (zh) * 2021-09-14 2021-12-14 联想(北京)有限公司 计算资源分配方法、装置及电子设备和存储介质
CN115664953A (zh) * 2022-11-30 2023-01-31 苏州浪潮智能科技有限公司 一种外接设备的资源分配方法及相关装置

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104679535B (zh) * 2013-11-28 2018-03-30 英业达科技有限公司 伺服器以及识别码同步方法
CN107566174A (zh) * 2017-09-05 2018-01-09 郑州云海信息技术有限公司 一种网卡识别及批量灌装系统的实现方法及系统
CN107861790B (zh) * 2017-10-27 2020-05-15 新华三云计算技术有限公司 虚拟机磁盘空间扩展方法、装置、宿主机及可读存储介质
CN110045991B (zh) * 2019-03-08 2022-05-20 平安科技(深圳)有限公司 服务器的raid配置方法、装置、计算机设备和存储介质
CN110399217B (zh) * 2019-06-27 2022-02-18 苏州浪潮智能科技有限公司 一种内存资源分配方法、装置及设备
CN113190279B (zh) * 2021-04-01 2023-03-17 山东英信计算机技术有限公司 一种预启动功能控制方法、系统及介质
CN114860268A (zh) * 2022-04-22 2022-08-05 浪潮电子信息产业股份有限公司 操作系统安装方法、装置、电子设备及可读存储介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107193760A (zh) * 2017-05-23 2017-09-22 郑州云海信息技术有限公司 一种避免pcie设备因地址空间分配导致功能异常的方法
CN112860330A (zh) * 2021-02-23 2021-05-28 浙江大华技术股份有限公司 安装操作系统的方法、装置、计算机设备和存储介质
CN113791905A (zh) * 2021-09-14 2021-12-14 联想(北京)有限公司 计算资源分配方法、装置及电子设备和存储介质
CN115664953A (zh) * 2022-11-30 2023-01-31 苏州浪潮智能科技有限公司 一种外接设备的资源分配方法及相关装置

Also Published As

Publication number Publication date
CN115664953A (zh) 2023-01-31
CN115664953B (zh) 2023-05-26

Similar Documents

Publication Publication Date Title
US10019253B2 (en) Systems and methods of updating hot-pluggable devices
US20170357500A1 (en) System and Method for Runtime Update of ESRT Table for Hot-Pluggable Disks
USRE49226E1 (en) UEFI and operating system driver methods for updating MAC address in LAN-based NIC
US10303487B2 (en) System and method for booting an information handling system
WO2024113884A1 (zh) 外接设备的资源分配方法、装置、服务器及存储介质
US11429298B2 (en) System and method for tying non-volatile dual inline memory modules to a particular information handling system
US8495349B2 (en) Generating a primary BIOS code memory address and a recovery BIOS code memory address, where the recovery BIOS service code is loaded when the primary BIOS code fails to execute
CN110297726B (zh) 具有串行存在检测数据的计算机系统及内存模块控制方法
US10491736B2 (en) Computer system and method thereof for bluetooth data sharing between UEFI firmware and OS
CN110399168B (zh) 多数据盘存储服务器的系统启动方法、装置及设备
US11861349B2 (en) Modular firmware updates in an information handling system
US20100268925A1 (en) System and method for populating a dedicated system service repository for an information handling system
US20130232287A1 (en) Method of obtaining instruction for triggering function
CN115878327A (zh) 总线预留方法、装置、服务器、电子设备和存储介质
CN116627472A (zh) 高速外围组件设备的固件程序升级方法及服务器
US20200364040A1 (en) System and Method for Restoring a Previously Functional Firmware Image on a Non-Volatile Dual Inline Memory Module
CN108985402B (zh) 一种raid卡信息获取方法及相关装置
US11226755B1 (en) Core dump in a storage device
TWI411921B (zh) 電子系統、互連電子系統與週邊裝置之電腦可讀儲存媒體及其互連方法
WO2023279875A1 (zh) Bootloader启动流程的监控方法、装置、嵌入式设备及存储介质
CN113791905A (zh) 计算资源分配方法、装置及电子设备和存储介质
US6792610B2 (en) Attaching a device driver to multiple logical devices of one physical device
WO2017079951A1 (zh) 计算机设备及计算机设备的io设备注册方法
CN117472458B (zh) 系统功能优化配置方法、装置、电子设备及存储介质
CN117539629A (zh) 资源分配方法及装置、存储介质、电子设备