CN114816813B - A driver control method and device - Google Patents

A driver control method and device Download PDF

Info

Publication number
CN114816813B
CN114816813B CN202210292462.XA CN202210292462A CN114816813B CN 114816813 B CN114816813 B CN 114816813B CN 202210292462 A CN202210292462 A CN 202210292462A CN 114816813 B CN114816813 B CN 114816813B
Authority
CN
China
Prior art keywords
driver
abnormal
driving
program
control method
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
CN202210292462.XA
Other languages
Chinese (zh)
Other versions
CN114816813A (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.)
Suzhou Metabrain Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202210292462.XA priority Critical patent/CN114816813B/en
Publication of CN114816813A publication Critical patent/CN114816813A/en
Application granted granted Critical
Publication of CN114816813B publication Critical patent/CN114816813B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0706Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0793Remedial or corrective actions
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • G06F9/4411Configuring for operating with peripheral devices; Loading of device drivers

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Computer Security & Cryptography (AREA)
  • Debugging And Monitoring (AREA)
  • Hardware Redundancy (AREA)

Abstract

The invention provides a method and a device for controlling a driver, and relates to the technical field of servers. The method comprises the following steps: monitoring the first driving program and judging whether the first driving program is abnormal or not; when the first driver is abnormal, stopping the operation of the first driver and the second driver; converting the driving object of the second driving program from the second device to the first device, and converting the driving object of the first driving program from the first device to the second device; updating the first driver and the first device, and synchronously sending operation instructions to the updated first driver and the updated second driver, wherein the operation instructions are respectively used for driving the second device and the updated first device. By implementing the control method of the driving program disclosed by the invention, transient faults of hardware equipment can be corrected in time, the fault tolerance and reliability of the system are improved, and the method is particularly suitable for systems with high stability requirements.

Description

Driver control method and device
Technical Field
The present invention relates to the field of server technologies, and in particular, to a method and apparatus for controlling a driver.
Background
The device driver is a gate that enters the Linux kernel world and plays a special role in the Linux kernel. The device driver is a specific hardware internal programming interface in the operating system while completely hiding the operating details of the device. In modern operating systems, the proportion of device driver code is higher than 70%.
Hardware faults may cause system operation anomalies, while most hardware faults are transient, and hardware devices may experience transient errors for various reasons. For example: electromagnetic interference or radiation, etc. Reports from hardware device manufacturers indicate: most of the returned devices were detected as normal. If a hardware device fails to execute a command, the same command is re-executed in most cases to restore to normal.
When the device driver executes a command and the hardware device is out of order due to the fault of the hardware device, if the device driver can be timely restored to the state before executing the command, the device driver can request the hardware device to execute the command again, and the normal operation of the system can be maintained under most conditions. Therefore, the faults of the hardware equipment cannot be perceived by the application program and the operating system, so that the fault tolerance of the hardware faults is realized, and the reliability of the system is improved.
Therefore, a driver control method is needed, when a device driver executes a command and an abnormality occurs in the device driver due to a hardware device fault, the device driver is controlled to be restored to a state before executing the command in time, and then the device driver is controlled to request the hardware device to execute the command again, so as to obtain a correct result, thereby solving the problem of abnormal system operation caused by a transient fault of the hardware device.
Disclosure of Invention
In order to solve the problems in the prior art, the embodiment of the invention provides a method and a device for controlling a driver, which are used for solving the problem that in the prior art, hardware equipment is abnormal in system operation due to transient faults.
In order to solve one or more of the above technical problems, the technical solution adopted by the present invention is as follows:
in a first aspect, a driver control method is provided, including:
monitoring a first driving program and judging whether the first driving program is abnormal, wherein the first driving program is used for driving a first device;
when the first driver is abnormal, stopping the operation of the first driver and the second driver, wherein the second driver is used for driving the second device;
Converting the driving object of the second driving program from the second device to the first device, and converting the driving object of the first driving program from the first device to the second device;
updating the first driver and the first device, and synchronously sending operation instructions to the updated first driver and the updated second driver, wherein the operation instructions are respectively used for driving the second device and the updated first device.
Further, converting the driving object of the second driver from the second device to the first device, and converting the driving object of the first driver from the first device to the second device includes:
The change management device drives preset data items in the data structure body, so that the driving object of the second driving program is converted into the first device from the second device, and meanwhile, the driving object of the first driving program is converted into the second device from the first device.
Further, updating the first driver and the first device includes:
Copying the instruction state value and the data value in the register of the second device, and covering the corresponding instruction state value and data value of the first driver;
And copying the instruction state value and the data carried by the second driver to corresponding positions in a register of the first device.
Further, before monitoring the first driver and determining whether the first driver is abnormal, the method further includes:
Counting the abnormal condition of the first driver to obtain a historical abnormal counting result;
judging whether to start a drive program control method according to the historical abnormal statistical result and an abnormal monitoring strategy;
if yes, starting a drive program control method;
if not, the driver control method is not started.
Further, counting the abnormal condition of the first driver, and obtaining the historical abnormal counting result includes:
The abnormal condition of the driver is at least divided into: a first abnormal situation, a second abnormal situation;
in the abnormal situation of the driver, counting the occurrence quantity belonging to the first abnormal situation to obtain a first abnormal quantity;
In the abnormal condition of the driver, counting the occurrence quantity belonging to the second abnormal condition to obtain a second abnormal quantity;
the historical anomaly statistics include: the first abnormal condition and the corresponding first abnormal condition number thereof, and the second abnormal condition and the corresponding second abnormal condition number thereof.
Further, according to the historical anomaly statistics result and the anomaly monitoring policy, judging whether to enable the driver control method comprises the following steps:
If the first abnormal number exceeds the first threshold value or the second abnormal number exceeds the second threshold value, judging whether the drive program control method is started or not, and if so, judging that the result is yes;
If the first abnormal number does not exceed the first threshold value and the second abnormal number does not exceed the second threshold value, judging whether the drive program control method is started or not, and if not, judging that the result of the drive program control method is NO;
The anomaly monitoring strategy at least comprises the following steps: a first threshold corresponding to a first abnormal condition, and a second threshold corresponding to a second abnormal condition.
Further, counting the abnormal condition of the first driver, and before obtaining the historical abnormal statistic result, further including:
and synchronously sending operation instructions to the first driver and the second driver.
Further, synchronously sending the operation instruction to the first driver and the second driver includes:
after the operation instruction is acquired, copying the operation instruction, sending one of the operation instructions to the first driver, and sending the other operation instruction to the second driver;
Storing the instruction state value and data generated after the second device executes the operation instruction into a register of the second device;
and receiving the returned data generated after the first equipment and the second equipment execute the operation instruction, and only using the returned data of the first equipment for external data exchange.
Further, the driver control method further includes: recording a system operation log for optimizing an abnormality monitoring strategy;
wherein, the system operation log at least comprises: the number of times the method is executed, the moment the method is executed.
In a second aspect, a driver control apparatus includes: the device comprises an abnormality monitoring module, a driving suspension module, a driving conversion module and a driving updating module;
the abnormality monitoring module is used for monitoring the first driving program and judging whether the first driving program is abnormal or not;
the drive suspension module is used for suspending the operation of the first drive program and the second drive program;
The drive conversion module is used for converting the drive object of the second drive program from the second device to the first device and converting the drive object of the first drive program from the first device to the second device;
the drive updating module is used for updating the first drive program and the first device and synchronously sending operation instructions to the updated first drive program and second drive program.
The technical scheme provided by the embodiment of the invention has the beneficial effects that:
1. By implementing the drive program control method disclosed by the invention, transient faults of hardware equipment can be corrected in time, the fault tolerance and reliability of the system are improved, and the drive program control method is particularly suitable for systems with high stability requirements;
2. the register of the second device stores the same instruction and execution data as those of the first device, and when the first driving program is abnormal, the program abnormality can be recovered in time;
3. The temporary faults of the equipment are solved in time, and the hardware maintenance cost caused by the return to the factory for maintenance due to the fact that the temporary faults of the hardware equipment cannot be solved in time is reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a method for controlling a driver according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a driver control apparatus according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions 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, and it is apparent that the described embodiments are only some examples of the present invention, not all examples. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Unless defined otherwise, technical or scientific terms used in this disclosure should be given the ordinary meaning as understood by one of ordinary skill in the art to which this disclosure belongs. The terms "first," "second," and the like, as used in this disclosure, do not denote any order, quantity, or importance, but rather are used to distinguish one element from another. Likewise, the terms "a," "an," or "the" and similar terms do not denote a limitation of quantity, but rather denote the presence of at least one. The numerals in the drawings of the specification merely denote distinction of respective functional components or modules, and do not denote logical relationships between the components or modules. The word "comprising" or "comprises", and the like, means that elements or items preceding the word are included in the element or item listed after the word and equivalents thereof, but does not exclude other elements or items. The terms "connected" or "connected," and the like, are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "upper", "lower", "left", "right", etc. are used merely to indicate relative positional relationships, which may also be changed when the absolute position of the object to be described is changed.
Hereinafter, various embodiments according to the present disclosure will be described in detail with reference to the accompanying drawings. Note that in the drawings, the same reference numerals are given to constituent parts having substantially the same or similar structures and functions, and repeated description thereof will be omitted.
Aiming at the problem of abnormal system operation caused by temporary faults of hardware equipment in a server system, the embodiment of the invention discloses a method and a device for controlling a driving program, which timely remove the temporary faults of the hardware equipment and repair the driving program of the corresponding equipment so as to ensure the normal operation of the system, and the specific technical scheme is as follows:
in one embodiment, as shown in fig. 1, a driver control method includes:
step S100: monitoring a first driving program and judging whether the first driving program is abnormal, wherein the first driving program is used for driving a first device;
Step S200: when the first driver is abnormal, stopping the operation of the first driver and the second driver, wherein the second driver is used for driving the second device;
step S300: converting the driving object of the second driving program from the second device to the first device, and converting the driving object of the first driving program from the first device to the second device;
Step S400: updating the first driver and the first device, and synchronously sending operation instructions to the updated first driver and the updated second driver, wherein the operation instructions are respectively used for driving the second device and the updated first device.
Step S100: the first driving program is monitored and whether the first driving program is abnormal or not is judged.
Specifically, the controller detects whether a first driver has a driver abnormality due to a hardware device failure. Common driver anomalies due to hardware device failures mainly include: the function parameter is wrong, the function returns a value wrong, the pointer references wrong, the error is removed, illegal memory pages are accessed, the released memory is released, the unlocked spin lock is unlocked, and the like.
The first device refers to a real hardware device, such as a real network card, a display card, a sound card and the like;
the first driver is a device driver that operates on the viewing hardware device.
Step S200: when the first driver is abnormal, the operation of the first driver and the second driver is stopped, wherein the second driver is used for driving the second device.
Specifically, when the controller monitors that the first driver is abnormal as described above. The controller immediately suspends the operation of the first driver and the second driver.
The second device refers to a simulation device written according to the hardware device specification;
the second driver is a backup of the device driver operating on the real hardware device, the backup driver operating on the emulated device.
The first driver and the second driver are suspended, and optionally, the method is realized in a manner that the controller sends a suspension identifier to the drivers. The first driver and the second driver immediately suspend operation upon receiving the suspend identifier included in the operation instruction. Further, the first driver pauses operation, which causes the first device to pause execution of the action contained in the current operation instruction; the second driver pausing will cause the second device to pause executing the action contained in the current operating instruction. At the same time, instruction state values, abort identifiers, data values (including but not limited to current state data of the respective device) will be saved in registers of the respective device. Namely, the register of the first device stores the instruction state value, the suspension mark and the data value of the first driver; the instruction state value, the abort identifier, and the data value of the second driver are stored in a register of the second device.
Step S300: the driving object of the second driving program is converted from the second device to the first device, and the driving object of the first driving program is converted from the first device to the second device.
Specifically, the method comprises the following steps: the controller changes the preset data items in the management device driving data structure body, so that the driving object of the second driving program is converted into the first device from the second device, and meanwhile, the driving object of the first driving program is converted into the second device from the first device.
Preferably, a data item is added in a main data structure body of the Linux operating system kernel for managing the device driver, and the controller can control the driver to work on the first device or the second device by modifying the data item. Correspondingly, the first driver may be controlled to operate on the first device or the second device by altering such data item in a data structure that manages the first driver; the second driver may be controlled to operate on the second device or the first device by altering such data items in a data structure that manages the second driver.
By the method, the influence of device drivers and hardware device performances can be reduced while the modified code quantity of the device drivers is reduced. Furthermore, the data item may also be used to identify whether the driver is a first driver or a second driver.
Step S400: updating the first driver and the first device, and synchronously sending operation instructions to the updated first driver and the updated second driver, wherein the operation instructions are respectively used for driving the second device and the updated first device.
Specifically, updating the first driver and the first device includes:
Copying the instruction state value and the data value in the register of the second device, and covering the corresponding instruction state value and data value of the first driver;
And copying the instruction state value and the data carried by the second driver to corresponding positions in a register of the first device.
At this time, the controller refreshes the first driver to synchronize the first driver with the second driver; and the controller restores the operation state of the first device to the normal state according to the instruction state and the data value in the second device register.
Since the registers of the second device hold the correct instruction state and data values. Refreshing the first driver to have a synchronized state with the second driver is the controller copying and overwriting instruction state values and data values in registers of the second device with corresponding instruction state values and data values of the first driver.
And the running state of the first device is restored to the normal state, and the controller copies the instruction state value and the data value carried by the second driver to the corresponding position in the register of the first device.
This process can be understood as: the controller initializes the first driver and the first device using the second device and the second driver, respectively. And the initialized parameters are instruction state values and data values which are correctly recorded by the second equipment and the second driving program when the first driving program is abnormal due to the occurrence of faults of the first equipment.
After the updating is completed, the controller receives an operation instruction request sent by the driving program; after receiving the operation instruction request, the controller synchronously sends operation instructions to the first driver and the second driver, wherein the operation instructions are respectively used for driving the second device and the updated first device.
Step S100: the monitoring the first driving program and judging whether the first driving program is abnormal further comprises the following steps:
step S010: and counting the abnormal condition of the first driving program to obtain a historical abnormal counting result.
Specifically, counting the abnormal condition of the first driver, and obtaining the historical abnormal counting result includes:
The abnormal condition of the driver is at least divided into: a first abnormal situation, a second abnormal situation;
in the abnormal situation of the driver, counting the occurrence quantity belonging to the first abnormal situation to obtain a first abnormal quantity;
In the abnormal condition of the driver, counting the occurrence quantity belonging to the second abnormal condition to obtain a second abnormal quantity;
the historical anomaly statistics include: the first abnormal condition and the corresponding first abnormal condition number thereof, and the second abnormal condition and the corresponding second abnormal condition number thereof.
Step S011: judging whether to start the drive program control method according to the historical abnormal statistical result and the abnormal monitoring strategy.
Specifically, the method for judging whether to enable the driver control according to the historical anomaly statistics result and the anomaly monitoring strategy comprises the following steps:
If the first abnormal number exceeds the first threshold value or the second abnormal number exceeds the second threshold value, judging whether the drive program control method is started or not, and if so, judging that the result is yes;
If the first abnormal number does not exceed the first threshold value and the second abnormal number does not exceed the second threshold value, judging whether the drive program control method is started or not, and if not, judging that the result of the drive program control method is NO;
The anomaly monitoring strategy at least comprises the following steps: a first threshold corresponding to a first abnormal condition, and a second threshold corresponding to a second abnormal condition.
Step S012: if yes, starting the control method of the driving program;
step S012': if not, the driver control method is not started.
Through the execution of the steps, the controller can automatically select the inflator to be the driving program control method according to the abnormality monitoring strategy when the error is accumulated to the critical condition in the running process of the system.
Step S010: counting the abnormal condition of the first driving program, and before obtaining the historical abnormal counting result, further comprising:
Step S001: and synchronously sending operation instructions to the first driver and the second driver.
Specifically, the synchronous transmission of the operation instruction to the first driver and the second driver includes:
after the operation instruction is acquired, copying the operation instruction, sending one of the operation instructions to the first driver, and sending the other operation instruction to the second driver;
Storing the instruction state value and data generated after the second device executes the operation instruction into a register of the second device;
and receiving the returned data generated after the first equipment and the second equipment execute the operation instruction, and only using the returned data of the first equipment for external data exchange.
Therefore, the two devices can be guaranteed to normally operate under the same operation instruction, the same instruction state value and data can be obtained, and the two devices are stored in respective registers.
Only the return data (e.g., return value) of the first device is used for external data exchange, so that the system does not identify the second device, and the code amount of the system, which is required to be modified by two sets of drivers and devices, is reduced.
The driver control method further includes:
step S5: and recording a system operation log.
Specifically, a system operation log is recorded for optimizing an anomaly monitoring policy.
The system operation log at least comprises: the number of times the above method is performed, the moment the above method is performed.
Alternatively, the system operation log may further include: globally unique sequence number, timestamp, exception type, etc.; and can also be used to collect the number of times a certain error type occurs per day, within a certain period of time, etc.
Recording in a log form, recording the generated errors and the switching times/times, and analyzing the different dimensions of the error number, the error duty ratio, the switching times and the like to obtain the distribution condition of the hardware equipment and the equipment driving errors, so as to further optimize an abnormality monitoring strategy.
In another embodiment, as shown in fig. 2, a driver control apparatus includes: the abnormality monitoring module 10, the driving suspension module 20, the driving conversion module 30 and the updating module 40;
The abnormality monitoring module 10 is configured to monitor the first driver and determine whether the first driver is abnormal;
A drive suspension module 20 for suspending the operation of the first driver and the second driver;
A drive conversion module 30 for converting the drive object of the second driver from the second device to the first device and converting the drive object of the first driver from the first device to the second device;
the drive update module 40 is configured to update the first driver and the first device, and send an operation instruction to the updated first driver and the updated second driver synchronously.
Any combination of the above optional solutions may be adopted to form an optional embodiment of the present invention, which is not described herein.
Example 1
The embodiment discloses a driver control method, which comprises the following steps:
Step S001: and synchronously sending operation instructions to the first driver and the second driver.
After the operation instruction is acquired, copying the operation instruction, sending one of the operation instructions to the first driver, and sending the other operation instruction to the second driver;
Storing the instruction state value and data generated after the second device executes the operation instruction into a register of the second device;
and receiving the returned data generated after the first equipment and the second equipment execute the operation instruction, and only using the returned data of the first equipment for external data exchange.
Step S010: and counting the abnormal condition of the first driving program to obtain a historical abnormal counting result.
The abnormal condition of the driver is at least divided into: a first abnormal situation, a second abnormal situation;
in the abnormal situation of the driver, counting the occurrence quantity belonging to the first abnormal situation to obtain a first abnormal quantity;
In the abnormal condition of the driver, counting the occurrence quantity belonging to the second abnormal condition to obtain a second abnormal quantity;
the historical anomaly statistics include: the first abnormal condition and the corresponding first abnormal condition number thereof, and the second abnormal condition and the corresponding second abnormal condition number thereof.
Step S011: judging whether to start the drive program control method according to the historical abnormal statistical result and the abnormal monitoring strategy.
If the first abnormal number exceeds the first threshold value or the second abnormal number exceeds the second threshold value, judging whether the drive program control method is started or not, and if so, judging that the result is yes;
if the first abnormal number does not exceed the first threshold value and the second abnormal number does not exceed the second threshold value, judging whether the driver control method is started or not, and judging that the result is NO.
Step S012: if yes, starting the control method of the driving program;
step S012': if not, the driver control method is not started.
Step S100: the first driving program is monitored and whether the first driving program is abnormal or not is judged.
And detecting whether the first driver is abnormal or not due to the fault of the hardware equipment. Comprising the following steps: the function parameter is wrong, the function returns a value wrong, the pointer references wrong, the error is removed, illegal memory pages are accessed, the released memory is released, the unlocked spin lock is unlocked, and the like.
Step S200: when the first driver is abnormal, the operation of the first driver and the second driver is stopped.
The first driver and the second driver are suspended by the controller sending a suspension identification to the drivers. The first driver and the second driver immediately suspend operation upon receiving the suspend identifier included in the operation instruction. Further, the first driver pauses operation, which causes the first device to pause execution of the action contained in the current operation instruction; the second driver pausing will cause the second device to pause executing the action contained in the current operating instruction. At the same time, instruction state values, abort identifiers, data values (including but not limited to current state data of the respective device) will be saved in registers of the respective device. Namely, the register of the first device stores the instruction state value, the suspension mark and the data value of the first driver; the instruction state value, the abort identifier, and the data value of the second driver are stored in a register of the second device.
Step S300: the driving object of the second driving program is converted from the second device to the first device, and the driving object of the first driving program is converted from the first device to the second device.
The change management device drives preset data items in the data structure body, so that the driving object of the second driving program is converted into the first device from the second device, and meanwhile, the driving object of the first driving program is converted into the second device from the first device.
Step S400: updating the first driver and the first device, and synchronously sending operation instructions to the updated first driver and the updated second driver, wherein the operation instructions are respectively used for driving the second device and the updated first device.
Copying the instruction state value and the data value in the register of the second device, and covering the corresponding instruction state value and data value of the first driver;
And copying the instruction state value and the data carried by the second driver to corresponding positions in a register of the first device.
At this time, the controller refreshes the first driver to synchronize the first driver with the second driver; and the controller restores the operation state of the first device to the normal state according to the instruction state and the data value in the second device register.
Since the registers of the second device hold the correct instruction state and data values. Refreshing the first driver to have a synchronized state with the second driver is the controller copying and overwriting instruction state values and data values in registers of the second device with corresponding instruction state values and data values of the first driver.
And the running state of the first device is restored to the normal state, and the controller copies the instruction state value and the data value carried by the second driver to the corresponding position in the register of the first device.
After the updating is completed, the controller receives an operation instruction request sent by the driving program; after receiving the operation instruction request, the controller synchronously sends operation instructions to the first driver and the second driver, wherein the operation instructions are respectively used for driving the second device and the updated first device.
Step S5: and recording a system operation log for optimizing an abnormality monitoring strategy.
Example two
As shown in fig. 2, the present embodiment discloses a driver control apparatus, including: the abnormality monitoring module 10, the driving suspension module 20, the driving conversion module 30 and the updating module 40;
The abnormality monitoring module 10 is configured to monitor the first driver and determine whether the first driver is abnormal;
A drive suspension module 20 for suspending the operation of the first driver and the second driver;
A drive conversion module 30 for converting the drive object of the second driver from the second device to the first device and converting the drive object of the first driver from the first device to the second device;
the drive update module 40 is configured to update the first driver and the first device, and send an operation instruction to the updated first driver and the updated second driver synchronously.
In particular, according to embodiments of the present application, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program loaded on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via a communication device, or from memory, or from ROM. The above-described functions defined in the method of the embodiment of the present application are performed when the computer program is executed by an external processor.
It should be noted that, the computer readable medium of the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In embodiments of the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in embodiments of the present application, the computer-readable signal medium may comprise a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (Radio Frequency), and the like, or any suitable combination thereof.
The computer readable medium may be contained in the server; or may exist alone without being assembled into the server. The computer readable medium carries one or more programs which, when executed by the server, cause the server to: acquiring a frame rate of an application on the terminal in response to detecting that a peripheral mode of the terminal is not activated; when the frame rate meets the screen-extinguishing condition, judging whether a user is acquiring screen information of the terminal; and controlling the screen to enter an immediate dimming mode in response to the judgment result that the user does not acquire the screen information of the terminal.
Computer program code for carrying out operations for embodiments of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for a system or system embodiment, since it is substantially similar to a method embodiment, the description is relatively simple, with reference to the description of the method embodiment being made in part. The systems and system embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
The foregoing has outlined rather broadly the more detailed description of the application in order that the detailed description of the application that follows may be better understood, and in order that the present principles and embodiments may be better understood; also, it is within the scope of the present application to be modified by those of ordinary skill in the art in light of the present teachings. In view of the foregoing, this description should not be construed as limiting the application.
The foregoing description of the preferred embodiments of the invention is not intended to limit the invention to the precise form disclosed, and any such modifications, equivalents, and alternatives falling within the spirit and scope of the invention are intended to be included within the scope of the invention.

Claims (9)

1. A method of driver control, the method comprising:
monitoring a first driver and judging whether the first driver is abnormal, wherein the first driver is used for driving a first device;
When the first driver is abnormal, stopping the operation of the first driver and a second driver, wherein the second driver is used for driving a second device;
Converting a driving object of the second driver from the second device to the first device, and converting the driving object of the first driver from the first device to the second device;
Updating the first driver and the first device, and synchronously sending operation instructions to the updated first driver and the updated second driver, wherein the operation instructions are respectively used for driving the second device and the updated first device;
the monitoring the first driving program and judging whether the first driving program is abnormal further comprises the following steps:
Counting the abnormal condition of the first driving program to obtain a historical abnormal counting result;
The step of counting the abnormal condition of the first driving program, and the step of obtaining historical abnormal counting results comprises the following steps:
Dividing the abnormal condition of the driver into at least: a first abnormal situation, a second abnormal situation;
in the abnormal situation of the driver, counting the occurrence quantity belonging to the first abnormal situation to obtain a first abnormal quantity;
in the abnormal condition of the driver, counting the occurrence quantity belonging to the second abnormal condition to obtain a second abnormal quantity;
the historical anomaly statistics include: the first abnormal condition and the corresponding first abnormal condition number thereof, and the second abnormal condition and the corresponding second abnormal condition number thereof.
2. The method according to claim 1, wherein the converting the driving object of the second driver from the second device to the first device, and converting the driving object of the first driver from the first device to the second device, comprises:
The change management device drives preset data items in a data structure body, so that a driving object of the second driver is converted into the first device by the second device, and meanwhile, the driving object of the first driver is converted into the second device by the first device.
3. The driver control method of claim 1, wherein the updating the first driver and the first device comprises:
Copying the instruction state value and the data value in the register of the second device, and covering the corresponding instruction state value and data value of the first driver;
and copying the instruction state value and the data value carried by the second driver to corresponding positions in a register of the first device.
4. The method of claim 1, wherein the monitoring the first driver and determining whether the first driver is abnormal further comprises:
Judging whether the driver control method is started or not according to the historical abnormal statistical result and an abnormal monitoring strategy;
If yes, starting the control method of the driving program;
if not, the driver control method is not started.
5. The method of claim 4, wherein said determining whether to enable the driver control method based on the historical anomaly statistics and anomaly monitoring policy comprises:
if the first abnormal number exceeds the first threshold value or the second abnormal number exceeds the second threshold value, the judgment whether the driver control method is started is yes;
If the first abnormal number does not exceed the first threshold value and the second abnormal number does not exceed the second threshold value, the judging whether the driver control method is started is judged to be NO;
Wherein, the anomaly monitoring strategy at least comprises: a first threshold corresponding to a first abnormal condition, and a second threshold corresponding to a second abnormal condition.
6. The method according to claim 4, wherein said counting anomalies of said first driver, before obtaining historical anomaly statistics, further comprises:
and synchronously sending operation instructions to the first driver and the second driver.
7. The method according to claim 6, wherein said sending operation instructions to said first driver and said second driver synchronously comprises:
copying the operation instructions after the operation instructions are acquired, sending one of the operation instructions to a first driver, and sending the other operation instruction to a second driver;
Storing an instruction state value and a data value generated after the second equipment executes the operation instruction into a register of the second equipment;
and receiving the returned data generated after the first equipment and the second equipment execute the operation instruction, and only using the returned data of the first equipment for external data exchange.
8. The driver control method of claim 1, wherein the method further comprises: recording a system operation log for optimizing an abnormality monitoring strategy;
Wherein, the system operation log at least comprises: the number of times the method is performed, the moment the method is performed.
9. Driver control apparatus for implementing a driver control method according to any of claims 1-8, said apparatus comprising: the device comprises an abnormality monitoring module, a driving suspension module, a driving conversion module and a driving updating module;
the abnormality monitoring module is used for monitoring a first driving program and judging whether the first driving program is abnormal or not;
The drive suspension module is used for suspending the operation of the first drive program and the second drive program;
the drive conversion module is used for converting a drive object of the second drive program from second equipment to first equipment and converting the drive object of the first drive program from the first equipment to the second equipment;
the drive updating module is used for updating the first drive program and the first device and synchronously sending operation instructions to the updated first drive program and the updated second drive program.
CN202210292462.XA 2022-03-23 2022-03-23 A driver control method and device Active CN114816813B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210292462.XA CN114816813B (en) 2022-03-23 2022-03-23 A driver control method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210292462.XA CN114816813B (en) 2022-03-23 2022-03-23 A driver control method and device

Publications (2)

Publication Number Publication Date
CN114816813A CN114816813A (en) 2022-07-29
CN114816813B true CN114816813B (en) 2024-06-25

Family

ID=82531340

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210292462.XA Active CN114816813B (en) 2022-03-23 2022-03-23 A driver control method and device

Country Status (1)

Country Link
CN (1) CN114816813B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109710444A (en) * 2018-12-26 2019-05-03 九逸(北京)信息技术有限公司 The method and relevant device of the abnormality processing of intelligent hospital information system
CN112395121A (en) * 2019-08-15 2021-02-23 奇安信安全技术(珠海)有限公司 Drive loading processing method and device, storage medium and computer equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112631661B (en) * 2020-12-16 2024-04-02 中国电子信息产业集团有限公司 Program security control methods, devices, equipment and storage media

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109710444A (en) * 2018-12-26 2019-05-03 九逸(北京)信息技术有限公司 The method and relevant device of the abnormality processing of intelligent hospital information system
CN112395121A (en) * 2019-08-15 2021-02-23 奇安信安全技术(珠海)有限公司 Drive loading processing method and device, storage medium and computer equipment

Also Published As

Publication number Publication date
CN114816813A (en) 2022-07-29

Similar Documents

Publication Publication Date Title
US20240012706A1 (en) Method, system and apparatus for fault positioning in starting process of server
EP3036633B1 (en) Cloud deployment infrastructure validation engine
JP5713056B2 (en) Process control apparatus and system and update method thereof
US8458510B2 (en) LPAR creation and repair for automated error recovery
US10175973B2 (en) Microcode upgrade in a storage system
CN107634860B (en) Method for automatically upgrading weblogic cluster patches in batches
JP2014130585A (en) Firmware upgrade error detection and automatic rollback
US20140025991A1 (en) Core diagnostics and repair
CN114218180B (en) A method and device for adjusting and printing log levels of a running system
US9600265B2 (en) Updating elements in data storage facility using predefined state machine over extended time period
CN118734994A (en) A Distributed Machine Learning Approach in Heterogeneous Computing
CN105607973A (en) Method, device and system for processing equipment failures in virtual machine system
CN114647454A (en) Installation method and system based on PXE service
US9953293B2 (en) Method for controlling changes of replication directions in a multi-site disaster recovery environment for high available application
CN114816813B (en) A driver control method and device
CN111897626A (en) Cloud computing scene-oriented virtual machine high-reliability system and implementation method
CN105279042A (en) Redundant backup system and method for BSD system
CN105988885B (en) Operating system failure self-recovery method based on compensation rollback
CN111682987B (en) Real vehicle environment simulation and rapid test system based on OSEK NM
CN119668916A (en) Cluster system fault handling method, system, device, equipment, medium and program
CN119127254A (en) Hard disk firmware upgrade method, device, electronic device and storage medium
CN109116818B (en) Real-time data dump method and device during SCADA system upgrade
CN119127609A (en) Processor status monitoring method, device, equipment and medium
CN116149954A (en) Intelligent operation and maintenance system and method for server
CN115964142A (en) Application service management method, device and storage medium

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
CP03 Change of name, title or address

Address after: 215168 Jiangsu Province, Suzhou City, Wuzhong Economic Development Zone, Guoqiang Street, Guanpu Road No. 1, Building 9

Patentee after: Suzhou Yuannao Intelligent Technology Co.,Ltd.

Country or region after: China

Address before: 215168 Jiangsu Province, Suzhou City, Wuzhong Economic Development Zone, Guoqiang Street, Guanpu Road No. 1, Building 9

Patentee before: SUZHOU LANGCHAO INTELLIGENT TECHNOLOGY Co.,Ltd.

Country or region before: China

CP03 Change of name, title or address