Remote startup and shutdown detection method and device, equipment and medium

Receive and convert remote power on and off instructions through the PS/2 interface to detect the power on or off status of the PC, which solves the problem of being unable to detect successful power on and off in the existing technology, and improves system reliability and user experience.

CN118796281AActive Publication Date: 2024-10-18CHINA MOBILEHANGZHOUINFORMATION TECH CO LTD +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410049905.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-12
Publication Date
2024-10-18
Estimated Expiration
2044-01-12

AI Technical Summary

Technical Problem

Existing remote power on and off technology cannot achieve successful startup and shutdown detection of a remote PC, and there are risks of misoperation and system anomalies.

Method used

Through the PS/2 interface, it receives the power-on or shutdown command from the user terminal, converts it into an interface command of a preset data type, sends it to the device to be controlled, and obtains the execution result to detect whether the device is successfully powered on or off.

Benefits of technology

It achieves successful detection of remote power on and off, reduces the risk of misoperation, and ensures system stability and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118796281A_ABST
    Figure CN118796281A_ABST
Patent Text Reader

Abstract

The invention provides a remote startup and shutdown detection method and device, equipment and a medium, the method is applied to startup equipment, the startup equipment is arranged on to-be-controlled equipment through a PS / 2 interface of the to-be-controlled equipment, a control instruction sent by a user terminal is received, and the control instruction is a startup instruction or a shutdown instruction; based on the instruction type of the control instruction, the control instruction is converted into an interface instruction of a preset data type, the to-be-controlled device can recognize the preset data type, and the interface instruction is used for controlling the to-be-controlled device to be started or shut down; sending the interface instruction to a to-be-controlled device; obtaining state information generated when the to-be-controlled device executes the interface instruction; and analyzing the state information to obtain a control result of the to-be-controlled device, the control result being used for indicating whether the to-be-controlled device is successfully started or shut down. According to the embodiment of the invention, whether the to-be-controlled equipment is successfully started or shut down can be detected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a remote power on / off detection method, device, equipment and medium. Background Art

[0002] Remote startup / shutdown refers to the method of waking up / shutting down a personal computer (PC) from a distance. With the development of society, PCs have become an indispensable device for entertainment, learning, and work. Usually, for safety and energy saving, PCs are shut down after use. Many times, when you are on a business trip, on the way to work, or on the way to school, you need to access a PC at home or in a remote office to retrieve data. If there is no one at the PC to help you start it up, you need to use the remote startup method to start the PC.

[0003] The prior art usually sends a broadcast message of a specific format in the local area network where the PC is located. After the PC network card monitors the wake-up message, it notifies the mainboard to start the computer. However, this method can only realize the startup of the PC, but cannot realize the remote shutdown of the PC, nor can it sense whether the PC is successfully started or whether the PC is currently running normally. Summary of the invention

[0004] The present application provides a remote power on / off detection method, device, equipment and medium, which can detect whether a device to be controlled is successfully powered on or powered off.

[0005] In a first aspect, an embodiment of the present application provides a remote power on / off detection method, which is applied to a power on device, where the power on device is set on the device to be controlled via a PS / 2 interface of the device to be controlled, and the method includes:

[0006] Receiving a control instruction sent by a user terminal, the control instruction being a power-on instruction or a power-off instruction;

[0007] Based on the instruction type of the control instruction, the control instruction is converted into an interface instruction of a preset data type, the device to be controlled can recognize the preset data type, and the interface instruction is used to control the device to be controlled to turn on or off;

[0008] Sending interface instructions to the device to be controlled;

[0009] Obtaining status information generated by the device to be controlled executing the interface instruction;

[0010] The status information is analyzed to obtain a control result of the device to be controlled, and the control result is used to indicate whether the device to be controlled is successfully turned on or off.

[0011] In a second aspect, the present application provides a remote power on / off detection device, which is applied to a power on device. The power on device is set on the device to be controlled through a PS / 2 interface of the device to be controlled. The device includes:

[0012] A receiving module, used to receive a control instruction sent by a user terminal, where the control instruction is a power-on instruction or a power-off instruction;

[0013] A conversion module, used for converting the control instruction into an interface instruction of a preset data type based on the instruction type of the control instruction, the device to be controlled can recognize the preset data type, and the interface instruction is used to control the device to be controlled to start or shut down;

[0014] A sending module, used for sending interface instructions to the device to be controlled;

[0015] An acquisition module, used to acquire status information generated by the device to be controlled executing the interface instruction;

[0016] The analysis module is used to analyze the status information to obtain the control result of the device to be controlled, and the control result is used to indicate whether the device to be controlled is successfully turned on or off.

[0017] In a third aspect, an embodiment of the present application provides an electronic device, the electronic device comprising: a processor and a memory storing computer program instructions;

[0018] When the processor executes the computer program instructions, the remote power on / off detection method in any one of the embodiments in the first aspect is implemented.

[0019] In a fourth aspect, an embodiment of the present application provides a computer storage medium having computer program instructions stored thereon, and when the computer program instructions are executed by a processor, a remote power on / off detection method as in any one of the embodiments in the first aspect is implemented.

[0020] In a fifth aspect, an embodiment of the present application provides a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes a remote power on / off detection method as in any one of the embodiments in the first aspect above.

[0021] In a remote power on / off detection method, device, equipment and medium provided in an embodiment of the present application, a control instruction sent by a user terminal is received, and the control instruction is a power on instruction or a power off instruction; based on the instruction type of the control instruction, the control instruction is converted into an interface instruction of a preset data type, and the device to be controlled can recognize the preset data type, and the interface instruction is used to control the device to be controlled to power on or off; the interface instruction is sent to the device to be controlled; the status information generated by the device to be controlled executing the interface instruction is obtained; the status information is analyzed to obtain the control result of the device to be controlled, and the control result is used to indicate whether the device to be controlled is successfully powered on or off. In the above manner, the power on device can detect whether the device to be controlled has successfully executed the power on or off instruction by analyzing the status information, thereby realizing the remote power on / off detection function. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0023] Figure 1 This is a flow chart of a remote power on / off detection method provided by an embodiment of the present application;

[0024] Figure 2 This is a communication connection diagram between a startup APP, a startup device, and a PC provided by an embodiment of the present application;

[0025] Figure 3 This is a schematic diagram of the structure of a PS / 2 interface provided by an embodiment of the present application;

[0026] Figure 4 It is a flowchart of a remote power-on detection method provided by an embodiment of the present application;

[0027] Figure 5 It is a flowchart of a remote shutdown detection method provided by an embodiment of the present application;

[0028] Figure 6 It is a structural schematic diagram of a remote power on / off detection device provided in an embodiment of the present application;

[0029] Figure 7 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0030] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0031] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0032] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprising a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0033] Currently, the following technical solutions are mainly used to achieve remote startup:

[0034] 1) Remote Wake-On-LAN (WOL): Network wake-up, sending a broadcast message in a specific format in the local area network where the PC is located. After the PC network card monitors the wake-up message, it notifies the motherboard to start the computer. This method can only turn on the PC, but cannot remotely shut down the PC, nor can it detect whether the PC is successfully turned on, nor can it detect whether the PC is currently running normally.

[0035] 2) Power-on wake-up: The power module of the PC detects the 220V AC input status. If the 220V AC changes from 0V to 220V, it notifies the motherboard to start the computer. This method can realize the PC startup and shutdown, but the PC is shut down by cutting off the power supply, which is easy to cause file loss or system abnormality. The shutdown method is not acceptable to users; this method cannot sense whether the PC is successfully started or running. This method requires cutting off the power supply before starting, and then connecting the power supply to start. If the current PC is running, it is easy to cause PC file loss or system abnormality because the PC running status cannot be sensed.

[0036] 3) Remote control of PC switch circuit: The switch circuit of the PC is modified, and the PC is remotely connected to a remote control switch or mechanical device. When starting up, it simulates manually clicking the PC switch to start up. This method can start and shut down the PC, but the shutdown method simulates long pressing of the power button to force shutdown, which also has the risk of causing system abnormalities to a certain extent; this method cannot sense whether the startup is successful and the current operating status of the PC, and there is a risk of misoperation.

[0037] 4) Peripheral Component Interconnect (PCI) boot card: Add a PCI boot device to the system motherboard. After receiving the boot command, it notifies the motherboard to start the PC. After receiving the shutdown command, it sends it to the PCI driver software in the operating system to shut down. This method can start and shut down the PC in a normal way, and can also sense the current operating status of the PC. However, this method is difficult to use. The user needs to open the chassis and plug and unplug the device on the motherboard and install the driver software. There is a risk of damaging the PC during the installation process.

[0038] In the prior art, most PC motherboards support the Personal System / 2 (PS / 2) interface to start the computer. By sending PS / 2 instructions to the motherboard, the motherboard checks that the received instructions are completely consistent with the preset instructions, and then turns on the PC. However, the PS / 2 interface does not provide a shutdown instruction, which needs to be completed with the help of operating system instructions, and the PS / 2 device cannot directly feedback the operating status of the PC. PS / 2 refers to a computer interface standard used to connect a keyboard and a mouse.

[0039] In order to solve the problems existing in the prior art, the embodiments of the present application provide a remote power on / off detection method, device, equipment and medium.

[0040] The present application embodiment provides a remote power on / off detection method, device, equipment and medium. The following first introduces the remote power on / off detection method provided by the present application embodiment. Figure 1 As shown, the method is applied to a power-on device, and the power-on device is set on the device to be controlled through the PS / 2 interface of the device to be controlled. The method specifically includes the following steps:

[0041] S100, receiving a control instruction sent by a user terminal, where the control instruction is a power-on instruction or a power-off instruction.

[0042] Optionally, in an embodiment of the present application, the boot device is simulated as a PS / 2 device through a microcontroller unit (MCU) and mounted on a PC (ie, the device to be controlled) through a PS / 2 interface.

[0043] Optionally, in a feasible implementation of the present application, at the hardware level, a plug-in card supporting serial port communication may be added, and the card communicates with the user terminal via the serial port. A serial port line is used to connect the serial port card to the user terminal, so as to receive control instructions sent by the user terminal.

[0044] At the software level, you can write a serial port driver to communicate with the serial port card. This driver needs to be able to receive data sent from the user terminal. Develop a command parsing program to parse the control instructions sent from the user terminal. The program needs to be able to recognize the power-on and power-off instructions.

[0045] In these optional embodiments, the specific implementation method may vary depending on the hardware and software platform. The hardware has high scalability, so the appropriate serial port card and interface method can be selected according to the specific system configuration. The software needs to write the corresponding driver and control instruction parsing program according to the system's instruction set and operating system.

[0046] Optionally, in a possible implementation of the present application, the boot device and the user terminal can communicate through a cloud service. For example, the boot instruction can be transmitted through the cloud service, and the boot device is connected to the same cloud service for communication, so that remote communication can be achieved without being in the same network.

[0047] S200, based on the instruction type of the control instruction, convert the control instruction into an interface instruction of a preset data type, the device to be controlled can recognize the preset data type, and the interface instruction is used to control the device to be controlled to turn on or off;

[0048] S300: Send an interface instruction to the device to be controlled.

[0049] Optionally, in an embodiment of the present application, when the user terminal controls the power on / off, the power-on device can receive the instruction sent by the power-on application (Application, App) (i.e., the user terminal) through the instruction receiving module, and hand it over to the MCU microprocessor for processing. After processing, the MCU processor converts the power-on instruction into a standard PS / 2 interface instruction that can be recognized by the PC, and sends it to the PC through the PS / 2 interface.

[0050] Optionally, in a possible implementation of the present application, the power-on device first needs to parse the received control instruction to determine whether its type is a power-on instruction or a power-off instruction. Then, according to the type of control instruction obtained by the analysis, a preset data format and instruction type are formulated to ensure that these data can be understood and executed by the device to be controlled. For example, for a power-on instruction, a data format can be formulated, and for a power-off instruction, there can be another data format. The parsed control instruction is then converted into an interface instruction of a preset data type, and specifically, the data field of the control instruction can be assembled and encoded to generate an interface instruction that conforms to the preset data type. Finally, the generated interface instruction is sent to the device to be controlled via a communication link, and can be transmitted using a PS / 2 interface.

[0051] S400, obtaining status information generated by the device to be controlled executing the interface instruction;

[0052] S500, analyzing the status information to obtain a control result of the device to be controlled, where the control result is used to indicate whether the device to be controlled is successfully powered on or powered off.

[0053] Optionally, in one example, Figure 2 As shown, the terminal device is the startup APP and the device to be controlled is the PC.

[0054] 1) Power-on App: used for human-computer interaction, it can send power-on / power-off commands through the communication link, obtain the execution results, and present the results to the user.

[0055] 2) Boot device: The boot device is simulated as a PS / 2 device through the MCU microprocessor and mounted on the PC through the PS / 2 interface. When turning on / off, the boot device receives the command sent by the boot app through the command receiving module and passes it to the MCU microprocessor for processing. After processing, the MCU processor converts the boot command into a standard PS / 2 interface command that can be recognized by the PC and sends it to the PC through the PS / 2 interface. Then, the PS / 2 command sent by the PC and the clock pin level status in the PS / 2 interface are monitored, and the command execution result is identified through a specific algorithm, and the result is sent to the boot app through the command receiving module.

[0056] 3) PC: A PC with a PS / 2 interface for being turned on or off.

[0057] In the embodiment of the present application, the PS / 2 interface command is used to turn on / off the PC. A device compatible with the PS / 2 interface is connected to the PS / 2 interface of the PC. The user uses the App to connect to the device and sends a power on / off command. The device converts the power on / off command into a PS / 2 protocol command to turn on / off the PC. The device can also determine whether the power on is successful based on the PS / 2 clock bus status, and can provide accurate and timely feedback of the execution result to the user to prevent misoperation.

[0058] Optionally, in a feasible implementation of the present application, in the MCU program, it is necessary to obtain and parse the status information. For example, a protocol can be designed to ensure that the status information can be reliably transmitted to the boot device. For another example, a code can be written in the MCU program to parse the status information returned from the device to be controlled.

[0059] Specifically, it is preferred to parse the status information obtained from the device to be controlled in the MCU program. Specifically, it may involve converting binary or other forms of status information into understandable data. For another example, an algorithm or logic may be designed to determine whether the parsed status information indicates that the device to be controlled has been successfully powered on or off, specifically involving the inspection of a specific status code or status flag. Finally, the control result of the judgment may be fed back to the startup App. This may send the result information to the startup App via a communication link so that the user can know the status of the device to be controlled.

[0060] In a remote power on / off detection method provided in an embodiment of the present application, a control instruction sent by a user terminal is received, and the control instruction is a power on instruction or a power off instruction; based on the instruction type of the control instruction, the control instruction is converted into an interface instruction of a preset data type, and the device to be controlled can recognize the preset data type, and the interface instruction is used to control the device to be controlled to power on or off; the interface instruction is sent to the device to be controlled; the status information generated by the device to be controlled executing the interface instruction is obtained; the status information is analyzed to obtain the control result of the device to be controlled, and the control result is used to indicate whether the device to be controlled is successfully powered on or off. In the above manner, the power on device can detect whether the device to be controlled has successfully executed the power on or off instruction by analyzing the status information, thereby realizing the remote power on / off detection function.

[0061] In one embodiment, the control instruction is a power-on instruction; the above step 200 may specifically perform the following steps:

[0062] S210, based on a preset parsing algorithm, the microprocessor of the power-on device parses the power-on instruction to obtain a first PS / 2 keyboard instruction code, where the first PS / 2 keyboard instruction code is used to control a preset quick power-on key of the device to be controlled.

[0063] Optionally, in the embodiments of the present application, Figure 3 As shown, the PS / 2 interface has a total of 5 pins. The 4th and 5th pins are used to power the PS / 2 device from the PC; the 3rd pin is idle and has no specific use; the 1st pin is used to generate a data synchronization clock; the 2nd pin is the data transmission pin; when the clock pin level changes from high to low once, the PC and the PS / 2 device can exchange 1 bit of data through the data transmission pin.

[0064] In these optional embodiments, the power-on command is parsed based on a preset parsing algorithm to obtain a first PS / 2 keyboard command code, which is specifically used to simulate a quick power-on key on the device to be controlled. In this way, the power-on device can send a simulated key command to the device to be controlled via the PS / 2 interface to achieve a quick power-on effect.

[0065] In one embodiment, the above step 300 may specifically perform the following steps:

[0066] S310, sending a first PS / 2 keyboard command code to a device to be controlled via a clock pin and a data pin of a PS / 2 interface.

[0067] In these optional embodiments, the first PS / 2 keyboard command code is sent to the device to be controlled using the clock pin and data pin of the PS / 2 interface. This direct physical connection mode is more reliable and avoids message loss or distortion that may occur in the communication link. And the characteristics of the PS / 2 interface allow hardware communication with strong real-time performance. Through the synchronous transmission of the clock pin and the data pin, the timely transmission of the instruction can be ensured, the delay of communication can be reduced, and the real-time performance of the control can be improved. Due to the use of the PS / 2 interface, there is no need to make additional hardware changes to the device to be controlled. This helps to maintain the original state of the device to be controlled and reduce unnecessary complexity and risks.

[0068] In one embodiment, the above step 400 may specifically perform the following steps:

[0069] S410, monitoring a first instruction sent by a device to be controlled and received by a clock pin and a data pin, wherein the first instruction is an instruction generated by the device to be controlled based on a first PS / 2 keyboard instruction code, and the first instruction is used to control a startup device.

[0070] In one embodiment, after the above step 410, the method may further specifically perform the following steps:

[0071] S411: When the first instruction is detected, a reply message is sent to the device to be controlled.

[0072] In these optional embodiments, by monitoring the first instruction sent by the device to be controlled, the startup device can perceive the status and feedback of the device to be controlled in real time, which helps to maintain the real-time nature of the communication link and ensure the timely transmission of control and status information.

[0073] When the first command is detected, a reply message is sent to the device to be controlled. In this way, the startup device can confirm the receipt of the command to the device to be controlled and provide a feedback so that the device to be controlled can know the execution status of the command. This two-way communication helps to improve the reliability and interactivity of the system.

[0074] By replying to the information, the controlled device can transmit the execution result of the command to the booting device. This helps the booting device obtain information about the status of the controlled device, such as whether the booting command is successfully executed. Such feedback information is visible to the user, improving the user's perception of the system status. In general, steps S410 and S411 form a real-time monitoring and response mechanism, which ensures the reliability of communication, the correct execution of commands, and provides two-way information transmission, enhancing the interactivity of the system and user experience.

[0075] In one embodiment, the above step 500 may specifically perform the following steps:

[0076] S510, when the first instruction is a disabling instruction, determining a disabling flag of the booting device as a first flag;

[0077] S520, when the first instruction is an enabling instruction, determining the disabling flag as the second flag;

[0078] S530, when the first instruction is a reset instruction, if the disable flag is the second flag, obtaining the number of times the first instruction is received;

[0079] S540: When the number of reception times is greater than or equal to the first preset number of times, the control result is determined as a first result, where the first result is used to indicate that the device to be controlled is successfully powered on.

[0080] Optionally, in a specific implementation of the present application, as Figure 4 As shown in the figure, the specific process of controlling the device startup and monitoring whether the device is successfully started is as follows:

[0081] 1) Boot App: The boot app sends a boot request to the PS / 2 boot device through the communication link. After the boot app successfully sends the boot request, it will start the timeout timer (the timeout time can be manually set according to the operating system startup time). If the boot app receives the boot result sent by the PS / 2 boot device before the timer times out, the specific boot result will be displayed; if the boot app does not receive the boot result fed back by the PS / 2 boot device until the timer times out, it will display the boot abnormality.

[0082] 2) PC to be opened: A standard PC is used, no circuit modification is done on the PC, and no auxiliary software is run on the PC.

[0083] 3) PS / 2 boot device: After receiving the boot request, the boot device parses the boot request and converts it into a PS / 2 keyboard command code, and then sends the command to the PC through the MCU microprocessor to operate the CLK (clock) pin and Data (data) pin of the PS / 2 interface. After the command is sent, the PS / 2 boot device will always monitor the CLK (clock) pin and Data (data) pin of the PS / 2 interface, and identify the control command sent by the PC and respond. The response is mainly to deceive the PC and make the PC recognize the PS / 2 boot device as a keyboard device. At the same time, the PS / 2 boot device will save and process the received instructions. The PS / 2 boot device focuses on the following three instructions sent by the PC: device reset (FF) instruction, device disable (F5) instruction, and device enable (F4) instruction. The PC motherboard boots into the Basic Input / Output System (BIOS) and the operating system will recognize and initialize the keyboard respectively, so the PS / 2 boot device only needs to record the number of reset instructions received to identify which stage the current PC startup is in; during the boot process, the PC will disable the input device to prevent input from being mistakenly input, and will not re-enable it until the boot is completed, so the algorithm also needs to further eliminate the interference of invalid reset commands based on whether the current device is disabled when the reset instruction is received. The PS / 2 device also sends the recognition results to the boot app in real time for display to the user.

[0084] In these optional embodiments, by using a timeout timer, the startup App can monitor the feedback from the PS / 2 startup device in real time after sending the startup request. If the startup result is received before the timer times out, the user can immediately obtain specific startup information; otherwise, after the timeout, the startup App displays a startup abnormality, providing the user with an opportunity to handle the abnormality in a timely manner, thereby enhancing the reliability of the system and the user experience.

[0085] Using a standard PC, there is no need to modify the PC circuit or run auxiliary software, which helps the solution to be widely applicable. Users do not need to perform additional hardware or software settings on the PC, simplifying the deployment and use process.

[0086] By deceiving the PC, the PS / 2 boot device makes the PC recognize it as a keyboard device, successfully simulating the working principle of the keyboard and realizing an ingenious remote boot method.

[0087] By recording the number of reset instructions and monitoring whether the device is disabled, the PS / 2 boot device can accurately determine the stage and status of PC startup. This helps to improve the perception of PC status, eliminate abnormal situations, and send identification results to the boot app in real time to provide users with detailed boot information. Overall, the solution is characterized by real-time, simplicity, and reliability. It realizes remote boot through the physical connection of the PS / 2 interface and the communication of the PS / 2 protocol, and provides the beneficial effects of real-time feedback, abnormal handling, and status identification through the working principle of the PS / 2 boot device.

[0088] In one embodiment, the control instruction is a shutdown instruction; the above step 200 may specifically perform the following steps:

[0089] S220, based on a preset parsing algorithm, the microprocessor of the power-on device parses the shutdown command to obtain a second PS / 2 keyboard command code, where the second PS / 2 keyboard command code is used to control a preset quick shutdown button of the device to be controlled;

[0090] In one embodiment, the above step 300 may specifically perform the following steps:

[0091] S320, sending the second PS / 2 keyboard command code to the device to be controlled via the clock pin and the data pin of the PS / 2 interface.

[0092] In one embodiment, the above step 400 may specifically perform the following steps:

[0093] S420, obtaining a level state of a clock pin of the PS / 2 interface at every target time interval;

[0094] In one embodiment, the above step 500 may specifically perform the following steps:

[0095] S550, when the level state is the first state, after a preset time, sending a test instruction to the device to be controlled, the test instruction is used to simulate a keyboard start instruction, and the first state is used to indicate that the voltage of the clock pin is less than a first preset threshold;

[0096] S560, when the level state is in the second state, obtaining the number of consecutive times that the level state is in the second state, where the second state is used to indicate that the voltage of the clock pin is greater than a second preset threshold;

[0097] S570: When the consecutive number of times is greater than a second preset number of times, the control result is determined as a second result, and the second result is used to indicate that the device to be controlled is successfully shut down.

[0098] Optionally, in a specific implementation of the present application, as Figure 5 As shown in the figure, the specific process of controlling the shutdown of the device and monitoring whether the shutdown of the device is successful is as follows:

[0099] 1) Boot App: The boot app sends a shutdown request to the PS / 2 boot device through the communication link. After the boot app sends the shutdown request successfully, the timeout timer will be started (the timeout time can be manually set according to the operating system shutdown time). If the boot app receives the shutdown result sent by the PS / 2 boot device before the timer times out, the specific shutdown result will be displayed; if the boot app does not receive the shutdown result fed back by the PS / 2 boot device until the timer times out, the shutdown abnormality will be displayed.

[0100] 2) Shutdown PC: Use a standard PC without any circuit modification or auxiliary software running on the PC.

[0101] 3) PS / 2 boot device: After receiving the shutdown request, the boot device parses the shutdown request and converts it into a PS / 2 keyboard command code, and then sends the command to the PC through the MCU microprocessor to operate the CLK (clock) pin and Data (data) pin of the PS / 2 interface. When the PC receives and processes the PS / 2 command in the running state, the CLK (clock) pin will be set to a low level to suppress the PS / 2 device from sending commands to interfere with the PC's processing during this period. After the PC processes the command, it will release the CLK (clock) pin pull-down operation. Since there is a pull-up resistor on the CLK (clock) pin, the CLK level will automatically become a high level. Taking advantage of this feature, after the algorithm sends the shutdown command, the PS / 2 boot device will send a test command every few seconds and monitor the CLK (clock) pin level of the PS / 2 interface to see if there is any change. If the CLK level still has the action of pulling down the inhibition command, it means that the PC is still powered on; if the CLK level no longer has the action of pulling down the inhibition command, it means that the PC has stopped running. In order to ensure reliability, the algorithm will not detect the action of the CLK pin being pulled low by the PC for three consecutive times before it considers that the PC has been turned off. The PS / 2 device also sends the recognition result to the boot app in real time for display to the user.

[0102] In these optional embodiments, the PS / 2 power-on device utilizes the characteristics of the clock pin when the PC receives and processes PS / 2 instructions, and realizes real-time status detection by monitoring the level change of the CLK pin. This method does not require the PC to actively report the status, but by passively detecting the change of the CLK pin level, it can perceive the operating status of the PC more timely. This is particularly important for the remote shutdown scenario, and it can be known in the shortest time whether the PC has been successfully shut down.

[0103] The algorithm cleverly uses the feature that the PC releases the CLK pin after processing the instruction. Due to the pull-up resistor on the CLK pin, the CLK level automatically becomes a high level. The use of this level feature enables the PS / 2 boot device to accurately determine the operating status of the PC by detecting the level change of the CLK pin. This design based on hardware characteristics is not only efficient, but also stable and reliable.

[0104] In order to ensure the reliability of the shutdown state, the algorithm introduces the condition that the CLK pin is not pulled to a low level by the PC for three consecutive times as a judgment condition, thereby eliminating the possibility of misjudgment of short-term level changes. This multiple detection strategy enhances the robustness of the system's judgment of the shutdown state and improves the reliability of detection.

[0105] The PS / 2 power-on device sends the recognition result to the power-on App in real time for display to the user. This real-time feedback mechanism ensures that the user can know the shutdown status of the PC in a timely manner, so that further operations or adjustments can be taken quickly. This plays a positive role in user experience and convenience of operation. In summary, this embodiment realizes a real-time and reliable PC shutdown status perception and feedback mechanism by cleverly designing the status detection of the PS / 2 interface and utilizing the level characteristics, providing users with a better user experience.

[0106] In one embodiment, after the above step 500, the method may further specifically perform the following steps:

[0107] S510, sending status information to the user terminal;

[0108] In one embodiment, the above step 510 may specifically perform the following steps:

[0109] S511: When the timer timing of the user terminal exceeds the target time threshold, the sending of status information is stopped, and the timer starts timing when the user terminal sends a control instruction.

[0110] Optionally, in the embodiment of the present application, after the startup request of the startup App is successfully sent, a timeout timer will be started (the timeout time of the timer can be manually set according to the startup time of the operating system). If the startup App receives the startup result sent by the PS / 2 startup device before the timer times out, the specific startup result will be displayed; if the startup App does not receive the startup result fed back by the PS / 2 startup device until the timer times out, a startup abnormality will be displayed. The same is true for the shutdown request, which will not be elaborated here.

[0111] Optionally, in an embodiment of the present application, a PS / 2 physical interface is used to directly connect to a PC, and signal transmission is more reliable. The present application detects the instructions and level states transmitted by the physical connection line of the PS / 2 interface directly connected to the PC, and the PC operation result perception is more accurate and rapid. In addition, the PS / 2 protocol used in the present application is a type of serial protocol, which can be implemented with only a low-performance single-chip microcomputer MCU, and is simple and convenient to implement.

[0112] Figure 6 A schematic structural diagram of a remote power on / off detection device provided in another embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.

[0113] Reference Figure 6 The remote power on / off detection device is applied to the power on device, and the power on device is set on the device to be controlled through the PS / 2 interface of the device to be controlled. The remote power on / off detection device may include:

[0114] The receiving module 601 is used to receive a control instruction sent by a user terminal, where the control instruction is a power-on instruction or a power-off instruction;

[0115] A conversion module 602, configured to convert the control instruction into an interface instruction of a preset data type based on the instruction type of the control instruction, wherein the device to be controlled can recognize the preset data type, and the interface instruction is used to control the device to be controlled to start or shut down;

[0116] The sending module 603 is used to send the interface instruction to the device to be controlled;

[0117] An acquisition module 604 is used to acquire status information generated by the device to be controlled executing the interface instruction;

[0118] The analysis module 605 is used to analyze the status information to obtain the control result of the device to be controlled, and the control result is used to indicate whether the device to be controlled is successfully turned on or off.

[0119] In one embodiment, the control instruction is a power-on instruction; the conversion module 602 may include:

[0120] A first parsing submodule is used to parse the power-on instruction through the microprocessor of the power-on device based on a preset parsing algorithm to obtain a first PS / 2 keyboard instruction code, where the first PS / 2 keyboard instruction code is used to control a preset quick power-on key of the device to be controlled;

[0121] In one embodiment, the sending module 603 may include:

[0122] The first sending submodule is used to send the first PS / 2 keyboard command code to the device to be controlled through the clock pin and the data pin of the PS / 2 interface.

[0123] In one embodiment, the acquisition module 604 may include:

[0124] A first monitoring submodule, used for monitoring a first instruction sent by a device to be controlled and received by a clock pin and a data pin, wherein the first instruction is an instruction generated by the device to be controlled based on a first PS / 2 keyboard instruction code, and the first instruction is used for controlling a startup device;

[0125] In one embodiment, the first monitoring submodule may include:

[0126] The first sending unit is used to send reply information to the device to be controlled when the first instruction is detected.

[0127] In one embodiment, the analysis module 605 may include:

[0128] A first determining submodule, configured to determine the disable flag of the boot device as the first flag when the first instruction is a disable command;

[0129] A second determining submodule, configured to determine the disabling flag as the second flag when the first instruction is an enabling instruction;

[0130] A first acquisition submodule is used for acquiring the number of times the first instruction is received if the first instruction is a reset instruction and the disable flag is a second flag;

[0131] The third determining submodule is used to determine the control result as a first result when the number of receiving times is greater than or equal to a first preset number, and the first result is used to indicate that the device to be controlled is successfully powered on.

[0132] In one embodiment, the control instruction is a shutdown instruction; the conversion module 602 may further include:

[0133] A second parsing submodule is used to parse the shutdown command through the microprocessor of the power-on device based on a preset parsing algorithm to obtain a second PS / 2 keyboard command code, and the second PS / 2 keyboard command code is used to control a preset quick shutdown button of the device to be controlled;

[0134] In one embodiment, the sending module 603 may further include:

[0135] The second sending submodule is used to send the second PS / 2 keyboard command code to the device to be controlled through the clock pin and the data pin of the PS / 2 interface.

[0136] In one embodiment, the acquisition module 604 may further include:

[0137] The second acquisition submodule is used to acquire the level state of the clock pin of the PS / 2 interface at every target time interval;

[0138] In one embodiment, the analysis module 605 may further include:

[0139] A third sending submodule is used to send a test instruction to the device to be controlled after a preset time when the level state is the first state, the test instruction is used to simulate a keyboard start instruction, and the first state is used to indicate that the voltage of the clock pin is less than a first preset threshold;

[0140] A third acquisition submodule is used to acquire the number of consecutive times that the level state is in the second state when the level state is in the second state, and the second state is used to indicate that the voltage of the clock pin is greater than a second preset threshold;

[0141] The fourth determining submodule is used to determine the control result as a second result when the consecutive number of times is greater than a second preset number of times, and the second result is used to indicate that the device to be controlled is successfully shut down.

[0142] In one embodiment, the remote power on / off detection device may further include:

[0143] A second sending module, used to send status information to a user terminal;

[0144] In one embodiment, the second sending module may include:

[0145] The stop submodule is used to stop sending status information when the timer timing of the user terminal exceeds the target time threshold, and the timer starts timing when the user terminal sends a control instruction.

[0146] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application, and are devices corresponding to the above-mentioned battery thermal runaway warning method. All implementation methods in the above-mentioned method embodiment are applicable to the embodiments of the device. Its specific functions and technical effects can be found in the method embodiment part, which will not be repeated here.

[0147] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0148] Figure 7 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown.

[0149] The device may include a processor 701 and a memory 702 storing program instructions.

[0150] When the processor 701 executes the program, the steps in any of the above method embodiments are implemented.

[0151] Exemplarily, the program may be divided into one or more modules / units, one or more modules / units are stored in the memory 702 and executed by the processor 701 to complete the present application. One or more modules / units may be a series of program instruction segments capable of completing a specific function, and the instruction segments are used to describe the execution process of the program in the device.

[0152] Specifically, the processor 701 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0153] The memory 702 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 702 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 702 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 702 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 702 is a non-volatile solid-state memory.

[0154] The memory may include read-only memory (ROM), random access memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical or other physical / tangible memory storage devices. Thus, typically, the memory includes one or more tangible (non-transitory) readable storage media (e.g., memory devices) encoded with software including computer executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.

[0155] The processor 701 implements any one of the methods in the above embodiments by reading and executing program instructions stored in the memory 702 .

[0156] In one example, the electronic device may further include a communication interface 703 and a bus 710. The processor 701, the memory 702, and the communication interface 703 are connected via the bus 710 and communicate with each other.

[0157] The communication interface 703 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.

[0158] Bus 710 includes hardware, software or both, and the parts of online data flow billing equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front-end bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 710 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the present application considers any suitable bus or interconnection.

[0159] In addition, in combination with the method in the above embodiment, the embodiment of the present application can provide a storage medium for implementation. The storage medium stores program instructions; when the program instructions are executed by a processor, any one of the methods in the above embodiment is implemented.

[0160] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0161] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0162] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0163] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.

[0164] The functional modules shown in the above block diagram can be implemented as hardware, software, firmware or their combination. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), suitable firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. Programs or code segments can be stored in machine-readable media, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable media" can include any medium that can store or transmit information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. Code segments can be downloaded via computer grids such as the Internet, intranets, etc.

[0165] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.

[0166] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.

[0167] The above are only specific implementation methods of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.

Claims

1. A remote power on / off detection method, characterized in that: Applied to a power-on device, the power-on device is set on the device to be controlled via a PS / 2 interface of the device to be controlled, and the method comprises: Receiving a control instruction sent by a user terminal, wherein the control instruction is a power-on instruction or a power-off instruction; Based on the instruction type of the control instruction, convert the control instruction into an interface instruction of a preset data type, the device to be controlled can recognize the preset data type, and the interface instruction is used to control the device to be controlled to turn on or off; Sending the interface instruction to the device to be controlled; Acquire status information generated by the device to be controlled executing the interface instruction; The state information is analyzed to obtain a control result of the device to be controlled, where the control result is used to indicate whether the device to be controlled is successfully powered on or powered off.

2. The method according to claim 1, characterized in that The control instruction is the power-on instruction; The step of converting the control instruction into an interface instruction of a preset data type based on the instruction type of the control instruction includes: Based on a preset parsing algorithm, the power-on instruction is parsed by the microprocessor of the power-on device to obtain a first PS / 2 keyboard command code, where the first PS / 2 keyboard command code is used to control a preset quick power-on key of the device to be controlled; The step of sending the interface instruction to the device to be controlled includes: The first PS / 2 keyboard command code is sent to the device to be controlled through the clock pin and the data pin of the PS / 2 interface.

3. The method according to claim 2, characterized in that The obtaining of the state information generated by the device to be controlled executing the interface instruction includes: Monitoring a first instruction sent by the device to be controlled and received by the clock pin and the data pin, wherein the first instruction is an instruction generated by the device to be controlled based on the first PS / 2 keyboard instruction code, and the first instruction is used to control the power-on device; After monitoring the first instruction sent by the device to be controlled and received by the clock pin and the data pin, the method further includes: When the first instruction is detected, a reply message is sent to the device to be controlled.

4. The method according to claim 3, characterized in that The analyzing the state information to obtain the control result of the device to be controlled includes: In the case where the first instruction is a disabling instruction, determining the disabling flag of the boot device as the first flag; In the case where the first instruction is an enabling instruction, determining the disabling flag as a second flag; In the case where the first instruction is a reset instruction, if the disable flag is the second flag, acquiring the number of times the first instruction is received; In a case where the number of reception times is greater than or equal to a first preset number of times, the control result is determined as a first result, where the first result is used to indicate that the device to be controlled is successfully powered on.

5. The method according to claim 1, characterized in that The control instruction is a shutdown instruction; The step of converting the control instruction into an interface instruction of a preset data type based on the instruction type of the control instruction includes: Based on a preset parsing algorithm, the shutdown command is parsed by the microprocessor of the power-on device to obtain a second PS / 2 keyboard command code, where the second PS / 2 keyboard command code is used to control a preset quick shutdown button of the device to be controlled; The step of sending the interface instruction to the device to be controlled includes: The second PS / 2 keyboard command code is sent to the device to be controlled through the clock pin and the data pin of the PS / 2 interface.

6. The method according to claim 5, characterized in that The obtaining of the state information generated by the device to be controlled executing the interface instruction includes: At every target time interval, obtaining the level state of the clock pin of the PS / 2 interface; The analyzing the state information to obtain the control result of the device to be controlled includes: When the level state is the first state, after a preset time, a test instruction is sent to the device to be controlled, the test instruction is used to simulate a keyboard start instruction, and the first state is used to indicate that the voltage of the clock pin is less than a first preset threshold; When the level state is in the second state, obtaining the number of consecutive times that the level state is in the second state, wherein the second state is used to indicate that the voltage of the clock pin is greater than a second preset threshold; When the consecutive number is greater than a second preset number, the control result is determined as a second result, and the second result is used to indicate that the device to be controlled is successfully shut down.

7. The method according to any one of claims 1 to 6, characterized in that: After acquiring the state information generated by the device to be controlled executing the interface instruction, the method further includes: Sending the status information to the user terminal; The sending the status information to the user terminal includes: When the timing time of the timer of the user terminal exceeds the target time threshold, the sending of the status information is stopped, and the timer starts timing when the user terminal sends the control instruction.

8. A remote power on / off detection device, characterized in that: Applied to a power-on device, the power-on device is arranged on the device to be controlled via a PS / 2 interface of the device to be controlled, and the device comprises: A receiving module, used to receive a control instruction sent by a user terminal, wherein the control instruction is a power-on instruction or a power-off instruction; A conversion module, used for converting the control instruction into an interface instruction of a preset data type based on the instruction type of the control instruction, the preset data type can be recognized by the device to be controlled, and the interface instruction is used to control the device to be controlled to turn on or off; A sending module, used for sending the interface instruction to the device to be controlled; An acquisition module, used for acquiring status information generated by the device to be controlled executing the interface instruction; The analysis module is used to analyze the state information to obtain a control result of the device to be controlled, wherein the control result is used to indicate whether the device to be controlled is successfully turned on or off.

9. An electronic device, characterized in that: The device comprises: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the remote power on / off detection method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by the processor, the remote power on / off detection method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Verification method for remote startup or wakeup through PS / 2 interface

    CN102088357A

  • Method, device and system for remote startup and shutdown

    CN103412629A

  • Remote startup method, device and system

    CN113326071A

  • Remote computer rebooting tool

    US20090210948A1

  • Device and method for remote computer operation

    US20150229509A1