CN110007973B - Information processing method and electronic equipment - Google Patents

Information processing method and electronic equipment Download PDF

Info

Publication number
CN110007973B
CN110007973B CN201910234825.2A CN201910234825A CN110007973B CN 110007973 B CN110007973 B CN 110007973B CN 201910234825 A CN201910234825 A CN 201910234825A CN 110007973 B CN110007973 B CN 110007973B
Authority
CN
China
Prior art keywords
information
hardware device
attribute information
registry
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910234825.2A
Other languages
Chinese (zh)
Other versions
CN110007973A (en
Inventor
李桂清
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201910234825.2A priority Critical patent/CN110007973B/en
Publication of CN110007973A publication Critical patent/CN110007973A/en
Application granted granted Critical
Publication of CN110007973B publication Critical patent/CN110007973B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention discloses an information processing method, which comprises the following steps: acquiring first attribute information of a first hardware device electrically connected with electronic equipment; acquiring second attribute information of a second hardware device which is not electrically connected with the electronic equipment based on the first attribute information; wherein the second hardware device is a device that can replace the first hardware device; acquiring a target driver based on the second attribute information; updating a registry of the electronic device based on the second attribute information and the target driver. The embodiment of the invention also discloses electronic equipment.

Description

Information processing method and electronic equipment
Technical Field
The present invention relates to the field of electronics and information technologies, and in particular, to an information processing method and an electronic device.
Background
The performance of electronic equipment such as a server and the like depends on the performance of hardware devices to a great extent, when a user needs to replace a first hardware device which is electrically connected with the electronic equipment with a second hardware device which is the same as the first hardware device in type, the first hardware device is pulled out, and the second hardware device is inserted into the electronic equipment; however, since the registry in the electronic device still corresponds to the first hardware device, the electronic device may fail to be booted due to the fact that the first hardware device in the registry is not found during the booting process.
In the related art, when a user needs to replace a first hardware device with a second hardware device, an electronic device is first turned off, the second hardware device is inserted into the electronic device on the basis of keeping the first hardware device inserted into the electronic device, the electronic device is turned on, after the electronic device is turned on, a registry is updated according to the second hardware device inserted into the electronic device, after the registry is updated, the electronic device is turned off again, the first hardware device is pulled out from the electronic device, and the electronic device is restarted.
Obviously, in order to replace the first hardware device with the second hardware device and enable the electronic device to be normally started in the related art, after the electronic device is turned off for the first time, the first hardware device and the second hardware device need to be inserted at the same time, but when the electronic device has only one card slot for inserting the hardware device, the first hardware device cannot be replaced with the second hardware device. Further, even if the electronic device has two card slots, the electronic device such as a server needs several minutes to several tens of minutes of start-up time, and the electronic device needs to perform two operations of turning on and off the electronic device, thereby having a great influence on the service of the electronic device.
Disclosure of Invention
In order to solve the above technical problems, embodiments of the present invention desirably provide an information processing method and an electronic device, so as to solve the problems that, in the related art, when only one electronic device is used to be inserted into a card slot of a hardware device, a first hardware device cannot be replaced by a second hardware device, and in order to replace the first hardware device with the second hardware device, two operations of turning on and off the electronic device need to be performed, thereby greatly affecting a service of the electronic device.
The technical scheme of the invention is realized as follows:
an information processing method, the method comprising:
acquiring first attribute information of a first hardware device electrically connected with electronic equipment;
acquiring second attribute information of a second hardware device which is not electrically connected with the electronic equipment based on the first attribute information; wherein the second hardware device is a device that can replace the first hardware device;
acquiring a target driver based on the second attribute information;
updating a registry of the electronic device based on the second attribute information and the target driver.
Optionally, after the updating the registry of the electronic device based on the second attribute information and the target driver, the method further includes:
receiving a starting-up instruction aiming at the electronic equipment;
and loading the updated registry based on the starting instruction, and executing the starting operation by driving a second hardware device electrically connected with the electronic equipment.
Optionally, the updating the registry of the electronic device based on the second attribute information and the target driver includes:
acquiring registry information required to be modified for driving the second hardware device to work based on the second attribute information and the target driver;
updating a registry of the electronic device based on the registry information.
Optionally, the obtaining, based on the second attribute information and the target driver, registry information that needs to be modified for driving the second hardware device to operate includes:
acquiring target slot position information corresponding to the second hardware device;
acquiring registry information required to be modified for driving the second hardware device based on the second attribute information, the target driver and the target slot position information;
correspondingly, the loading the updated registry based on the boot instruction, and executing the boot operation by driving a second hardware device electrically connected to the electronic device includes:
loading the updated registry based on the starting instruction, and executing starting operation by driving a second hardware device electrically connected with the electronic equipment by using the target slot position; wherein the target slot position corresponds to the target slot position information.
Optionally, the obtaining, based on the second attribute information, the target driver, and the target slot information, registry information that needs to be modified for driving the second hardware device includes:
acquiring first information, second information and third information which need to be modified under a target path of the first registry based on the second attribute information, the target driver and the target slot position information; wherein the first information comprises the second attribute information and the target slot position information; the second information comprises path information of the target driver; the third information comprises start information for controlling the electronic equipment and configuration information of the second hardware device;
accordingly, updating the registry of the electronic device based on the second attribute information and the target driver includes:
updating a registry of the electronic device based on the first information, the second information, and the third information.
Optionally, the obtaining, based on the first attribute information, second attribute information of a second hardware device that is not electrically connected to the electronic device includes:
setting a hardware device information list; wherein the hardware device information list includes attribute information of at least two mutually compatible hardware devices;
and acquiring second attribute information of a second hardware device which is not electrically connected with the electronic equipment from the hardware device information list based on the first attribute information.
Optionally, the obtaining the target driver based on the second attribute information includes:
determining, based on the second attribute information, that an operating system of the electronic device includes a first driver for driving the second hardware device, where the first driver is the target driver;
if the operating system of the electronic equipment does not comprise a first driver used for driving the second hardware device, acquiring a second driver used for driving the second hardware device from a cloud end or a target electronic equipment;
and setting the second driver in the operating system, and determining that the second driver is the target driver.
An electronic device comprising a processor and a memory;
the processor is used for acquiring first attribute information of a first hardware device electrically connected with the electronic equipment from the memory;
the processor is further configured to acquire second attribute information of a second hardware device that is not electrically connected to the electronic device based on the first attribute information; wherein the second hardware device is a device to replace the first hardware device;
the processor is further configured to obtain a target driver based on the second attribute information;
the processor is further configured to update a registry of the electronic device stored in the memory based on the second attribute information and the target driver.
Optionally, the processor is further configured to receive a boot instruction for the electronic device;
the processor is further configured to load the updated registry from the memory based on the boot instruction, and execute a boot operation by driving a second hardware device electrically connected to the electronic device.
Optionally, the first hardware device is a first disk array card, and the second hardware device is a second disk array card.
The information processing method and the electronic device provided by the embodiment of the invention acquire first attribute information of a first hardware device electrically connected with the electronic device, acquire second attribute information of a second hardware device which is not electrically connected with the electronic device and can replace the first hardware device based on the first attribute information, acquire a target driver based on the second attribute information, and update a registry of the electronic device based on the second attribute information and the target driver; because the registry of the electronic equipment is updated based on the second attribute information and the target driver instead of being inserted into the second hardware device of the electronic equipment, when the electronic equipment only has one card slot for inserting the hardware device, the first hardware device can be still replaced by the second hardware device; moreover, the process of updating the registry of the electronic equipment is completed in the current startup state, so that the electronic equipment only needs one startup and shutdown operation to replace the first hardware device with the second hardware device, and the influence on the service running of the electronic equipment is small.
Drawings
Fig. 1 is a schematic flowchart of an information processing method according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating another information processing method according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating another information processing method according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
It should be appreciated that reference throughout this specification to "an embodiment of the present invention" or "an embodiment described previously" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Thus, the appearances of the phrase "in an embodiment of the present invention" or "in the foregoing embodiments" in various places throughout the specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In various embodiments of the present invention, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention. The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
An embodiment of the present invention provides an information processing method applied to an electronic device, and as shown in fig. 1, the method includes the following steps:
step 101: first attribute information of a first hardware device electrically connected with an electronic device is acquired.
The electronic device in the embodiment of the present invention may be a server. In other embodiments, the electronic device may be any device with information processing capabilities, such as a cell phone, a tablet, a laptop, a palmtop, a personal digital assistant, a portable media player, a navigation device, a wearable device, a smart band, a pedometer, a digital TV, or a desktop computer.
In an embodiment of the present invention, the first hardware device is a first RAID (Redundant Arrays of Independent Drives) card. The disk array card is a card which is formed by combining a plurality of independent disks into a disk group with huge capacity and improves the efficiency of the whole disk system by utilizing the effect generated by providing data by a part of disks. With this technique, data is divided into a plurality of sectors, each of which is stored on a respective hard disk. In other embodiments of the present invention, the first hardware device may also be other hardware devices as long as the first hardware device can generate an electrical connection with the electronic device, for example, a processing device, a hard disk, a display device, a control device, or the like, which is not limited herein.
In one embodiment, acquiring first attribute information of a first hardware device electrically connected to an electronic device may include: first model information and first vendor information of a first hardware device electrically connected to an electronic device are acquired. The first model information may be divided according to a capacity or an interface type of the first hardware device, for example, the capacity may include 100GB, 800GB, 750GB, and the like, and the interface type may include SAS, USB3.0, SATA, and the like. The first vendor information is used to characterize vendor information, such as samsung, dell, and western data, etc., that produces the first hardware device. The model information and the vendor information of the hardware device are not limited herein.
The electronic device may be provided with an interface or a card slot for connecting the first hardware device, and the first hardware device may be plugged into the electronic device through the interface or the card slot, thereby achieving electrical connection with the electronic device.
Step 102: and acquiring second attribute information of a second hardware device which is not electrically connected with the electronic equipment based on the first attribute information.
Wherein the second hardware device is a device that can replace the first hardware device.
In this embodiment of the present invention, the second hardware device may be a second disk array card. In other embodiments of the present invention, the second hardware device may be other hardware devices of the same type as the first hardware device. For example, when the first hardware device is a processing device, the second hardware device should also be a processing device and not a hard disk.
In one embodiment, acquiring second attribute information of a second hardware device that is not electrically connected to the electronic device based on the first attribute information may include: and acquiring second type number information and second manufacturer information of a second hardware device which is not electrically connected with the electronic equipment based on the first attribute information. The second type number information may also be divided according to the capacity or interface type of the second hardware device. The second vendor information is used to characterize vendor information for producing the second hardware device. The second model information may be the same as or different from the first model information. The second vendor information may be the same as or different from the first vendor information.
The second hardware device is compatible with the first hardware device. The second hardware device may be compatible with the first hardware device in that both the second hardware device and the first hardware device are compatible with the electronic device.
Step 103: and acquiring the target driver based on the second attribute information.
The target driver provides an interface of the hardware device to the operating system and coordinates the relationship between the two, i.e. a small piece of code added to the operating system, which contains the information of the hardware device. The information of the hardware device may include parameter information of the hardware device, such as at least one of an identifier, a capacity, an interface type, and an interface protocol of the hardware device, and the computer may communicate with the hardware device by using the information. The target driver is a configuration file written by a hardware manufacturer of the hardware device according to the operating system, and the hardware device in the computer cannot work without the target driver. Different operating systems and different target drivers of hardware devices are used, and various hardware manufacturers can continuously upgrade the target drivers in order to ensure the compatibility of hardware and enhance the functions of the hardware. The operating system in the embodiment of the invention is a Windows operating system, and in other embodiments, the operating system can also be a Linux operating system or an IOS operating system. It should be noted that the hardware device mentioned in the embodiments of the present invention is the first hardware device or the second hardware device, or the hardware device may be other hardware devices of the same type as the first hardware device and the second hardware device.
The target driver in the embodiment of the present invention may be downloaded from an official website of a hardware manufacturer, may be downloaded from another website, or may be acquired from another electronic device.
If the electronic device is capable of acquiring at least two drivers that can be used to drive the second hardware device, the target driver may be determined from the at least two drivers based on version information and/or stability information of each driver in the at least two drivers. For example, in one embodiment, the electronic device may determine, from the at least two versions, that the driver corresponding to the highest version is the target driver. In another embodiment, the electronic device may determine, from the at least two versions, that a driver whose stability information is greater than the preset stability information and whose version information is greater than the preset version information is a target driver.
Step 104: and updating the registry of the electronic equipment based on the second attribute information and the target driver.
In one embodiment, updating the registry of the electronic device based on the second attribute information and the target driver may include: updating a registry of the electronic device based on the model information, the vendor information, and the target driver of the second hardware device. Updating the registry of the electronic device may be simulating the process of installing the second hardware appliance. The simulation installation can be understood as follows, in the related art, since the electronic device must update the registry according to the second hardware device inserted into the electronic device and install the second hardware device according to the updated registry, in the embodiment of the present invention, the registry is updated according to the second attribute information and the target driver of the second hardware device not inserted into the electronic device, and the second hardware device installed is implemented according to the updated registry, since the second hardware device is not electrically connected with the electronic device when the registry is updated, the simulation installation is called.
Updating the registry of the electronic device may include: and updating the registry key under the HKLM \ SYSTEM \ CurrentControlSet path of the electronic equipment. In one embodiment, the Enum entry, Services entry, Control entry under the HKLM \ SYSTEM \ CurrentControlSet path may be updated.
In the embodiment of the present invention, the electronic device may update the registry of the electronic device and update the registry based on the second attribute information and the target driver, and only needs one card slot to implement the process of replacing the first hardware device with the second hardware device without inserting the second hardware device into an interface of the electronic device, and the registry may be updated when the electronic device is in the current power-on state, and the power-on and power-off operation is executed based on the updated registry, and in the power-on process, the target driver drives the second hardware device to install the second hardware device, so that the second hardware device may be installed successfully only by one power-on and power-off operation. The method and the device avoid the problems that in the related art, the first startup and shutdown operation needs to be executed firstly, the second hardware device is inserted after the first shutdown, the registry is updated according to the second hardware device inserted into the electronic equipment after the first startup, the second startup and shutdown operation is executed based on the updated registry, and then the second hardware device is installed, so that the second hardware device can be installed successfully only after two startup and shutdown operations occur.
The information processing method provided by the embodiment of the invention comprises the steps of acquiring first attribute information of a first hardware device electrically connected with electronic equipment, acquiring second attribute information of a second hardware device which is not electrically connected with the electronic equipment and can replace the first hardware device based on the first attribute information, acquiring a target driver based on the second attribute information, and updating a registry of the electronic equipment based on the second attribute information and the target driver; because the registry of the electronic equipment is updated based on the second attribute information and the target driver instead of being inserted into the second hardware device of the electronic equipment, when the electronic equipment only has one card slot for inserting the hardware device, the first hardware device can be still replaced by the second hardware device; moreover, the process of updating the registry of the electronic equipment is completed in the current startup state, so that the electronic equipment only needs one startup and shutdown operation to replace the first hardware device with the second hardware device, and the influence on the service running of the electronic equipment is small.
Based on the foregoing embodiments, an embodiment of the present invention provides an information processing method, as shown in fig. 2, including the following steps:
step 201: the electronic device acquires first attribute information of a first hardware device electrically connected with the electronic device.
Step 202: the electronic equipment acquires second attribute information of a second hardware device which is not electrically connected with the electronic equipment based on the first attribute information.
Wherein the second hardware device is a device that can replace the first hardware device.
Step 203: and the electronic equipment acquires the target driving program based on the second attribute information.
In one embodiment, the electronic device obtains the target driver based on the second attribute information, and may be implemented by: and based on the second attribute information, if the operating system of the electronic equipment is determined to comprise a first driver used for driving the second hardware device, determining that the first driver is a target driver. For example, the electronic device may determine whether there is a Driver for driving the second hardware device from the Windows \ System32\ Driver Store \ File reproduction path.
In another embodiment, the electronic device obtains the target driver based on the second attribute information, and may further be implemented by the following steps a1 to a 2:
step A1: if it is determined that the operating system of the electronic device does not include the first driver for driving the second hardware device, the electronic device obtains a second driver for driving the second hardware device from the cloud or the target electronic device.
Step A2: the electronic equipment sets a second driver in the operating system and determines that the second driver is a target driver.
Wherein, setting the second driver in the operating system may include: the second driver is set in Windows \ System32\ drivers path.
The target electronic device is a device different from the electronic device in the embodiment of the present invention, for example, the target electronic device may be a hard disk device, a second driver is stored in the hard disk device, and the electronic device may copy the second driver from the hard disk device to the operating system; alternatively, the target device may be a server for storing the second driver, and the electronic device may download the second driver from the server for storing the second driver and set the second driver in the operating system.
Step 204: the electronic device updates a registry of the electronic device based on the second attribute information and the target driver.
In one embodiment, step 204 may be implemented by the following steps B1 through B2:
step B1: and the electronic equipment acquires the registry information required to be modified for driving the second hardware device to work based on the second attribute information and the target driver.
In one embodiment, step B1 may be implemented by the following steps B11 to B12:
step B11: the electronic device obtains target slot position information corresponding to the second hardware device.
The target slot location information may be the same as the slot location information of the first hardware device currently inserted into the electronic device. In one embodiment, when the electronic device includes only one slot for inserting a hardware device, the target slot information may default to be the same as the slot information that the first hardware device currently accesses to the electronic device. In another embodiment, when the electronic device includes at least two slots for inserting the hardware device, an operation performed by a user with respect to a target slot of the at least two slot information corresponding to the at least two slots may be received, so as to determine that the target slot information is the same as the slot information of the first hardware device currently inserted into the electronic device. In other embodiments, the target slot position information may be different from the slot position information currently inserted into the first hardware device of the electronic device, and in this embodiment, the electronic device should include at least two slot positions and receive an operation for a target slot position of the at least two slot position information, so as to determine the target slot position information different from the slot position information currently inserted into the first hardware device of the electronic device.
Step B12: and acquiring registry information required to be modified for driving the second hardware device based on the second attribute information, the target driver and the target slot position information.
In one embodiment, acquiring the registry information that needs to be modified for driving the second hardware device based on the second attribute information, the target driver, and the target slot information may include: and acquiring first information, second information and third information which need to be modified under the target path of the first registry based on the second attribute information, the target driver and the target slot position information.
The first information comprises second attribute information and target slot position information; the second information includes path information of the target driver; the third information comprises start-up information for controlling the electronic device and configuration information for the second hardware arrangement.
The target path in the embodiment of the invention is HKLM \ SYSTEM \ Current ControlSet path. The first information is an item of Enum, the second information is an item of Services, and the third information is an item of Control, and it should be understood that the first information, the second information, and the third information are all information under HKLM \ SYSTEM \ current Control path.
Step B2: the electronic device updates the registry of the electronic device based on the registry information.
In one embodiment, updating the registry of the electronic device based on the registry information may include: and updating the registry of the electronic equipment based on the first information, the second information and the third information.
After obtaining the first information, the second information, and the third information, the electronic device may replace the information corresponding to the first information, the information corresponding to the second information, and the information corresponding to the third information in the target path, so as to obtain an updated registry.
Step 205: the electronic device receives a power-on instruction for the electronic device.
The electronic device may receive a shutdown operation for the electronic device after obtaining the updated registry, the electronic device may shutdown based on the shutdown operation, and receive a startup operation for the electronic device after the electronic device is shutdown, so that the electronic device receives a startup instruction. Or, after obtaining the updated registry, the electronic device may receive a restart instruction for the electronic device, and receive a boot instruction in a process of restarting the electronic device based on the restart instruction.
Step 206: and the electronic equipment loads the updated registry based on the starting instruction and executes the starting operation by driving a second hardware device electrically connected with the electronic equipment.
The electronic equipment firstly enters a power-on self-test program after receiving a starting-up instruction, loads an operating system after the power-on self-test program is finished, loads updated registry information by a target driver in the process of loading the operating system, drives a second hardware device, and starts up successfully after the second hardware device is installed.
In one embodiment, loading the updated registry table based on the boot instruction, and executing the boot operation by driving a second hardware device electrically connected to the electronic device may include: loading the updated registry based on the starting instruction, and executing starting operation by driving a second hardware device electrically connected with the electronic equipment by using the target slot position; wherein the target slot position corresponds to the target slot position information.
It should be noted that, for the descriptions of the same steps and the same contents in this embodiment as those in other embodiments, reference may be made to the descriptions in other embodiments, which are not described herein again.
The information processing method provided by the embodiment of the invention comprises the steps of acquiring first attribute information of a first hardware device electrically connected with electronic equipment, acquiring second attribute information of a second hardware device which is not electrically connected with the electronic equipment and can replace the first hardware device based on the first attribute information, acquiring a target driver based on the second attribute information, and updating a registry of the electronic equipment based on the second attribute information and the target driver; because the registry of the electronic equipment is updated based on the second attribute information and the target driver instead of being inserted into the second hardware device of the electronic equipment, when the electronic equipment only has one card slot for inserting the hardware device, the first hardware device can be still replaced by the second hardware device; moreover, the process of updating the registry of the electronic equipment is completed in the current startup state, so that the electronic equipment only needs one startup and shutdown operation to replace the first hardware device with the second hardware device, and the influence on the service running of the electronic equipment is small. In addition, after the electronic equipment finishes updating the registry, the electronic equipment executes one startup and shutdown operation, and in the startup process, the target driver drives the second hardware device, so that the second hardware device can be successfully installed on the electronic equipment.
Based on the foregoing embodiments, an embodiment of the present invention provides an information processing method, as shown in fig. 3, including the following steps:
step 301: the electronic device acquires first attribute information of a first hardware device electrically connected with the electronic device.
Step 302: the electronic device sets a hardware device information list.
The hardware device information list includes attribute information of at least two hardware devices compatible with each other.
The hardware device information list may be set by a user, for example, the user may store attribute information of at least two hardware devices that are compatible with each other in a storage space of the electronic device, so that the electronic device may invoke the hardware information list when executing the information processing method in the embodiment of the present invention. Wherein the at least two mutually compatible hardware devices may be of the same type as the first hardware information. The attribute information of the hardware device in this step includes at least model information and vendor information of the hardware device. The hardware device information list includes first attribute information that should include at least a first hardware device and second attribute information of a second hardware device.
Step 303: the electronic device acquires second attribute information of a second hardware device that is not electrically connected to the electronic device from the hardware device information list based on the first attribute information.
In an embodiment, when the electronic device acquires the attribute information of at least two target hardware devices that are not electrically connected with the electronic device and are compatible with the first hardware device from the hardware device information list based on the first attribute information, the electronic device may receive an operation of a user on second attribute information in the attribute information of the at least two target hardware devices, so as to obtain the second attribute information, where the attribute information of the at least two target hardware devices should include the second attribute information.
Step 304: and the electronic equipment acquires the target driving program based on the second attribute information.
Step 305: the electronic device updates a registry of the electronic device based on the second attribute information and the target driver.
The information processing method provided by the embodiment of the invention comprises the steps of acquiring first attribute information of a first hardware device electrically connected with electronic equipment, acquiring second attribute information of a second hardware device which is not electrically connected with the electronic equipment and can replace the first hardware device based on the first attribute information, acquiring a target driver based on the second attribute information, and updating a registry of the electronic equipment based on the second attribute information and the target driver; because the registry of the electronic equipment is updated based on the second attribute information and the target driver instead of being inserted into the second hardware device of the electronic equipment, when the electronic equipment only has one card slot for inserting the hardware device, the first hardware device can be still replaced by the second hardware device; moreover, the process of updating the registry of the electronic equipment is completed in the current startup state, so that the electronic equipment only needs one startup and shutdown operation to replace the first hardware device with the second hardware device, and the influence on the service running of the electronic equipment is small. In addition, because the hardware device information list is set, and the hardware devices in the hardware device information list are compatible, the electronic equipment can determine the attribute information of the second hardware device from the hardware device information list, so that the second hardware device is compatible with the first hardware device, and the method for acquiring the second attribute information is simple.
Based on the foregoing embodiment, an embodiment of the present invention provides an electronic device 4, where the electronic device 4 may be applied to an information processing method provided in the embodiments corresponding to fig. 1 to 3, and referring to fig. 4, the electronic device 4 may include: a processor 41 and a memory 42, wherein:
a processor 41 for acquiring first attribute information of a first hardware device (not shown in the figure) electrically connected to the electronic apparatus from a memory 42;
a processor 41, further configured to obtain second attribute information of a second hardware device (not shown in the figure) that is not electrically connected to the electronic apparatus, based on the first attribute information; wherein the second hardware device is a device used to replace the first hardware device;
the processor 41 is further configured to obtain a target driver based on the second attribute information;
the processor 41 is further configured to update the registry of the electronic device stored in the memory 42 based on the second attribute information and the target driver.
In other embodiments of the present invention, the processor 41 is further configured to receive a power-on instruction for the electronic device;
the processor 41 is further configured to load the updated registry from the memory 42 based on the boot instruction, and execute a boot operation by driving a second hardware device electrically connected to the electronic device.
In other embodiments of the present invention, the processor 41 is further configured to obtain, based on the second attribute information and the target driver, the registry information that needs to be modified for driving the second hardware device to operate;
the processor 41 is further configured to update the registry of the electronic device based on the registry information.
In other embodiments of the present invention, the processor 41 is further configured to obtain target slot position information corresponding to the second hardware device;
the processor 41 is further configured to obtain, based on the second attribute information, the target driver, and the target slot information, registry information that needs to be modified for driving the second hardware device;
correspondingly, the processor 41 is further configured to load the updated registry stored in the memory 42 based on the boot instruction, and execute the boot operation by driving a second hardware device electrically connected to the electronic device by using the target slot; wherein the target slot position corresponds to the target slot position information.
In other embodiments of the present invention, the processor 41 is further configured to obtain, based on the second attribute information, the target driver, and the target slot information, first information, second information, and third information that need to be modified in the target path of the first registry; the first information comprises second attribute information and target slot position information; the second information includes path information of the target driver; the third information comprises start information for controlling the electronic equipment and configuration information of the second hardware device;
accordingly, the processor 41 is further configured to update the registry of the electronic device stored in the memory 42 based on the first information, the second information, and the third information.
In other embodiments of the present invention, the processor 41 is further configured to set a hardware device information list in the memory 42; the hardware device information list comprises attribute information of at least two mutually compatible hardware devices;
the processor 41 is further configured to obtain second attribute information of a second hardware device that is not electrically connected to the electronic apparatus from the hardware device information list obtained from the memory 42 based on the first attribute information.
In other embodiments of the present invention, the processor 41 is further configured to determine, based on the second attribute information, that the first driver is a target driver if it is determined that the operating system of the electronic device includes the first driver for driving the second hardware device;
the processor 41 is further configured to obtain a second driver for driving the second hardware device from the cloud or the target electronic device if it is determined that the operating system of the electronic device does not include the first driver for driving the second hardware device;
the processor 41 is further configured to set the second driver in the operating system, and determine that the second driver is the target driver.
In another embodiment of the present invention, the first hardware device is a first disk array card, and the second hardware device is a second disk array card.
The electronic device provided by the embodiment of the invention acquires first attribute information of a first hardware device electrically connected with the electronic device, acquires second attribute information of a second hardware device which is not electrically connected with the electronic device and can replace the first hardware device based on the first attribute information, acquires a target driver based on the second attribute information, and updates a registry of the electronic device based on the second attribute information and the target driver; because the registry of the electronic equipment is updated based on the second attribute information and the target driver instead of being inserted into the second hardware device of the electronic equipment, when the electronic equipment only has one card slot for inserting the hardware device, the first hardware device can be still replaced by the second hardware device; moreover, the process of updating the registry of the electronic equipment is completed in the current startup state, so that the electronic equipment only needs one startup and shutdown operation to replace the first hardware device with the second hardware device, and the influence on the service running of the electronic equipment is small.
Based on the foregoing embodiments, an embodiment of the present invention provides a computer-readable storage medium storing one or more programs, which are executable by one or more processors to implement the steps of the information processing method as any one of the above.
The Processor may be at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a Central Processing Unit (CPU), a controller, a microcontroller, and a microprocessor. It is understood that the electronic device implementing the above-mentioned processor function may be other electronic devices, and the embodiments of the present application are not particularly limited.
The computer storage medium/Memory may be a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Programmable Read Only Memory (EPROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a magnetic Random Access Memory (FRAM), a Flash Memory (Flash Memory), a magnetic surface Memory, an optical Disc, or a Compact Disc Read-Only Memory (CD-ROM); but may also be various terminals such as mobile phones, computers, tablet devices, personal digital assistants, etc., that include one or any combination of the above-mentioned memories.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, recitation of an element by the phrase "comprising an … …" does not exclude the presence of other like elements in the process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method described in the embodiments of the present application.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application, or which are directly or indirectly applied to other related technical fields, are included in the scope of the present application.

Claims (10)

1. An information processing method, the method comprising:
acquiring first attribute information of a first hardware device electrically connected with electronic equipment;
acquiring second attribute information of a second hardware device which is not electrically connected with the electronic equipment based on the first attribute information; wherein the second hardware device is a device that a user determines can replace the first hardware device;
acquiring a target driver based on the second attribute information;
updating a registry of the electronic device based on the second attribute information and the target driver.
2. The method of claim 1, wherein after the updating the registry of the electronic device based on the second attribute information and the target driver, the method further comprises:
receiving a starting-up instruction aiming at the electronic equipment;
and loading the updated registry based on the starting instruction, and executing the starting operation by driving a second hardware device electrically connected with the electronic equipment.
3. The method of claim 2, wherein updating the registry of the electronic device based on the second attribute information and the target driver comprises:
acquiring registry information required to be modified for driving the second hardware device to work based on the second attribute information and the target driver;
updating a registry of the electronic device based on the registry information.
4. The method according to claim 3, wherein the obtaining, based on the second attribute information and the target driver, registry information that needs to be modified for driving the second hardware device to operate comprises:
acquiring target slot position information corresponding to the second hardware device;
acquiring registry information required to be modified for driving the second hardware device based on the second attribute information, the target driver and the target slot position information;
correspondingly, the loading the updated registry based on the boot instruction, and executing the boot operation by driving a second hardware device electrically connected to the electronic device includes:
loading the updated registry based on the starting instruction, and executing starting operation by driving a second hardware device electrically connected with the electronic equipment by using the target slot position; wherein the target slot position corresponds to the target slot position information.
5. The method of claim 4, wherein obtaining registry information that needs to be modified for driving the second hardware device based on the second attribute information, the target driver, and the target slot information comprises:
acquiring first information, second information and third information which need to be modified under a target path of a first registry based on the second attribute information, the target driver and the target slot position information; wherein the first information comprises the second attribute information and the target slot position information; the second information comprises path information of the target driver; the third information comprises start information for controlling the electronic equipment and configuration information of the second hardware device;
accordingly, updating the registry of the electronic device based on the second attribute information and the target driver includes:
updating a registry of the electronic device based on the first information, the second information, and the third information.
6. The method according to claim 1, wherein the obtaining second attribute information of a second hardware device that is not electrically connected to the electronic device based on the first attribute information comprises:
setting a hardware device information list; wherein the hardware device information list includes attribute information of at least two mutually compatible hardware devices;
and acquiring second attribute information of a second hardware device which is not electrically connected with the electronic equipment from the hardware device information list based on the first attribute information.
7. The method of claim 1, wherein obtaining the target driver based on the second attribute information comprises:
determining, based on the second attribute information, that an operating system of the electronic device includes a first driver for driving the second hardware device, where the first driver is the target driver;
if the operating system of the electronic equipment does not comprise a first driver used for driving the second hardware device, acquiring a second driver used for driving the second hardware device from a cloud end or a target electronic equipment;
and setting the second driver in the operating system, and determining that the second driver is the target driver.
8. An electronic device, comprising a processor and a memory;
the processor is used for acquiring first attribute information of a first hardware device electrically connected with the electronic equipment from the memory;
the processor is further configured to acquire second attribute information of a second hardware device that is not electrically connected to the electronic device based on the first attribute information; wherein the second hardware device is a device that a user determines can replace the first hardware device;
the processor is further configured to obtain a target driver based on the second attribute information;
the processor is further configured to update a registry of the electronic device stored in the memory based on the second attribute information and the target driver.
9. The electronic device of claim 8,
the processor is further configured to receive a boot instruction for the electronic device;
the processor is further configured to load the updated registry from the memory based on the boot instruction, and execute a boot operation by driving a second hardware device electrically connected to the electronic device.
10. The electronic device according to claim 8 or 9, wherein the first hardware device is a first disk array card, and the second hardware device is a second disk array card.
CN201910234825.2A 2019-03-26 2019-03-26 Information processing method and electronic equipment Active CN110007973B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910234825.2A CN110007973B (en) 2019-03-26 2019-03-26 Information processing method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910234825.2A CN110007973B (en) 2019-03-26 2019-03-26 Information processing method and electronic equipment

Publications (2)

Publication Number Publication Date
CN110007973A CN110007973A (en) 2019-07-12
CN110007973B true CN110007973B (en) 2021-07-16

Family

ID=67168291

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910234825.2A Active CN110007973B (en) 2019-03-26 2019-03-26 Information processing method and electronic equipment

Country Status (1)

Country Link
CN (1) CN110007973B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8819299B1 (en) * 2010-02-24 2014-08-26 Open Invention Network, Llc Method for creation of a device driver for a peripheral device
CN106325879A (en) * 2016-08-30 2017-01-11 北京金山安全软件有限公司 Method and device for installing driver and electronic equipment
CN109426625A (en) * 2017-08-30 2019-03-05 深圳市道通科技股份有限公司 A kind of control device and implementation method that more drivings are compatible

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8554957B1 (en) * 2010-02-24 2013-10-08 Open Invention Network, Llc Method for creation of device drivers and device objects for peripheral devices
CN102662685B (en) * 2012-03-06 2015-08-12 中兴通讯股份有限公司 The drive installation method of terminal device and device
CN102750164B (en) * 2012-05-29 2016-01-20 湖北盛天网络技术股份有限公司 A kind of method of automatic configuration device driver
US8949815B2 (en) * 2013-05-31 2015-02-03 Microsoft Corporation Driver installation for targeted and non-present devices
KR102255216B1 (en) * 2014-11-20 2021-05-24 삼성전자주식회사 Pci device and pci system including the same

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8819299B1 (en) * 2010-02-24 2014-08-26 Open Invention Network, Llc Method for creation of a device driver for a peripheral device
CN106325879A (en) * 2016-08-30 2017-01-11 北京金山安全软件有限公司 Method and device for installing driver and electronic equipment
CN109426625A (en) * 2017-08-30 2019-03-05 深圳市道通科技股份有限公司 A kind of control device and implementation method that more drivings are compatible

Also Published As

Publication number Publication date
CN110007973A (en) 2019-07-12

Similar Documents

Publication Publication Date Title
US9507604B2 (en) Boot method and boot system
US9389878B1 (en) Pre-boot management of drivers and programs
US8874892B1 (en) Assessing BIOS information prior to reversion
US8751783B2 (en) Booting computing devices with EFI aware operating systems
US7694165B2 (en) Automation of bare metal recoveries
US20110302572A1 (en) Embedded network device and firmware upgrading method
TWI576764B (en) A computer system
JP6873811B2 (en) Information processing device
CN107870769B (en) Installation method and device of operating system
US20080098381A1 (en) Systems and methods for firmware update in a data processing device
US20090083375A1 (en) Installation of a Virtualization Environment
CN110825419B (en) Firmware refreshing method and device, electronic equipment and storage medium
CN108874459B (en) Rapid starting method and device based on virtualization technology
US9110678B1 (en) Automated BIOS enhancements and upgrades
WO2016062146A1 (en) Serial number information update method, device and terminal
CN113672296B (en) Custom application switching method, switching device, electronic equipment and storage medium
CN113064637B (en) Method and system for starting from separated BIOS image file
US20100268925A1 (en) System and method for populating a dedicated system service repository for an information handling system
CN107911816B (en) Starting method for multi-mode IoT device, multi-mode IoT device and storage medium
CN110007973B (en) Information processing method and electronic equipment
CN106484442B (en) Server system and method for updating startup mapping file
US20150212866A1 (en) Management system for service of multiple operating environments, and methods thereof
CN106611124A (en) Computer device and boot method thereof
CN112667444A (en) System upgrading method, storage medium and terminal equipment
CN114296764A (en) System upgrading method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant