CN114064234B - Method and device for repairing WMI service - Google Patents

Method and device for repairing WMI service Download PDF

Info

Publication number
CN114064234B
CN114064234B CN202111218284.8A CN202111218284A CN114064234B CN 114064234 B CN114064234 B CN 114064234B CN 202111218284 A CN202111218284 A CN 202111218284A CN 114064234 B CN114064234 B CN 114064234B
Authority
CN
China
Prior art keywords
wmi
service
module
indication information
interrupt
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
CN202111218284.8A
Other languages
Chinese (zh)
Other versions
CN114064234A (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.)
Honor Device Co Ltd
Original Assignee
Honor Device 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 Honor Device Co Ltd filed Critical Honor Device Co Ltd
Publication of CN114064234A publication Critical patent/CN114064234A/en
Application granted granted Critical
Publication of CN114064234B publication Critical patent/CN114064234B/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/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4812Task transfer initiation or dispatching by interrupt, e.g. masked
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1438Restarting or rejuvenating
    • 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/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/48Indexing scheme relating to G06F9/48
    • G06F2209/481Exception handling

Abstract

The application relates to the field of terminals and provides a method and a device for repairing WMI service. The method is applied to an electronic device, the electronic device comprises a first module, and the method comprises the following steps: the first module sends first indication information to the WMI service at a first moment, and the first indication information indicates the WMI service to send WMI interruption to the first module; the first module monitors WMI interruption; if the first module does not receive WMI interruption in the first preset time period, the first module restarts the WMI service. The reason for the abnormal hot key function may be that WMI service is abnormal, and cannot notify the SCI generation event to the first module, and there is a certain probability for restarting the WMI service to solve the problem that the WMI service cannot transmit the SCI generation event. After the first module sends the first indication information, if WMI interruption is not received within a preset time period, the WMI service is abnormal, the first module can restart the WMI service, and therefore the problem of abnormal hot key functions can be solved.

Description

Method and device for repairing WMI service
Technical Field
The application relates to the field of terminals, in particular to a repair window management specification (A)
Figure BDA0003311383160000011
management information, WMI) service.
Background
The hot key is a shortcut key for realizing a specific function of the terminal equipment, and a user can define the function of the hot key by self. For example, a user may open a computer manager Application (APP) by pressing F10 on a keyboard of a notebook computer.
In some scenarios, the function of the custom hotkey may be abnormal, for example, the user presses F10, and the hostess APP does not respond, thereby degrading the user experience.
Disclosure of Invention
The embodiment of the application provides a method and a device for repairing WMI service, a computer readable storage medium and a computer program product, which can solve the problem of abnormal hot key function and improve user experience.
In a first aspect, a method for repairing WMI service is provided, where the method is applied to an electronic device, where the electronic device includes a first module, and the method includes: the first module sends first indication information to the WMI service, and the first indication information indicates the WMI service to send WMI interruption to the first module; the first module monitors WMI interruption; if the first module does not receive WMI interruption in the first preset time period, the first module restarts the WMI service.
The first module is, for example, an on-screen display (OSD) service. After a user presses a hotkey, a chip of the terminal device generates a System Control Interrupt (SCI), an SCI generation event (i.e., WMI interrupt) is transmitted to an OSD service through an SCI event service in a Basic Input Output System (BIOS) and a WMI service (Winmgmt) in an Operating System (OS), and after receiving the SCI, the OSD service determines a function corresponding to the hotkey according to an identifier in the SCI generation event and implements the function. In general, the reason why the hotkey function is abnormal is that WMI service is abnormal, SCI generation events cannot be notified to APPs of an application layer, and restarting WMI service has a certain probability to solve the problem that WMI service cannot transmit SCI generation events. In this embodiment, after the OSD service sends the first indication information, if the OSD service does not receive WMI interrupt within the preset time period, it indicates that the WMI service is abnormal, and the OSD service may restart the WMI service, so that the problem of abnormal hot key function may be solved.
In an alternative embodiment, the electronic device further comprises a WMI module, and the method further comprises: the WMI service responds to the first indication information and sends second indication information to the WMI module, and the second indication information indicates the WMI module to send WMI interrupt to the WMI service; the WMI module generates WMI interrupt according to the second indication information; the WMI module sends a WMI interrupt to the WMI service.
The second indication information may be the same as the first indication information or may be different from the first indication information; that is, the WMI service may forward the first indication information to the WMI service, or may generate the second indication information based on the first indication information. After receiving the second indication information, the WMI module directly sends WMI interrupt to the WMI service without SCI event service processing, so that whether the WMI service is abnormal or not can be quickly determined.
In an optional embodiment, the method further comprises: if the first module receives WMI interruption in a first preset time period, the first module acquires identification information from the WMI module through WMI service, wherein the identification information is information associated with the identification in the first indication information; and if the first module does not receive the identification information in the second preset time period, the first module restarts the WMI service.
The first module receives WMI interruption in a first preset time period, and shows that the function of the WMI service in the first preset time period is normal. If the first module does not receive the identification information within the second preset time period, it may be that the WMI service has failed within the second preset time period, and the first module may attempt to repair the WMI service by restarting the WMI service.
In an optional embodiment, the method further comprises: if the first module receives WMI interruption in a first preset time period, the first module empties a first counter, and the first counter is used for recording the continuous restarting times of WMI service.
Emptying the first counter can enable the first module to restart the WMI service for many times when the subsequent WMI service is abnormal, and the probability of repairing the hot key function is improved.
In an alternative embodiment, the first module restarts the WMI service, including: the first module restarts the WMI service when the value of a first counter is smaller than a first threshold value, and the first counter is used for recording the continuous restart times of the WMI service.
If the continuous restart times of the WMI service are smaller than the first threshold value, the first module can try to restart the WMI service for multiple times, and the probability of repairing the WMI service is improved.
In an alternative embodiment, the method further comprises: the first module increments a first counter by 1 upon restarting the WMI service.
If the continuous restart times of the WMI service are larger than or equal to the first threshold, the abnormal problem of the hot key function is difficult to solve by restarting the WMI service, the WMI service is continuously restarted, only signaling overhead and electric quantity consumption are increased, in this case, the WMI service is stopped to be restarted and the user is prompted that the hot key function is abnormal, and the number of the first counter is increased by 1, so that the WMI service is prevented from being restarted for too many times, and the signaling overhead and the electric quantity consumption are reduced.
In an optional implementation manner, the first module sends first indication information to the WMI service, including: the first module periodically transmits first indication information to the WMI service.
The first module can periodically send the first indication information without user participation, so that the problem of abnormal hot key functions can be solved under the condition that a user feels nothing, and the user experience is improved.
In an alternative embodiment, the first module sends the first indication information to the WMI service, and includes: the first module sends first indication information to the WMI service according to a hot key function repairing instruction input by a user.
The first module can also send the first indication information according to the instruction of the user without periodically sending the first indication information, thereby reducing signaling overhead and electric quantity consumption. The embodiment is suitable for the terminal equipment in the power saving mode.
In a second aspect, another method for repairing WMI service is provided, where the method is applied to an electronic device, where the electronic device includes a first module, and the method includes: the first module sends first indication information to the WMI service, and the first indication information indicates the WMI service to send WMI interruption to the first module; the first module monitors WMI interruption; if the first module does not receive WMI interruption in the first preset time period, the first module restarts the WMI service.
The first module is, for example, an on-screen display (OSD) service. After a user presses a hotkey, a chip of the terminal device generates a System Control Interrupt (SCI), an SCI generation event (i.e., WMI interrupt) is transmitted to an OSD service through an SCI event service in a Basic Input Output System (BIOS) and a WMI service (Winmgmt) in an Operating System (OS), and after receiving the SCI, the OSD service determines a function corresponding to the hotkey according to an identifier in the SCI generation event and implements the function. In general, the reason why the hotkey function is abnormal is that WMI service is abnormal, SCI generation events cannot be notified to APPs of an application layer, and restarting WMI service has a certain probability to solve the problem that WMI service cannot transmit SCI generation events. In this embodiment, after the OSD service sends the first indication information, if the OSD service does not receive WMI interrupt within the preset time period, it indicates that the WMI service is abnormal, and the OSD service may restart the WMI service, so that the problem of abnormal hot key function may be solved.
In an optional embodiment, the electronic device further includes a WMI module, an Embedded Controller (EC), and an SCI event service, and the method further includes: the WMI service responds to the first indication information and sends second indication information to the WMI module; the WMI module writes the interrupt event into a Random Access Memory (RAM) of the EC according to the second indication information; the EC sends SCI interruption information to the SCI event service according to the interruption event; SCI event service generates WMI interrupt according to SCI interrupt information; the SCI event service sends a WMI interrupt to the WMI service.
The reason for the abnormal hot key function may be that the EC and SCI event services are abnormal, and the problem cannot be solved by restarting the WMI service. In this embodiment, the WMI module writes the interrupt event into the EC RAM according to the second indication information, and then the EC sends the SCI interrupt information to the SCI event service according to the interrupt event; the SCI event service generates WMI interrupt according to SCI interrupt information and sends the WMI interrupt to the WMI service, thereby testing whether the EC and SCI event services are normal. If the OSD service does not receive WMI interruption within the first preset time period, which indicates that the EC and SCI event services may be abnormal, the manufacturer of the electronic device may repair the hot key function by checking the fault repair hot key function of the EC and SCI event services, thereby improving the probability of repairing the hot key function.
In an alternative embodiment, the EC sending SCI interrupt information to the SCI event service based on the interrupt event includes: EC pulls down the level of SCI pin according to the interrupt event; SCI event service inquires interrupt information to EC according to level reduction of SCI pin; the EC sends SCI interrupt information to the SCI event service based on the query of the SCI event service.
In an optional embodiment, the method further comprises: if the first module receives WMI interruption in a first preset time period, the first module acquires identification information from WMI through WMI service, wherein the identification information is information associated with an identification in the first indication information; and if the first module does not receive the identification information in the second preset time period, the first module restarts the OS.
The first module receives WMI interruption in a first preset time period, and shows that the function of the WMI service in the first preset time period is normal. If the first module does not receive the identification information within the second preset time period, a fault may occur in the WMI service within the second preset time period, or a fault may occur in the OS within the second preset time period, the probability that the OS sends the fault is high, and the first module may attempt to repair the hot key function by restarting the OS.
In an alternative embodiment, the first module reboots the OS, including: the first module restarts the OS when the value of the second counter is less than a second threshold.
If the continuous restart times of the OS are smaller than the second threshold value, the first module can try to restart the OS for multiple times, and the probability of repairing the hot key function is improved.
In an optional embodiment, the method further comprises: the first module adds 1 to the value of a second counter when the OS is restarted, wherein the second counter is used for recording the continuous restart times of the OS.
If the continuous restart times of the OS is larger than or equal to the second threshold, the abnormal problem of the hot key function is difficult to solve by restarting the OS, the OS is restarted continuously, only signaling overhead and power consumption are increased, in this case, the OS is stopped to be restarted, the user is prompted that the hot key function is abnormal, and the numerical value of the second counter is increased by 1, so that the condition that the OS is restarted for too many times can be avoided, and the signaling overhead and the power consumption are reduced.
In an alternative embodiment, the method further comprises: if the first module receives WMI interruption in a first preset time period, the first module empties a first counter, and the first counter is used for recording the continuous restarting times of WMI service.
The first counter is cleared, so that the first module can restart the WMI service for many times when the subsequent WMI service is abnormal, and the probability of repairing the hot key function is improved.
In an alternative embodiment, the first module restarts the WMI service, including: the first module restarts the WMI service when the value of the first counter is less than a first threshold.
If the continuous restart times of the WMI service are smaller than the first threshold value, the first module can try to restart the WMI service for multiple times, and the probability of repairing the hot key function is improved.
In an optional embodiment, the method further comprises: the first module increments the value of the first counter by 1 when restarting the WMI service.
If the WMI service cannot be repaired after being restarted for multiple times, the abnormal problem of the hot key function is difficult to solve by restarting the WMI service, the WMI service is only restarted and signaling overhead and electric quantity consumption are only increased, the WMI service is stopped being restarted and the user is prompted that the hot key function is abnormal under the condition, and the number of the first counter is increased by 1, so that the WMI service can be prevented from being restarted for too many times, and the signaling overhead and the electric quantity consumption are reduced.
In an optional implementation manner, the first module sends first indication information to the WMI service, including: the first module periodically transmits first indication information to the WMI service.
The first module can periodically send the first indication information without user participation, so that the problem of abnormal hot key function can be solved under the condition that the user feels no sense, and the user experience is improved.
In an optional implementation manner, the first module sends first indication information to the WMI service, including: the first module sends first indication information to the WMI service according to a hot key function repairing instruction input by a user.
The first module can also send the first indication information according to the instruction of the user without periodically sending the first indication information, thereby reducing signaling overhead and electric quantity consumption. The embodiment is suitable for the terminal equipment in the power saving mode.
In a third aspect, an apparatus for repairing WMI services is provided, comprising means for performing any of the methods of the first or second aspects. The device can be a terminal device or a chip in the terminal device. The apparatus may include a communication unit and a processing unit.
When the apparatus is a terminal device, the processing unit may be a processor, and the communication unit may be a communication interface; the terminal device may further comprise a memory for storing computer program code which, when executed by the processor, causes the terminal device to perform any of the methods of the first aspect or causes the terminal device to perform any of the methods of the second aspect.
When the apparatus is a chip in a terminal device, the processing unit may be a logic processing unit inside the chip, and the input unit may be an output interface, a pin, a circuit, or the like; the chip may also include a memory, which may be a memory within the chip (e.g., registers, cache, etc.) or a memory external to the chip (e.g., read only memory, random access memory, etc.); the memory is adapted to store computer program code which, when executed by the processor, causes the chip to perform any of the methods of the first aspect or causes the chip to perform any of the methods of the second aspect.
In a fourth aspect, a computer readable storage medium is provided, which stores computer program code, which, when executed by an apparatus for repairing WMI services, causes the apparatus to perform any one of the methods of the first aspect or causes the apparatus to perform any one of the methods of the second aspect.
In a fifth aspect, there is provided a computer program product comprising: computer program code for causing an apparatus to perform any of the methods of the first aspect or causing the apparatus to perform any of the methods of the second aspect when said computer program code is run by the apparatus repairing WMI services.
Drawings
FIG. 1 is a schematic diagram of a hardware system suitable for use in the apparatus of the present application;
FIG. 2 is a schematic diagram of a software system suitable for use in the apparatus of the present application;
FIG. 3 is a flow chart illustrating an exemplary process for obtaining interrupt information by SCI event service according to the present application;
FIG. 4 is a schematic illustration of one scenario suitable for use in the present application;
FIG. 5 is a schematic flow chart diagram illustrating a method for repairing hot key functions provided herein;
FIG. 6 is a signaling diagram of a method for repairing hotkey functionality provided herein;
FIG. 7 is a schematic flow chart diagram of another method for repairing hot key functions provided herein;
fig. 8 is a signaling diagram of another method for repairing hotkey functionality provided herein.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 1 shows a hardware structure of an apparatus suitable for the present application.
The device may be fitted with
Figure BDA0003311383160000051
Mobile phone, smart screen, tablet computer, wearable electronic equipment and vehicle-mounted electronic equipment of systemExamples of the present application include, but are not limited to, an Augmented Reality (AR) device, a Virtual Reality (VR) device, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a Personal Digital Assistant (PDA), a projector, and the like, and specific types of devices shown in fig. 1 are not limited in any way.
The apparatus may include a processor, read-only memory (ROM), hard disk, EC, keyboard, and display.
A processor may include one or more processing units. For example, the processor may comprise at least one of the following processing units: an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a video codec, a Digital Signal Processor (DSP), a baseband processor, and a neural Network Processor (NPU). The different processing units may be independent devices or integrated devices.
A memory may also be provided in the processor for storing instructions and data. In some embodiments, the memory in the processor is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor. If the processor needs to reuse the instruction or data, it can be called directly from the memory. Avoiding repeated accesses reduces the latency of the processor and thus increases the efficiency of the system.
In some embodiments, a processor may include one or more interfaces. For example, the processor may include at least one of the following interfaces: a Serial Peripheral Interface (SPI), a peripheral component interconnect express (PCIe) bus, a Low Pin Count (LPC) bus, and an embedded display interface (eDP).
SPI is a high-speed, full-duplex, synchronous communication bus, generally consisting of a master module and a plurality of slave modules, the master module selecting one slave module for synchronous communication to complete the exchange of data. The SPI occupies fewer chip pins, and the chip pins are saved. In some embodiments, the processor is connected to the ROM via the SPI, and obtains the code of the BIOS from the ROM, and implements the function of the BIOS by running the code of the BIOS.
The PCIe bus is a high speed serial computer expansion bus with greater system bus throughput, fewer pin counts, and physical size. In some embodiments, the processor is connected to the hard disk through a PCIe bus, obtains codes of the operating system and the application layer APP from the hard disk, and implements functions of the operating system and the application layer APP by running the codes of the operating system and the application layer APP.
The LPC bus is typically used for the connection of low bandwidth devices. In some embodiments, the processor is coupled to the EC via the LPC bus to enable data interaction with the EC.
eDP is an image transmission interface with high transmission rate and low power consumption, and includes a main channel (main link), an auxiliary channel (auxiliary channel), and a link tracing. In some embodiments, the processor is connected with the display screen through the eDP, and data interaction between the processor and the display screen is realized.
The display screen may be used to display images or video. The display screen includes a display panel, which may adopt a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Mini light-emitting diode (Mini LED), a Micro light-emitting diode (Micro LED), a Micro OLED (Micro OLED), or a quantum dot light-emitting diode (QLED). In some embodiments, the device shown in fig. 1 may include 1 or more display screens.
The EC and the keyboard are connected with the keyboard through a Key Source International (KSI) bus or a key board send (KSO) bus, and the key-press behavior of the user is monitored through the KSI bus or the KSO bus. In addition, the EC is connected with the ROM through the SPI, the EC codes are obtained from the ROM, and the EC functions are achieved by running the EC codes.
The double-headed arrows in fig. 1 indicate data buses for transmitting data such as interrupt information; the arrowed lines in fig. 1 represent control lines for transmitting control signals, such as interrupts.
The structure shown in fig. 1 is not intended to limit the device applied to the present application. In other embodiments of the present application, an apparatus suitable for use in the present application may include more or fewer components than shown in FIG. 1, or an apparatus suitable for use in the present application may include a combination of some of the components shown in FIG. 1, or an apparatus suitable for use in the present application may include sub-components of some of the components shown in FIG. 1. The components shown in fig. 1 may be implemented in hardware, software, or a combination of software and hardware.
The connection relationship between the modules shown in fig. 1 is merely illustrative, and is not intended to limit the connection relationship between the modules.
A hardware system suitable for the apparatus of the present application is described in detail above, and a software system suitable for the apparatus is described below. The embodiment of the present application takes a layered architecture as an example, and exemplarily describes a software system of the apparatus.
As shown in fig. 2, the software system adopting the layered architecture is divided into a plurality of layers, and each layer has a clear role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the software system may be divided into three layers, an application layer, an OS layer, and a BIOS from top to bottom. The working flow of the software system is described below by taking hotkey detection as an example.
S210, after the user presses the hot key, the hot key generates a hardware signal.
S220, after detecting the hardware signal, the EC determines the identifier of the hot key corresponding to the hardware signal through row scanning and column scanning; subsequently, the EC triggers the SCI, i.e., the EC pulls down the SCI pin level of the EC; after the SCI event service senses that the level of the SCI pin of the EC is lowered, the EC queries the interrupt information through the LPC bus, and the EC reports the interrupt information to the SCI event service through the LPC bus, as shown in fig. 3.
Interrupt information reported by the EC to the SCI event service via the LPC bus is used to indicate a hot key press, and the interrupt information includes an Identifier (ID) of the hot key. Illustratively, ID 0x10 represents a hotkey F7; ID 0x11 indicates a hot key F8.
S230, the SCI event service converts the hotkey ID acquired from the EC into a hotkey ID corresponding to an on-screen display (OSD) service, and stores the hotkey ID corresponding to the OSD service in the WMI module.
And S240, generating a WMI interrupt by the SCI event service, and sending the WMI interrupt to the WMI service of the OS layer, wherein the WMI interrupt is used for informing the WMI service of the occurrence of the SCI event.
The execution sequence of S230 and S240 is not sequential.
S250, after receiving the WMI interrupt, the WMI interrupt is forwarded to the OSD service by the WMI service, wherein after the electronic equipment is started, the WMI interrupt monitoring is registered in the WMI service by the PC housekeeper through the OSD service, and the WMI interrupt monitoring is used for: and when the WMI interrupt is received by the WMI service, forwarding the WMI interrupt to the OSD service.
And S260, after receiving the WMI interrupt, the OSD service acquires the hot key ID corresponding to the OSD service from the WMI module through the WMI service, and specifically, the OSD service calls a Read/Write (Read/Write) interface of the WMI service to acquire the hot key ID corresponding to the OSD service from the WMI module (WMI method).
And after the OSD service of the computer manager APP receives the hot key ID corresponding to the OSD service, starting the corresponding hot key function. For example, the hotkey function corresponding to the hotkey function ID is to open a main interface of a computer housekeeper, and the computer housekeeper APP can control the display screen to display the interface shown in fig. 4.
In some cases, the WMI service may be abnormal and unable to notify the APP of the application layer of the SCI generation event (i.e., WMI interrupt), so that the notebook computer cannot display the interface shown in fig. 4 after the user presses the hot key.
The method for repairing a hot bond provided by the present application is described below. As shown in fig. 5. The method comprises the following steps.
S501, after the computer manager is started, a heartbeat command is sent to the WMI service through the OSD service at the first time, and the heartbeat command indicates the WMI service to call the WMI module to send WMI interrupt to the OSD service.
The heartbeat command may include a heartbeat ID1, and the specific form of the heartbeat command is not limited in the present application.
In an alternative embodiment, the computer steward may send the heartbeat command periodically, for example, every 30 seconds. When the hot key function fails, the hot key function can be automatically repaired through the steps described below, so that the problem of abnormal hot key function can be solved under the condition that a user feels no sense, and the user experience is improved.
In another alternative embodiment, the cyber attendant may receive a hot key function detection instruction of the user, and send a heartbeat command to the WMI service at a first time according to the hot key function detection instruction. Namely, the computer manager can wait for the user to find the hot key function fault and send the hot key function detection instruction, and then send the heartbeat command without periodically sending the heartbeat command, thereby reducing signaling overhead and electric quantity consumption. The embodiment is suitable for the terminal equipment in the power saving mode.
S502, after receiving the heartbeat command, the WMI service forwards the heartbeat command to a WMI module of the BIOS through the read/write interface, instructs the WMI module to generate WMI interruption, and sends the WMI interruption to the WMI service.
And S503, after receiving the heartbeat command of the WMI service, the WMI module generates a WMI interrupt and sends the WMI interrupt to the WMI service.
The WMI interrupt is used for testing whether the function of forwarding the WMI interrupt by the WMI is normal, and therefore the WMI interrupt can be any WMI interrupt.
And S504, after receiving the WMI interrupt, the WMI service forwards the WMI interrupt to the OSD service.
If the forwarding function of the WMI service is normal, the OSD service can receive WMI interruption in a first preset time period; if the forwarding function of the WMI service is abnormal, the OSD service cannot receive WMI interruption within a first preset time period. Therefore, the OSD service may determine whether the forwarding function of the WMI is normal according to whether the WMI interrupt is received within the first preset period.
The OSD service determines whether a WMI interrupt is received within a first preset period S505.
The first preset time period may be a time period with a duration of 1s from the first time, or other time periods, and the application does not limit features such as the duration of the first preset time period.
If the OSD service receives WMI interrupt within the first preset time period, the OSD service may send the heartbeat command again after waiting for 30 seconds, that is, send the heartbeat command again at the second time, and if the OSD service does not receive WMI interrupt within the preset time period after the second time, the OSD service may restart the WMI service in time, reducing the probability that the user perceives that the hotkey is abnormal.
If the OSD service does not receive the WMI interrupt within the preset time period, the OSD service may perform S506.
The OSD service determines whether the value of the counter 1 is less than a first threshold, i.e., the OSD service determines whether the number of consecutive restarts of the WMI service is less than the first threshold S506.
If the number of consecutive restarts of the WMI service is less than the first threshold (e.g., 5), the OSD service may proceed to S507.
The OSD service may call an interface (CreateProcessWithToken) to restart the WMI service and increment the value of counter 1 by 1S 507.
When the continuous restart times of the WMI service are less than the time threshold value, the OSD service can try to restart the WMI service for many times, and the probability of repairing the WMI service is improved.
After the WMI service is restarted, the OSD service may continue to send a heartbeat command to detect whether the function of the WMI service is restored to normal.
And if the restart times of the WMI service are greater than or equal to the first threshold value, the OSD service ends the hot key repair process.
When the restarting times of the WMI service is greater than or equal to the time threshold, the abnormal problem of the WMI service is difficult to solve through restarting, and the continuation of the restarting of the WMI service only can increase signaling overhead and electric quantity consumption.
If the OSD service receives the WMI interrupt within the preset time period, the OSD service may perform S508.
S508, the OSD service obtains the heartbeat information from the WMI module through the WMI service.
The OSD service can call the WMI module to report heartbeat information through the WMI service, the WMI module sends the heartbeat information to the WMI service based on the call of the WMI service, the heartbeat information comprises a heartbeat ID2, and the heartbeat ID2 is a heartbeat ID generated by the WMI module based on the heartbeat ID 1. And after receiving the heartbeat information, the WMI service forwards the heartbeat information to the OSD service.
If the forwarding function of the WMI service is normal, the OSD service may receive heartbeat information within a second preset time period; if the forwarding function of the WMI service is abnormal, the OSD service cannot receive the heartbeat message within the second preset time period. Therefore, the OSD service may determine whether the forwarding function of the WMI is normal according to whether the heartbeat information is received within the second preset period.
S509, the OSD service determines whether the heartbeat information is received within a second preset time period.
The second preset time period may be a time period with a duration of 2s from the first time, or may be other time periods, and the present application does not limit features such as the duration of the second preset time period.
If the OSD service does not receive the heartbeat message within the second predetermined period, the OSD service may perform S506.
If the OSD service receives the heartbeat message within the second predetermined period, the OSD service may perform S510.
S510, the OSD service clears the counter 1, and executes S501 after waiting 30S.
In the method shown in fig. 5, the information interaction flow of each module is shown in fig. 6.
The reason for the abnormal hot key function may be that communication between the EC and the BIOS is abnormal, the EC cannot transfer the SCI to the BIOS, and the problem cannot be solved by restarting the WMI service. Another method of repairing the hot key function provided by the present application is described below. This method is illustrated in fig. 7.
And S701, after the computer housekeeper is started, sending a heartbeat command to the WMI service at the third moment, wherein the heartbeat command instructs the WMI service to call the WMI module to send WMI interrupt to the WMI service.
The heartbeat command may include a heartbeat ID1, and the specific form of the second heartbeat command is not limited in the present application.
In an alternative embodiment, the computer butler may send the heartbeat command periodically, for example, every 30 seconds. When the hot key function breaks down, the hot key function can be automatically repaired through the steps described below, so that the problem of abnormal hot key function can be solved in time before a user senses that the hot key function breaks down, and the user experience is improved.
In another alternative embodiment, the cyber attendant may receive a hot key function detection instruction of the user, and send a heartbeat command to the WMI service at a third time according to the hot key function detection instruction.
In the embodiment, the computer manager can send the heartbeat command after the user finds the hot key function fault and sends the hot key function detection instruction, and does not need to send the heartbeat command periodically, so that the signaling overhead and the power consumption are reduced. The embodiment is suitable for the terminal equipment in the power saving mode.
S702, after receiving the heartbeat command, the WMI service forwards the heartbeat command to the WMI module of the BIOS through the read/write interface, instructs the WMI module to generate WMI interrupt, and sends the WMI interrupt to the WMI service.
After receiving the heartbeat command, the WMI service calls an advanced configuration and power interface source language (ASL) method (WMI method) of the BIOS to execute an SCI reporting procedure, that is, instructs the WMI module to generate an interrupt event, and writes the interrupt event into an EC Random Access Memory (RAM).
And S703, the WMI module generates an interrupt event based on the calling of the WMI service and writes the interrupt event into the EC RAM.
The interrupt event is used to test whether the SCI reporting process is normal, and therefore, the interrupt event may be any interrupt event capable of testing whether the SCI reporting process is normal.
The EC RAM is memory internal to the EC, and the WMI module may write interrupt events to the EC RAM through 62/66 input/output (I/O) ports.
S704, the EC triggers the SCI after receiving the interrupt event, i.e., the EC pulls down the SCI pin level.
S705, SCI event service senses the EC' S SCI pin level down, querying the EC for interrupt information via the LPC bus.
S706, the EC reports SCI interrupt information to the SCI event service via the LPC bus, where the interrupt information includes heartbeat information (including heartbeat ID 1), and the heartbeat information indicates that the interrupt information is used for a heartbeat test.
S707, after receiving the SCI interrupt information (including heartbeat information and corresponding ID 1), the SCI event service generates a corresponding WMI interrupt (including heartbeat information and corresponding ID 2) according to the SCI interrupt information.
S708, the SCI event service stores the WMI interrupt to the WMI module.
S709, the SCI event service reports WMI interrupt to the WMI service.
S710, the WMI service reports WMI interrupt to the OSD service.
After receiving the WMI interrupt, the WMI service forwards the WMI interrupt to the OSD service, wherein after the electronic device is powered on, the PC housekeeper registers WMI interrupt monitoring in the WMI service through the OSD service, and the WMI interrupt monitoring is used for: and when the WMI interrupt is received by the WMI service, forwarding the WMI interrupt to the OSD service.
The OSD service determines whether a WMI interrupt is received S711.
If the forwarding function of the WMI service is normal, the OSD service can receive WMI interruption within a preset time period; if the forwarding function of the WMI service is abnormal, the OSD service cannot receive WMI interruption within a preset time period. Therefore, the OSD service may determine whether the forwarding function of the WMI is normal according to whether the WMI interrupt is received within a preset time period.
The preset time period may be a time period with a duration of 1s from the third time, or other time periods, and the present application does not limit the characteristics of the preset time period, such as the duration.
S712, if the concierge does not receive WMI interruption within the preset time period, the OSD service determines whether the value of the counter 1 is smaller than a first threshold, wherein the counter 1 is used for recording the continuous restart times of the WMI service.
If the numerical value of the counter 1 is greater than or equal to the first threshold value, the OSD service ends the process, and the WMI service is not repaired; if the value of the counter 1 is smaller than the first threshold, the OSD service performs S713.
S713, the OSD service restarts the WMI service and increments the value of the counter 1 by 1.
After the WMI service is restarted, the OSD service may perform S701.
If the computer administrator receives the WMI interrupt within the preset time period, the OSD service proceeds to S714.
S714, the OSD service clears the counter 1, and obtains heartbeat information from the WMI module through the WMI service, and specifically, the OSD service calls a Read/Write (Read/Write) interface of the WMI service to obtain heartbeat information (corresponding to ID 2) from the WMI module (WMI method).
S715, the OSD service determines whether the heartbeat information is received within a second preset time period.
S716, if the heartbeat message is received within the second preset time period, the OSD service determines that the WMI service normally operates. The OSD service clears the counter 2, and executes S701 after waiting for 30 seconds, where the counter 2 is used to record the number of consecutive restarts of the OS.
S717, if the heartbeat message is not received within the second predetermined period, the OSD service determines whether the value of the counter 2 is less than the second threshold.
When the restart times of the OS is greater than or equal to the second threshold, it is indicated that the problem of the abnormal hot key function is difficult to be solved by restarting the OS, and continuing to restart the OS may only increase signaling overhead and power consumption, and in this case, stopping restarting the OS and prompting the user that the abnormal hot key function exists, may reduce the signaling overhead and power consumption.
If the value of the counter 2 is smaller than the second threshold, the OSD service proceeds to step S718.
And S718, restarting the OS.
In the method shown in fig. 7, the work flow of each module is shown in fig. 8. The serial numbers near the arrows in fig. 8 indicate a possible execution sequence of steps, and other execution sequences may exist in an actual product, for example, step 5 and step 6 may be executed sequentially or simultaneously.
It should be noted that, the computer administrator may separately execute the method shown in fig. 5 and the method shown in fig. 7, or may execute the method shown in fig. 5 first and then execute the method shown in fig. 7 (i.e., restart the OS when the WMI service is not restarted, which may minimize the impact of repairing the hotkey function on the user and improve the probability of successfully repairing the hotkey function), or execute the method shown in fig. 7 first and then execute the method shown in fig. 5, and the present application does not limit the execution sequence of the method shown in fig. 5 and the method shown in fig. 7.
The present application also provides a computer program product which, when executed by a processor, implements the method of any of the method embodiments of the present application.
The computer program product may be stored in a memory and may be eventually transformed into an executable object file by preprocessing, compiling, assembling and linking.
The present application also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a computer, implements the method of any of the method embodiments of the present application. The computer program may be a high-level language program or an executable object program.
The computer readable storage medium may be volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile memory may be a read-only memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an electrically Erasable EPROM (EEPROM), or a flash memory. Volatile memory can be Random Access Memory (RAM), which acts as external cache memory. By way of example, and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous Dynamic Random Access Memory (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), SLDRAM (synchronous DRAM), and direct rambus RAM (DR RAM).
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes and the generated technical effects of the above-described apparatuses and devices may refer to the corresponding processes and technical effects in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, the disclosed system, apparatus and method may be implemented in other ways. For example, some features of the method embodiments described above may be omitted, or not performed. The above-described embodiments of the apparatus are merely exemplary, the division of the unit is only one logical function division, and there may be other division ways in actual implementation, and a plurality of units or components may be combined or integrated into another system. In addition, the coupling between the units or the coupling between the components may be direct coupling or indirect coupling, and the coupling includes electrical, mechanical, or other forms of connection.
It should be understood that, in the various embodiments of the present application, the sequence numbers of the processes do not mean the execution sequence, and the execution sequence of the processes should be determined by the functions and the inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Additionally, the terms "system" and "network" are often used interchangeably herein. The term "and/or" herein is merely an association relationship describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
In short, the above description is only a preferred embodiment of the present disclosure, and is not intended to limit the scope of the present disclosure. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. A method for repairing a window management specification (WMI) service, which is applied to an electronic device, wherein the electronic device comprises a first module, and the method comprises the following steps:
the first module sends first indication information to WMI service, and the first indication information indicates that the WMI service sends WMI interruption to the first module;
the first module monitors the WMI interrupt;
and if the first module does not receive the WMI interruption in a first preset time period, the first module restarts the WMI service.
2. The method of claim 1, wherein the electronic device further comprises a WMI module, and wherein the method further comprises:
the WMI service responds to the first indication information and sends second indication information to the WMI module, and the second indication information indicates the WMI module to send the WMI interrupt to the WMI service;
the WMI module generates the WMI interrupt according to the second indication information;
and the WMI module sends the WMI interrupt to the WMI service.
3. The method of claim 1 or 2, wherein the electronic device further comprises a WMI module, further comprising:
if the first module receives the WMI interruption in the first preset time period, the first module acquires identification information from the WMI module through the WMI service, wherein the identification information is information associated with an identification in the first indication information;
and if the first module does not receive the identification information in a second preset time period, the first module restarts the WMI service.
4. The method of claim 3, further comprising:
if the first module receives the WMI interruption in the first preset time period, the first module empties a first counter, and the first counter is used for recording the continuous restarting times of the WMI service.
5. The method according to claim 1 or 2, wherein said first module reboots said WMI service, comprising:
the first module restarts the WMI service when a value of a first counter is smaller than a first threshold, the first counter being used for recording the number of continuous restarts of the WMI service.
6. The method of claim 5, further comprising:
the first module adds 1 to the value of the first counter when restarting the WMI service.
7. The method according to claim 1 or 2, wherein the first module sends first indication information to the WMI service, including:
the first module periodically transmits the first indication information to the WMI service.
8. The method of claim 1 or 2, wherein the first module sends the first indication information to the WMI service, and wherein the sending the first indication information comprises:
and the first module sends the first indication information to the WMI service according to a hot key function repairing instruction input by a user.
9. An apparatus for repairing WMI services, comprising a processor and a memory, said processor and said memory being coupled, said memory for storing a computer program which, when executed by said processor, causes said apparatus to perform the method of any of claims 1 to 8.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, causes the processor to carry out the method of any one of claims 1 to 8.
CN202111218284.8A 2021-09-26 2021-10-19 Method and device for repairing WMI service Active CN114064234B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111134410 2021-09-26
CN2021111344101 2021-09-26

Publications (2)

Publication Number Publication Date
CN114064234A CN114064234A (en) 2022-02-18
CN114064234B true CN114064234B (en) 2022-11-18

Family

ID=80234944

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111218284.8A Active CN114064234B (en) 2021-09-26 2021-10-19 Method and device for repairing WMI service

Country Status (1)

Country Link
CN (1) CN114064234B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114090309B (en) * 2021-10-19 2023-04-07 荣耀终端有限公司 Method and device for repairing WMI service
CN116088658B (en) * 2022-05-16 2023-10-20 荣耀终端有限公司 Abnormality recovery method for electronic equipment and electronic equipment

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105808343A (en) * 2014-12-31 2016-07-27 中国科学院沈阳自动化研究所 Cluster resource control method used for complicated production management system
CN108255631A (en) * 2017-12-28 2018-07-06 努比亚技术有限公司 Mobile terminal restarts localization method, mobile terminal and computer readable storage medium
CN109684050A (en) * 2018-12-06 2019-04-26 成都佰纳瑞信息技术有限公司 A kind of the affairs actuator and its application method of parallelization
CN110175102A (en) * 2019-05-29 2019-08-27 中国海洋石油集团有限公司 A kind of information management system
CN111124761A (en) * 2019-12-29 2020-05-08 浪潮电子信息产业股份有限公司 Equipment restarting method, device, equipment and medium
CN112131015A (en) * 2020-09-15 2020-12-25 深圳市锐尔觅移动通信有限公司 Information processing method and device, cloud server and storage medium
CN112559205A (en) * 2020-12-08 2021-03-26 爱信诺征信有限公司 Credit report generation method and system
CN112860408A (en) * 2021-03-03 2021-05-28 苏州沁游网络科技有限公司 Process keep-alive method, device and system in cloud reality machine and storage medium
US11036518B1 (en) * 2021-02-23 2021-06-15 Fmr Llc Automated management of scheduling a computer hardware reboot
CN113127110A (en) * 2021-05-12 2021-07-16 中国建设银行股份有限公司 Transaction service control method, device, equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10002089B2 (en) * 2015-11-12 2018-06-19 Nxp Usa, Inc. Interrupt-controlled direct memory access peripheral data transfer

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105808343A (en) * 2014-12-31 2016-07-27 中国科学院沈阳自动化研究所 Cluster resource control method used for complicated production management system
CN108255631A (en) * 2017-12-28 2018-07-06 努比亚技术有限公司 Mobile terminal restarts localization method, mobile terminal and computer readable storage medium
CN109684050A (en) * 2018-12-06 2019-04-26 成都佰纳瑞信息技术有限公司 A kind of the affairs actuator and its application method of parallelization
CN110175102A (en) * 2019-05-29 2019-08-27 中国海洋石油集团有限公司 A kind of information management system
CN111124761A (en) * 2019-12-29 2020-05-08 浪潮电子信息产业股份有限公司 Equipment restarting method, device, equipment and medium
CN112131015A (en) * 2020-09-15 2020-12-25 深圳市锐尔觅移动通信有限公司 Information processing method and device, cloud server and storage medium
CN112559205A (en) * 2020-12-08 2021-03-26 爱信诺征信有限公司 Credit report generation method and system
US11036518B1 (en) * 2021-02-23 2021-06-15 Fmr Llc Automated management of scheduling a computer hardware reboot
CN112860408A (en) * 2021-03-03 2021-05-28 苏州沁游网络科技有限公司 Process keep-alive method, device and system in cloud reality machine and storage medium
CN113127110A (en) * 2021-05-12 2021-07-16 中国建设银行股份有限公司 Transaction service control method, device, equipment and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
"Minimum Cost SDN Routing With Reconfiguration Frequency Constraints";Apostolos Destounis;《IEEE/ACM Transactions on Networking》;20180831;第26卷(第4期);第1577-1590页 *
"TCP连接修复技术在无间断路由中的研究与实现";钱枫;《中国优秀硕士学位论文全文数据库 信息科技辑》;20180715(第07期);第I139-4页 *
"WMI控件属性异常修复";紫色天空1026;《https://blog.csdn.net/nick841026/article/details/112303305》;20210107;第1-5页 *

Also Published As

Publication number Publication date
CN114064234A (en) 2022-02-18

Similar Documents

Publication Publication Date Title
CN114064234B (en) Method and device for repairing WMI service
US9052920B2 (en) Electronic devices and methods for switching between dual operating systems
CN104657228B (en) A kind of system exception processing method and processing device of mobile terminal
JP2001101033A (en) Fault monitoring method for operating system and application program
US11662803B2 (en) Control method, apparatus, and electronic device
CN109976926A (en) Method, circuit, terminal and the storage medium of protection BMC renewal process are restarted in a kind of shielding
CN102855149B (en) A kind of chip operating system upgrade method, device and system
CN114327606A (en) Configuration management method and device, electronic equipment and computer readable storage medium
CN114090309B (en) Method and device for repairing WMI service
CN110096105A (en) The method for controlling power-supply unit
US11954519B2 (en) Information processing apparatus, method, and recording medium controlling execution of a process based on the amount of a type of log data stored
CN111767242B (en) PCIE equipment control method and device, computer equipment and storage medium
CN104750551A (en) A computer system and user-defined responding method thereof
CN116300780B (en) Component configuration method, device, electronic equipment and storage medium
WO2022222968A1 (en) Conference call recovery method, apparatus and system, electronic device, and readable storage medium
CN113412480A (en) Mounting processing method and device, electronic equipment and computer readable storage medium
CN114113855A (en) Electrostatic discharge detection processing method and device and terminal equipment
CN114968880A (en) Multi-host system and operation method of host equipment and shared man-machine interface device
CN111813574A (en) Picture compression method and device, storage medium and electronic equipment
CN110008071B (en) Remote debugging device and method
CN111338914A (en) Fault notification method and related equipment
JP2003298624A (en) Communication path securing method in service control application execution program
CN110837290A (en) Management method of kernel lock and terminal equipment
JP2001211232A (en) Device management control method and system for remote access
US20230056294A1 (en) Client live keeping method and apparatus, electronic 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