Embroidery industrial personal computer power-down data storage method and system

By introducing the division of labor between core A and core B in the embroidery industrial control machine, data storage is realized when the power is disconnected, the problem of data loss when the embroidery industrial control machine is powered off is solved, and the efficiency and reliability of data storage are improved.

CN119415011APending Publication Date: 2025-02-11FUZHOU HUICHUANG INTELLIGENT CONTROL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411246884.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-06
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

The embroidery industrial control machine cannot effectively save the operating data when power is lost, resulting in the loss of operating data after power recovery, affecting the normal operation of the embroidery machine.

Method used

By introducing the division of labor between core A and core B in the embroidery industrial control machine, core A monitors the power signal in real time and sends data saving instructions to core B when the power is disconnected. Core B turns off the power supply of peripheral functions, reads operating data, and reduces the amount of data through data cleaning and compression, and finally stores the compressed data to the solid-state hard disk.

Benefits of technology

It improves the efficiency and reliability of power-down data storage of embroidery industrial control machines, ensures that the operating data can be fully restored during power recovery, and avoids the problem of data loss.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119415011A_ABST
    Figure CN119415011A_ABST
Patent Text Reader

Abstract

The invention provides a power-down data storage method and system for an embroidery industrial personal computer in the technical field of embroidery machines, and the method comprises the steps: S1, calculating the unit energy consumption, and setting a storage priority; s2, when the core A of the controller monitors that the power signal is disconnected, a data storage instruction is sent to the core B based on the emergency power supply; s3, the core B closes the peripheral function power supply, and reads the operation data from the cache; s4, calculating the estimated power consumption based on the total data volume and the unit energy consumption of each operation data, and monitoring the residual electric quantity of the emergency power supply; s5, cleaning and compressing the running data to obtain a plurality of compressed data; and S6, based on the estimated power consumption and the residual electric quantity, storing the compressed data according to the priority, and indicating the working state through an indicating lamp. The method has the advantages that the power failure data storage efficiency and reliability of the embroidery industrial personal computer are greatly improved, the battery capacity of the emergency power supply can be properly reduced, the size is optimized, and the cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of embroidery machines, and in particular to a method and system for preserving power-off data of an embroidery industrial control machine. Background Art

[0002] Embroidery machine, also known as computer embroidery machine, is the most advanced embroidery machine in contemporary times. It can make traditional hand embroidery be realized with high speed and high efficiency, and can also realize the requirements of "multi-level, multi-function, unity and perfection" that hand embroidery cannot achieve. It is an electromechanical product that embodies a variety of high-tech. As computer embroidery replaces hand embroidery, computer embroidery machine will also become the main machine type in the embroidery industry.

[0003] During the operation of the embroidery machine, a large amount of operation data will be generated. Since real-time storage of these operation data requires a large amount of storage space and computing resources, and may also affect the stability of the embroidery machine's operation, these operation data are not saved in real time. However, due to malfunctions, human operating errors, etc., power outages may occur. When power outages occur, the embroidery industrial computer (the industrial computer of the embroidery machine) needs to save the operation data of the embroidery machine so that it can continue to work when power is restored.

[0004] In order to save data when the embroidery industrial computer loses power, traditionally, the operating data of the existing network is simply saved based on the emergency power supply. It often happens that when the emergency power supply is exhausted, the operating data has not been completely saved. The missing operating data will directly affect the operation of the embroidery machine after power is restored.

[0005] Therefore, how to provide a method and system for preserving power-off data of an embroidery industrial computer to improve the efficiency and reliability of preserving power-off data of an embroidery industrial computer has become a technical problem to be solved urgently. Summary of the invention

[0006] The technical problem to be solved by the present invention is to provide a method and system for preserving power-off data of an embroidery industrial computer, so as to improve the efficiency and reliability of preserving power-off data of an embroidery industrial computer.

[0007] In a first aspect, the present invention provides a method for preserving power-off data of an embroidery industrial computer, comprising the following steps:

[0008] Step S1, the embroidery industrial computer calculates the unit energy consumption based on the power consumed for saving the unit data volume, and sets the saving priority of the operation data;

[0009] Step S2, the A core of the controller of the embroidery industrial computer monitors the power signal in real time, and when the power signal is disconnected, sends a data saving instruction to the B core in real time based on the emergency power supply;

[0010] Step S3: Based on the data saving instruction, the B core turns off the power supply of the peripheral function and reads the operation data from the cache;

[0011] Step S4, the B core calculates the estimated power consumption based on the total data volume of each of the operating data and the unit energy consumption, and monitors the remaining power of the emergency power supply in real time;

[0012] Step S5, the B core performs data cleaning and data compression operations on each of the read operation data to obtain a plurality of compressed data;

[0013] Step S6, core B stores each of the compressed data in a solid state drive based on the estimated power consumption, remaining power and storage priority, and indicates the working status through an indicator light;

[0014] Step S7: After the storage of each compressed data is completed, the B core feeds back a storage completion response to the A core;

[0015] The step S1 is specifically as follows:

[0016] The embroidery industrial computer obtains the amount of historical data and the amount of historical power consumption saved each time the power is turned off in history, and respectively averages the amount of historical data and the amount of historical power consumption to obtain the historical average amount of data and the historical average power consumption, and based on the historical average amount of data and the historical average power consumption, calculates the power consumed for saving the unit amount of data, thereby obtaining the unit energy consumption;

[0017] Set the saving priority of running data based on data type or embroidery machine number;

[0018] The unit energy consumption and the storage priority are stored in a cache layer.

[0019] Furthermore, the step S2 is specifically as follows:

[0020] When the embroidery industrial computer is powered on, the emergency power supply is powered by the power module, and the emergency power supply is self-checked for faults;

[0021] In the controller of the embroidery industrial computer, the A core running the RTOS system monitors the power signal of the power module in real time. When the power signal is disconnected, it means that the embroidery industrial computer is powered off. Based on the emergency power supply, the shared memory technology is used to send data saving instructions to the B core running the Linux system in real time.

[0022] Furthermore, the fault self-checking of the emergency power supply is specifically as follows:

[0023] The emergency power supply is controlled to charge and discharge, and the voltage, current and temperature values ​​of the emergency power supply are collected in real time. Fault judgment is made based on whether the voltage, current and temperature values ​​have undergone sudden changes. When a fault is judged, an emergency power supply fault alarm is displayed on the display screen.

[0024] Furthermore, the step S3 is specifically as follows:

[0025] Based on the data saving instruction, the B core turns off the power supply of at least the peripheral functions including the display screen, the USB port, the thread trimming sensor, the thread hooking sensor, the spindle encoder, the thread buckling control output port, the R5 coprocessor, the PRU coprocessor and the M4 coprocessor, and reads the operation data from the cache in real time through the memory mapping technology;

[0026] The step S5 is specifically as follows:

[0027] The B core first performs a data cleaning operation including at least deleting duplicate data and outlier values ​​on each of the read operating data, and then classifies the operating data of different data types, and performs a data compression operation on the operating data of each classification through Huffman coding and Lempe l-Ziv algorithm to obtain a plurality of compressed data.

[0028] Furthermore, the step S6 is specifically as follows:

[0029] The B core determines whether the storage of all the compressed data can be completed based on the estimated power consumption and the remaining power. If so, each compressed data is structured and stored in the solid state disk through multi-threading technology, and the working status is indicated by an indicator light; if not, the storage order of each compressed data is set based on the storage priority of the cache layer storage, and based on the storage order, each compressed data is structured and stored in the solid state disk through multi-threading technology, and the working status is indicated by an indicator light;

[0030] The indicator light is a three-color indicator light. When the indicator light is green, it indicates that the embroidery industrial computer is working normally; when the indicator light is yellow, it indicates that the embroidery industrial computer is powered off and is saving operating data, and the power of the emergency power supply is sufficient to save all operating data; when the indicator light is red, it indicates that the embroidery industrial computer is powered off and is saving operating data, and the power of the emergency power supply is insufficient to save all operating data; when the indicator light is off, it indicates that the embroidery industrial computer is powered off and the emergency power supply is exhausted;

[0031] The step S7 is specifically as follows:

[0032] After the storage of each compressed data is completed, the B core feeds back a storage completion response to the A core through the shared memory technology, or feeds back the storage progress to the A core through the shared memory technology before the emergency power supply is exhausted.

[0033] In a second aspect, the present invention provides a power-off data storage system for an embroidery industrial computer, comprising the following modules:

[0034] Initialization module, used for the embroidery industrial computer to calculate the unit energy consumption based on the power consumed by saving the unit data volume, and set the saving priority of the running data;

[0035] A data saving instruction sending module is used for the A core of the controller of the embroidery industrial computer to monitor the power signal in real time, and when the power signal is disconnected, a data saving instruction is sent to the B core in real time based on the emergency power supply;

[0036] An operation data reading module is used for the B core to shut down the power supply of the peripheral function based on the data saving instruction and read the operation data from the cache;

[0037] An estimated power consumption calculation module, used for the B core to calculate the estimated power consumption based on the total data volume of each of the operating data and the unit energy consumption, and to monitor the remaining power of the emergency power supply in real time;

[0038] A data compression module, used for the B core to perform data cleaning and data compression operations on each of the read operation data to obtain a plurality of compressed data;

[0039] A compressed data storage module, used for the B core to store each of the compressed data into a solid state drive based on the estimated power consumption, remaining power and storage priority, and to indicate the working status through an indicator light;

[0040] A process feedback module, used for the B core to feedback a storage completion response to the A core after the storage of each compressed data is completed;

[0041] The initialization module is specifically used for:

[0042] The embroidery industrial computer obtains the amount of historical data and the amount of historical power consumption saved each time the power is turned off in history, and respectively averages the amount of historical data and the amount of historical power consumption to obtain the historical average amount of data and the historical average power consumption, and based on the historical average amount of data and the historical average power consumption, calculates the power consumed for saving the unit amount of data, thereby obtaining the unit energy consumption;

[0043] Set the saving priority of running data based on data type or embroidery machine number;

[0044] The unit energy consumption and the storage priority are stored in a cache layer.

[0045] Furthermore, the data saving instruction sending module is specifically used for:

[0046] When the embroidery industrial computer is powered on, the emergency power supply is powered by the power module, and the emergency power supply is self-checked for faults;

[0047] In the controller of the embroidery industrial computer, the A core running the RTOS system monitors the power signal of the power module in real time. When the power signal is disconnected, it means that the embroidery industrial computer is powered off. Based on the emergency power supply, the shared memory technology is used to send data saving instructions to the B core running the Linux system in real time.

[0048] Furthermore, the fault self-checking of the emergency power supply is specifically as follows:

[0049] The emergency power supply is controlled to charge and discharge, and the voltage, current and temperature values ​​of the emergency power supply are collected in real time. Fault judgment is made based on whether the voltage, current and temperature values ​​have undergone sudden changes. When a fault is judged, an emergency power supply fault alarm is displayed on the display screen.

[0050] Furthermore, the operation data reading module is specifically used for:

[0051] Based on the data saving instruction, the B core turns off the power supply of at least the peripheral functions including the display screen, the USB port, the thread trimming sensor, the thread hooking sensor, the spindle encoder, the thread buckling control output port, the R5 coprocessor, the PRU coprocessor and the M4 coprocessor, and reads the operation data from the cache in real time through the memory mapping technology;

[0052] The data compression module is specifically used for:

[0053] The B core first performs a data cleaning operation including at least deleting duplicate data and outlier values ​​on each of the read operating data, and then classifies the operating data of different data types, and performs a data compression operation on the operating data of each classification through Huffman coding and Lempe l-Ziv algorithm to obtain a plurality of compressed data.

[0054] Furthermore, the compressed data storage module is specifically used for:

[0055] The B core determines whether the storage of all the compressed data can be completed based on the estimated power consumption and the remaining power. If so, each compressed data is structured and stored in the solid state disk through multi-threading technology, and the working status is indicated by an indicator light; if not, the storage order of each compressed data is set based on the storage priority of the cache layer storage, and based on the storage order, each compressed data is structured and stored in the solid state disk through multi-threading technology, and the working status is indicated by an indicator light;

[0056] The indicator light is a three-color indicator light. When the indicator light is green, it indicates that the embroidery industrial computer is working normally; when the indicator light is yellow, it indicates that the embroidery industrial computer is powered off and is saving operating data, and the power of the emergency power supply is sufficient to save all operating data; when the indicator light is red, it indicates that the embroidery industrial computer is powered off and is saving operating data, and the power of the emergency power supply is insufficient to save all operating data; when the indicator light is off, it indicates that the embroidery industrial computer is powered off and the emergency power supply is exhausted;

[0057] The process feedback module is specifically used for:

[0058] After the storage of each compressed data is completed, the B core feeds back a storage completion response to the A core through the shared memory technology, or feeds back the storage progress to the A core through the shared memory technology before the emergency power supply is exhausted.

[0059] The advantages of the present invention are:

[0060] 1. The embroidery industrial computer calculates the unit energy consumption based on the power consumed by saving the unit data volume, sets the saving priority of the operation data, and the A core of the controller monitors the power signal in real time. When the power signal is disconnected, the emergency power supply sends a data saving instruction to the B core in real time; then the B core turns off the power supply of the peripheral function based on the data saving instruction, reads the operation data from the cache, calculates the estimated power consumption based on the total data volume of each operation data and the unit energy consumption, monitors the remaining power of the emergency power supply in real time, performs data cleaning and data compression operations on each operation data read, obtains a number of compressed data, stores each compressed data in the solid-state hard disk based on the estimated power consumption, remaining power and saving priority, indicates the working status through the indicator light, and feeds back the storage status to the A core after each compressed data is stored. The storage is completed and the response is received; that is, when the embroidery industrial computer loses power, the operating data is urgently saved through the emergency power supply. Before the operating data is saved, the power supply of the peripheral functions is turned off to avoid unnecessary power consumption, so that the power of the emergency power supply can be used to handle more urgent operating data saving work, and redundant data is reduced through data cleaning, and the amount of data saved is reduced through data compression. The storage speed is effectively guaranteed by storing compressed data in the solid-state hard disk, and the efficiency of data saving instruction transmission is guaranteed through the inter-core communication between the A core and the B core; the unit energy consumption is also calculated, the saving priority is set, and the remaining power of the emergency power supply is monitored in real time. When the remaining power of the emergency power supply is not enough to save all the compressed data, the compressed data with a higher priority is saved first, which ultimately greatly improves the efficiency and reliability of power-off data saving of the embroidery industrial computer.

[0061] 2. By obtaining the amount of historical data and the historical power consumption saved in each power outage in history, the historical average data amount and the historical average power consumption are averaged respectively, and then based on the historical average data amount and the historical average power consumption, the power consumed for saving the unit data amount is calculated, and then the unit energy consumption is obtained. That is, the unit energy consumption is calculated based on the historical average data, which effectively improves the objectivity of the unit energy consumption and further improves the reliability of the power-off data preservation of the embroidery industrial computer.

[0062] 3. By storing the unit energy consumption and the saving priority in the cache layer, it is convenient to read at high speed when the embroidery industrial computer is powered off, so as to improve the efficiency of data saving when the embroidery industrial computer is powered off.

[0063] 4. When the embroidery industrial computer is powered on, the emergency power supply is powered by the power module, and the emergency power supply is self-checked to ensure that the emergency power supply can operate normally when the embroidery industrial computer is powered off, further improving the reliability of data storage when the embroidery industrial computer is powered off.

[0064] 5. Data transmission between core A and core B is carried out through shared memory technology, which effectively improves data transmission efficiency and further improves the efficiency of data preservation when the embroidery industrial computer is powered off.

[0065] 6. When the B core receives a data save instruction, the power supply of at least the display screen, USB port, thread trimming sensor, thread hooking sensor, spindle encoder, thread buckle control output port, R5 coprocessor, PRU coprocessor and M4 coprocessor is turned off, and the power of the emergency power supply is concentrated on saving the running data, thereby extending the time available for saving the running data. In combination with the memory mapping technology, the running data is read from the cache in real time, which effectively improves the speed of reading the running data, thereby improving the reliability and efficiency of the power-off data preservation of the embroidery industrial computer.

[0066] 7. Huffman coding encodes common characters into shorter bit sequences and uncommon characters into longer bit sequences based on the probability of character occurrence. The Lempe l-Ziv algorithm achieves compression by replacing repeated patterns in the data. By combining Huffman coding and the Lempe l-Ziv algorithm to perform data compression operations on the operating data of each category, the compression ratio of the operating data is greatly improved, thereby greatly reducing the amount of data that needs to be saved, and greatly improving the efficiency of data preservation when the embroidery industrial computer is powered off.

[0067] 8. The indicator light indicates the working status. When the indicator light is green, it means that the embroidery industrial computer is working normally; when the indicator light is yellow, it means that the embroidery industrial computer is saving the operating data after power failure, and the power of the emergency power supply is enough to save all the operating data; when the indicator light is red, it means that the embroidery industrial computer is saving the operating data after power failure, and the power of the emergency power supply is not enough to save all the operating data; when the indicator light is off, it means that the embroidery industrial computer is powered off and the emergency power supply is exhausted; the indicator light can clearly show the relevant working status, which greatly improves the convenience of operation and maintenance of the embroidery industrial computer.

[0068] 9. By improving the efficiency of data preservation when the embroidery industrial computer is powered off, the battery capacity of the emergency power supply can be appropriately reduced, thereby optimizing the size of the embroidery industrial computer and reducing costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] The present invention will be further described below in conjunction with embodiments with reference to the accompanying drawings.

[0070] Figure 1 The invention discloses a flow chart of a method for preserving power-off data of an embroidery industrial computer.

[0071] Figure 2 The invention discloses a structural schematic diagram of a power-off data storage system for an embroidery industrial computer. DETAILED DESCRIPTION

[0072] The technical solution in the embodiment of the present application has the following overall idea: when the embroidery industrial computer loses power, the operating data is urgently saved through the emergency power supply. Before the operating data is saved, the power supply of the peripheral functions is turned off to avoid unnecessary power consumption, so that the power of the emergency power supply can be used to handle more urgent operating data saving work, and redundant data is reduced through data cleaning, and the amount of data saved is reduced through data compression. The storage speed is effectively guaranteed by storing compressed data in a solid-state hard disk, and the efficiency of data saving instruction transmission is guaranteed through inter-core communication between the A core and the B core; the unit energy consumption is also calculated, the saving priority is set, and the remaining power of the emergency power supply is monitored in real time. When the remaining power of the emergency power supply is not enough to save all the compressed data, the compressed data with a higher priority is saved first, so as to improve the efficiency and reliability of power-off data saving of the embroidery industrial computer.

[0073] Please refer to Figure 1 to Figure 2 As shown, a preferred embodiment of a method for saving power-off data of an embroidery industrial computer of the present invention comprises the following steps:

[0074] Step S1, the embroidery industrial computer calculates the unit energy consumption based on the power consumed for saving the unit data volume, and sets the saving priority of the operation data;

[0075] Step S2, the A core of the controller of the embroidery industrial computer monitors the power signal in real time, and when the power signal is disconnected, sends a data saving instruction to the B core in real time based on the emergency power supply;

[0076] Step S3: Based on the data saving instruction, the B core turns off the power supply of the peripheral function and reads the operation data from the cache;

[0077] Step S4, the B core calculates the estimated power consumption based on the total data volume of each of the operating data and the unit energy consumption, and monitors the remaining power of the emergency power supply in real time;

[0078] Step S5, the B core performs data cleaning and data compression operations on each of the read operation data to obtain a plurality of compressed data;

[0079] Step S6, core B stores each of the compressed data in a solid state drive based on the estimated power consumption, remaining power and storage priority, and indicates the working status through an indicator light;

[0080] Step S7: After the storage of each compressed data is completed, the B core feeds back a storage completion response to the A core;

[0081] The step S1 is specifically as follows:

[0082] The embroidery industrial computer obtains the amount of historical data and the amount of historical power consumption saved each time the power is turned off in history, and respectively averages the amount of historical data and the amount of historical power consumption to obtain the historical average amount of data and the historical average power consumption, and based on the historical average amount of data and the historical average power consumption, calculates the power consumed for saving the unit amount of data, thereby obtaining the unit energy consumption;

[0083] By obtaining the amount of historical data and the historical power consumption saved for each power outage in history, the historical average data amount and the historical average power consumption are averaged respectively, and then based on the historical average data amount and the historical average power consumption, the power consumed for saving the unit data amount is calculated, and then the unit energy consumption is obtained. That is, the unit energy consumption is calculated based on the historical average data, which effectively improves the objectivity of the unit energy consumption and further improves the reliability of power-off data preservation of the embroidery industrial computer.

[0084] Calculating the unit energy consumption based on the amount of historical data before compression can provide a certain safety redundancy, that is, the unit energy consumption of the compressed data after compression will be lower, further ensuring the reliability of data preservation when the embroidery industrial computer is powered off.

[0085] Set the saving priority of running data based on data type or embroidery machine number;

[0086] The unit energy consumption and the storage priority are stored in a cache layer.

[0087] By storing the unit energy consumption and the saving priority in the high-speed cache layer, it is convenient to read at high speed when the embroidery industrial computer is powered off, so as to improve the efficiency of data saving when the embroidery industrial computer is powered off.

[0088] The step S2 is specifically as follows:

[0089] When the embroidery industrial computer is powered on, the emergency power supply is powered by the power module, and the emergency power supply is self-checked for faults;

[0090] In the controller of the embroidery industrial computer, the A core running the RTOS system monitors the power signal of the power module in real time. When the power signal is disconnected, it means that the embroidery industrial computer is powered off. Based on the emergency power supply, the shared memory technology is used to send data saving instructions to the B core running the Linux system in real time.

[0091] The data transmission between the A core and the B core is carried out through the shared memory technology, which effectively improves the data transmission efficiency, thereby improving the efficiency of data preservation when the embroidery industrial computer is powered off.

[0092] The specific fault self-checking of the emergency power supply is as follows:

[0093] The emergency power supply is controlled to charge and discharge, and the voltage, current and temperature values ​​of the emergency power supply are collected in real time. Fault judgment is made based on whether the voltage, current and temperature values ​​have undergone sudden changes. When a fault is judged, an emergency power supply fault alarm is displayed on the display screen.

[0094] When the embroidery industrial computer is powered on, the power module supplies power to the emergency power supply, performs fault self-check on the emergency power supply, and ensures that the emergency power supply can operate normally when the embroidery industrial computer loses power, further improving the reliability of data storage when the embroidery industrial computer loses power.

[0095] The step S3 is specifically as follows:

[0096] Based on the data saving instruction, the B core turns off the power supply of at least the peripheral functions including the display screen, the USB port, the thread trimming sensor, the thread hooking sensor, the spindle encoder, the thread buckling control output port, the R5 coprocessor, the PRU coprocessor and the M4 coprocessor, and reads the operation data from the cache in real time through the memory mapping technology;

[0097] When the B core receives the data saving instruction, the power supply of at least the peripheral functions including the display screen, USB port, thread trimming sensor, thread hooking sensor, spindle encoder, thread buckle control output port, R5 coprocessor, PRU coprocessor and M4 coprocessor is turned off, and the power of the emergency power supply is concentrated on saving the running data, thereby extending the time available for saving the running data. In combination with the memory mapping technology, the running data is read from the cache in real time, which effectively improves the speed of reading the running data, thereby improving the reliability and efficiency of power-off data preservation of the embroidery industrial computer.

[0098] The step S5 is specifically as follows:

[0099] The B core first performs a data cleaning operation including at least deleting duplicate data and outlier values ​​on each of the read operating data, and then classifies the operating data of different data types, and performs a data compression operation on the operating data of each classification through Huffman coding and Lempe l-Ziv algorithm to obtain a plurality of compressed data.

[0100] Huffman coding encodes common characters into shorter bit sequences and uncommon characters into longer bit sequences based on the probability of character occurrence. The Lempe lZ iv algorithm achieves compression by replacing repeated patterns in the data. By combining Huffman coding and the Lempe lZ iv algorithm to perform data compression operations on the operating data of each category, the compression ratio of the operating data is greatly improved, thereby greatly reducing the amount of data that needs to be saved, and greatly improving the efficiency of data storage when the embroidery industrial computer is powered off.

[0101] The step S6 is specifically as follows:

[0102] Based on the estimated power consumption and the remaining power, the B core determines whether the storage of all the compressed data can be completed. If so, each compressed data is structured and stored in the solid-state hard disk through multi-threading technology, and the working status is indicated by an indicator light; if not, the storage order of each compressed data is set based on the storage priority of the cache layer storage, and based on the storage order, each compressed data is structured and stored in the solid-state hard disk through multi-threading technology, and the working status is indicated by an indicator light; in specific implementation, if the remaining power is sufficient to complete the storage of all compressed data, the compressed data can also be encrypted based on the ECDSA algorithm to improve the security of the compressed data storage. The ECDSA algorithm is a digital signature algorithm using ECC, which has the advantages of short key, fast speed and high security;

[0103] The indicator light is a three-color indicator light. When the indicator light is green, it indicates that the embroidery industrial computer is working normally; when the indicator light is yellow, it indicates that the embroidery industrial computer is powered off and is saving operating data, and the power of the emergency power supply is sufficient to save all operating data; when the indicator light is red, it indicates that the embroidery industrial computer is powered off and is saving operating data, and the power of the emergency power supply is insufficient to save all operating data; when the indicator light is off, it indicates that the embroidery industrial computer is powered off and the emergency power supply is exhausted;

[0104] The working status is indicated by the indicator light. When the indicator light is green, it means that the embroidery industrial computer is working normally; when the indicator light is yellow, it means that the embroidery industrial computer is saving the operating data after power failure, and the emergency power supply is sufficient to save all the operating data; when the indicator light is red, it means that the embroidery industrial computer is saving the operating data after power failure, and the emergency power supply is insufficient to save all the operating data; when the indicator light is off, it means that the embroidery industrial computer is powered off and the emergency power supply is exhausted; the relevant working status can be clearly seen through the indicator light, which greatly improves the convenience of operation and maintenance of the embroidery industrial computer.

[0105] The step S7 is specifically as follows:

[0106] After the storage of each compressed data is completed, the B core feeds back a storage completion response to the A core through the shared memory technology, or feeds back the storage progress to the A core through the shared memory technology before the emergency power supply is exhausted.

[0107] A preferred embodiment of a power-off data storage system for an embroidery industrial computer of the present invention comprises the following modules:

[0108] Initialization module, used for the embroidery industrial computer to calculate the unit energy consumption based on the power consumed by saving the unit data volume, and set the saving priority of the running data;

[0109] A data saving instruction sending module is used for the A core of the controller of the embroidery industrial computer to monitor the power signal in real time, and when the power signal is disconnected, a data saving instruction is sent to the B core in real time based on the emergency power supply;

[0110] An operation data reading module is used for the B core to shut down the power supply of the peripheral function based on the data saving instruction and read the operation data from the cache;

[0111] An estimated power consumption calculation module, used for the B core to calculate the estimated power consumption based on the total data volume of each of the operating data and the unit energy consumption, and to monitor the remaining power of the emergency power supply in real time;

[0112] A data compression module, used for the B core to perform data cleaning and data compression operations on each of the read operation data to obtain a plurality of compressed data;

[0113] A compressed data storage module, used for the B core to store each of the compressed data into a solid state drive based on the estimated power consumption, remaining power and storage priority, and to indicate the working status through an indicator light;

[0114] A process feedback module, used for the B core to feedback a storage completion response to the A core after the storage of each compressed data is completed;

[0115] The initialization module is specifically used for:

[0116] The embroidery industrial computer obtains the amount of historical data and the amount of historical power consumption saved each time the power is turned off in history, and respectively averages the amount of historical data and the amount of historical power consumption to obtain the historical average amount of data and the historical average power consumption, and based on the historical average amount of data and the historical average power consumption, calculates the power consumed for saving the unit amount of data, thereby obtaining the unit energy consumption;

[0117] By obtaining the amount of historical data and the historical power consumption saved for each power outage in history, the historical average data amount and the historical average power consumption are averaged respectively, and then based on the historical average data amount and the historical average power consumption, the power consumed for saving the unit data amount is calculated, and then the unit energy consumption is obtained. That is, the unit energy consumption is calculated based on the historical average data, which effectively improves the objectivity of the unit energy consumption and further improves the reliability of power-off data preservation of the embroidery industrial computer.

[0118] Calculating the unit energy consumption based on the amount of historical data before compression can provide a certain safety redundancy, that is, the unit energy consumption of the compressed data after compression will be lower, further ensuring the reliability of data preservation when the embroidery industrial computer is powered off.

[0119] Set the saving priority of running data based on data type or embroidery machine number;

[0120] The unit energy consumption and the storage priority are stored in a cache layer.

[0121] By storing the unit energy consumption and the saving priority in the high-speed cache layer, it is convenient to read at high speed when the embroidery industrial computer is powered off, so as to improve the efficiency of data saving when the embroidery industrial computer is powered off.

[0122] The data saving instruction sending module is specifically used for:

[0123] When the embroidery industrial computer is powered on, the emergency power supply is powered by the power module, and the emergency power supply is self-checked for faults;

[0124] In the controller of the embroidery industrial computer, the A core running the RTOS system monitors the power signal of the power module in real time. When the power signal is disconnected, it means that the embroidery industrial computer is powered off. Based on the emergency power supply, the shared memory technology is used to send data saving instructions to the B core running the Linux system in real time.

[0125] The data transmission between the A core and the B core is carried out through the shared memory technology, which effectively improves the data transmission efficiency, thereby improving the efficiency of data preservation when the embroidery industrial computer is powered off.

[0126] The specific fault self-checking of the emergency power supply is as follows:

[0127] The emergency power supply is controlled to charge and discharge, and the voltage, current and temperature values ​​of the emergency power supply are collected in real time. Fault judgment is made based on whether the voltage, current and temperature values ​​have undergone sudden changes. When a fault is judged, an emergency power supply fault alarm is displayed on the display screen.

[0128] When the embroidery industrial computer is powered on, the power module supplies power to the emergency power supply, performs fault self-check on the emergency power supply, and ensures that the emergency power supply can operate normally when the embroidery industrial computer loses power, further improving the reliability of data storage when the embroidery industrial computer loses power.

[0129] The operation data reading module is specifically used for:

[0130] Based on the data saving instruction, the B core turns off the power supply of at least the peripheral functions including the display screen, the USB port, the thread trimming sensor, the thread hooking sensor, the spindle encoder, the thread buckling control output port, the R5 coprocessor, the PRU coprocessor and the M4 coprocessor, and reads the operation data from the cache in real time through the memory mapping technology;

[0131] When the B core receives the data saving instruction, the power supply of at least the peripheral functions including the display screen, USB port, thread trimming sensor, thread hooking sensor, spindle encoder, thread buckle control output port, R5 coprocessor, PRU coprocessor and M4 coprocessor is turned off, and the power of the emergency power supply is concentrated on saving the running data, thereby extending the time available for saving the running data. In combination with the memory mapping technology, the running data is read from the cache in real time, which effectively improves the speed of reading the running data, thereby improving the reliability and efficiency of power-off data preservation of the embroidery industrial computer.

[0132] The data compression module is specifically used for:

[0133] The B core first performs a data cleaning operation including at least deleting duplicate data and outlier values ​​on each of the read operating data, and then classifies the operating data of different data types, and performs a data compression operation on the operating data of each classification through Huffman coding and Lempe l-Ziv algorithm to obtain a plurality of compressed data.

[0134] Huffman coding encodes common characters into shorter bit sequences and uncommon characters into longer bit sequences based on the probability of character occurrence. The Lempe lZ iv algorithm achieves compression by replacing repeated patterns in the data. By combining Huffman coding and the Lempe lZ iv algorithm to perform data compression operations on the operating data of each category, the compression ratio of the operating data is greatly improved, thereby greatly reducing the amount of data that needs to be saved, and greatly improving the efficiency of data storage when the embroidery industrial computer is powered off.

[0135] The compressed data storage module is specifically used for:

[0136] Based on the estimated power consumption and the remaining power, the B core determines whether the storage of all the compressed data can be completed. If so, each compressed data is structured and stored in the solid-state hard disk through multi-threading technology, and the working status is indicated by an indicator light; if not, the storage order of each compressed data is set based on the storage priority of the cache layer storage, and based on the storage order, each compressed data is structured and stored in the solid-state hard disk through multi-threading technology, and the working status is indicated by an indicator light; in specific implementation, if the remaining power is sufficient to complete the storage of all compressed data, the compressed data can also be encrypted based on the ECDSA algorithm to improve the security of the compressed data storage. The ECDSA algorithm is a digital signature algorithm using ECC, which has the advantages of short key, fast speed and high security;

[0137] The indicator light is a three-color indicator light. When the indicator light is green, it indicates that the embroidery industrial computer is working normally; when the indicator light is yellow, it indicates that the embroidery industrial computer is powered off and is saving operating data, and the power of the emergency power supply is sufficient to save all operating data; when the indicator light is red, it indicates that the embroidery industrial computer is powered off and is saving operating data, and the power of the emergency power supply is insufficient to save all operating data; when the indicator light is off, it indicates that the embroidery industrial computer is powered off and the emergency power supply is exhausted;

[0138] The working status is indicated by the indicator light. When the indicator light is green, it means that the embroidery industrial computer is working normally; when the indicator light is yellow, it means that the embroidery industrial computer is saving the operating data after power failure, and the emergency power supply is sufficient to save all the operating data; when the indicator light is red, it means that the embroidery industrial computer is saving the operating data after power failure, and the emergency power supply is insufficient to save all the operating data; when the indicator light is off, it means that the embroidery industrial computer is powered off and the emergency power supply is exhausted; the relevant working status can be clearly seen through the indicator light, which greatly improves the convenience of operation and maintenance of the embroidery industrial computer.

[0139] The process feedback module is specifically used for:

[0140] After the storage of each compressed data is completed, the B core feeds back a storage completion response to the A core through the shared memory technology, or feeds back the storage progress to the A core through the shared memory technology before the emergency power supply is exhausted.

[0141] In summary, the advantages of the present invention are:

[0142] 1. The embroidery industrial computer calculates the unit energy consumption based on the power consumed by saving the unit data volume, sets the saving priority of the operation data, and the A core of the controller monitors the power signal in real time. When the power signal is disconnected, the emergency power supply sends a data saving instruction to the B core in real time; then the B core turns off the power supply of the peripheral function based on the data saving instruction, reads the operation data from the cache, calculates the estimated power consumption based on the total data volume of each operation data and the unit energy consumption, monitors the remaining power of the emergency power supply in real time, performs data cleaning and data compression operations on each operation data read, obtains a number of compressed data, stores each compressed data in the solid-state hard disk based on the estimated power consumption, remaining power and saving priority, indicates the working status through the indicator light, and feeds back the storage status to the A core after each compressed data is stored. The storage is completed and the response is received; that is, when the embroidery industrial computer loses power, the operating data is urgently saved through the emergency power supply. Before the operating data is saved, the power supply of the peripheral functions is turned off to avoid unnecessary power consumption, so that the power of the emergency power supply can be used to handle more urgent operating data saving work, and redundant data is reduced through data cleaning, and the amount of data saved is reduced through data compression. The storage speed is effectively guaranteed by storing compressed data in the solid-state hard disk, and the efficiency of data saving instruction transmission is guaranteed through the inter-core communication between the A core and the B core; the unit energy consumption is also calculated, the saving priority is set, and the remaining power of the emergency power supply is monitored in real time. When the remaining power of the emergency power supply is not enough to save all the compressed data, the compressed data with a higher priority is saved first, which ultimately greatly improves the efficiency and reliability of power-off data saving of the embroidery industrial computer.

[0143] 2. By obtaining the amount of historical data and the historical power consumption saved in each power outage in history, the historical average data amount and the historical average power consumption are averaged respectively, and then based on the historical average data amount and the historical average power consumption, the power consumed for saving the unit data amount is calculated, and then the unit energy consumption is obtained. That is, the unit energy consumption is calculated based on the historical average data, which effectively improves the objectivity of the unit energy consumption and further improves the reliability of the power-off data preservation of the embroidery industrial computer.

[0144] 3. By storing the unit energy consumption and the saving priority in the cache layer, it is convenient to read at high speed when the embroidery industrial computer is powered off, so as to improve the efficiency of data saving when the embroidery industrial computer is powered off.

[0145] 4. When the embroidery industrial computer is powered on, the emergency power supply is powered by the power module, and the emergency power supply is self-checked to ensure that the emergency power supply can operate normally when the embroidery industrial computer is powered off, further improving the reliability of data storage when the embroidery industrial computer is powered off.

[0146] 5. Data transmission between core A and core B is carried out through shared memory technology, which effectively improves data transmission efficiency and further improves the efficiency of data preservation when the embroidery industrial computer is powered off.

[0147] 6. When the B core receives a data save instruction, the power supply of at least the display screen, USB port, thread trimming sensor, thread hooking sensor, spindle encoder, thread buckle control output port, R5 coprocessor, PRU coprocessor and M4 coprocessor is turned off, and the power of the emergency power supply is concentrated on saving the running data, thereby extending the time available for saving the running data. In combination with the memory mapping technology, the running data is read from the cache in real time, which effectively improves the speed of reading the running data, thereby improving the reliability and efficiency of the power-off data preservation of the embroidery industrial computer.

[0148] 7. Huffman coding encodes common characters into shorter bit sequences and uncommon characters into longer bit sequences based on the probability of character occurrence. The Lempe l-Ziv algorithm achieves compression by replacing repeated patterns in the data. By combining Huffman coding and the Lempe l-Ziv algorithm to perform data compression operations on the operating data of each category, the compression ratio of the operating data is greatly improved, thereby greatly reducing the amount of data that needs to be saved, and greatly improving the efficiency of data preservation when the embroidery industrial computer is powered off.

[0149] 8. The indicator light indicates the working status. When the indicator light is green, it means that the embroidery industrial computer is working normally; when the indicator light is yellow, it means that the embroidery industrial computer is saving the operating data after power failure, and the power of the emergency power supply is enough to save all the operating data; when the indicator light is red, it means that the embroidery industrial computer is saving the operating data after power failure, and the power of the emergency power supply is not enough to save all the operating data; when the indicator light is off, it means that the embroidery industrial computer is powered off and the emergency power supply is exhausted; the indicator light can clearly show the relevant working status, which greatly improves the convenience of operation and maintenance of the embroidery industrial computer.

[0150] 9. By improving the efficiency of data preservation when the embroidery industrial computer is powered off, the battery capacity of the emergency power supply can be appropriately reduced, thereby optimizing the size of the embroidery industrial computer and reducing costs.

[0151] Although the specific implementation modes of the present invention are described above, those skilled in the art should understand that the specific implementation modes described are only illustrative and are not intended to limit the scope of the present invention. Equivalent modifications and changes made by those skilled in the art in accordance with the spirit of the present invention should be included in the scope of protection of the claims of the present invention.

Claims

1. A method for preserving power-off data of an embroidery industrial computer, characterized in that: The steps include: Step S1, the embroidery industrial computer calculates the unit energy consumption based on the power consumed for saving the unit data volume, and sets the saving priority of the operation data; Step S2, the A core of the controller of the embroidery industrial computer monitors the power signal in real time, and when the power signal is disconnected, sends a data saving instruction to the B core in real time based on the emergency power supply; Step S3: Based on the data saving instruction, the B core turns off the power supply of the peripheral function and reads the operation data from the cache; Step S4, the B core calculates the estimated power consumption based on the total data volume of each of the operating data and the unit energy consumption, and monitors the remaining power of the emergency power supply in real time; Step S5, the B core performs data cleaning and data compression operations on each of the read operation data to obtain a plurality of compressed data; Step S6, core B stores each of the compressed data in a solid state drive based on the estimated power consumption, remaining power and storage priority, and indicates the working status through an indicator light; Step S7: After the storage of each compressed data is completed, the B core feeds back a storage completion response to the A core; The step S1 is specifically as follows: The embroidery industrial computer obtains the amount of historical data and the amount of historical power consumption saved each time the power is turned off in history, and respectively averages the amount of historical data and the amount of historical power consumption to obtain the historical average amount of data and the historical average power consumption, and based on the historical average amount of data and the historical average power consumption, calculates the power consumed for saving the unit amount of data, thereby obtaining the unit energy consumption; Set the saving priority of running data based on data type or embroidery machine number; The unit energy consumption and the storage priority are stored in a cache layer.

2. The method for preserving power-off data of an embroidery industrial computer according to claim 1, characterized in that: The step S2 is specifically as follows: When the embroidery industrial computer is powered on, the emergency power supply is powered by the power module, and the emergency power supply is self-checked for faults; In the controller of the embroidery industrial computer, the A core running the RTOS system monitors the power signal of the power module in real time. When the power signal is disconnected, it means that the embroidery industrial computer is powered off. Based on the emergency power supply, the shared memory technology is used to send data saving instructions to the B core running the Linux system in real time.

3. A method for preserving power-off data of an embroidery industrial computer as claimed in claim 2, characterized in that: The specific fault self-checking of the emergency power supply is as follows: The emergency power supply is controlled to charge and discharge, and the voltage, current and temperature values ​​of the emergency power supply are collected in real time. Fault judgment is made based on whether the voltage, current and temperature values ​​have undergone sudden changes. When a fault is judged, an emergency power supply fault alarm is displayed on the display screen.

4. The method for preserving power-off data of an embroidery industrial computer according to claim 1, characterized in that: The step S3 is specifically as follows: Based on the data saving instruction, the B core turns off the power supply of at least the peripheral functions including the display screen, the USB port, the thread trimming sensor, the thread hooking sensor, the spindle encoder, the thread buckling control output port, the R5 coprocessor, the PRU coprocessor and the M4 coprocessor, and reads the operation data from the cache in real time through the memory mapping technology; The step S5 is specifically as follows: The B core first performs a data cleaning operation including at least deleting duplicate data and outlier values ​​on each of the read operating data, and then classifies the operating data of different data types, and performs data compression operations on the operating data of each classification through Huffman coding and Lempel-Ziv algorithm to obtain a plurality of compressed data.

5. The method for preserving power-off data of an embroidery industrial computer according to claim 1, characterized in that: The step S6 is specifically as follows: The B core determines whether the storage of all the compressed data can be completed based on the estimated power consumption and the remaining power. If so, each compressed data is structured and stored in the solid state disk through multi-threading technology, and the working status is indicated by an indicator light; if not, the storage order of each compressed data is set based on the storage priority of the cache layer storage, and based on the storage order, each compressed data is structured and stored in the solid state disk through multi-threading technology, and the working status is indicated by an indicator light; The indicator light is a three-color indicator light. When the indicator light is green, it indicates that the embroidery industrial computer is working normally; when the indicator light is yellow, it indicates that the embroidery industrial computer is powered off and is saving operating data, and the power of the emergency power supply is sufficient to save all operating data; when the indicator light is red, it indicates that the embroidery industrial computer is powered off and is saving operating data, and the power of the emergency power supply is insufficient to save all operating data; when the indicator light is off, it indicates that the embroidery industrial computer is powered off and the emergency power supply is exhausted; The step S7 is specifically as follows: After the storage of each compressed data is completed, the B core feeds back a storage completion response to the A core through the shared memory technology, or feeds back the storage progress to the A core through the shared memory technology before the emergency power supply is exhausted.

6. A power-off data storage system for an embroidery industrial computer, characterized in that: Includes the following modules: Initialization module, used for the embroidery industrial computer to calculate the unit energy consumption based on the power consumed by saving the unit data volume, and set the saving priority of the running data; A data saving instruction sending module is used for the A core of the controller of the embroidery industrial computer to monitor the power signal in real time, and when the power signal is disconnected, a data saving instruction is sent to the B core in real time based on the emergency power supply; An operation data reading module is used for the B core to shut down the power supply of the peripheral function based on the data saving instruction and read the operation data from the cache; An estimated power consumption calculation module, used for the B core to calculate the estimated power consumption based on the total data volume of each of the operating data and the unit energy consumption, and to monitor the remaining power of the emergency power supply in real time; A data compression module, used for the B core to perform data cleaning and data compression operations on each of the read operation data to obtain a plurality of compressed data; A compressed data storage module, used for the B core to store each of the compressed data into a solid state drive based on the estimated power consumption, remaining power and storage priority, and to indicate the working status through an indicator light; A process feedback module, used for the B core to feedback a storage completion response to the A core after the storage of each compressed data is completed; The initialization module is specifically used for: The embroidery industrial computer obtains the amount of historical data and the amount of historical power consumption saved each time the power is turned off in history, and respectively averages the amount of historical data and the amount of historical power consumption to obtain the historical average amount of data and the historical average power consumption, and based on the historical average amount of data and the historical average power consumption, calculates the power consumed for saving the unit amount of data, thereby obtaining the unit energy consumption; Set the saving priority of running data based on data type or embroidery machine number; The unit energy consumption and the storage priority are stored in a cache layer.

7. The power-off data storage system for an embroidery industrial computer as claimed in claim 6, characterized in that: The data saving instruction sending module is specifically used for: When the embroidery industrial computer is powered on, the emergency power supply is powered by the power module, and the emergency power supply is self-checked for faults; In the controller of the embroidery industrial computer, the A core running the RTOS system monitors the power signal of the power module in real time. When the power signal is disconnected, it means that the embroidery industrial computer is powered off. Based on the emergency power supply, the shared memory technology is used to send data saving instructions to the B core running the Linux system in real time.

8. The power-off data storage system for an embroidery industrial computer as claimed in claim 7, characterized in that: The specific fault self-checking of the emergency power supply is as follows: The emergency power supply is controlled to charge and discharge, and the voltage, current and temperature values ​​of the emergency power supply are collected in real time. Fault judgment is made based on whether the voltage, current and temperature values ​​have undergone sudden changes. When a fault is judged, an emergency power supply fault alarm is displayed on the display screen.

9. The power-off data storage system for an embroidery industrial computer according to claim 6, characterized in that: The operation data reading module is specifically used for: Based on the data saving instruction, the B core turns off the power supply of at least the peripheral functions including the display screen, the USB port, the thread trimming sensor, the thread hooking sensor, the spindle encoder, the thread buckling control output port, the R5 coprocessor, the PRU coprocessor and the M4 coprocessor, and reads the operation data from the cache in real time through the memory mapping technology; The data compression module is specifically used for: The B core first performs a data cleaning operation including at least deleting duplicate data and outlier values ​​on each of the read operating data, and then classifies the operating data of different data types, and performs data compression operations on the operating data of each classification through Huffman coding and Lempel-Ziv algorithm to obtain a plurality of compressed data.

10. The power-off data storage system for an embroidery industrial computer according to claim 6, characterized in that: The compressed data storage module is specifically used for: The B core determines whether the storage of all the compressed data can be completed based on the estimated power consumption and the remaining power. If so, each compressed data is structured and stored in the solid state disk through multi-threading technology, and the working status is indicated by an indicator light; if not, the storage order of each compressed data is set based on the storage priority of the cache layer storage, and based on the storage order, each compressed data is structured and stored in the solid state disk through multi-threading technology, and the working status is indicated by an indicator light; The indicator light is a three-color indicator light. When the indicator light is green, it indicates that the embroidery industrial computer is working normally; when the indicator light is yellow, it indicates that the embroidery industrial computer is powered off and is saving operating data, and the power of the emergency power supply is sufficient to save all operating data; when the indicator light is red, it indicates that the embroidery industrial computer is powered off and is saving operating data, and the power of the emergency power supply is insufficient to save all operating data; when the indicator light is off, it indicates that the embroidery industrial computer is powered off and the emergency power supply is exhausted; The process feedback module is specifically used for: After the storage of each compressed data is completed, the B core feeds back a storage completion response to the A core through the shared memory technology, or feeds back the storage progress to the A core through the shared memory technology before the emergency power supply is exhausted.