Device operation method, system and apparatus, and non-volatile readable storage medium and electronic device
By adjusting the loading sequence of external devices during the server power-on self-test, the normal use problems of external devices caused by memory overflow are solved, and the normal operation of key devices and the maximum utilization of memory space are achieved.
Patent Information
- Application Number
- PCT/CN2023/132741
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-08
- Filing Date
- 2023-11-20
- Publication Date
- 2024-09-12
AI Technical Summary
In the server system, because the total memory required for the extended memory of external devices exceeds the specified space in the traditional startup mode, key devices cannot be used normally. It is difficult for existing technology to effectively solve this problem.
By obtaining the extended memory of external devices during the server power-on self-test process, it is determined whether the preset memory conditions are met. If not, the device sequence is adjusted, the candidate device sequence is determined, and the target device sequence is loaded to optimize memory utilization.
It enables key devices of multiple external devices to be loaded and run normally, while maximizing the use of the server's memory space and avoiding the increase in manual adjustment time and workload.
Smart Images

Figure CN2023132741_12092024_PF_FP
Abstract
Description
Device operation method, system, apparatus, non-volatile readable storage medium, and electronic device
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on March 8, 2023, with application number 202310218225.3, and application name “Device operation method, system, device, storage medium and electronic device”, all contents of which are incorporated by reference into this application. Technical Field
[0003] The embodiments of the present application relate to the field of computers, and in particular, to a device operation method, system, apparatus, non-volatile readable storage medium, and electronic device. Background Art
[0004] Servers are critical infrastructure devices for data storage and processing of services and applications. The Basic Input Output System (BIOS) plays an important role in server system startup, hardware initialization, and system loading and importing. As business scale expands in a large environment, the BIOS system typically uses the traditional startup mode, also known as Legacy mode, to run critical services.
[0005] However, traditional boot modes face technical bottlenecks such as memory access restrictions and insufficient resource space. During initialization, some external devices load their own extended memory into system memory for operation and related processing. However, due to technical limitations, the storage space allocated for processing extended memory is fixed. Because the memory requirements of external devices on the server vary, the combined memory requirements of all devices can sometimes exceed the specified storage space, causing critical devices to malfunction.
[0006] To address this issue, related technologies often circumvent it by pre-verifying and limiting server configurations. They also manually adjust the order in which device expansion memory is loaded, optimizing the loading of expansion memory and fully utilizing the available space. However, manual adjustments increase time and workload due to repeated card insertion and removal, leading to inefficiencies and rework due to changes in external device types and expansion memory versions.
[0007] Currently, no effective solution has been proposed to the problem that when devices plugged into the server are loaded and run in the current arrangement order, the total memory required for the extended memory exceeds the specified storage space, resulting in the inability to use key devices normally.
[0008] Summary of the Invention
[0009] The embodiments of the present application provide a device operation method, system, apparatus, non-volatile readable storage medium and electronic device to at least solve the problem in the related art that when devices plugged into a server are loaded and run according to the current arrangement order, the total memory required for the extended memory exceeds the specified storage space, resulting in the inability to use key devices normally.
[0010] According to one embodiment of the present application, a device operation method is provided, comprising: during a power-on self-test (PST) process on a server, obtaining memory of multiple external devices connected to the server and an extended memory of each external device; determining whether the memory of the extended memories of the multiple external devices meets a preset memory condition of a basic input / output system in the server, and obtaining a determination result; if the determination result indicates that the memory of the extended memories of the multiple external devices does not meet the preset memory condition, determining multiple candidate device sequences based on the multiple external devices, wherein each candidate device sequence is composed of multiple target devices in a preset arrangement order, and the target device is a device among the multiple external devices; determining a target device sequence from the multiple candidate device sequences, and loading and running each target device in the target device sequence.
[0011] Optionally, in an exemplary embodiment, the memory of the extended memory includes running memory. When the judgment result indicates that the total running memory of the extended memory of multiple external devices is greater than a first preset value, it is determined that the memory of the extended memory of the multiple external devices does not meet the preset memory condition, wherein the first preset value refers to the memory space size supported by the basic input and output system in the server.
[0012] Optionally, in an exemplary embodiment, the memory of the extended memory further includes loaded memory. When the judgment result indicates that the total running memory of the extended memory of multiple external devices is less than or equal to a first preset value, and the loaded memory of the last external device in the current arrangement order of the multiple external devices is greater than a second preset value, it is determined that the memory of the extended memory of the multiple external devices does not meet the preset memory condition, wherein the first preset value refers to the memory space size supported by the basic input and output system in the server, and the second preset value is less than the first preset value.
[0013] Optionally, in an exemplary embodiment, it is characterized in that before determining whether the memory of the extended memory of multiple external devices meets the preset memory conditions of the basic input and output system in the server and obtaining the judgment result, the method also includes: traversing the memory of the extended memory of multiple external devices to obtain the running memory and loading memory of each external device; adding the running memory of each external device to obtain the total running memory of the extended memory of multiple external devices.
[0014] Optionally, in an exemplary embodiment, the memory of the extended memory includes an operating memory, and when the judgment result indicates that the total operating memory of the extended memories of the plurality of external devices is greater than a first preset value, a first alarm message is issued.
[0015] Optionally, in an exemplary embodiment, when a judgment result indicates that the memory of the extended memory of the multiple external devices does not meet a preset memory condition, determining multiple candidate device sequences based on the multiple external devices includes: combining at least two of the multiple external devices multiple times to obtain multiple combination results; arranging the devices in each combination result in different orders to obtain multiple initial device sequences; and screening a device sequence that meets an operating rule from the multiple initial device sequences to obtain a candidate device sequence.
[0016] Optionally, in an exemplary embodiment, the operating rules include at least one of the following: the candidate device sequence includes external devices required for the server to run; the candidate device sequence includes external devices required for the server to execute the target business; the number of all target devices in the candidate device sequence is greater than a preset number; the operating memory of all target devices in the candidate device sequence is less than or equal to a first preset value, wherein the first preset value refers to the memory space size supported by the basic input and output system in the server.
[0017] Optionally, in an exemplary embodiment, determining a target device sequence from multiple candidate device sequences includes: respectively calculating the difference between a first preset value and the running memory of all target devices in each candidate device sequence to obtain multiple remaining running memories; and determining the candidate device sequence with the largest remaining running memory as the target device sequence.
[0018] Optionally, in an exemplary embodiment, after arranging the devices in each combination result in different orders to obtain multiple initial device sequences, the method further includes: issuing a second alarm message when there is no device sequence that meets the operating rules in the multiple initial device sequences.
[0019] Optionally, in an exemplary embodiment, before determining whether the memory of the extended memory of multiple external devices meets the preset memory conditions of the basic input and output system in the server and obtaining the determination result, the method further includes: determining whether the historical device information content check value stored in the basic input and output system is zero, and determining whether the total device information content check value of the multiple external devices is the same as the historical device information content check value; if the historical device information content check value is not zero and the total device information content check value of the multiple external devices is the same as the historical device information content check value, loading and running the target device; if the historical device information content check value is zero or the total device information content check value of the multiple external devices is different from the historical device information content check value, executing the step of determining whether the memory of the extended memory of the multiple external devices meets the preset memory conditions of the basic input and output system in the server.
[0020] Optionally, in an exemplary embodiment, before determining whether the total device information content verification value of multiple external devices is the same as the historical device information content verification value, the method also includes: traversing the device information content of multiple external devices, calculating the device information content verification value based on the device information content of each external device, and obtaining multiple device information content verification values; adding the device information content verification values of multiple external devices to obtain the total device information content verification value.
[0021] Optionally, in an exemplary embodiment, after determining whether the historical device information content verification value stored in the basic input and output system is zero, and determining whether the total device information content verification value of multiple external devices is the same as the historical device information content verification value, the method further includes: when the historical device information content verification value is not zero and the total device information content verification value of multiple external devices is the same as the historical device information content verification value, reading the historical device sequence stored in the basic input and output system, wherein the historical device sequence is composed of multiple target devices in a historical arrangement order; loading and running each target device according to the historical device sequence.
[0022] Optionally, in an exemplary embodiment, after determining whether the memory of the extended memory of multiple external devices meets the preset memory conditions of the basic input and output system in the server and obtaining the determination result, the method further includes: when the determination result indicates that the memory of the extended memory of multiple external devices meets the preset memory conditions, reading the device sequence stored in the basic input and output system, and loading and running the multiple external devices according to the stored device sequence.
[0023] Optionally, in an exemplary embodiment, loading and running each target device in the target device sequence includes: adding the device information content verification value of each target device to obtain an updated total device information content verification value; storing the target device sequence and the updated total device information content verification value to the basic input and output system; restarting the server, and loading and running each target device using the basic input and output system in the server.
[0024] According to another embodiment of the present application, a device operation system is provided, including: a server; multiple external devices connected to the server; a basic input and output system deployed in the server, and configured to determine multiple candidate device sequences based on the multiple external devices when the memory of the extended memory of the multiple external devices does not meet the preset memory conditions during the server's power-on self-test, and determine a target device sequence from the multiple candidate device sequences, load and run each target device in the target device sequence, wherein each candidate device sequence is composed of multiple target devices in a preset arrangement order, and the target device is a device among the multiple external devices.
[0025] Optionally, the memory of the extended memory includes running memory. When the total running memory of the extended memory of multiple external devices is greater than a first preset value, it is determined that the memory of the extended memory of multiple external devices does not meet the preset memory condition, wherein the first preset value refers to the memory space size supported by the basic input and output system in the server.
[0026] Optionally, the memory of the extended memory includes running memory and loaded memory. When the total running memory of the extended memory of multiple external devices is less than or equal to a first preset value, and the loaded memory of the last external device in the current arrangement order of the multiple external devices is greater than a second preset value, it is determined that the memory of the extended memory of the multiple external devices does not meet the preset memory condition, wherein the first preset value refers to the memory space size supported by the basic input and output system in the server, and the second preset value is less than the first preset value.
[0027] Optionally, the basic input / output system determines the candidate device sequence by: combining at least two external devices from a plurality of external devices multiple times to obtain a plurality of combination results; arranging the devices in each combination result in a different order to obtain a plurality of initial device sequences; and screening a device sequence that meets the operating rules from the plurality of initial device sequences to obtain a candidate device sequence.
[0028] According to another embodiment of the present application, a device operation apparatus is provided, comprising: an acquisition unit configured to acquire, during a power-on self-test (PST) on the server, a plurality of external devices connected to the server and the memory of an extended memory of each external device; a first judgment unit configured to judge whether the memory of the extended memory of the plurality of external devices meets a preset memory condition of a basic input / output system in the server, and obtain a judgment result; a first determination unit configured to, when the judgment result indicates that the memory of the extended memory of the plurality of external devices does not meet the preset memory condition, determine a plurality of candidate device sequences based on the plurality of external devices, wherein each candidate device sequence is composed of a plurality of target devices in a preset arrangement order, and the target device is a device among the plurality of external devices; and a second determination unit configured to determine a target device sequence from the plurality of candidate device sequences, and load and run each target device in the target device sequence.
[0029] According to another embodiment of the present application, a non-volatile readable storage medium is provided, in which a computer program is stored. The computer program is configured to execute the steps of any of the above method embodiments when running.
[0030] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0031] Through the present application, when the memory of the extended memory of multiple external devices plugged into the server does not meet the preset memory conditions, the connection relationship between each external device and the server is adjusted, and the order of the external devices is adjusted. The adjusted external devices constitute a target device sequence, and the devices in the target device sequence are loaded and run. Therefore, it is possible to solve the problem in the related art that when the devices plugged into the server are loaded and run according to the current arrangement order, the total memory required for the extended memory exceeds the specified storage space, resulting in the inability to use the key devices normally. This achieves the effect of enabling the key devices among the multiple external devices to be loaded and run, while maximizing the use of the server's memory space. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] FIG1 is a hardware structure block diagram of a mobile terminal of a device operation method according to an embodiment of the present application;
[0033] FIG2 is a schematic diagram of a device operation system according to an embodiment of the present application;
[0034] FIG3 is a flow chart of a device operation method according to an embodiment of the present application;
[0035] FIG4 is a flow chart of an optional device operation method provided according to an embodiment of the present application;
[0036] FIG5 is a schematic diagram of a device operating apparatus according to an embodiment of the present application. DETAILED DESCRIPTION
[0037] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0038] It should be noted that the terms "first", "second", etc. in the description and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0039] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking operation on a mobile terminal as an example, FIG1 is a hardware structure block diagram of a mobile terminal of a device operation method of an embodiment of the present application. As shown in FIG1 , the mobile terminal may include one or more (only one is shown in FIG1 ) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 configured to store data, wherein the mobile terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It will be understood by those skilled in the art that the structure shown in FIG1 is only for illustration and does not limit the structure of the mobile terminal. For example, the mobile terminal may also include more or fewer components than those shown in FIG1 , or have a configuration different from that shown in FIG1 .
[0040] The memory 104 can be configured to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the device operation method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implementing the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may include a memory remotely located relative to the processor 102, and these remote memories may be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0041] The transmission device 106 is configured to receive or send data via a network. Optional examples of the above-mentioned network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is configured to communicate with the Internet wirelessly. In this embodiment, a device operation system is provided. FIG2 is a schematic diagram of a device operation system according to an embodiment of the present application. As shown in FIG2 , the system includes:
[0042] Server 201.
[0043] A plurality of external devices 202 are connected to the server 201 .
[0044] Optionally, the external device 202 may be a PCIE device, that is, a device supported by PCI-Express (peripheral component interconnect express), and multiple external devices 202 are mounted on the server 201 in a certain arrangement order.
[0045] The basic input and output system 2011 is deployed in the server 201 and is configured to determine multiple candidate device sequences based on the multiple external devices 202 when the memory of the extended memory of the multiple external devices 202 does not meet the preset memory conditions during the server 201's power-on self-test, and determine a target device sequence from the multiple candidate device sequences, load and run each target device in the target device sequence, wherein each candidate device sequence is composed of multiple target devices in a preset arrangement order, and the target device is a device among the multiple external devices 202.
[0046] Optionally, the basic input / output system 2011 is deployed on the server 201, and when the server 201 performs a power-on self-test operation, it determines whether the devices connected to the server 201 can operate normally according to the current arrangement order under the server's memory conditions, that is, it determines whether the memory of the extended memory of the multiple external devices 202 meets the preset memory conditions. When the memory of the extended memory of the multiple external devices 202 does not meet the preset memory conditions, that is, when the external devices 202 cannot operate according to the current arrangement order under the server's memory conditions, multiple candidate devices are selected from all the external devices 202 to form a candidate device sequence, and a unique target device sequence is obtained from the multiple candidate device sequences according to certain standards. All target devices in the target device sequence are loaded and operated according to the sequence to complete a specific task.
[0047] The preset memory condition of the basic input and output system 2011 is a condition for determining whether the external device 202 cannot operate normally due to an abnormality in the memory space. Optionally, it is necessary to determine the memory occupied by the extended memory in the external device 202, that is, to determine whether the operating memory parameter size of the extended memory in the external device 202 meets the preset memory condition, and then obtain the judgment result. Among them, the external device 202 will load the extended memory therein into the memory of the server 201 for related processing operations during operation, but due to the limitations of the system itself, there is only a certain amount of memory space that can process the extended memory. Therefore, it is necessary to determine whether the memory of the extended memory of multiple external devices 202 meets the preset memory condition.
[0048] For example, the total memory space occupied by the external devices 202 that the basic input and output system 2011 in the server 201 can support in the traditional startup mode is 128K bytes. The memory of the extended memory includes running memory and loaded memory. The preset memory condition can refer to the condition that the total running memory of the extended memory of multiple external devices 202 is less than or equal to 128K bytes, and the loaded memory of the last external device 202 is less than the set value.
[0049] Optionally, in the device operating system provided in an embodiment of the present application, the memory of the extended memory includes the running memory. When the total running memory of the extended memory of multiple external devices 202 is greater than a first preset value, it is determined that the memory of the extended memory of multiple external devices 202 does not meet the preset memory condition, wherein the first preset value refers to the memory space size supported by the basic input and output system 2011 in the server 201.
[0050] Optionally, the memory of the extended memory component of the external device 202 may include operating memory. The fact that the memory of the extended memory of the external device 202 does not meet the preset memory condition may refer to a situation where the total operating memory of the extended memory of the external device 202 is greater than a first preset value, and the first preset value refers to the total memory space occupied by the external device 202 that can be supported by the basic input and output system 2011 in the traditional boot mode. For example, the first preset value may be 128K bytes.
[0051] For example, there are five external devices 202 connected to the outside of the server 201, and the five devices form a device sequence. When the memory of the extended memory of the five devices does not meet the preset memory condition, the situation may be that the total running memory of the five devices is greater than the first preset value, and the data of the total running memory is recorded as X bytes, that is, when X>128, the preset memory condition is not met.
[0052] Optionally, in the device operation system provided in the embodiment of the present application, it is characterized in that the memory of the extended memory includes running memory and loaded memory. When the total running memory of the extended memory of multiple external devices 202 is less than a first preset value, and the loaded memory of the last external device 202 in the current arrangement order of the multiple external devices 202 is greater than a second preset value, it is determined that the memory of the extended memory of the multiple external devices 202 does not meet the preset memory condition, wherein the first preset value refers to the memory space size supported by the basic input and output system 2011 in the server 201, and the second preset value is less than the first preset value.
[0053] Optionally, the memory of the extended memory component may include running memory and load memory, and the size of the running memory is smaller than the size of the load memory. The fact that the memory of the extended memories of multiple external devices 202 does not meet the preset memory condition may also be represented by the situation where the total running memory of the extended memories of the external devices 202 is less than or equal to a first preset value, and when the external devices 202 form a default sequence, the load memory of the last external device 202 in the sequence is greater than the difference between the sum of the running memory of the other devices except the last device and the first preset value.
[0054] Optionally, the memory of the extended memory component may include running memory and loaded memory. It should be noted that since each external device 202 needs to be loaded into a specific area when it starts working, it can only operate normally after loading. Therefore, the size parameter of the loaded memory is greater than the size parameter of the running memory.
[0055] The memory of the extended memory of multiple external devices 202 does not meet the preset memory condition, which can also be expressed as the total running memory of the extended memory of the external device 202 is less than or equal to the first preset value. When the external devices 202 are arranged in a default order, the loaded memory of the last external device 202 is greater than the second preset value, where the second preset value can be the difference between the first preset value and the total running memory of other devices except the last device.
[0056] For example, there are five external devices 202 connected to the outside of the server 201, and the five devices form a device sequence. When the memory of the extended memory of five devices does not meet the preset memory condition, this situation may also mean that the total running memory of the five devices is less than or equal to the first preset value, and the data of the total running memory is recorded as X bytes, that is, X<=128. At the same time, the loaded memory of the fifth device in the sequence is greater than the difference between the first preset value and the total running memory of the first four devices, and the size of the loaded memory is recorded as Z bytes, and the size of the total running memory of the first four devices is recorded as Y bytes, that is, "Z>128-Y".
[0057] Optionally, in the device operation system provided in the embodiment of the present application, the basic input and output system 2011 determines the candidate device sequence in the following manner: combining at least two external devices 202 from multiple external devices 202 multiple times to obtain multiple combination results; arranging the devices in each combination result in different orders to obtain multiple initial device sequences; and screening device sequences that meet the operation rules from the multiple initial device sequences to obtain candidate device sequences.
[0058] Optionally, when the total running memory of the extended storage does not meet the preset memory conditions, it is necessary to select multiple target devices from multiple external devices 202 connected to the server 201 and combine them into a candidate device sequence. Optionally, two or more devices are selected from multiple external devices 202 for combination operations multiple times to obtain all possible combination results, and then the devices in all combination results are arranged in different orders to obtain multiple sequences. For example, when two devices are selected from five devices, recorded as device A and device B, device A and device B are arranged in different orders, that is, AB or BA order, or three devices are selected from five devices for combination, recorded as device A, device B and device C respectively, and the above three devices are arranged in different orders, which can be arranged into 6 kinds of arrangement orders: ABC, ACB, BAC, BCA, CAB, and CBA.
[0059] Furthermore, all obtained sequences are screened through certain operating rules to select candidate device sequences.
[0060] Through the above steps: server 201; multiple external devices 202, connected to the server 201; basic input and output system 2011, deployed in the server 201, for determining multiple candidate device sequences based on the multiple external devices 202 when the memory of the extended memory of the multiple external devices 202 does not meet the preset memory conditions during the process of the server 201 performing the power-on self-test, and determining the target device sequence from the multiple candidate device sequences, loading and running each target device in the target device sequence, wherein each candidate device sequence is composed of multiple target devices in a preset arrangement order, and the target device is a device in the multiple external devices 202. This solves the problem in the related art that when the devices plugged into the server are loaded and run according to the current arrangement order, the total memory required for the extended memory exceeds the specified storage space, resulting in the inability of key devices to be used normally. This achieves the effect of enabling key devices in multiple external devices to be loaded and run while maximizing the use of the server's memory space.
[0061] In this embodiment, a method for operating in a device operating system is provided. FIG3 is a flow chart of the device operating method according to an embodiment of the present application. As shown in FIG3 , the flow chart includes the following steps:
[0062] Step S302 : During the process of performing a power-on self-test on the server, a plurality of external devices connected to the server and the memory of an extended memory of each external device are obtained.
[0063] Optionally, external devices are connected to the server in a certain order. The external devices may be PCIE devices, that is, devices supported by PCI-Express (peripheral component interconnect express), where PCI-Express is a high-speed serial computer expansion bus standard. The external devices include multiple components, and the components may be extended memory (extended read-only memory, also known as OpROM). When the external devices are initialized, the OpROMs of these devices are loaded into the memory for operation and related processing. The external devices may include VGA, 9271 model RAID card, I350 model network card, single-port 82599 model network card, single-port x520 model network card, and so on. When it is necessary to load and run the external devices, the external devices are started in sequence, and the OpROMs of each external device have memory requirements on the server.
[0064] When it is necessary to verify whether the device connected to the server has memory space abnormalities due to configuration order problems, which makes the device unable to operate normally, it is first necessary to perform a power-on self-test operation on the server. During the power-on self-test operation, the basic input and output system stored on the server is used to obtain memory data of multiple external devices connected to the server and the extended memory in the external devices, so as to determine the occupied memory space.
[0065] Step S304 , determining whether the memory of the expansion memory of the plurality of external devices meets the preset memory condition of the basic input and output system in the server, and obtaining a determination result.
[0066] The preset memory condition of the basic input and output system is a condition used to determine whether an external device cannot operate normally due to an abnormality in the memory space. Optionally, it is necessary to determine the memory occupied by the extended memory in the external device, that is, to determine whether the operating memory parameter size of the extended memory in the external device meets the preset memory condition, and then obtain the judgment result. During operation, the external device will load the extended memory therein into the memory of the server for related processing operations. However, due to the limitations of the system itself, there is only a certain amount of memory space that can process the extended memory. Therefore, it is necessary to determine whether the memory of the extended memory of multiple external devices meets the preset memory condition.
[0067] For example, the total memory space occupied by external devices that the basic input and output system in the server can support in the traditional boot mode is 128K bytes. The memory of the extended memory includes running memory and loaded memory. The preset memory condition can refer to the condition that the total running memory of the extended memory of multiple external devices is less than or equal to 128K bytes, and the loaded memory of the last external device is less than the set value.
[0068] Step S306, when the judgment result indicates that the memory of the extended memory of the multiple external devices does not meet the preset memory condition, multiple candidate device sequences are determined based on the multiple external devices, wherein each candidate device sequence is composed of multiple target devices in a preset arrangement order, and the target device is a device among the multiple external devices.
[0069] Optionally, when the judgment result indicates that the running memory of multiple external devices is greater than 128K bytes, or the loaded memory of the last external device is greater than the set value, it is necessary to select some devices from all external devices as target devices, and arrange these target devices in a specific order to obtain a candidate device sequence, so that when the candidate device sequence is run, all target devices in the sequence can be run normally.
[0070] Step S308 : determining a target device sequence from a plurality of candidate device sequences, and loading and running each target device in the target device sequence.
[0071] Optionally, the target device sequence is the candidate device sequence that best matches the selection criteria among multiple candidate device sequences. For example, the selection criteria may be the candidate device sequence with the largest remaining memory on the server during operation. The selection criteria may also be the candidate device sequence containing the largest number of specified devices. The target device sequence is determined from multiple device sequences, and then the target device is loaded and run into the server according to the device sequence to complete the set task.
[0072] Through the above steps: during the power-on self-test of the server, the memory of multiple external devices connected to the server and the extended memory of each external device are obtained; whether the memory of the extended memory of the multiple external devices meets the preset memory conditions of the basic input and output system in the server is judged, and a judgment result is obtained; when the judgment result indicates that the memory of the extended memory of the multiple external devices does not meet the preset memory conditions, multiple candidate device sequences are determined based on the multiple external devices, wherein each candidate device sequence is composed of multiple target devices in a preset arrangement order, and the target device is a device among the multiple external devices; a target device sequence is determined from the multiple candidate device sequences, and each target device in the target device sequence is loaded and run, thereby solving the problem in the related art that when the devices plugged into the server are loaded and run according to the current arrangement order, the total memory required for the extended memory exceeds the specified storage space, resulting in the inability of key devices to be used normally, thereby achieving the effect of enabling key devices among the multiple external devices to be loaded and run, while maximizing the use of the server's memory space.
[0073] The execution entity of the above steps may be a server, a terminal, etc., but is not limited thereto.
[0074] The execution order of step S304 and step S306 can be interchanged, that is, step S306 can be executed first, and then step S304.
[0075] Optionally, in the device operation method provided in an embodiment of the present application, the memory of the extended memory includes running memory. When the judgment result indicates that the total running memory of the extended memory of multiple external devices is greater than a first preset value, it is determined that the memory of the extended memory of multiple external devices does not meet the preset memory condition, wherein the first preset value refers to the memory space size supported by the basic input and output system in the server.
[0076] Optionally, the memory of the extended memory component of the external device may include running memory. The memory of the extended memory of the external device not meeting the preset memory condition may refer to a situation where the total running memory of the extended memory of the external device is greater than a first preset value, and the first preset value refers to the total memory space occupied by external devices that can be supported by the basic input and output system in the traditional boot mode. For example, the first preset value may be 128K bytes.
[0077] For example, there are five external devices connected to the server, and the five devices form a device sequence. When the memory of the extended memory of the five devices does not meet the preset memory condition, the situation may be that the total running memory of the five devices is greater than the first preset value. The data of the total running memory is recorded as X bytes, that is, when X>128, the preset memory condition is not met.
[0078] Optionally, in the device operation method provided in an embodiment of the present application, the memory of the extended memory also includes loaded memory. When the judgment result indicates that the total running memory of the extended memory of multiple external devices is less than or equal to a first preset value, and the loaded memory of the last external device in the current arrangement order of the multiple external devices is greater than a second preset value, it is determined that the memory of the extended memory of the multiple external devices does not meet the preset memory condition, wherein the first preset value refers to the memory space size supported by the basic input and output system in the server, and the second preset value is less than the first preset value.
[0079] Optionally, the memory of the extended memory component may include running memory and loaded memory. It should be noted that since each external device needs to be loaded into a specific area before it starts working, it can only operate normally after loading. Therefore, the size parameter of the loaded memory is greater than the size parameter of the running memory.
[0080] The memory of the extended memory of multiple external devices does not meet the preset memory condition, which can also be expressed as the total running memory of the extended memory of the external devices is less than or equal to the first preset value. When the external devices are arranged in a default order, the loaded memory of the last external device is greater than the second preset value, where the second preset value can be the difference between the first preset value and the total running memory of other devices except the last device.
[0081] For example, there are five external devices connected to the outside of the server, and the five devices form a device sequence. When the memory of the extended memory of the five devices does not meet the preset memory condition, this situation may also mean that the total running memory of the five devices is less than or equal to the first preset value, and the data of the total running memory is recorded as X bytes, that is, when X≤128. At the same time, the loaded memory of the fifth device in the sequence is greater than the difference between the first preset value and the total running memory of the first four devices, the size of the loaded memory is recorded as Z bytes, and the size of the total running memory of the first four devices is recorded as Y bytes, that is, "Z>128-Y".
[0082] Optionally, in the device operation method provided in the embodiment of the present application, before determining whether the memory of the extended memory of multiple external devices meets the preset memory conditions of the basic input and output system in the server and obtaining the judgment result, the method also includes: traversing the memory of the extended memory of multiple external devices to obtain the running memory and loading memory of each external device; adding the running memory of each external device to obtain the total running memory of the extended memory of multiple external devices.
[0083] Before determining whether the memory of the extended memory meets the preset memory conditions, it is necessary to first calculate the total running memory size of the extended memory. Optionally, first traverse all external devices connected to the server according to the connection device table stored in the server, and initialize the total running memory values of all external devices, that is, set the initial total running memory value to 0, and collect device information of each external device, for example, collect the running memory information of the extended memory and load memory information, device serial number, device identification code, firmware version, etc.
[0084] Each time an external device is traversed, the external device is added to the initial total running memory to obtain a memory sum. When traversing the second external device, the running memory of the external device is continued to be added to the previous memory sum until all external devices are traversed to obtain the total running memory of the extended memory of multiple external devices.
[0085] Optionally, in the device operation method provided in the embodiment of the present application, the memory of the extended memory includes running memory, and when the judgment result indicates that the total running memory of the extended memory of multiple external devices is greater than a first preset value, a first alarm message is issued.
[0086] Optionally, when the total running memory of the extended memory of the external device is greater than 128K bytes, an alarm message needs to be issued before the target device is screened among all external devices, prompting the developer to pay attention to the sequential update of the devices.
[0087] Optionally, in the device operation method provided in an embodiment of the present application, when a judgment result indicates that the memory of the extended memory of multiple external devices does not meet a preset memory condition, determining multiple candidate device sequences based on the multiple external devices includes: combining at least two of the multiple external devices multiple times to obtain multiple combination results; arranging the devices in each combination result in different orders to obtain multiple initial device sequences; and screening a device sequence that meets the operation rules from the multiple initial device sequences to obtain a candidate device sequence.
[0088] When the total running memory of the extended storage does not meet the preset memory conditions, it is necessary to select multiple target devices from multiple external devices connected to the server and combine them into a candidate device sequence. Optionally, two or more devices are selected from multiple external devices for combination operations multiple times to obtain all possible combination results, and then the devices in all the combination results are arranged in different orders to obtain multiple sequences. For example, when two devices are selected from five devices, recorded as device A and device B, device A and device B are arranged in different orders, that is, AB or BA order, or three devices are selected from five devices for combination, recorded as device A, device B and device C respectively, and the above three devices are arranged in different orders, which can be arranged into 6 kinds of arrangement orders: ABC, ACB, BAC, BCA, CAB, and CBA.
[0089] Furthermore, all obtained sequences are screened through certain operating rules to select candidate device sequences.
[0090] Optionally, in the device operation method provided in the embodiment of the present application, the operation rules include at least one of the following: the candidate device sequence includes external devices required for server operation; the candidate device sequence includes external devices required for the server to execute target business; the number of all target devices in the candidate device sequence is greater than a preset number; the operating memory of all target devices in the candidate device sequence is less than or equal to a first preset value, wherein the first preset value refers to the memory space size supported by the basic input and output system in the server.
[0091] Optionally, the operation rules may include multiple rules. For example, rule one may be whether the devices in the sequence include external devices required for server operation, that is, whether they include devices that are essential for server operation, such as a graphics array card (VGA). When a sequence does not include an essential device, the sequence is considered a sequence that does not meet the rules and needs to be discarded.
[0092] Rule 2 may be whether the devices in the sequence include devices necessary for the target service, that is, whether they include specific devices specified by the manufacturer. If a sequence does not include the specific device specified by the manufacturer, the device needs to be discarded.
[0093] Rule three may be whether the number of devices in the sequence is greater than a preset number, where the preset number may be half of the number of all external devices, that is, the number of devices in the sequence needs to be greater than half of the number of all devices.
[0094] Rule 4 may be that the total operating memory of the devices in the sequence needs to be less than 128K bytes, that is, the devices included in the sequence can operate normally under the memory conditions of the server.
[0095] Optionally, in the device operation method provided in an embodiment of the present application, determining a target device sequence from multiple candidate device sequences includes: respectively calculating the difference between a first preset value and the running memory of all target devices in each candidate device sequence to obtain multiple remaining running memories; and determining the candidate device sequence with the largest remaining running memory as the target device sequence.
[0096] When multiple candidate device sequences that all meet the above-mentioned multiple operating rules are obtained, the target device sequence can be screened according to the size of the remaining memory space. Optionally, the total operating memory of all target devices in each candidate device sequence is calculated, that is, the operating memory of all devices is added together to obtain the total operating memory, and then the total operating memory is subtracted from the first preset value to obtain a memory difference, that is, the remaining operating memory. The multiple remaining operating memories are arranged in descending order, and the candidate device sequence with the largest remaining operating memory is determined as the target device sequence, that is, the candidate device sequence corresponding to the first position in the descending order is determined as the target device sequence.
[0097] Optionally, in the device operation method provided in an embodiment of the present application, after arranging the devices in each combination result in different orders to obtain multiple initial device sequences, the method also includes: if there is no device sequence that meets the operation rules in the multiple initial device sequences, issuing a second alarm message.
[0098] Optionally, if multiple sequences obtained by arranging the devices in all combination results in different orders do not meet the operation rules, that is, if there is no candidate device sequence that meets the operation rules, a second alarm message needs to be issued to alert the developer.
[0099] Optionally, in the device operation method provided in the embodiment of the present application, before determining whether the memory of the extended memory of multiple external devices meets the preset memory conditions of the basic input and output system in the server and obtaining the judgment result, the method also includes: determining whether the historical device information content check value stored in the basic input and output system is zero, and determining whether the total device information content check value of the multiple external devices is the same as the historical device information content check value; if the historical device information content check value is not zero and the total device information content check value of the multiple external devices is the same as the historical device information content check value, loading and running the target device; if the historical device information content check value is zero or the total device information content check value of the multiple external devices is different from the historical device information content check value, executing the step of determining whether the memory of the extended memory of the multiple external devices meets the preset memory conditions of the basic input and output system in the server.
[0100] Before determining whether the device's total running memory meets the preset memory requirements, it is necessary to first determine whether the order, type, and number of devices have changed before the current power-on self-test process. This means comparing the order, type, and number of devices with the historical device sequence and devices. Optionally, a checksum value for the historical device information stored in the basic input / output system is obtained to determine whether the checksum value is 0. If the checksum value is 0, it indicates that no historical devices or historical device sequences are stored, indicating that this power-on self-test operation is the server's first power-on self-test operation.
[0101] If the historical device information checksum is not zero, the system determines whether the historical device information checksum is the same as the total device information checksum for all devices during the current POST. If the two checksums are the same, the devices and their order have not changed. If the two checksums are different and the historical device information checksum is not zero, the system determines whether the device's total running memory meets the preset memory requirements.
[0102] It should be noted that each device information content check value is used to represent the check value calculated based on all device information of an external device connected to the server. For example, the check value is calculated based on the device's running memory information and loaded memory information, device serial number, device identification code, firmware version, etc. Each external device has a unique device information content check value. If the device information content check values of two devices are the same, it means that the two devices are the same type of external devices, and the sizes of the devices' loaded memory and running memory are the same.
[0103] Optionally, in the device operation method provided in the embodiment of the present application, after determining whether the historical device information content verification value stored in the basic input and output system is zero, and determining whether the total device information content verification value of multiple external devices is the same as the historical device information content verification value, the method also includes: when the historical device information content verification value is not zero and the total device information content verification value of multiple external devices is the same as the historical device information content verification value, reading the historical device sequence stored in the basic input and output system, wherein the historical device sequence is composed of multiple target devices in a historical arrangement order; loading and running each target device according to the historical device sequence.
[0104] Optionally, after calculating the total device information content check value of this power-on self-test operation, compare the value with the historical device information content check value. When the total device information content check value is the same as the historical device information content check value, it indicates that the device and device order have not changed. The arrangement order of the historical devices stored in the basic input and output system of the server is directly read, and then all target devices of this operation are loaded and run according to the stored historical device order, thereby improving the efficiency of loading and running.
[0105] Optionally, in the device operation method provided in an embodiment of the present application, after determining whether the memory of the extended memory of multiple external devices meets the preset memory conditions of the basic input and output system in the server and obtaining the judgment result, the method also includes: when the judgment result indicates that the memory of the extended memory of multiple external devices meets the preset memory conditions, reading the device sequence stored in the basic input and output system, and loading and running multiple external devices according to the stored device sequence.
[0106] Optionally, when the judgment result indicates that the total running memory of all external devices connected to the server is less than or equal to 128K bytes, and the loaded memory of the external device at the last position in the stored arrangement order is less than the set value, all external devices connected to the server are arranged according to the arrangement order stored in the basic input and output system, and the arranged devices are loaded and run.
[0107] Optionally, in the device operation method provided in the embodiment of the present application, before determining whether the total device information content verification value of multiple external devices is the same as the historical device information content verification value, the method also includes: traversing the device information content of multiple external devices, calculating the device information content verification value based on the device information content of each external device, and obtaining multiple device information content verification values; adding the device information content verification values of multiple external devices to obtain the total device information content verification value.
[0108] Optionally, after obtaining the device information of each device, a device information content check value for each device can be calculated using a specific encryption algorithm. This means that each device corresponds to a unique device information content check value. Before traversing the external devices of the basic input / output system, the total device information content check value of all devices is initialized. Specifically, the initial total device information content check value is set to 0 before the traversal operation is performed.
[0109] When traversing the first device, the device information content check value of the first device is added to the initial total device information content check value. After that, each time a device is traversed, the device information content check value of the device is added to the device information content check values of all the traversed devices, and finally the total device information content check value is obtained.
[0110] Optionally, in the device operation method provided in the embodiment of the present application, loading and running each target device in the target device sequence includes: adding the device information content verification value of each target device to obtain an updated total device information content verification value; storing the target device sequence and the updated total device information content verification value to the basic input and output system; restarting the server, and using the basic input and output system in the server to load and run each target device.
[0111] Optionally, after screening the target device and the target device sequence, before running the target device, it is necessary to first calculate the device information content verification value based on the device information of each target device, and then add up multiple device information content verification values to obtain the total device information content verification value. The total device information content verification value and the target device sequence are stored in the basic input and output system to provide reference data for subsequent changes to the device sequence. Furthermore, by restarting the server, the system can be used to load and run the device.
[0112] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the relevant technology, can be embodied in the form of a software product, which is stored in a non-volatile readable storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.
[0113] This embodiment also provides an optional device operation method. FIG4 is a flow chart of an optional device operation method provided according to an embodiment of the present application. As shown in FIG4 , the method includes:
[0114] When the server is powered on and self-tested, multiple external devices connected to the server, device information of all external devices, and memory of the extended memory of each external device are obtained, and the running memory capacity and data information check value of the extended memory of all external devices are initialized.
[0115] Traverse all external devices and calculate the data checksum value ToChk and the total running memory ToRunOp of the external device based on the initialized checksum and device information. Determine whether all external devices have been traversed. If not, traverse according to the device table stored in the system until all devices have been traversed.
[0116] After obtaining all external devices, determine whether the order of external devices has changed. First, obtain the device information total check value variable ToChkHis stored in the system. When the device information total check value variable and the current check value are consistent, it is considered that the order has not changed. Directly read the devices stored in the system and their arrangement order, and load and initialize the devices according to the arrangement order.
[0117] When the arrangement order of the external devices changes, that is, when the two check values are different, it is determined whether ToRunOp is greater than the memory space limit supported by the system, that is, whether ToRunOp is greater than 128KB.
[0118] If ToRunOp is less than 128KB, the device is first loaded and initialized in the default order, and then it is determined whether the device's loading memory is insufficient. When the loading memory is sufficient, the order is directly determined as the target sequence and the device is determined as the target device.
[0119] When the loaded memory is insufficient, that is, the total running memory of the external device's extended memory is less than or equal to 128KB, and when the default order is formed by external devices, the loaded memory of the last external device is greater than the difference between the first preset value and the total running memory of other devices except the last device, first enumerate the arrangement sequence combinations of all devices and check whether the enumeration is complete. If it is not complete, traverse and enumerate according to the stored combination table. After enumerating all the combinations, record whether there is insufficient loaded memory in each case, and the amount of remaining memory space. After recording, compare and analyze all the combinations according to the operation rules. For example, the operation rules can be rule 1, whether the devices in the sequence include the external devices required for the server to run, whether the devices in the sequence include the devices required for the target business, etc. If it is determined that there is an arrangement and combination sequence that meets the requirements, all combinations will be screened again to select the combination with the largest remaining space, and use it as the target sequence and target device. If it is determined that no combination meets the requirements, first print an alarm message for the customer's reference, and determine the devices that are essential for this startup. Then, screen and enumerate the combinations based on the necessity of the devices and the amount of memory space they occupy. According to the operating rules, screen the combinations that meet the requirements, record their arrangement order and the amount of remaining space, and then screen each combination and select the combination with the largest remaining space as the target sequence and target combination.
[0120] If it is determined that ToRunOp is greater than the memory space limit supported by the system, an alarm message will be printed for the customer's reference, and the devices that are essential for this startup will be determined. Then, based on the necessity of the devices and the amount of memory space they occupy, the system will screen and enumerate the combinations. According to the operation rules, the combinations that meet the requirements will be screened, and their order and the amount of remaining space will be recorded. It will be determined whether there are available combinations. If no combination that meets the requirements exists, the system will screen again based on the necessity of the devices and the amount of memory space they occupy until a combination that meets the requirements is selected. Each combination that meets the requirements will then be screened, and the combination with the largest remaining space will be selected as the target sequence and target combination.
[0121] The checksum will be calculated based on the device information, and the checksum, the obtained target sequence and the target device will be stored in the system so that the device can be loaded and run normally.
[0122] In this embodiment, a device operation device is also provided, which is configured to implement the above-mentioned embodiments and optional implementations. Details that have already been described will not be repeated. As used below, the term "unit" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.
[0123] FIG5 is a schematic diagram of a device operating apparatus according to an embodiment of the present application. As shown in FIG5 , the apparatus includes: an acquisition unit 50, a first judgment unit 51, a first determination unit 52, and a second determination unit 53.
[0124] The acquisition unit 50 is configured to acquire the memory of multiple external devices connected to the server and the extended memory of each external device during the process of performing a power-on self-test on the server;
[0125] The first judgment unit 51 is configured to judge whether the memory of the expansion memory of the plurality of external devices meets the preset memory condition of the basic input and output system in the server, and obtain a judgment result;
[0126] The first determining unit 52 is configured to determine, if the determination result indicates that the memory of the expansion memory of the plurality of external devices does not meet the preset memory condition, a plurality of candidate device sequences based on the plurality of external devices, wherein each candidate device sequence is composed of a plurality of target devices arranged in a preset order, and the target device is a device among the plurality of external devices;
[0127] The second determining unit 53 is configured to determine a target device sequence from a plurality of candidate device sequences, and load and run each target device in the target device sequence.
[0128] Optionally, in the device operation device provided in the embodiment of the present application, the memory of the extended memory includes the running memory. When the judgment result indicates that the total running memory of the extended memory of multiple external devices is greater than a first preset value, it is determined that the memory of the extended memory of the multiple external devices does not meet the preset memory condition, wherein the first preset value refers to the memory space size supported by the basic input and output system in the server.
[0129] Optionally, in the device operation device provided in the embodiment of the present application, the memory of the extended memory also includes loaded memory. When the judgment result indicates that the total running memory of the extended memory of multiple external devices is less than or equal to a first preset value, and the loaded memory of the last external device in the current arrangement order of the multiple external devices is greater than a second preset value, it is determined that the memory of the extended memory of the multiple external devices does not meet the preset memory condition, wherein the first preset value refers to the memory space size supported by the basic input and output system in the server, and the second preset value is less than the first preset value.
[0130] Optionally, in the device operation device provided in the embodiment of the present application, the device also includes: a first traversal unit, which is configured to traverse the memory of the extended memory of multiple external devices before determining whether the memory of the extended memory of multiple external devices meets the preset memory conditions of the basic input and output system in the server and obtaining the judgment result, to obtain the running memory and loading memory of each external device; an addition unit, which is configured to add the running memory of each external device to obtain the total running memory of the extended memory of multiple external devices.
[0131] Optionally, in the device operation apparatus provided in the embodiment of the present application, the memory of the extended memory includes an operating memory, and when the judgment result indicates that the total operating memory of the extended memories of multiple external devices is greater than a first preset value, a first alarm message is issued.
[0132] Optionally, in the device operation device provided in the embodiment of the present application, the first determination unit 52 includes: a combination module, which is configured to combine at least two external devices from multiple external devices multiple times to obtain multiple combination results; a sorting module, which is configured to arrange the devices in each combination result in different orders to obtain multiple initial device sequences; and a screening module, which is configured to screen device sequences that meet the operation rules from the multiple initial device sequences to obtain candidate device sequences.
[0133] Optionally, in the device operation device provided in the embodiment of the present application, the operation rules include at least one of the following: the candidate device sequence includes external devices required for the server operation; the candidate device sequence includes external devices required for the server to execute the target business; the number of all target devices in the candidate device sequence is greater than a preset number; the operating memory of all target devices in the candidate device sequence is less than or equal to a first preset value, wherein the first preset value refers to the memory space size supported by the basic input and output system in the server.
[0134] Optionally, in the device operation device provided in the embodiment of the present application, the second determination unit 53 includes: a calculation module, which is configured to respectively calculate the difference between the first preset value and the running memory of all target devices in each candidate device sequence to obtain multiple remaining running memories; and a determination module, which is configured to determine the candidate device sequence with the largest remaining running memory as the target device sequence.
[0135] Optionally, in the device operation device provided in the embodiment of the present application, the device also includes: an issuing unit, which is configured to arrange the devices in each combination result in different orders to obtain multiple initial device sequences, and then issue a second alarm message if there is no device sequence that meets the operation rules in the multiple initial device sequences.
[0136] Optionally, in the device operation device provided in the embodiment of the present application, the device also includes: a second judgment unit, which is configured to judge whether the memory of the extended memory of multiple external devices meets the preset memory conditions of the basic input and output system in the server, and before obtaining the judgment result, judge whether the historical device information content verification value stored in the basic input and output system is zero, and judge whether the total device information content verification value of the multiple external devices is the same as the historical device information content verification value; a third judgment unit, which is configured to load and run the target device when the historical device information content verification value is not zero and the total device information content verification value of the multiple external devices is the same as the historical device information content verification value; an execution unit, which is configured to execute the step of judging whether the memory of the extended memory of multiple external devices meets the preset memory conditions of the basic input and output system in the server when the historical device information content verification value is zero or the total device information content verification value of the multiple external devices is different from the historical device information content verification value.
[0137] Optionally, in the device operation device provided in the embodiment of the present application, the device also includes: a second traversal unit, which is configured to traverse the device information content of multiple external devices before determining whether the total device information content verification value of multiple external devices is the same as the historical device information content verification value, and calculate the device information content verification value according to the device information content of each external device to obtain multiple device information content verification values; an addition unit, which is configured to add the device information content verification values of multiple external devices to obtain a total device information content verification value.
[0138] Optionally, in the device operation device provided in the embodiment of the present application, the device also includes: a first reading unit, which is configured to, after determining whether the historical device information content verification value stored in the basic input and output system is zero, and determining whether the total device information content verification value of multiple external devices is the same as the historical device information content verification value, read the historical device sequence stored in the basic input and output system when the historical device information content verification value is not zero and the total device information content verification value of multiple external devices is the same as the historical device information content verification value, wherein the historical device sequence is composed of multiple target devices in a historical arrangement order; a loading unit, which is configured to load and run each target device according to the historical device sequence.
[0139] Optionally, in the device operation device provided in the embodiment of the present application, the device also includes: a second reading unit, which is configured to judge whether the memory of the extended memory of multiple external devices meets the preset memory conditions of the basic input and output system in the server, and after obtaining the judgment result, if the judgment result indicates that the memory of the extended memory of multiple external devices meets the preset memory conditions, read the device sequence stored in the basic input and output system, and load and run multiple external devices according to the stored device sequence.
[0140] Optionally, in the device operation device provided in the embodiment of the present application, the second determination unit 53 includes: an addition module, which is configured to add the device information content verification value of each target device to obtain an updated total device information content verification value; a storage module, which is configured to store the target device sequence and the updated total device information content verification value to the basic input and output system; and a restart module, which is configured to restart the server and load and run each target device in the server using the basic input and output system.
[0141] It should be noted that the above modules can be implemented through software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0142] An embodiment of the present application further provides a non-volatile readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps of any of the above method embodiments when running.
[0143] In an exemplary embodiment, the non-volatile readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0144] An embodiment of the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0145] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0146] For optional examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementations, and this embodiment will not be described in detail here.
[0147] Obviously, those skilled in the art should understand that the modules or steps of the present application described above can be implemented using a general-purpose computing device, they can be concentrated on a single computing device, or distributed across a network composed of multiple computing devices, they can be implemented using program code executable by the computing device, and thus, they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be performed in a different order than herein, or they can be fabricated into separate integrated circuit modules, or multiple modules or steps can be fabricated into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0148] The above are merely optional embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may be subject to various modifications and variations. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A method for operating a device, It is characterized in that include: During a power-on self-test of a server, obtaining memory of a plurality of external devices connected to the server and an extended memory of each external device; Determine whether the memory of the extended memory of the plurality of external devices meets the preset memory condition of the basic input and output system in the server, and obtain a determination result; In the case where the judgment result indicates that the memory of the extended memory of the multiple external devices does not meet the preset memory condition, determining multiple candidate device sequences according to the multiple external devices, wherein each candidate device sequence is composed of multiple target devices in a preset arrangement order, and the target device is a device among the multiple external devices; A target device sequence is determined from the multiple candidate device sequences, and each target device in the target device sequence is loaded and run.
2. The method according to claim 1, It is characterized in that The memory of the extended memory includes running memory. When the judgment result indicates that the total running memory of the extended memory of the multiple external devices is greater than a first preset value, it is determined that the memory of the extended memory of the multiple external devices does not meet the preset memory condition, wherein the first preset value refers to the memory space size supported by the basic input and output system in the server.
3. The method according to claim 2, It is characterized in that The memory of the extended memory also includes a loaded memory. When the judgment result indicates that the total running memory of the extended memory of the multiple external devices is less than or equal to a first preset value, and the loaded memory of the last external device in the current arrangement order of the multiple external devices is greater than a second preset value, it is determined that the memory of the extended memory of the multiple external devices does not meet the preset memory condition, wherein the first preset value refers to the memory space size supported by the basic input and output system in the server, and the second preset value is less than the first preset value.
4. The method according to claim 3, It is characterized in that Before determining whether the memory of the extended memory of the plurality of external devices meets the preset memory condition of the basic input and output system in the server and obtaining the determination result, the method further includes: Traversing the memory of the extended memory of the plurality of external devices to obtain the running memory and the loading memory of each external device; The operating memory of each external device is added together to obtain the total operating memory of the extended memories of the multiple external devices.
5. The method according to claim 2, It is characterized in that The memory of the extended memory includes an operating memory, and when the judgment result indicates that the total operating memory of the extended memory of the plurality of external devices is greater than a first preset value, a first alarm message is issued.
6. The method according to claim 1, It is characterized in that When the judgment result indicates that the memory of the extended memory of the plurality of external devices does not satisfy the preset memory condition, determining a plurality of candidate device sequences according to the plurality of external devices comprises: Combining at least two of the multiple external devices for multiple times to obtain multiple combination results; Arrange the devices in each combination result in different orders to obtain multiple initial device sequences; Device sequences that meet the operation rule are screened from the multiple initial device sequences to obtain the candidate device sequence.
7. The method according to claim 6, It is characterized in that The operation rules include at least one of the following: The candidate device sequence includes external devices required for the server to run; The candidate device sequence includes external devices required by the server to execute the target service; The number of all target devices in the candidate device sequence is greater than a preset number; The running memory of all target devices in the candidate device sequence is less than or equal to a first preset value, wherein the first preset value refers to the memory space size supported by the basic input and output system in the server.
8. The method according to claim 7, It is characterized in that Determining a target device sequence from the plurality of candidate device sequences comprises: respectively calculating the difference between the first preset value and the running memory of all target devices in each of the candidate device sequences to obtain a plurality of remaining running memories; The candidate device sequence with the largest remaining running memory is determined as the target device sequence.
9. The method according to claim 6, It is characterized in that After arranging the devices in each combination result in different orders to obtain a plurality of initial device sequences, the method further includes: In the case that there is no device sequence satisfying the operation rule in the multiple initial device sequences, a second alarm message is issued.
10. The method according to claim 1, It is characterized in that Before determining whether the memory of the extended memory of the plurality of external devices meets the preset memory condition of the basic input and output system in the server and obtaining the determination result, the method further includes: Determine whether the historical device information content check value stored in the basic input and output system is zero, and determine whether the total device information content check value of the plurality of external devices is the same as the historical device information content check value; When the historical device information content check value is not zero and the total device information content check value of the plurality of external devices is the same as the historical device information content check value, loading and running the target device; When the historical device information content check value is zero or the total device information content check value of the multiple external devices is different from the historical device information content check value, a step is performed to determine whether the memory of the extended memory of the multiple external devices meets the preset memory condition of the basic input and output system in the server.
11. The method according to claim 10, It is characterized in that Before determining whether the total device information content verification value of the plurality of external devices is the same as the historical device information content verification value, the method further includes: Traversing the device information contents of the plurality of external devices, calculating a device information content check value according to the device information content of each external device, and obtaining a plurality of device information content check values; The device information content check values of the multiple external devices are added together to obtain the total device information content check value.
12. The method according to claim 10, It is characterized in that After determining whether the historical device information content check value stored in the basic input and output system is zero, and determining whether the total device information content check value of the plurality of external devices is the same as the historical device information content check value, the method further includes: When the historical device information content check value is not zero and the total device information content check value of the plurality of external devices is the same as the historical device information content check value, reading a historical device sequence stored in the basic input and output system, wherein the historical device sequence is composed of a plurality of target devices in a historical arrangement order; Each target device is loaded and run according to the historical device sequence.
13. The method according to claim 1, It is characterized in that After determining whether the memory of the extended memory of the plurality of external devices meets the preset memory condition of the basic input and output system in the server and obtaining the determination result, the method further includes: When the judgment result indicates that the memory of the extended memory of the plurality of external devices meets the preset memory condition, the device sequence stored in the basic input and output system is read, and the plurality of external devices are loaded and run according to the stored device sequence.
14. The method according to claim 1, It is characterized in that Loading and running each target device in the target device sequence includes: Adding the device information content check values of the target devices to obtain an updated total device information content check value; storing the target device sequence and the updated total device information content check value in the basic input and output system; The server is restarted, and each target device is loaded and run in the server by using the basic input and output system.
15. A device operation system, It is characterized in that include: server; A plurality of external devices connected to the server; A basic input / output system is deployed in the server and is configured to determine a plurality of candidate device sequences according to the plurality of external devices when the memory of the extended memory of the plurality of external devices does not meet a preset memory condition during the process of the server performing a power-on self-test, and determine a target device sequence from the plurality of candidate device sequences, and load and run each target device in the target device sequence, wherein each candidate device sequence is composed of a plurality of target devices in a preset arrangement order, and the target device is a device among the plurality of external devices.
16. The device operation system according to claim 15, It is characterized in that The memory of the extended memory includes running memory. When the total running memory of the extended memory of the multiple external devices is greater than a first preset value, it is determined that the memory of the extended memory of the multiple external devices does not meet the preset memory condition, wherein the first preset value refers to the memory space size supported by the basic input and output system in the server.
17. The device operation system according to claim 15, It is characterized in that The memory of the extended memory includes running memory and loading memory. When the total running memory of the extended memory of the multiple external devices is less than a first preset value, and the loading memory of the last external device in the current arrangement order of the multiple external devices is greater than a second preset value, it is determined that the memory of the extended memory of the multiple external devices does not meet the preset memory condition, wherein the first preset value refers to the memory space size supported by the basic input and output system in the server, and the second preset value is less than the first preset value.
18. The device operation system according to claim 15, It is characterized in that The basic input and output system determines the candidate device sequence in the following manner: Combining at least two of the multiple external devices for multiple times to obtain multiple combination results; Arrange the devices in each combination result in different orders to obtain multiple initial device sequences; Device sequences that meet the operation rule are screened from the multiple initial device sequences to obtain the candidate device sequence.
19. A device for operating an equipment, It is characterized in that include: an acquisition unit, configured to acquire the memory of a plurality of external devices connected to the server and an extended memory of each external device during a process of performing a power-on self-test on the server; A first judgment unit is configured to judge whether the memory of the extended memory of the plurality of external devices meets the preset memory condition of the basic input and output system in the server, and obtain a judgment result; A first determining unit is configured to determine a plurality of candidate device sequences according to the plurality of external devices if the judgment result indicates that the memory of the extended memory of the plurality of external devices does not meet the preset memory condition, wherein each candidate device sequence is composed of a plurality of target devices in a preset arrangement order, and the target device is a device among the plurality of external devices; The second determining unit is configured to determine a target device sequence from the plurality of candidate device sequences, and load and run each target device in the target device sequence.
20. A non-volatile readable storage medium, It is characterized in that The non-volatile readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 14 when executed by a processor.
21. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the steps of the method described in any one of claims 1 to 14 are implemented.
Citation Information
Patent Citations
Reading method for boot sequence of computer boot equipment
CN101826020A
Operation data processing method and device, computer equipment and storage medium
CN113110939A
Server self-starting method and device, readable storage medium and electronic equipment
CN115658113A
Equipment operation method, system and device, storage medium and electronic equipment
CN116048643A
Method and apparatus to minimize computer apparatus initial program load and exit / shut down processing
US7299346B1
Cited By
PCIe device fault alarm method, system, device, medium and product
CN120196519A
