Control method of program update, storage medium, and 3D printer
By storing device data in a specific area within the 3D printer, the problem of needing to reset the control program after an update is solved, thus simplifying the operation process.
Patent Information
- Application Number
- CN202311315268.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-11
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2043-10-11
AI Technical Summary
After the 3D printer's control program is updated, operations such as re-leveling and setting the z-axis offset data need to be performed, making the process cumbersome.
The 3D printer's equipment data is stored in a specific storage area that is not overwritten or erased when the control program is updated. This allows the printer to continue operating based on the original equipment data after the update, eliminating the need for resetting.
It simplifies the steps of using a 3D printer, avoids the need for releveling and data setting, and improves operational efficiency.
Smart Images

Figure CN119806565B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of 3D printing technology, and more particularly to a control method for program updates, a storage medium, and a 3D printer. Background Technology
[0002] With the development of 3D printing technology, the control programs configured in 3D printers need to be continuously upgraded and updated in order to better meet people's production and life needs.
[0003] However, after updating the control program configured in the 3D printer, the 3D printer needs to be re-leveled and the z-axis offset data needs to be set, which makes the process of using the 3D printer very cumbersome.
[0004] Therefore, how to simplify the operation process when reusing a 3D printer after updating the control program has become a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] This application provides a control method for program updates, a storage medium, and a 3D printer. In this method, the device data of the 3D printer is stored in a specific storage area. This device data in the specific storage area will not be overwritten or erased when the 3D printer's control program is updated. Thus, after updating the 3D printer's control program, the 3D printer can still operate based on the original device data, eliminating the need for re-leveling and setting the data, ultimately simplifying the use of the 3D printer.
[0006] In a first aspect, embodiments of this application provide a program update control method applied to a 3D printer, comprising:
[0007] The device data of the 3D printer is stored in a specific storage area;
[0008] The control program of the 3D printer is updated by reading device data from the specific storage area to configure the updated control program.
[0009] In some embodiments, the 3D printer includes a memory, the memory including RAM; the step of updating the control program of the 3D printer includes:
[0010] Read the target control program from the memory;
[0011] The control program of the 3D printer is updated using the target control program.
[0012] In some embodiments, the memory further includes non-volatile memory; the program update control method further includes:
[0013] A first program set is acquired and stored in the non-volatile memory, wherein the first program set includes a plurality of first program data for updating the control program of the 3D printer, and the first program data includes the control program to be applied and a first check code obtained by processing the control program to be applied.
[0014] Obtain one piece of first program data from the first program set;
[0015] The control program to be applied in the first program data is verified to obtain the second verification code;
[0016] Compare the second check code with the first check code in the first program data;
[0017] If the second verification code is the same as the first verification code, then the control program to be applied is loaded into the memory as the target control program.
[0018] In some embodiments, the method for controlling program updates further includes:
[0019] If the second verification code and the first verification code are different, then the next first program data is obtained from the first program set, and the step of verifying the control program to be applied in the first program data to obtain the second verification code is executed until the second verification code obtained by verifying the control program to be applied in the obtained first program data is the same as the first verification code. Then the control program to be applied corresponding to the second verification code that is the same as the first verification code is loaded into the memory as the target control program.
[0020] In some embodiments, the memory further includes non-volatile memory; the program update control method further includes:
[0021] A first program set is acquired and stored in the non-volatile memory, wherein the first program set includes a plurality of first program data for updating the control program of the 3D printer, and the first program data includes the control program to be applied and a first check code obtained by processing the control program to be applied.
[0022] Verify all the control programs to be applied in the first program data of the first program set to obtain a second verification code corresponding to the control program to be applied.
[0023] Obtain a second verification code from the first program data;
[0024] Compare the second check code with the first check code in the first program data;
[0025] If the second verification code is the same as the first verification code, then the control program to be applied is loaded into the memory as the target control program.
[0026] In some embodiments, the method for controlling program updates further includes:
[0027] If the second verification code and the first verification code are different, then the second verification code in the next first program data is obtained, and the step of comparing the second verification code and the first verification code is executed until the obtained second verification code and the first verification code are the same. Then, the control program to be applied corresponding to the second verification code that is the same as the first verification code is loaded into the memory as the target control program.
[0028] In some embodiments, the method for controlling program updates further includes:
[0029] Delete all content in the first program set except for the first program data corresponding to the target control program.
[0030] In some embodiments, the memory further includes non-volatile memory; the program update control method further includes:
[0031] A second program set is acquired and stored in the non-volatile memory. The second program set includes first program data and multiple second program data. The first program data includes a control program to be applied and a first checksum obtained by processing the control program to be applied. The second program data includes a current control program and a third checksum obtained by processing the current control program.
[0032] Obtain the first program data from the second program set;
[0033] The control program to be applied in the first program data is verified to obtain the second verification code;
[0034] Compare the second check code with the first check code in the first program data;
[0035] If the second verification code is the same as the first verification code, then the control program to be applied is loaded into the memory as the target control program.
[0036] In some embodiments, the method for controlling program updates further includes:
[0037] If the second verification code and the first verification code are different, then obtain one of the second program data;
[0038] The current control program in the second program data is verified to obtain the fourth verification code;
[0039] The fourth check code is compared with the third check code in the second program data;
[0040] If the fourth check code is the same as the third check code, then the current control program is loaded into the memory as the target control program.
[0041] In some embodiments, the method for controlling program updates further includes:
[0042] If the fourth check code and the third check code are different, then the next second program data is obtained, and the current control program in the second program data is checked to obtain the fourth check code. This process continues until the fourth check code obtained by checking the current control program in the second program data is the same as the third check code. Then, the current control program corresponding to the fourth check code that is the same as the third check code is loaded into the memory as the target control program.
[0043] In some embodiments, the method for controlling program updates further includes:
[0044] Delete all content in the second program assembly except for the first program data and the second program data of the target control program.
[0045] In some embodiments, the step of storing the device data of the 3D printer in a specific storage area includes:
[0046] The device data of the 3D printer is encrypted to obtain encrypted data, and the data type of the device data is a text file.
[0047] The encrypted data is stored on a disk.
[0048] In some embodiments, reading device data from the specific storage area to configure the updated control program includes:
[0049] When the updated control program is run, the encrypted data in the disk is decrypted to obtain the device data;
[0050] The device data is loaded into memory;
[0051] In a second aspect, embodiments of this application also provide a 3D printer, comprising: (The second aspect is that the updated control program is run using the device data in the memory.)
[0052] Processor; and
[0053] A memory configured to store computer-executable instructions, which, when executed, cause the processor to perform the program update control method.
[0054] Thirdly, embodiments of this application also provide a computer-readable storage medium storing one or more programs, which, when executed by a 3D printer including multiple applications, cause the 3D printer to perform a control method for updating the programs.
[0055] The above embodiments provide a control method, storage medium, and 3D printer for program updates. In this method, the device data of the 3D printer is stored in a specific storage area. This device data in the specific storage area will not be overwritten or erased when the 3D printer's control program is updated. Thus, after updating the 3D printer's control program, the 3D printer can still operate based on the original device data, eliminating the need for re-leveling and setting data, ultimately simplifying the use of the 3D printer. The method includes: storing the 3D printer's device data in a specific storage area; updating the 3D printer's control program by reading the device data from the specific storage area to configure the updated control program. Attached Figure Description
[0056] Figure 1 An exemplary diagram illustrates a method for storing device data in related technologies;
[0057] Figure 2 An exemplary flowchart illustrates a control method for program updates according to some embodiments;
[0058] Figure 3 An exemplary diagram illustrates a method for storing device data according to some embodiments;
[0059] Figure 4 An exemplary flowchart illustrates yet another control method for program updates provided according to some embodiments;
[0060] Figure 5 An exemplary flowchart illustrates yet another control method for program updates provided according to some embodiments;
[0061] Figure 6 An exemplary diagram illustrates a storage method for multiple main programs according to some embodiments;
[0062] Figure 7 An exemplary schematic diagram of a program update control device provided according to some embodiments is shown. Detailed Implementation
[0063] To make the objectives and implementation methods of this application clearer, the exemplary implementation methods of this application will be clearly and completely described below with reference to the accompanying drawings of the exemplary embodiments of this application. Obviously, the exemplary embodiments described are only some embodiments of this application, and not all embodiments.
[0064] It should be noted that the brief descriptions of terms in this application are only for the convenience of understanding the embodiments described below, and are not intended to limit the embodiments of this application. Unless otherwise stated, these terms should be understood in their ordinary and common meaning.
[0065] The terms "first," "second," "third," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar or related objects or entities, and do not necessarily imply a specific order or sequence, unless otherwise specified. It should be understood that such terms are interchangeable where appropriate.
[0066] The terms “comprising” and “having”, and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device that includes a range of components is not necessarily limited to all of the components that are clearly listed, but may include other components that are not clearly listed or that are inherent to such product or device.
[0067] With the development of 3D printing technology, the control programs configured in 3D printers need to be continuously upgraded and updated in order to better meet people's production and life needs.
[0068] However, after updating the control program configured in the 3D printer, the 3D printer needs to be re-leveled and the z-axis offset data needs to be set, which makes the process of using the 3D printer very cumbersome.
[0069] The reason for this is that the device data generated by operations such as leveling and setting Z-axis offset is erased or overwritten when the control program is upgraded. Although the 3D printer's device data has not changed, it is still necessary to reset the device data when using the 3D printer again.
[0070] Figure 1 An exemplary diagram illustrating a method for storing device data in related technologies is provided. Figure 1 In this example, the device data is located within the data area of the corresponding storage location of the control program (in this case, the control program can be firmware, such as Marlin firmware). Upgrading the control program using the bootloader erases the data within this data area, meaning that the device data must be reconfigured after each upgrade of the control program configured in the 3D printer.
[0071] Therefore, how to simplify the operation process when reusing a 3D printer after updating the control program has become a technical problem that urgently needs to be solved by those skilled in the art.
[0072] To address the aforementioned technical problems, this application provides a control method for program updates. In this method, the device data of the 3D printer is stored in a specific storage area. This device data in the specific storage area will not be overwritten or erased when the 3D printer's control program is updated. Thus, after updating the 3D printer's control program, the 3D printer can still operate based on the original device data, eliminating the need for re-leveling and setting data, ultimately simplifying the use of the 3D printer.
[0073] Figure 2 A flowchart illustrating a control method for program updates according to some embodiments is provided. The method includes steps S100-S200.
[0074] S100: Store the device data of the 3D printer in a specific storage area.
[0075] In this embodiment, the 3D printer's device data includes device-related data such as leveling data and / or z-axis offset data. The device data in this embodiment can be automatically generated by the 3D printer or manually set by the user.
[0076] In some embodiments, a specific storage area and the control program may be stored in the same storage area, for example, both may be stored in a non-volatile storage area. Alternatively, the specific storage area and the control program may be stored in different storage areas.
[0077] In this embodiment, the device data in the specific storage area will not be overwritten or erased when the 3D printer's control program is updated. This means that when using the 3D printer later, there is no need to reset the device data; the device data already stored in the specific storage area can be used directly.
[0078] Figure 3 An exemplary schematic diagram of a device data storage method according to some embodiments is shown. Figure 3 In this system, a specific storage area is not located within the control program's storage location. Therefore, the device data stored in the specific storage area will not be overwritten due to upgrades to the control program (in this example, the 3D printer's control program can be firmware, such as Marlin firmware). This eliminates the need to reconfigure the device data when running the 3D printer again, simplifying the operation steps of using the 3D printer.
[0079] The methods in this application embodiment can be applied to program firmware systems (e.g., Marlin firmware systems) and also to upper and lower computer system architectures.
[0080] S200: Update the control program of the 3D printer by reading device data from the specific storage area to configure the updated control program.
[0081] In this embodiment, the control program is a piece of code. The control program is configured in the 3D printer, enabling the 3D printer to perform printing operations.
[0082] In some embodiments, the bootloader may perform steps to update the control program of the 3D printer.
[0083] In some embodiments, the step of updating the control program of the 3D printer includes: obtaining a target control program from an external device and updating the control program of the 3D printer using the target control program. In this embodiment, the control program and the target control program of the 3D printer can be firmware, such as Marlin firmware. The target control program can be obtained from an external device using a communication interface such as a serial port, USB, or Ethernet.
[0084] In some embodiments, the 3D printer includes a memory, which includes RAM and non-volatile memory; the step of updating the control program of the 3D printer includes:
[0085] Read the target control program from memory;
[0086] The control program of the 3D printer is updated using the target control program.
[0087] In this embodiment, a target control program is pre-stored in memory and read from the 3D printer's memory during use. The target control program read from memory can be firmware, such as Marlin, or it can be the main program in the host / host computer system architecture. The process of determining the target control program when it is the main program is described in detail below.
[0088] In some embodiments, Figure 4 A flowchart illustrating, according to some embodiments, of another control method for program updates, including S201-S206, is provided. The method further includes:
[0089] S201. Obtain a first program set and store it in non-volatile memory, wherein the first program set includes a plurality of first program data for updating the control program of the 3D printer, and the first program data includes the control program to be applied and a first check code obtained by processing the control program to be applied.
[0090] For example, the current 3D printer's control program is version 1.0, and the control program to be applied in the first program data can be version 2.0, which is used to upgrade the current 3D printer's control program.
[0091] To prevent issues with the control program to be applied from causing the 3D printer's control program upgrade to fail, this embodiment of the application sets up a first program set. This first program set contains multiple first program data for updating the 3D printer's control program. Initially, the multiple first program data are identical. Each first program data includes the control program to be applied and a first checksum corresponding to that control program. Due to power outages or other reasons, the control program to be applied in some of the first program data in the first program set may encounter problems. In this case, other first program data can be used to continue upgrading the 3D printer's control program, thus avoiding the 3D printer's control program upgrade failure.
[0092] In this embodiment of the application, the amount of first program data in the first program assembly can be set according to actual needs, and is not limited here.
[0093] S202. Obtain a first program data from the first program assembly.
[0094] In this embodiment of the application, the first program data in the first program set may be modified during the download process to the 3D printer. Therefore, when upgrading the control program to be applied in the first program data, it is necessary to first verify the control program to be applied in the first program data downloaded to the 3D printer. When the control program to be applied is verified to be unmodified or without other problems, the control program to be applied is then used to upgrade the control program of the 3D printer.
[0095] S203. Verify the control program to be applied in the first program data to obtain the second verification code;
[0096] In some embodiments, when determining the first checksum in the first program data, the MD5 value of the control program to be applied can be calculated and used as the first checksum. Simultaneously, the MD5 value of the control program to be applied, already downloaded to the 3D printer, is calculated in the same manner and used as the second checksum.
[0097] In one example, the second checksum can be written to the end of the control program to be applied.
[0098] S204. Compare the second check code with the first check code in the first program data.
[0099] In this embodiment, the second verification code obtained from the verification of the control program to be applied in the first program data is compared with the first verification code in the first program data. If they are the same, it indicates that the control program to be applied is valid and correct, and that the control program to be applied downloaded to the 3D printer has not been tampered with.
[0100] S205. If the second check code is the same as the first check code, then the control program to be applied is loaded into memory as the target control program.
[0101] In this embodiment, the control program to be applied is loaded into memory as the target control program so that the target control program can be read from memory and the control program of the 3D printer can be updated using the target control program.
[0102] In some embodiments, the method further includes: S206, if the second verification code and the first verification code are different, then obtain the next first program data from the first program assembly, execute the step of verifying the control program to be applied in the first program data to obtain the second verification code, until the second verification code obtained by verifying the control program to be applied in the obtained first program data is the same as the first verification code, and load the control program to be applied corresponding to the second verification code that is the same as the first verification code into the memory as the target control program.
[0103] In this embodiment, after acquiring a first program data set, a second verification code corresponding to the control program to be applied in that first program data set is calculated. If the second verification code and the first verification code are different, it indicates that the control program to be applied may have been tampered with, or the download may have been interrupted due to a power outage, causing code abnormalities. Therefore, the next first program data set in the first program set can be acquired, and the step of verifying the control program to be applied in the next first program data set to obtain the second verification code can be performed. In this way, when the control program to be applied in one first program data set in the first program set cannot complete the upgrade of the 3D printer's control program, the next first program data set in the first program set can be used until the upgrade of the 3D printer's control program is successful.
[0104] In one example, the first program assembly includes first program data A, first program data B, first program data C, and first program data D. First program data A includes control program A to be applied and first verification code A. First program data B includes control program B to be applied and first verification code B. First program data C includes control program C to be applied and first verification code C. First program data D includes control program D to be applied and first verification code D.
[0105] First, first program data A is obtained from the first program assembly. The control program A to be applied in first program data A is verified to obtain a second verification code A. The second verification code A is compared with the first verification code A. If they are different, the process continues with first program data B. The control program B to be applied in first program data B is verified to obtain a second verification code B. The second verification code B is compared with the first verification code B. If they are different, the process continues with first program data C. The control program C to be applied in first program data C is verified to obtain a second verification code C. The second verification code C is compared with the first verification code C. If they are the same, the control program C to be applied is loaded into memory as the target control program.
[0106] In other embodiments, besides employing the scheme described above where the control program to be applied in the first program data is verified only when the first program data is acquired to obtain the second verification code, it is also possible to directly verify all control programs to be applied within the first program set after acquiring the first program set, thereby obtaining the second verification code corresponding to the control program to be applied. Specifically, Figure 5 An exemplary flowchart illustrates yet another control method for program updates according to some embodiments, including S207-S212. The method further includes:
[0107] S207. Obtain the first program set and store it in non-volatile memory. The first program set includes multiple first program data for updating the control program of the 3D printer. The first program data includes the control program to be applied and a first checksum obtained by processing the control program to be applied. Steps S207 and S201 are the same. S201 has been described in detail above and will not be repeated here.
[0108] S208. Verify all control programs to be applied in the first program set to obtain a second verification code corresponding to each control program to be applied. The process of obtaining the second verification code has been described in detail above and will not be repeated here. It should be noted that, in this embodiment, after obtaining the first program set, all control programs to be applied in the first program set are calculated to obtain the corresponding second verification code. For example, the first program set includes first program data A and first program data B. In this case, the control programs to be applied in first program data A and the control programs to be applied in second program data B are both verified to obtain a second verification code corresponding to the control program to be applied in first program data A and a second verification code corresponding to the control program to be applied in second program data B.
[0109] S209. Obtain a second check code from the first program data in the first program assembly.
[0110] Since all the control programs to be applied in the first program set have been verified in this embodiment, and each control program to be applied has been verified to obtain the corresponding second verification code, the second verification code in the first program data can be directly obtained in step S209.
[0111] S210. Compare the second check code with the first check code in the first program data. Steps S210 and S204 are the same. S204 has been described in detail above and will not be repeated here.
[0112] S211. If the second check code is the same as the first check code, then the control program to be applied is loaded into memory as the target control program.
[0113] S212. If the second check code and the first check code are not the same, then obtain the second check code from the next first program data, and perform the step of comparing the second check code and the first check code until the obtained second check code and the first check code are the same. Then, load the control program to be applied corresponding to the second check code that is the same as the first check code as the target control program into the memory.
[0114] Since all control programs to be applied in the first program set have been verified in this embodiment of the application to obtain the corresponding second verification code, this step can directly obtain the second verification code of the next first program data.
[0115] In some embodiments, the method further includes: deleting content from the first assembly other than the first program data corresponding to the target control program.
[0116] In this embodiment of the application, when the second verification code and the first verification code are the same, the control program to be applied corresponding to the second verification code is determined as the target control program for upgrading the 3D printer. At this time, the first program data corresponding to other control programs to be applied in the first program set will no longer be used. Therefore, the first program data corresponding to other control programs to be applied that are not the target control program can be directly deleted to free up the storage space in the 3D printer.
[0117] In some embodiments, the method further includes:
[0118] A second program set is acquired and stored in the non-volatile memory. The second program set includes first program data for updating the control program of the 3D printer, and multiple second program data. The first program data includes a control program to be applied and a first checksum obtained by processing the control program to be applied. The second program data includes a current control program and a third checksum obtained by processing the current control program.
[0119] In this embodiment, to prevent problems with the control program to be applied in the first program data, a second program data set is also provided in the second program set. This second program data includes the current control program and a third verification code obtained by processing the current control program. The current control program is a backup of the control program of the currently running 3D printer. The amount of second program data in the second program set can be set according to actual needs and is not limited here.
[0120] Obtain the first program data from the second program set;
[0121] The control program to be applied in the first program data is verified to obtain the second verification code;
[0122] Compare the second check code with the first check code;
[0123] If the second verification code is the same as the first verification code, then the control program to be applied is loaded into the memory as the target control program.
[0124] In this embodiment of the application, the steps from obtaining the first program data from the second program set to loading the control program to be applied as the target control program into the memory if the second check code and the first check code are the same are executed in the same way as steps S201-S205 above, and will not be repeated here.
[0125] In this embodiment, the control program to be applied in the first program data of the second program set is first verified. If the second check code determined by the control program to be applied is the same as the first check code, the control program to be applied is directly loaded into memory as the target control program. If the second check code is different from the first check code, the control program of the 3D printer is upgraded using the current control program in the second program data.
[0126] In some embodiments, if the second verification code and the first verification code are different, then the second program data is obtained;
[0127] The current control program in the second program data is verified to obtain a fourth verification code. In this embodiment, the method for verifying the current control program in the second program data is the same as the method for verifying the control program to be applied in the first program data mentioned above, and will not be described again.
[0128] The fourth check code and the third check code are compared;
[0129] If the fourth check code and the third check code are the same, then the current control program is loaded into the content as the target control program;
[0130] If the fourth check code and the third check code are different, then the next second program data is obtained, and the current control program in the second program data is checked to obtain the fourth check code. This process continues until the fourth check code obtained by checking the current control program in the second program data is the same as the third check code. Then, the current control program corresponding to the fourth check code that is the same as the third check code is loaded into the memory as the target control program.
[0131] In this embodiment, when the second check code and the first check code corresponding to the control program to be applied are different, the current control program is used to calculate the corresponding fourth check code, and the fourth check code is compared with the third check code. This ensures that even if the control program to be applied cannot upgrade the control program of the 3D printer, the current control program can still be used to ensure that the 3D printer can continue to operate normally.
[0132] In some embodiments, the method further includes:
[0133] Delete all content in the second program assembly except for the first program data and the second program data of the target control program.
[0134] In this embodiment of the application, in order to free up more space, other content in the second program assembly, except for the first program data and the second program data corresponding to the target control program stored in memory, can be deleted.
[0135] In this embodiment, it can be applied to a master-slave system architecture. When applied to a master-slave system architecture, the control program and target control program of the 3D printer are the main programs in the slave computer. The determination of the target control program when the control program and target control program of the 3D printer are the main programs will be described in detail below.
[0136] In related technologies, 3D printers utilize a master-slave system architecture, specifically including a master computer and a slave computer. Upgrading the control program of the MCU (Microcontroller Unit) in the slave computer, i.e., the main program upgrade, mainly involves three methods: the first is upgrading via a debugger emulator protocol (e.g., J-Link) / debugger (e.g., JTAG); the second is upgrading via a TF / SD card; and the third is upgrading the slave computer from the master computer via a bus protocol.
[0137] For the upper and lower computer system architecture, the J-link / J-tag solution requires technicians to use corresponding professional software tools to implement it, and it does not have mass production capability. Therefore, the first method is not suitable for upgrading the main program. Since the MCU is no longer equipped with TF / SD cards, the second program upgrade method is difficult to apply. The third solution involves the upper computer upgrading the lower computer through a bus protocol. During the process, the main program upgrade may fail due to some reason (such as power failure). Therefore, if the lower computer malfunctions during mass production or when it is in the hands of customers, the 3D printer will not be able to operate normally. Therefore, it is necessary to find a way to ensure the OTA (Over-the-Air Technology) upgrade of the lower computer, that is, to make the main program upgrade more reliable.
[0138] To address the issue of unreliable main program upgrades, the above-described steps prior to reading the target control program from the memory can be performed in this embodiment.
[0139] Specifically, the lower-level machine runs a bootloader and the MCU's main program. The bootloader is a special piece of code located inside the MCU, primarily responsible for starting the lower-level system, updating firmware, and managing communication interfaces. It can read application code and data from a specific storage medium (non-volatile memory) and load them into the microcontroller's memory. Afterward, the bootloader can jump to the application's entry point, achieving a smooth system switch.
[0140] In some embodiments, a first program assembly is obtained using a bootloader and stored in non-volatile memory. This first program assembly contains multiple first program data, including a control program to be applied (main program) and a first checksum obtained by processing the main program. When the main program is stored in non-volatile memory, the multiple main programs can be arranged in a certain order. Subsequent execution steps are the same as the execution steps described above after obtaining the first program assembly, and will not be repeated here.
[0141] Figure 6 An exemplary diagram illustrates a storage method for multiple main programs according to some embodiments. Figure 5 It includes three main programs: the first main program (Main App), the second main program (Main App backup1), and the third main program (Main App backup2). Figure 6While displaying the main program, the system also displays a second verification code calculated by the main program. In this embodiment, after obtaining the first program set, all main programs in the first program set are directly verified to obtain the second verification code, which is then placed at the end of the corresponding main program.
[0142] Of course, in this embodiment of the application, the above-mentioned scheme can also be adopted, in which after obtaining a main program from the first program set, only the obtained main program is verified to obtain the second verification value, and the other main programs are not verified in advance.
[0143] When initially setting up the main program in the first program set, multiple main programs have the same content. However, due to reasons such as power outages, some main programs in the first program set may malfunction. When using the malfunctioning main program to upgrade the original main program, the upgrade will fail. In this embodiment, a first program set including multiple main programs is set up. When the upgrade fails when using one of the main programs, other main programs can be used to continue the upgrade, thereby improving the reliability of the upgrade.
[0144] In other embodiments, a second program assembly is obtained using a bootloader and stored in non-volatile memory. This second program assembly includes first program data and multiple second program data sets. The first program data includes a control program to be applied (main program) and a first checksum obtained by processing the control program to be applied. The second program data includes a current control program (currently running main program) and a third checksum obtained by processing the current control program. Subsequent steps are the same as the execution steps after obtaining the second program assembly described above, and will not be repeated here.
[0145] In some embodiments, the step of storing device data in a specific storage area includes:
[0146] The device data is encrypted to obtain encrypted data, which is a text file. The encrypted data is then stored on a disk.
[0147] In this embodiment, while text files are easy to understand, they are also easily spied on. Therefore, while setting the device data type to text files, the device data is also encrypted, making it difficult to spy on. Furthermore, in this embodiment, the encrypted data is stored on a disk rather than in memory because data in memory is lost when the 3D printer loses power, while the encrypted data on the disk is not lost.
[0148] In this embodiment, the device data is encrypted. The step of obtaining encrypted data can also be applied to the scenario of FDM (Fused Deposition Modeling) type 3D printers. The device data of FDM type 3D printers is mostly in text file type or binary text type. Although text file type is easy to understand, it is easy to be spied on. Although binary file type has certain rules, it is not easy to understand. Subsequent modification and debugging are inconvenient. Therefore, in this embodiment, the device data is set to text file type and the device data is encrypted at the same time. This can ensure the security of device data.
[0149] In some embodiments, the method further includes:
[0150] When the updated control program is run using the bootloader, the encrypted data on the disk is decrypted to obtain device data; the device data is loaded into memory; and the updated control program is run using the device data from memory.
[0151] In this embodiment, encrypted data is obtained after encrypting the device data and stored on a disk. When the 3D printer runs, the encrypted data is decrypted to obtain the device data, which is then stored in memory. The 3D printer parses the device data in memory and then applies it.
[0152] The above embodiments provide a method for updating the control program. In this method, the device data of the 3D printer is stored in a specific storage area. This device data in the specific storage area will not be overwritten or erased when the 3D printer's control program is updated. Thus, after updating the 3D printer's control program, the 3D printer can still operate based on the original device data, eliminating the need for re-leveling and setting data, ultimately simplifying the use of the 3D printer. The method includes: storing the 3D printer's device data in the specific storage area; updating the 3D printer's control program by reading the device data from the specific storage area to configure the updated control program.
[0153] In embodiments of the present invention, as Figure 2 , Figure 4 and Figure 5 The specific implementation of the method shown in this embodiment provides a control program update device, such as... Figure 7 As shown, the device includes a storage unit 701 and an update unit 702.
[0154] Storage unit 701 is used to store the device data of the 3D printer in a specific storage area;
[0155] The update unit 702 is used to update the control program of the 3D printer by reading the device data from the specific storage area to configure the updated control program.
[0156] In some embodiments, the apparatus further includes:
[0157] The first acquisition unit is used to acquire a first program set and store it in the non-volatile memory. The first program set includes a plurality of first program data for updating the control program of the 3D printer. The first program data includes a control program to be applied and a first check code obtained by processing the control program to be applied.
[0158] The second acquisition unit is used to acquire a piece of first program data from the first program set;
[0159] The first verification unit is used to verify the control program to be applied in the first program data to obtain the second verification code;
[0160] The first comparison unit is used to compare the second verification code with the first verification code in the first program data;
[0161] The first loading unit is configured to load the control program to be applied into the memory as the target control program if the second check code and the first check code are the same.
[0162] In some embodiments, the apparatus further includes:
[0163] The third acquisition unit is configured to, if the second verification code and the first verification code are different, acquire the next first program data from the first program set, execute the step of verifying the control program to be applied in the first program data to obtain the second verification code, until the second verification code obtained by verifying the control program to be applied in the acquired first program data is the same as the first verification code, and load the control program to be applied corresponding to the second verification code that is the same as the first verification code into the memory as the target control program.
[0164] In some embodiments, the apparatus further includes:
[0165] The fourth acquisition unit is used to acquire the first program set and store it in the non-volatile memory. The first program set includes a plurality of first program data for updating the control program of the 3D printer. The first program data includes the control program to be applied and a first check code obtained by processing the control program to be applied.
[0166] The second verification unit is used to verify all the control programs to be applied in the first program data of the first program set, and obtain a second verification code corresponding to the control program to be applied.
[0167] The fifth acquisition unit is used to acquire a second verification code from the first program data;
[0168] The second comparison unit is used to compare the second check code with the first check code in the first program data;
[0169] The second loading unit is used to load the control program to be applied into the memory as the target control program if the second check code and the first check code are the same.
[0170] In some embodiments, the apparatus further includes:
[0171] The sixth acquisition unit is used to acquire the second verification code in the next first program data if the second verification code and the first verification code are not the same, and to perform the step of comparing the second verification code and the first verification code until the acquired second verification code and the first verification code are the same, and to load the application control program corresponding to the second verification code that is the same as the first verification code as the target control program into the memory.
[0172] In some embodiments, the apparatus further includes:
[0173] The first deletion unit is used to delete all content in the first program set except for the first program data corresponding to the target control program.
[0174] In some embodiments, the apparatus further includes:
[0175] The seventh acquisition unit is used to acquire the second program set and store it in the non-volatile memory. The second program set includes first program data and multiple second program data. The first program data includes a control program to be applied and a first check code obtained by processing the control program to be applied. The second program data includes the current control program and a third check code obtained by processing the current control program.
[0176] The eighth acquisition unit is used to acquire the first program data from the second program assembly;
[0177] The third verification unit is used to verify the control program to be applied in the first program data and obtain the second verification code.
[0178] The third comparison unit is used to compare the second check code with the first check code in the first program data;
[0179] The third loading unit is used to load the control program to be applied into the memory as the target control program if the second check code and the first check code are the same.
[0180] In some embodiments, the apparatus further includes:
[0181] The ninth acquisition unit is used to acquire a piece of the second program data if the second verification code and the first verification code are different.
[0182] The fourth verification unit is used to verify the current control program in the second program data to obtain the fourth verification code;
[0183] The fourth comparison unit is used to compare the fourth check code with the third check code in the second program data;
[0184] The fourth loading unit is used to load the current control program as the target control program into the memory if the fourth check code and the third check code are the same.
[0185] In some embodiments, the apparatus further includes:
[0186] The tenth acquisition unit is used to acquire the next second program data if the fourth check code and the third check code are different, and to perform the step of verifying the current control program in the second program data to obtain the fourth check code, until the fourth check code obtained by verifying the current control program in the acquired second program data is the same as the third check code, and then load the current control program corresponding to the fourth check code that is the same as the third check code into the memory as the target control program.
[0187] In some embodiments, the apparatus further includes:
[0188] The second deletion unit is used to delete other content in the second program set, except for the first program data and the second program data of the target control program.
[0189] In some embodiments, the first storage unit specifically performs:
[0190] The device data of the 3D printer is encrypted to obtain encrypted data, and the data type of the device data is a text file.
[0191] The encrypted data is stored on a disk.
[0192] In some embodiments, the update unit specifically performs the following:
[0193] The decryption unit is used to decrypt the encrypted data in the disk to obtain device data when the updated control program is run;
[0194] A loading unit is used to load the device data into memory;
[0195] The running unit is used to run the updated control program using the device data in the memory.
[0196] Embodiments of the present invention also provide a 3D printer, comprising:
[0197] Processor; and
[0198] A memory configured to store computer-executable instructions, which, when executed, cause the processor to perform the program update control method.
[0199] Embodiments of the present invention also provide a computer-readable storage medium storing one or more programs, which, when executed by a 3D printer including multiple applications, cause the 3D printer to perform a control method for updating the programs.
[0200] In an embodiment of the present invention, a 3D printer includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When executed by the processor, the computer program implements the following... Figure 2 , Figure 4 and Figure 5 The method for controlling program updates is shown.
[0201] It should be noted that other corresponding descriptions of the functional units involved in the 3D printer and program update control device provided in this embodiment can be found in the following references. Figure 2 , Figure 4 and Figure 5 The corresponding descriptions in all the above contents of this invention specification will not be repeated here.
[0202] Based on the above, Figure 2 , Figure 4 and Figure 5 Accordingly, this embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements the above-described method. Figure 1 , Figure 2 The method for controlling program updates is shown.
[0203] Based on this understanding, the technical solution of this application can be embodied in the form of a software product. The software product to be identified can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, or portable hard drive), including several instructions to enable a 3D printer (such as a personal computer, server, or network device) to execute the methods of various implementation scenarios of this application.
[0204] Based on the above, Figure 2 , Figure 4 and Figure 5 The method shown, and Figure 7 To achieve the above objectives, the embodiment of the program update control device also provides a program update control physical device, which can be a personal computer, server, smartphone, tablet computer, smartwatch, or other network device, etc. This physical device includes a storage medium and a processor; the storage medium is used to store a computer program; the processor is used to execute the computer program to achieve the above-described... Figure 2 , Figure 4 and Figure 5 The method shown.
[0205] The physical device may also include a user interface, a network interface, a camera, radio frequency (RF) circuitry, sensors, audio circuitry, a Wi-Fi module, and so on. The user interface may include a display screen, input units such as a keyboard, and optional user interfaces may include USB interfaces, card reader interfaces, etc. Optional network interfaces may include standard wired interfaces and wireless interfaces (such as Wi-Fi interfaces).
[0206] Those skilled in the art will understand that the control entity device structure for program updates provided in this embodiment does not constitute a limitation on the entity device, and may include more or fewer components, or combine certain components, or have different component arrangements.
[0207] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of the aforementioned physical device, supporting the operation of information processing programs and other software and / or programs to be identified. The network communication module is used to enable communication between the various components within the storage medium, as well as communication with other hardware and software in the information processing physical device.
[0208] This application also provides the following embodiments:
[0209] Example 1: A program update control method applied to a 3D printer, comprising:
[0210] The device data of the 3D printer is stored in a specific storage area;
[0211] The control program of the 3D printer is updated by reading device data from the specific storage area to configure the updated control program.
[0212] Example 2: According to the program update control method of Example 1, the 3D printer includes a memory, and the memory includes RAM; the step of updating the control program of the 3D printer includes:
[0213] Read the target control program from the memory;
[0214] The control program of the 3D printer is updated using the target control program.
[0215] Example 3: According to the program update control method of Example 2, the memory further includes non-volatile memory; the method further includes:
[0216] A first program set is acquired and stored in the non-volatile memory, wherein the first program set includes a plurality of first program data for updating the control program of the 3D printer, and the first program data includes the control program to be applied and a first check code obtained by processing the control program to be applied.
[0217] Obtain one piece of first program data from the first program set;
[0218] The control program to be applied in the first program data is verified to obtain the second verification code;
[0219] Compare the second check code with the first check code in the first program data;
[0220] If the second verification code is the same as the first verification code, then the control program to be applied is loaded into the memory as the target control program.
[0221] Example 4, the control method for program updates according to Example 3, further includes:
[0222] If the second verification code and the first verification code are different, then the next first program data is obtained from the first program set, and the step of verifying the control program to be applied in the first program data to obtain the second verification code is executed until the second verification code obtained by verifying the control program to be applied in the obtained first program data is the same as the first verification code. Then the control program to be applied corresponding to the second verification code that is the same as the first verification code is loaded into the memory as the target control program.
[0223] Example 5: According to the program update control method of Example 2, the memory further includes non-volatile memory; the method further includes:
[0224] A first program set is acquired and stored in the non-volatile memory, wherein the first program set includes a plurality of first program data for updating the control program of the 3D printer, and the first program data includes the control program to be applied and a first check code obtained by processing the control program to be applied.
[0225] Verify all the control programs to be applied in the first program data of the first program set to obtain a second verification code corresponding to the control program to be applied.
[0226] Obtain a second verification code from the first program data;
[0227] Compare the second check code with the first check code in the first program data;
[0228] If the second verification code is the same as the first verification code, then the control program to be applied is loaded into the memory as the target control program.
[0229] Example 6: The control method for program updates according to Example 5 further includes:
[0230] If the second verification code and the first verification code are different, then the second verification code in the next first program data is obtained, and the step of comparing the second verification code and the first verification code is executed until the obtained second verification code and the first verification code are the same. Then, the control program to be applied corresponding to the second verification code that is the same as the first verification code is loaded into the memory as the target control program.
[0231] Example 7: The control method for program updates according to any one of Examples 3-6 further includes:
[0232] Delete all content in the first program set except for the first program data corresponding to the target control program.
[0233] Example 8: According to the program update control method of Example 2, the memory further includes non-volatile memory; the method further includes:
[0234] A second program set is acquired and stored in the non-volatile memory. The second program set includes first program data and multiple second program data. The first program data includes a control program to be applied and a first checksum obtained by processing the control program to be applied. The second program data includes a current control program and a third checksum obtained by processing the current control program.
[0235] Obtain the first program data from the second program set;
[0236] The control program to be applied in the first program data is verified to obtain the second verification code;
[0237] Compare the second check code with the first check code in the first program data;
[0238] If the second verification code is the same as the first verification code, then the control program to be applied is loaded into the memory as the target control program.
[0239] Example 9, the control method for program updates according to Example 8, further includes:
[0240] If the second verification code and the first verification code are different, then obtain one of the second program data;
[0241] The current control program in the second program data is verified to obtain the fourth verification code;
[0242] The fourth check code is compared with the third check code in the second program data;
[0243] If the fourth check code is the same as the third check code, then the current control program is loaded into the memory as the target control program.
[0244] Example 10, the control method for program updates according to Example 9, further includes:
[0245] If the fourth check code and the third check code are different, then the next second program data is obtained, and the current control program in the second program data is checked to obtain the fourth check code. This process continues until the fourth check code obtained by checking the current control program in the second program data is the same as the third check code. Then, the current control program corresponding to the fourth check code that is the same as the third check code is loaded into the memory as the target control program.
[0246] Example 11: The control method for program updates according to any one of Examples 8-10 further includes:
[0247] Delete all content in the second program assembly except for the first program data and the second program data of the target control program.
[0248] Example 12: According to the program update control method of Example 1, the step of storing the device data of the 3D printer in a specific storage area includes:
[0249] The device data of the 3D printer is encrypted to obtain encrypted data, and the data type of the device data is a text file.
[0250] The encrypted data is stored on a disk.
[0251] Example 13: According to the program update control method of Example 12, reading the device data from the specific storage area to configure the updated control program includes:
[0252] When the updated control program is run, the encrypted data in the disk is decrypted to obtain the device data;
[0253] The device data is loaded into memory;
[0254] The updated control program is run using the device data in the memory.
[0255] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented using software plus necessary general-purpose hardware platforms, or it can be implemented through hardware. The device data of the 3D printer is stored in a specific storage area, and this device data in the specific storage area will not be overwritten or erased when the 3D printer's control program is updated. Thus, after updating the 3D printer's control program, the 3D printer can still run based on the original device data, eliminating the need for re-leveling the device and setting data, ultimately simplifying the use of the 3D printer. The above application serial numbers are merely descriptive and do not represent the superiority or inferiority of the implementation scenarios. The above disclosures are only a few specific implementation scenarios of this application; however, this application is not limited thereto, and any variations conceived by those skilled in the art should fall within the protection scope of this application.
Claims
1. A method for controlling program updates, applied to a 3D printer, characterized in that, include: The device data of the 3D printer is stored in a specific storage area; Update the control program of the 3D printer by reading device data from the specific storage area to configure the updated control program; The 3D printer includes a memory, which includes RAM; The memory also includes non-volatile memory; The method further includes: acquiring a second program set and storing it in the non-volatile memory, wherein the second program set includes first program data and multiple second program data, the first program data includes a control program to be applied and a first checksum obtained by processing the control program to be applied, and the second program data includes a current control program and a third checksum obtained by processing the current control program; acquiring the first program data from the second program set; verifying the control program to be applied in the first program data to obtain a second checksum; comparing the second checksum with the first checksum in the first program data; if the second checksum and the first checksum are the same, loading the control program to be applied as the target control program into the memory ... If the verification codes are different, then a second program data is obtained; the current control program in the second program data is verified to obtain a fourth verification code; the fourth verification code is compared with the third verification code in the second program data; if the fourth verification code and the third verification code are the same, then the current control program is loaded into the memory as the target control program; if the fourth verification code and the third verification code are different, then the next second program data is obtained, and the step of verifying the current control program in the second program data to obtain a fourth verification code is performed, until the fourth verification code obtained by verifying the current control program in the obtained second program data is the same as the third verification code, then the current control program corresponding to the fourth verification code that is the same as the third verification code is loaded into the memory as the target control program.
2. The control method for program updates according to claim 1, characterized in that, The steps of updating the control program of the 3D printer include: Read the target control program from the memory; The control program of the 3D printer is updated using the target control program.
3. The control method for program updates according to claim 2, characterized in that, The memory further includes non-volatile memory; the method further includes: A first program set is acquired and stored in the non-volatile memory, wherein the first program set includes a plurality of first program data for updating the control program of the 3D printer, and the first program data includes the control program to be applied and a first check code obtained by processing the control program to be applied. Obtain one piece of first program data from the first program set; The control program to be applied in the first program data is verified to obtain the second verification code; Compare the second check code with the first check code in the first program data; If the second verification code is the same as the first verification code, then the control program to be applied is loaded into the memory as the target control program.
4. The control method for program updates according to claim 3, characterized in that, Also includes: If the second verification code and the first verification code are different, then the next first program data is obtained from the first program set, and the step of verifying the control program to be applied in the first program data to obtain the second verification code is executed until the second verification code obtained by verifying the control program to be applied in the obtained first program data is the same as the first verification code. Then the control program to be applied corresponding to the second verification code that is the same as the first verification code is loaded into the memory as the target control program.
5. The control method for program updates according to claim 2, characterized in that, The memory further includes non-volatile memory; the method further includes: A first program set is acquired and stored in the non-volatile memory, wherein the first program set includes a plurality of first program data for updating the control program of the 3D printer, and the first program data includes the control program to be applied and a first check code obtained by processing the control program to be applied. Verify all the control programs to be applied in the first program data of the first program set to obtain a second verification code corresponding to the control program to be applied. Obtain a second verification code from the first program data; Compare the second check code with the first check code in the first program data; If the second verification code is the same as the first verification code, then the control program to be applied is loaded into the memory as the target control program.
6. The control method for program updates according to claim 5, characterized in that, Also includes: If the second verification code and the first verification code are different, then the second verification code in the next first program data is obtained, and the step of comparing the second verification code and the first verification code is executed until the obtained second verification code and the first verification code are the same. Then, the control program to be applied corresponding to the second verification code that is the same as the first verification code is loaded into the memory as the target control program.
7. The control method for program updates according to any one of claims 3-6, characterized in that, Also includes: Delete all content in the first program set except for the first program data corresponding to the target control program.
8. The control method for program updates according to claim 1, characterized in that, Also includes: Delete all content in the second program assembly except for the first program data and the second program data of the target control program.
9. The control method for program updates according to claim 1, characterized in that, The step of storing the 3D printer's device data in a specific storage area includes: The device data of the 3D printer is encrypted to obtain encrypted data, and the data type of the device data is a text file. The encrypted data is stored on a disk.
10. The control method for program updates according to claim 9, characterized in that, The step of reading device data from the specific storage area to configure the updated control program includes: When the updated control program is run, the encrypted data in the disk is decrypted to obtain the device data; The device data is loaded into memory; The updated control program is run using the device data in the memory.
11. A 3D printer, comprising: processor; as well as A memory configured to store computer-executable instructions, characterized in that, when executed, the executable instructions cause the processor to perform the program update control method according to any one of claims 1-10.
12. A computer-readable storage medium storing one or more programs, characterized in that, When the one or more programs are executed by a 3D printer comprising multiple applications, the 3D printer performs the program update control method according to any one of claims 1-10.
Citation Information
Patent Citations
Method and device for operating upgrade data packet of numerical control machine tool
CN107395666A
Remote updating method and system for set-up printer program and data
CN1588312A