Power-off protection method and system for industrial all-in-one machine

By monitoring external power fluctuations in real time and switching to backup power, combined with load power integration and data compression uploading, the problem of response lag and insufficient prediction in traditional power outage protection schemes is solved, realizing intelligent power outage protection for industrial all-in-one machines and ensuring data integrity and system stability.

CN121840877APending Publication Date: 2026-04-10GUANGDONG TOUCHWO TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-29
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Traditional power outage protection solutions suffer from delayed response and lack of predictive capabilities, leading to data loss and system downtime risks for industrial all-in-one machines, especially in complex multi-tasking environments where they cannot make optimal decisions.

Method used

Real-time monitoring of external power supply voltage fluctuations, switching to backup power, and estimating the backup power's usable time T1 and the data storage time T2 are all performed. Based on the comparison results, the optimal data storage strategy is selected, including sequential storage or emergency compression and uploading. The accuracy and reliability of the decision are ensured through voltage sensors, digital filtering, and load power integral calculation.

Benefits of technology

In the event of a sudden power outage, the system automatically selects the optimal data preservation strategy based on the actual power consumption and task status, thereby avoiding data loss, improving the reliability of protection and the efficiency of system operation, and reducing reliance on manual intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121840877A_ABST
    Figure CN121840877A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of power-off protection methods, and particularly relates to a power-off protection method and system for an industrial all-in-one machine. The method comprises the following steps: monitoring voltage fluctuation of an external power supply in real time, and generating a switching instruction when the voltage fluctuation exceeds a preset threshold value; controlling the power supply circuit to switch from an external power supply to a standby power supply; monitoring the electric quantity of a standby power supply in real time, calculating the estimated usable time T1 in combination with a system load, and meanwhile, sending state query to all application processes so as to calculate the longest estimated time T2 required for completely storing data; the T1 and the T2 are compared, if the T1 is larger than the T2, the data are stored in order, and if the T1 is smaller than or equal to the T2, emergency storage is carried out, and data compression and cloud uploading are started; and after power supply is recovered, when the voltage is stabilized above a set threshold value for a preset time length, switching back to the external power supply and charging the standby power supply. Through dynamic comparison and intelligent decision of T1 and T2, refined data protection under the power-off risk is realized, and data loss is effectively prevented.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the technical field of power failure protection methods, specifically relating to a power failure protection method and system for an industrial all-in-one machine. Background Technology

[0002] In the field of industrial automation, the stable operation of industrial all-in-one machines has a significant impact on the continuity of production lines and data security. Especially in harsh industrial environments, equipment needs to cope with various emergencies, such as abnormal power outages. Abnormal power outages may not only lead to the loss of production data, but also cause system configuration disorders or hardware damage, resulting in serious production accidents and economic losses.

[0003] Currently, although some solutions attempt to address power outages through backup power sources (such as UPS), traditional methods often have limitations. They currently focus more on emergency power supply at the hardware level, while neglecting the dynamic response and intelligent decision-making capabilities of software systems at the moment of power failure. For example, in complex multi-tasking environments, simple power outage protection cannot make optimal decisions based on remaining power and data preservation needs, which may result in the backup power being exhausted before data preservation is completed, failing to fundamentally solve the risk of data loss. Summary of the Invention

[0004] The technical problem to be solved by this invention is to overcome the risk of data loss and system downtime in industrial all-in-one machines caused by the delayed response and lack of predictive ability of traditional power failure protection schemes.

[0005] To address the aforementioned technical problems, a first aspect of the present invention discloses a power-off protection method for an industrial all-in-one machine, the method comprising:

[0006] Real-time monitoring of voltage fluctuation data from the external power supply; when the voltage fluctuation data exceeds a first preset threshold, a switching command is generated.

[0007] In response to the switching command, the power supply circuit is controlled to switch from an external power source to a backup power source to power the industrial all-in-one machine;

[0008] After switching to the backup power supply, the current power level of the backup power supply is monitored in real time, and the estimated usable time T1 of the backup power supply is calculated based on the current operating load of the industrial all-in-one machine. At the same time, status queries are sent to all running application processes in the industrial all-in-one machine, and the longest estimated time T2 required to completely save all process data is calculated based on the feedback data of each process.

[0009] The estimated usable time T1 is compared with the longest estimated time T2. If T1 is greater than T2, each application process is notified to perform data saving operations in a preset order. If T1 is less than or equal to T2, an emergency save command is immediately sent to all application processes, and data compression and cloud upload are started.

[0010] As an optional implementation, in the first aspect of the present invention, the real-time monitoring of voltage fluctuation data of the external power supply includes:

[0011] AC waveform data of the external power supply is acquired by a voltage sensor at a sampling frequency of not less than 1 kHz.

[0012] The effective value of the voltage is calculated, and a digital filtering algorithm is used to eliminate transient pulse interference.

[0013] The effective value of the filtered voltage is compared with a first preset threshold, which is dynamically adjusted based on historical power grid quality data of the environment in which the industrial all-in-one machine is located.

[0014] As an optional implementation, in the first aspect of the invention, the calculation of the estimated available time T1 of the backup power supply includes:

[0015] Obtain the current voltage, current, internal resistance parameters, and historical discharge curves of the backup power supply;

[0016] Based on the power consumption models of the current CPU, hard drive, and display screen of the industrial all-in-one machine, real-time load power integral calculation is performed;

[0017] A temperature-based attenuation factor is introduced to conservatively correct the calculation results. The calculation formula is: T1 = (current power consumption × attenuation factor) / current total load power, where the attenuation factor ranges from 0.8 to 0.95.

[0018] As an optional implementation, in the first aspect of the invention, the calculation of the longest estimated time T2 includes:

[0019] Send a status query request containing the data type, data size, and last saved timestamp to each application process;

[0020] Calculate the independent saving time for each process based on process priority, data size, and historical saving speed.

[0021] Take the maximum value of the save time for all processes as T2, and set time redundancy for high-priority processes.

[0022] As an optional implementation, in the first aspect of the present invention, the initiation of the data compression and cloud upload program includes:

[0023] Identify the core business data of the application process and compress it using a lossless compression algorithm;

[0024] Establish an encrypted communication link with the cloud server and upload compressed data in packets;

[0025] The system monitors the upload progress and the remaining power of the backup power supply in real time. When the power level is lower than the safety threshold, the compressed data is saved to the local non-volatile memory first.

[0026] As an optional implementation, in the first aspect of the invention, the method further includes a switching operation after power restoration:

[0027] The system continuously monitors the external power supply voltage. When the voltage recovers and stabilizes above the second preset threshold for a preset duration, a recovery command is generated.

[0028] The control power supply circuit switches from the backup power supply back to the external power supply and initiates the charging process for the backup power supply.

[0029] As an optional implementation, in the first aspect of the present invention, the method further includes an exception handling mechanism:

[0030] If an exception occurs during any step of the execution process, a rollback operation will be automatically triggered.

[0031] Log the exception and reinitialize the relevant software modules.

[0032] As an optional implementation, in the first aspect of the invention, the method further includes performance monitoring and optimization:

[0033] Real-time monitoring of the execution efficiency and resource usage of each software module;

[0034] The module's scheduling strategy and parameter configuration are dynamically adjusted based on monitoring results.

[0035] A second aspect of this invention discloses an industrial all-in-one computer power failure protection system, used to implement the industrial all-in-one computer power failure protection method described in any of the above embodiments, the system comprising:

[0036] The power monitoring module is used to monitor external power supply voltage fluctuations in real time.

[0037] The power switching control module is used to control the power supply circuit to switch between external power and backup power.

[0038] The power calculation module is used to monitor the power of the backup power supply in real time and estimate the estimated usable time T1;

[0039] The process management module is used to calculate the longest estimated time T2 required to save data;

[0040] The decision execution module is used to compare T1 and T2 and trigger the corresponding data saving strategy.

[0041] A third aspect of this invention discloses another power failure protection system for an industrial all-in-one machine, the system comprising:

[0042] Memory containing executable program code;

[0043] A processor coupled to the memory;

[0044] The processor calls the executable program code stored in the memory to execute the power failure protection method for an industrial all-in-one machine disclosed in the first aspect of the present invention.

[0045] The fourth aspect of the present invention discloses a computer-readable storage medium storing computer instructions, which, when invoked by a processor, are used to execute a power-off protection method for an industrial all-in-one machine disclosed in the first aspect of the present invention.

[0046] Compared with the prior art, the beneficial effects of the present invention are:

[0047] 1. By calculating and comparing the estimated usable time T1 of the backup power supply and the longest estimated time T2 required to completely save the data in real time, an intelligent decision-making core is constructed. This enables the system to automatically select the optimal data saving strategy based on the actual "power" and "task" situation, saving in normal order or uploading in emergency compression, avoiding data loss due to insufficient power estimation and improving the reliability of protection.

[0048] 2. By sending status queries to all application processes and calculating the retention time, this invention achieves refined management of the running program status. Combined with data compression and cloud upload mechanisms, it can provide dual protection for core data even in the most urgent situations, enhancing the data integrity of the industrial all-in-one machine in the event of a sudden power outage.

[0049] 3. This invention not only focuses on the switching at the moment of power failure, but also covers the automatic switching back after power restoration and the charging management of backup power, forming a fully automated closed-loop management from anomaly detection, intelligent decision-making, protection execution to state recovery, reducing the reliance on external manual intervention.

[0050] 4. Based on real-time load, the backup power usage time is estimated, and the task is scheduled and saved according to application priority, so that the limited backup power resources are used most effectively. The system's operating efficiency in emergency situations is optimized through dynamic resource allocation, ensuring the core tasks while also taking into account the speed of system recovery. Attached Figure Description

[0051] The specific embodiments of the present invention will be further described in detail below with reference to the accompanying drawings, wherein:

[0052] Figure 1 This is a flowchart illustrating a power failure protection method for an industrial all-in-one machine disclosed in an embodiment of the present invention;

[0053] Figure 2 This is a schematic diagram of the structure of an industrial all-in-one machine power failure protection system disclosed in an embodiment of the present invention;

[0054] Figure 3 This is a schematic diagram of another industrial all-in-one machine power failure protection system disclosed in an embodiment of the present invention. Detailed Implementation

[0055] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0056] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, apparatus, product, or end that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or ends.

[0057] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0058] This invention discloses a power failure protection method and system for industrial all-in-one machines. By calculating and comparing the estimated usable time T1 of the backup power supply and the longest estimated time T2 required to completely save the data in real time, an intelligent decision-making core is constructed. This enables the system to automatically select the optimal data saving strategy based on the actual "power" and "task" situation, either saving in normal order or uploading in emergency compression, thus avoiding data loss due to insufficient power estimation and improving the reliability of protection.

[0059] Example 1

[0060] Please see Figure 1 , Figure 1 This is a flowchart illustrating a power failure protection method for an industrial all-in-one machine disclosed in an embodiment of the present invention. Figure 1 The described power failure protection method for an industrial all-in-one machine is applied to a data processing chip, processing terminal, or processing server, and the processing server can be a local server or a cloud server; this embodiment of the invention does not limit the application. Figure 1 As shown, the power failure protection method for an industrial all-in-one machine may include the following operations:

[0061] 101. Monitor the voltage fluctuation data of the external power supply in real time, and generate a switching command when the voltage fluctuation data exceeds a first preset threshold.

[0062] Specifically, real-time monitoring of external power supply voltage fluctuations and generation of switching commands when they exceed preset thresholds has the primary benefit of providing a critical response time window for the system. By continuously monitoring voltage data, this step can identify anomalies in their early stages, reserving valuable preparation time for subsequent power switching and protection operations, thereby enabling proactive judgment of power supply status.

[0063] As can be seen, generating switching commands based on precise threshold comparisons ensures the accuracy and timeliness of subsequent protection actions. This mechanism avoids false triggering caused by slight instantaneous voltage fluctuations and also prevents response delays when real anomalies occur, providing a foundation for the reliable initiation of the entire power outage protection process.

[0064] 102. In response to the switching command, the power supply circuit is controlled to switch from the external power supply to the backup power supply to power the industrial all-in-one machine.

[0065] Specifically, in response to the switching command, the power supply circuit switches from the external power supply to the backup power supply. Its primary effect is to provide uninterrupted power supply for the industrial all-in-one machine. This operation ensures that the core system and critical loads can continue to operate during the period of main power failure, avoiding instantaneous system downtime caused by power interruption, and creating the necessary execution conditions for the subsequent orderly data saving process.

[0066] It is evident that this controlled switching process achieves seamless connection of power supply sources, reduces the impact of voltage dips or interruptions on the delicate circuits inside the equipment, and provides a stable underlying power environment for the software layer to execute a series of protection strategies such as status query, time calculation and data storage through fast and reliable hardware switching.

[0067] 103. After switching to the backup power supply, monitor the current power level of the backup power supply in real time, and calculate the estimated usable time T1 of the backup power supply based on the current operating load of the industrial all-in-one machine. At the same time, send status queries to all running application processes in the industrial all-in-one machine, and calculate the longest estimated time T2 required to completely save all process data based on the feedback data of each process.

[0068] Specifically, after switching to backup power, this invention achieves efficient synchronous acquisition of key decision parameters by performing power monitoring and process status query in parallel. This step optimizes the system's response process in emergency situations and saves valuable time for subsequent protection decision-making.

[0069] It is evident that the power supply duration T1 calculated through real-time load and the data storage requirement time T2 calculated based on process feedback together constitute the quantitative basis for intelligent decision-making. The synchronous generation of the above two key parameters provides reliable data support for the system to accurately assess the current situation and select the optimal data storage strategy.

[0070] 104. Compare the estimated usable time T1 with the longest estimated time T2. If T1 is greater than T2, notify each application process to perform data saving operations in a preset order. If T1 is less than or equal to T2, immediately send an emergency save command to all application processes and start the data compression and cloud upload process.

[0071] Specifically, by comparing the estimated available time T1 with the longest estimated time T2 and executing differentiated protection strategies based on the comparison results, this invention constructs a core intelligent decision-making mechanism. This mechanism can predict in advance whether the data saving task can be successfully completed before the power outage based on the quantitative relationship between available time and required time, thereby proactively avoiding the risk of data loss due to premature power depletion at the decision-making level.

[0072] As can be seen, triggering either "sequential saving" or "emergency compression and upload" based on the comparison results achieves an adaptive match between protection strength and resource status. When time is ample, sequential saving ensures business integrity, while when time is tight, compression and cloud upload provide additional protection for critical data. This tiered response strategy optimizes the overall certainty of protection effectiveness under limited resources.

[0073] As an optional embodiment, the real-time monitoring of voltage fluctuation data of the external power supply in the above steps includes:

[0074] AC waveform data of the external power supply is acquired by a voltage sensor at a sampling frequency of not less than 1 kHz.

[0075] The effective value of the voltage is calculated, and a digital filtering algorithm is used to eliminate transient pulse interference.

[0076] The effective value of the filtered voltage is compared with a first preset threshold, which is dynamically adjusted based on historical power grid quality data of the environment in which the industrial all-in-one machine is located.

[0077] In this embodiment of the invention, signal acquisition and preprocessing are included:

[0078] 1. Hardware configuration and signal conversion;

[0079] The voltage monitoring process begins with signal acquisition at the hardware level. The high-voltage AC power from the external power supply is first proportionally scaled by a precision resistor divider circuit to fit the input voltage range of the microprocessor's built-in ADC. The resulting voltage value... Compared to the original high pressure. The relationship is defined by the following formula:

[0080] ;

[0081] R1 and R2 are the resistance values ​​of the voltage divider resistors. To ensure accuracy, metal film resistors with an error within ±1% and a low temperature coefficient are selected. The sampling frequency of the ADC should not be lower than 1kHz to ensure that it can capture rapid changes in the power supply voltage and meet the requirements of the sampling theorem.

[0082] 2. RMS value calculation and digital filtering;

[0083] Acquired discrete voltage instantaneous values It needs to be converted to an effective value to accurately characterize its work capacity. For N sample points collected within one power frequency cycle, the effective voltage value... Calculated using the following formula:

[0084] ;

[0085] This calculation is based on the principle of the thermal effect of electric current, and the resulting effective value is equivalent to the DC voltage value that generates the same amount of heat. To eliminate transient pulse interference, it is necessary to... The sequence is digitally filtered. A composite filtering strategy can be used: by applying an amplitude limiting filter, if the deviation between adjacent sample values ​​exceeds a preset range (such as 10% of the rated voltage), it is considered interference and discarded; then, the data that has passed the amplitude limiting is subjected to a moving average filter to further smooth out random fluctuations.

[0086] 3. Dynamic threshold comparison and anomaly detection;

[0087] The filtered effective voltage value needs to be compared with a dynamically adjusted preset threshold. First preset threshold. It is not a fixed value, but rather a dynamically adjusted voltage quality baseline established based on historical normal operation data. The calculation can be found here:

[0088] ;

[0089] in, It is the historical average voltage. It is the historical voltage standard deviation. To adjust the coefficient (usually 1.5-2.5) and prevent false triggering, a hysteresis comparison mechanism is required: only when the voltage value is continuously lower than the threshold for more than a predetermined time window is the abnormal trend finally confirmed and a switching command generated.

[0090] As can be seen, the above steps, through clear algorithm selection and parameter design, ensure the real-time performance, accuracy, and reliability of the voltage monitoring process, providing a high-quality data foundation for subsequent intelligent decision-making.

[0091] As an optional embodiment, the step of calculating the estimated available time T1 of the backup power supply in the above steps includes:

[0092] Obtain the current voltage, current, internal resistance parameters, and historical discharge curves of the backup power supply;

[0093] Based on the power consumption models of the current CPU, hard drive, and display screen of the industrial all-in-one machine, real-time load power integral calculation is performed;

[0094] A temperature-based attenuation factor is introduced to conservatively correct the calculation results. The calculation formula is: T1 = (current power consumption × attenuation factor) / current total load power, where the attenuation factor ranges from 0.8 to 0.95.

[0095] In this embodiment of the invention, the system obtains the current output voltage of the battery pack in real time through the sensor interface of the backup power management unit. Discharge current and internal resistance Parameters. Simultaneously, standard discharge curve data for this type of battery is retrieved from the historical operating database. Based on the ampere-hour integral formula. Calculate the current remaining battery power. ,in This refers to the battery's rated capacity. The basic theoretical usable time is... Preliminary calculations based on the law of conservation of energy: in The real-time total load power is calculated for subsequent steps;

[0096] By collecting multiple battery parameters in real time and combining them with historical data, a precise data foundation is provided for subsequent calculations. The ampere-hour integration method for calculating remaining capacity fully considers the actual discharge process of the battery, avoiding errors caused by simply relying on voltage to estimate capacity, thus ensuring accuracy. The accuracy of the initial values.

[0097] As can be seen, the system initiates a low-power background task to periodically re-collect battery voltage, current, and load power at specific intervals (e.g., per second). It compares the latest calculated T1 with the value of the previous cycle. If the actual discharge rate (based on voltage drop and current integral) deviates from the rate calculated from the current T1 by more than a preset threshold (e.g., 15%), a recalculation process is immediately triggered to update the T1 value. This ensures that the system always makes decisions based on the latest and most accurate estimated time. This mechanism ensures that the T1 estimate is not a static, one-off prediction, but a dynamic parameter that can respond to sudden changes in system load or changes in the battery's own discharge characteristics. It effectively solves the problem of inaccurate estimated time caused by sudden increases in load or nonlinear battery discharge, giving the entire protection system self-correcting capabilities.

[0098] As an optional embodiment, the step of calculating the longest estimated time T2 in the above steps includes:

[0099] Send a status query request containing the data type, data size, and last saved timestamp to each application process;

[0100] Calculate the independent saving time for each process based on process priority, data size, and historical saving speed.

[0101] Take the maximum value of the save time for all processes as T2, and set time redundancy for high-priority processes.

[0102] In this embodiment of the invention, by sending detailed status query requests to each application process and calculating the independent storage time by comprehensively considering multiple factors such as process priority, data volume, and historical performance, the above method achieves a refined assessment of the system's data storage requirements. This process ensures that the final T2 time comes from an accurate perception of the system's actual load, providing a reliable data foundation for subsequent decision-making.

[0103] As can be seen, by taking the maximum value of the saving time of all processes as T2 and setting additional time redundancy for high-priority processes, this strategy constructs a conservative but safe prediction mechanism. The above method prioritizes the possibility of completing critical tasks and provides a time buffer for the system to orderly save core data in emergency situations.

[0104] As an optional embodiment, the step of initiating the data compression and cloud upload program in the above steps includes:

[0105] Identify the core business data of the application process and compress it using a lossless compression algorithm;

[0106] Establish an encrypted communication link with the cloud server and upload compressed data in packets;

[0107] The system monitors the upload progress and the remaining power of the backup power supply in real time. When the power level is lower than the safety threshold, the compressed data is saved to the local non-volatile memory first.

[0108] In this embodiment of the invention, by identifying core business data and compressing it using a lossless compression algorithm, the method effectively reduces the amount of data transmitted over the network while ensuring the integrity of key information. Combined with the establishment of an encrypted communication link, it creates a full-process protection channel for data from local to cloud.

[0109] As can be seen, by monitoring the upload progress and backup power in real time, and automatically saving the data to local non-volatile storage when the power is below the safety threshold, this strategy builds a dual protection mechanism of cloud upload and local storage. This dynamic adjustment method ensures that core data can always receive the highest priority protection under uncertain external environment conditions.

[0110] As an optional embodiment, the method described above further includes a switching operation after power restoration:

[0111] The system continuously monitors the external power supply voltage. When the voltage recovers and stabilizes above the second preset threshold for a preset duration, a recovery command is generated.

[0112] The control power supply circuit switches from the backup power supply back to the external power supply and initiates the charging process for the backup power supply.

[0113] In this embodiment of the invention, by continuously monitoring the external power supply voltage and generating a recovery command after it stabilizes above a threshold for a preset time, the method provides the system with a reliable basis for judging power quality. This step, based on a continuous stability judgment mechanism, avoids frequent switching caused by instantaneous voltage recovery, ensuring the authenticity and reliability of power supply recovery.

[0114] As can be seen, by switching the control power supply circuit back to the external power supply and simultaneously starting to charge the backup power supply, a complete system state recovery process is established. This operation not only restores the main power supply circuit to normal, but also provides a reserve for the backup power supply's subsequent emergency capabilities, thus forming a closed-loop power management system.

[0115] As an optional embodiment, the method described above further includes an exception handling mechanism:

[0116] If an exception occurs during any step of the execution process, a rollback operation will be automatically triggered.

[0117] Log the exception and reinitialize the relevant software modules.

[0118] In this embodiment of the invention, a rollback operation is automatically triggered when an exception occurs during the execution of any step. This step ensures that the system maintains the consistency of its state when encountering unexpected errors. By reversing the execution of the previously performed steps through this mechanism, data chaos or system logic conflicts caused by partially successful or partially failed operations are effectively avoided, providing the system with a reliable fault isolation and recovery path.

[0119] As can be seen, by recording exception logs and reinitializing relevant software modules, this mechanism establishes a complete audit trail and capability recovery guarantee for exception events. Detailed logs provide key contextual information for problem localization, while the reinitialization of modules ensures that affected components can continue to run from a clean and definite state, thereby improving the efficiency and thoroughness of the system's automatic recovery from errors.

[0120] As an optional embodiment, the method described above further includes performance monitoring and optimization:

[0121] Real-time monitoring of the execution efficiency and resource usage of each software module;

[0122] The module's scheduling strategy and parameter configuration are dynamically adjusted based on monitoring results.

[0123] In this embodiment of the invention, by monitoring the execution efficiency and resource usage of each software module in real time, the method can continuously collect key performance indicators during system operation, providing a data foundation for identifying performance bottlenecks and the rationality of resource allocation. This continuous monitoring mechanism enables the system to promptly perceive changes in its operating status, providing an accurate basis for subsequent optimization decisions.

[0124] As can be seen, the scheduling strategy and parameter configuration of the module are dynamically adjusted based on the monitoring results, enabling the system to adaptively optimize its operating mode according to the actual load and resource status. This dynamic adjustment mechanism ensures that the allocation of computing resources among different tasks can match the actual needs, thereby improving the overall resource utilization efficiency and responsiveness of the system.

[0125] Example 2

[0126] Please see Figure 2 , Figure 2 This is a schematic diagram of the structure of an industrial all-in-one machine power failure protection system disclosed in an embodiment of the present invention. Wherein, Figure 2 The described industrial all-in-one machine power failure protection system can be applied to data processing chips, processing terminals, or processing servers, and the processing server can be a local server or a cloud server; this embodiment of the invention does not limit the application. Figure 2 As shown, the power failure protection system for an industrial all-in-one machine may include the following operations:

[0127] The power monitoring module 201 is used to monitor external power supply voltage fluctuations in real time.

[0128] The power switching control module 202 is used to control the power supply circuit to switch between external power supply and backup power supply.

[0129] Specifically, real-time monitoring of external power supply voltage fluctuations and generation of switching commands when they exceed preset thresholds has the primary benefit of providing a critical response time window for the system. By continuously monitoring voltage data, this step can identify anomalies in their early stages, reserving valuable preparation time for subsequent power switching and protection operations, thereby enabling proactive judgment of power supply status.

[0130] As can be seen, generating switching commands based on precise threshold comparisons ensures the accuracy and timeliness of subsequent protection actions. This mechanism avoids false triggering caused by slight instantaneous voltage fluctuations and also prevents response delays when real anomalies occur, providing a foundation for the reliable initiation of the entire power outage protection process.

[0131] The power measurement module 203 is used to monitor the power of the backup power supply in real time and estimate the estimated usable time T1.

[0132] Specifically, in response to the switching command, the power supply circuit switches from the external power supply to the backup power supply. Its primary effect is to provide uninterrupted power supply for the industrial all-in-one machine. This operation ensures that the core system and critical loads can continue to operate during the period of main power failure, avoiding instantaneous system downtime caused by power interruption, and creating the necessary execution conditions for the subsequent orderly data saving process.

[0133] It is evident that this controlled switching process achieves seamless connection of power supply sources, reduces the impact of voltage dips or interruptions on the delicate circuits inside the equipment, and provides a stable underlying power environment for the software layer to execute a series of protection strategies such as status query, time calculation and data storage through fast and reliable hardware switching.

[0134] The process management module 204 is used to calculate the longest estimated time T2 required for data storage.

[0135] Specifically, after switching to backup power, this invention achieves efficient synchronous acquisition of key decision parameters by performing power monitoring and process status query in parallel. This step optimizes the system's response process in emergency situations and saves valuable time for subsequent protection decision-making.

[0136] It is evident that the power supply duration T1 calculated through real-time load and the data storage requirement time T2 calculated based on process feedback together constitute the quantitative basis for intelligent decision-making. The synchronous generation of the above two key parameters provides reliable data support for the system to accurately assess the current situation and select the optimal data storage strategy.

[0137] The decision execution module 205 is used to compare T1 and T2 and trigger the corresponding data saving strategy.

[0138] Specifically, by comparing the estimated available time T1 with the longest estimated time T2 and executing differentiated protection strategies based on the comparison results, this invention constructs a core intelligent decision-making mechanism. This mechanism can predict in advance whether the data saving task can be successfully completed before the power outage based on the quantitative relationship between available time and required time, thereby proactively avoiding the risk of data loss due to premature power depletion at the decision-making level.

[0139] As can be seen, triggering either "sequential saving" or "emergency compression and upload" based on the comparison results achieves an adaptive match between protection strength and resource status. When time is ample, sequential saving ensures business integrity, while when time is tight, compression and cloud upload provide additional protection for critical data. This tiered response strategy optimizes the overall certainty of protection effectiveness under limited resources.

[0140] Example 3

[0141] Please see Figure 3 , Figure 3 This is a schematic diagram of another industrial all-in-one machine power failure protection system disclosed in an embodiment of the present invention. Figure 3 As shown, the device may include:

[0142] Memory 301 storing executable program code;

[0143] Processor 302 coupled to memory 301;

[0144] The processor 302 calls the executable program code stored in the memory 301 to execute some or all of the steps in the power failure protection method for an industrial all-in-one machine disclosed in Embodiment 1 of the present invention.

[0145] Example 4

[0146] This invention discloses a computer storage medium storing computer instructions. When these computer instructions are invoked, they are used to execute some or all of the steps in the power failure protection method for an industrial all-in-one machine disclosed in Embodiment 1 of this invention.

[0147] Example 5

[0148] This invention discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to perform the steps of an industrial all-in-one machine power failure protection method described in Embodiment 1.

[0149] The system embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0150] Through the detailed description of the above embodiments, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, including read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-Erasable Programmable Read-Only Memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.

[0151] Finally, it should be noted that the power failure protection method and system for an industrial all-in-one machine disclosed in the embodiments of the present invention are merely preferred embodiments of the present invention and are only used to illustrate the technical solutions of the present invention, not to limit it. Although the present invention has been described in detail 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 of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A power failure protection method for an industrial all-in-one machine, characterized in that, The method includes: Real-time monitoring of voltage fluctuation data from the external power supply; when the voltage fluctuation data exceeds a first preset threshold, a switching command is generated. In response to the switching command, the power supply circuit is controlled to switch from an external power source to a backup power source to power the industrial all-in-one machine; After switching to the backup power supply, the current power level of the backup power supply is monitored in real time, and the estimated usable time T1 of the backup power supply is calculated based on the current operating load of the industrial all-in-one machine. At the same time, status queries are sent to all running application processes in the industrial all-in-one machine, and the longest estimated time T2 required to completely save all process data is calculated based on the feedback data of each process. The estimated usable time T1 is compared with the longest estimated time T2. If T1 is greater than T2, each application process is notified to perform data saving operations in a preset order. If T1 is less than or equal to T2, an emergency save command is immediately sent to all application processes, and data compression and cloud upload are started.

2. The power failure protection method for an industrial all-in-one machine according to claim 1, characterized in that, The real-time monitoring of external power supply voltage fluctuation data includes: AC waveform data of the external power supply is acquired by a voltage sensor at a sampling frequency of not less than 1 kHz. The effective value of the voltage is calculated, and a digital filtering algorithm is used to eliminate transient pulse interference. The effective value of the filtered voltage is compared with a first preset threshold, which is dynamically adjusted based on historical power grid quality data of the environment in which the industrial all-in-one machine is located.

3. The power failure protection method for an industrial all-in-one machine according to claim 1, characterized in that, The estimated available time T1 of the backup power supply includes: Obtain the current voltage, current, internal resistance parameters, and historical discharge curves of the backup power supply; Based on the power consumption models of the current CPU, hard drive, and display screen of the industrial all-in-one machine, real-time load power integral calculation is performed; A temperature-based attenuation factor is introduced to conservatively correct the calculation results. The calculation formula is: T1 = (current power consumption × attenuation factor) / current total load power, where the attenuation factor ranges from 0.8 to 0.

95.

4. The power failure protection method for an industrial all-in-one machine according to claim 1, characterized in that, The calculation of the longest estimated time T2 includes: Send a status query request containing the data type, data size, and last saved timestamp to each application process; Calculate the independent saving time for each process based on process priority, data size, and historical saving speed. Take the maximum value of the save time for all processes as T2, and set time redundancy for high-priority processes.

5. The power failure protection method for an industrial all-in-one machine according to claim 1, characterized in that, The startup data compression and cloud upload program includes: Identify the core business data of the application process and compress it using a lossless compression algorithm; Establish an encrypted communication link with the cloud server and upload compressed data in packets; The system monitors the upload progress and the remaining power of the backup power supply in real time. When the power level is lower than the safety threshold, the compressed data is saved to the local non-volatile memory first.

6. The power failure protection method for an industrial all-in-one machine according to claim 1, characterized in that, The method also includes a switching operation after power restoration: The system continuously monitors the external power supply voltage. When the voltage recovers and stabilizes above the second preset threshold for a preset duration, a recovery command is generated. The control power supply circuit switches from the backup power supply back to the external power supply and initiates the charging process for the backup power supply.

7. The power failure protection method for an industrial all-in-one machine according to claim 1, characterized in that, The method also includes an exception handling mechanism: If an exception occurs during any step of the execution process, a rollback operation will be automatically triggered. Log the exception and reinitialize the relevant software modules.

8. The power failure protection method for an industrial all-in-one machine according to claim 1, characterized in that, The method also includes performance monitoring and optimization: Real-time monitoring of the execution efficiency and resource usage of each software module; The module's scheduling strategy and parameter configuration are dynamically adjusted based on monitoring results.

9. An industrial all-in-one machine power failure protection system, used to implement the industrial all-in-one machine power failure protection method according to any one of claims 1-8, characterized in that, The system includes: The power monitoring module is used to monitor external power supply voltage fluctuations in real time. The power switching control module is used to control the power supply circuit to switch between external power and backup power. The power calculation module is used to monitor the power of the backup power supply in real time and estimate the estimated usable time T1; The process management module is used to calculate the longest estimated time T2 required to save data; The decision execution module is used to compare T1 and T2 and trigger the corresponding data saving strategy.

10. A power failure protection system for an industrial integrated machine, characterized in that, The system includes: Memory containing executable program code; A processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the power failure protection method for an industrial all-in-one machine as described in any one of claims 1-8.