A power-off protection system and method for automatically executing power-off of an industrial computer at the end of a shift
The automatic shutdown system, which uses image recognition and logic judgment, solves the problem of industrial control computers not shutting down properly after get off work hours, realizes automated power-off protection for industrial control computers, and improves production efficiency and equipment lifespan.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 山西昆明烟草有限责任公司
- Filing Date
- 2026-03-24
- Publication Date
- 2026-07-03
AI Technical Summary
Frequent malfunctions of existing industrial control computers (ICCs) caused by failure to shut them down properly after get off work hours are due to the lack of effective protection for the hardware and software systems of the ICCs in existing power-off protection technologies. This results in long repair cycles, reduced production efficiency, and shorter lifespan.
It employs an image acquisition module, an image recognition and status decision module, and an automatic shutdown execution module. Through image recognition and logical judgment, it automatically executes the shutdown process at the end of the workday, including a timed self-start mode and a forced start mode. It combines a perceptual hash algorithm and a color space model to determine the device status and achieve automatic shutdown.
It realizes automated power failure protection for industrial control computers, reduces production downtime, improves production efficiency, and extends the service life of industrial control computers.
Smart Images

Figure CN122331733A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial control computer technology, specifically to a power-off protection system and method for automatically shutting down an industrial control computer at the end of the workday. Background Technology
[0002] As a crucial component of the integrated platform for tobacco production and management, the stable operation of industrial control computers (ICCs) is essential for ensuring normal production in the workshop. During production, ICCs frequently experience hardware and software malfunctions, such as failure to start or inability to activate operating software (e.g., QR code terminal testing systems). Investigations reveal that these problems are often caused by improper operation, such as failing to close applications after get off work, improper application exit, or directly powering off the ICC. Current troubleshooting methods primarily involve reinstalling the system and software, which is not only time-consuming and severely impacts production progress and efficiency but also shortens the lifespan of the ICC.
[0003] Current mainstream power outage protection technologies are mainly based on electrical signals, mechanical structures, or sensors. Their core is to modify the hardware of mechanical equipment, and they lack effective power outage protection technologies for industrial control computer hardware and software systems. Summary of the Invention
[0004] In order to solve the problem of industrial control computers failing to shut down properly at the end of the workday in the prior art, the present invention provides a power-off protection system and method for automatically shutting down industrial control computers at the end of the workday.
[0005] This invention is achieved using the following technical solution:
[0006] A power-off protection system for an industrial control computer that automatically shuts down at the end of the workday includes a program startup control module, an image acquisition module, an image recognition and status decision module, and an automatic shutdown execution module.
[0007] The image acquisition module captures the target device's display interface at a fixed point by using the coordinate area of a pre-defined graphical user interface. The acquired image data includes images of the current shift time area, the production display area, and the equipment operating status indicator area.
[0008] The program startup control module includes a timed auto-start mode and a forced startup mode. The timed auto-start mode configures a standard image template library containing all possible shift information. It calculates the hash Hamming distance between the image acquired by the image acquisition module in real-time for the current shift time area and each image in the standard image template library. When the calculated hash Hamming distance is less than a preset threshold, a successful match is determined, thus determining the current shift time. When the system time reaches the determined auto-start time threshold for the current shift time, it enters the timed auto-start mode. The forced startup mode includes two triggering methods: shortcut key triggering and desktop icon interaction.
[0009] When the program enters the timed auto-start mode or forced start mode, the image recognition and status decision module analyzes and judges the images acquired by the image acquisition module, and executes the corresponding equipment control logic according to the analysis and judgment results. The specific analysis and judgment steps are as follows: a) Feature extraction and comparison: The perceptual hash algorithm is used to compare the real-time acquired production display area image with the reference image to determine whether the production value has changed. At the same time, the color space model is used to perform color recognition on the running status indicator area image to distinguish the equipment running status (the preset red pixel threshold corresponds to the "running" status, and the yellow pixel threshold corresponds to the "stopping" status); b) Status logic judgment: The production value information and the equipment running status information are combined for dual logic authentication. If the production value has not changed and the stopping status color is identified in three consecutive scanning cycles, it is determined that the equipment is not running. If the production value has changed or the running status color is identified, it is determined that the equipment is still running, the image is re-acquired, and the process returns to step a.
[0010] The automatic shutdown execution module uses a preset shutdown process based on mouse operation trajectory. When the image recognition and status decision module determines that the device is not running, it uses simulated mouse clicks and path control to realize the normal shutdown process (the normal shutdown process is to execute shutdown submission, application exit, and normal shutdown of the operating system).
[0011] A power-off protection method for automatically shutting down an industrial control computer at the end of the workday includes the following steps:
[0012] 1) Startup Mode Selection: Startup modes are divided into scheduled auto-start mode and forced start mode. The scheduled auto-start mode is triggered by pre-configuring a standard image template library containing information on all possible shifts, collecting images of the current shift time area in real time, and calculating the hash value Hamming distance between the real-time collected images of the current shift time area and each image in the standard image template library. When the calculated hash value Hamming distance is less than a preset threshold, it is considered a successful match, thus determining the current shift time. When the system time reaches the auto-start time threshold of the determined current shift time, it enters the scheduled auto-start mode. The forced start mode includes two triggering methods: shortcut key triggering and desktop icon interaction.
[0013] 2) When the program enters the timed auto-start mode or forced start mode, it acquires the current image in real time and analyzes and judges it. At the same time, it executes the corresponding equipment control logic according to the analysis and judgment results. The specific analysis and judgment steps are as follows: a) Feature extraction and comparison: The perceptual hash algorithm is used to compare the real-time acquired production display area image with the reference image to determine whether the production value has changed. At the same time, the color space model is used to perform color recognition on the running status indicator area image to distinguish the equipment running status (the preset red pixel threshold corresponds to the "running" status, and the yellow pixel threshold corresponds to the "stopping" status); b) Status logic judgment: The production value information and the equipment running status information are combined for dual logic authentication. If the production value has not changed and the stopping status color is identified in three consecutive scanning cycles, the automatic shutdown confirmation process is entered. If the production value has changed or the running status color is identified, it is determined that the equipment is still running, the image is re-acquired, and the process returns to step a.
[0014] 3) Preset the mouse operation trajectory for the shutdown process at the end of the workday. When it is determined through step 2) that the device is not running, the mouse click and path control method is used to realize the normal shutdown process at the end of the workday (the normal shutdown process at the end of the workday is to execute the shutdown submission, application exit, and normal shutdown of the operating system).
[0015] The beneficial effects of this invention are as follows: The power failure protection system described in this invention can automatically detect production stoppages, execute shutdown of industrial control software and shutdown of industrial control computers after get off work hours, thereby realizing power failure protection for industrial control computer systems and effectively improving production efficiency; at the same time, the system is highly scalable and applicable to multiple operating systems such as Linux, macOS, and Windows, and can be applied to most equipment that requires automated operation. Attached Figure Description
[0016] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, those skilled in the art can obtain other drawings based on these drawings without creative effort.
[0018] Figure 1 This is a flowchart of the power failure protection method described in this invention. Detailed Implementation
[0019] To better understand the above-mentioned objectives, features, and advantages of the present invention, the solutions of the present invention will be further described below. It should be noted that, unless otherwise specified, the embodiments of the present invention and the features thereof can be combined with each other.
[0020] Many specific details are set forth in the following description in order to provide a full understanding of the invention, but the invention may also be practiced in other ways different from those described herein; obviously, the embodiments in the specification are only some embodiments of the invention, and not all embodiments.
[0021] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0022] A power-off protection system for an industrial control computer that automatically shuts down at the end of the workday includes a program startup control module, an image acquisition module, an image recognition and status decision module, and an automatic shutdown execution module.
[0023] The image acquisition module captures the target device's display interface at a fixed point by using the coordinate area of a pre-defined graphical user interface. The acquired image data includes images of the current shift time area, the production display area, and the equipment operating status indicator area.
[0024] The program startup control module includes a timed auto-start mode and a forced startup mode. The timed auto-start mode configures a standard image template library containing all possible shift information. It calculates the hash Hamming distance between the image acquired by the image acquisition module in real-time for the current shift time area and each image in the standard image template library. When the calculated hash Hamming distance is less than a preset threshold, a successful match is determined, thus determining the current shift time. When the system time reaches the determined auto-start time threshold for the current shift time, it enters the timed auto-start mode. The forced startup mode includes two triggering methods: shortcut key triggering and desktop icon interaction.
[0025] When the program enters the timed auto-start mode or forced start mode, the image recognition and status decision module analyzes and judges the images acquired by the image acquisition module, and executes the corresponding equipment control logic according to the analysis and judgment results. The specific analysis and judgment steps are as follows: a) Feature extraction and comparison: The perceptual hash algorithm is used to compare the real-time acquired production display area image with the reference image to determine whether the production value has changed. At the same time, the color space model is used to perform color recognition on the running status indicator area image to distinguish the equipment running status (the preset red pixel threshold corresponds to the "running" status, and the yellow pixel threshold corresponds to the "stopping" status); b) Status logic judgment: The production value information and the equipment running status information are combined for dual logic authentication. If the production value has not changed and the stopping status color is identified in three consecutive scanning cycles, it is determined that the equipment is not running. If the production value has changed or the running status color is identified, it is determined that the equipment is still running, the image is re-acquired, and the process returns to step a.
[0026] The automatic shutdown execution module uses a preset shutdown process based on mouse operation trajectory. When the image recognition and status decision module determines that the device is not running, it uses simulated mouse clicks and path control to realize the normal shutdown process (the normal shutdown process is to execute shutdown submission, application exit, and normal shutdown of the operating system).
[0027] A power-off protection method for automatically shutting down an industrial control computer at the end of the workday includes the following steps:
[0028] 1) Startup Mode Selection: Scheduled Auto-Start Mode and Forced Start Mode; The scheduled auto-start mode is triggered by pre-configuring a standard image template library containing information on all possible shifts, collecting images of the current shift time area in real time, and calculating the hash Hamming distance between the real-time collected images of the current shift time area and each image in the standard image template library. When the calculated hash Hamming distance is less than a preset threshold, it is considered a successful match, thus determining the current shift time. When the system time reaches the auto-start time threshold of the determined current shift time, it enters the scheduled auto-start mode; The forced start mode includes two triggering methods: shortcut key triggering and desktop icon interaction.
[0029] 2) When the program enters the timed auto-start mode or forced start mode, it acquires the current image in real time and analyzes and judges it. At the same time, it executes the corresponding equipment control logic according to the analysis and judgment results. The specific analysis and judgment steps are as follows: a) Feature extraction and comparison: The perceptual hash algorithm is used to compare the real-time acquired production display area image with the reference image to determine whether the production value has changed. At the same time, the color space model is used to perform color recognition on the running status indicator area image to distinguish the equipment running status (the preset red pixel threshold corresponds to the "running" status, and the yellow pixel threshold corresponds to the "stopping" status); b) Status logic judgment: The production value information and the equipment running status information are combined for dual logic authentication. If the production value has not changed and the stopping status color is identified in three consecutive scanning cycles, the automatic shutdown confirmation process is entered. If the production value has changed or the running status color is identified, it is determined that the equipment is still running, the image is re-acquired, and the process returns to step a.
[0030] 3) Preset the mouse operation trajectory for the shutdown process at the end of the workday. When it is determined through step 2) that the device is not running, the mouse click and path control method is used to realize the normal shutdown process at the end of the workday (the normal shutdown process at the end of the workday is to execute the shutdown submission, application exit, and normal shutdown of the operating system).
[0031] Verification showed that after adopting the power failure protection system described in this invention, the average daily production downtime caused by the industrial control computer was reduced from 19.18 minutes to 5.36 minutes, a reduction of 13.99 minutes, which greatly improved production efficiency and also indirectly extended the service life of the industrial control computer.
[0032] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the present invention. Although detailed descriptions have been provided with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments, and they should all be covered within the protection scope of the claims.
Claims
1. A power-off protection system for an industrial control computer that automatically shuts down at the end of the workday, characterized in that, It includes a program startup control module, an image acquisition module, an image recognition and status decision module, and an automatic shutdown execution module; The image acquisition module captures the target device's display interface at a fixed point by using the coordinate area of a pre-defined graphical user interface. The acquired image data includes images of the current shift time area, the production display area, and the equipment operating status indicator area. The program startup control module includes a timed auto-start mode and a forced startup mode. The timed auto-start mode configures a standard image template library containing all possible shift information. It calculates the hash Hamming distance between the image acquired by the image acquisition module in real-time for the current shift time area and each image in the standard image template library. When the calculated hash Hamming distance is less than a preset threshold, a successful match is determined, thus determining the current shift time. When the system time reaches the determined auto-start time threshold for the current shift time, it enters the timed auto-start mode. The forced startup mode includes two triggering methods: shortcut key triggering and desktop icon interaction. When the program enters the timed auto-start mode or forced start mode, the image recognition and status decision module analyzes and judges the image acquired by the image acquisition module, and executes the corresponding equipment control logic according to the analysis and judgment results. The specific analysis and judgment steps are as follows: a. Feature extraction and comparison: The perceptual hash algorithm is used to compare the real-time acquired production display area image with the reference image to determine whether the production value has changed. At the same time, the color space model is used to perform color recognition on the running status indicator area image to distinguish the equipment running status. b. Status logic determination: Combine production value information and equipment operation status information for dual logic authentication. If the production value does not change and the shutdown status color is detected in three consecutive scanning cycles, it is determined that the equipment is not running. If the production value changes or the running status color is detected, it is determined that the equipment is still running. Re-acquire the image and return to step a. The automatic shutdown execution module uses a preset mouse operation trajectory for the shutdown process at the end of the workday. When the image recognition and status decision module determines that the device is not running, it uses a simulated mouse click and path control method to realize the normal shutdown process at the end of the workday.
2. A power-off protection method for an industrial control computer to automatically execute shutdown at the end of the workday, characterized in that, Includes the following steps: 1) Startup Mode Selection: Scheduled Auto-Start Mode and Forced Start Mode; The scheduled auto-start mode is triggered by pre-configuring a standard image template library containing information on all possible shifts, collecting images of the current shift time area in real time, and calculating the hash Hamming distance between the real-time collected images of the current shift time area and each image in the standard image template library. When the calculated hash Hamming distance is less than a preset threshold, it is considered a successful match, thus determining the current shift time. When the system time reaches the auto-start time threshold of the determined current shift time, it enters the scheduled auto-start mode; The forced start mode includes two triggering methods: shortcut key triggering and desktop icon interaction. 2) When the program enters the timed auto-start mode or forced start mode, it collects the current image in real time and analyzes and judges it. At the same time, it executes the corresponding equipment control logic according to the analysis and judgment results. The specific analysis and judgment steps are as follows: a. Feature extraction and comparison: The perceptual hash algorithm is used to compare the real-time collected production display area image with the reference image to determine whether the production value has changed. At the same time, the color space model is used to perform color recognition on the running status indicator area image to distinguish the equipment running status. b. Status logic determination: Combine production value information and equipment operation status information for dual logic authentication. If the production value does not change and the shutdown status color is detected in three consecutive scanning cycles, the automatic shutdown confirmation process is entered. If the production value changes or the operation status color is detected, the equipment is determined to be still running, the image is re-acquired and the process returns to step a. 3) Preset the mouse operation trajectory for the shutdown process at the end of the workday. When it is determined through step 2) that the device is not running, the mouse click and path control method is used to realize the normal shutdown process at the end of the workday.