Medical equipment startup control method and system and medical equipment
By setting two storage spaces in the non-volatile memory to store upgrade parameters and combining stack address detection, the problem of program abnormality during remote online upgrade of medical equipment is solved, and the device startup reliability and user experience are improved.
Patent Information
- Application Number
- CN202510712049.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-29
- Publication Date
- 2025-09-16
AI Technical Summary
The existing remote online upgrade method for medical equipment may cause abnormal program operation under abnormal circumstances, affecting the normal use of the equipment and posing safety hazards, and the on-site maintenance cost is high.
Two storage spaces are set up in the non-volatile memory to store the memory parameters at the start and completion of the program upgrade respectively. The consistency of the parameters is compared when the device is turned on. Combined with stack address detection, it ensures that the medical device enters the correct working mode and avoids program failure.
The dual protection mechanism of parameter consistency and stack address detection improves the reliability of medical equipment startup and operation, reduces the risk of misjudgment, enhances user experience and reduces maintenance costs.
Smart Images

Figure CN120653314A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of medical equipment control, and in particular to a medical equipment startup control method, system and medical equipment. Background Art
[0002] With the development of intelligent medical devices, remote online program upgrades have become a key feature of modern medical devices, enabling timely repair of software defects, addition of new features, and improved device availability and safety. Currently, remote online upgrades of medical devices typically use a microcontroller unit (MCU)-based upgrade solution. This solution typically divides the memory into a boot program area and an application program area, enabling remote application upgrades through the boot program.
[0003] However, existing remote online upgrade methods for medical devices have technical flaws. If an unexpected power outage or other abnormality occurs during the upgrade process, the MCU may enter the incorrectly programmed application (APP) upon powering back on, causing the code to run erratically or "runaway." This not only affects the normal operation of the device but also poses a safety hazard. In such cases, after-sales personnel are often required to visit the device site to reprogram the program, which not only affects the customer experience but also increases maintenance costs.
[0004] Therefore, there is a need for an improved medical device startup control method that can avoid running incomplete application programs after the medical device is started, thereby improving the reliability of the startup operation of the medical device. Summary of the Invention
[0005] The technical problem to be solved by the present invention is how to provide a medical device startup control method, system and medical device to improve the reliability of the startup operation of the medical device.
[0006] The technical solution adopted by the present invention to solve its technical problem is: to provide a medical device startup control method, the medical device is configured to be capable of remote online program upgrades, the medical device includes a non-volatile memory, the non-volatile memory includes a first storage space and a second storage space, the method includes: obtaining a first memory parameter pre-stored in the first storage space and a second memory parameter pre-stored in the second storage space, wherein the first memory parameter is stored in the first storage space at the beginning of each program upgrade, and the second memory parameter is stored in the second storage space after each program upgrade is completed; comparing the consistency of the first memory parameter and the second memory parameter; confirming the entry mode of the medical device after startup based on the comparison result, wherein the entry mode is one of the application mode and the waiting for upgrade mode.
[0007] Preferably, the method includes: when the program upgrade starts, obtaining the first memory parameter of the first storage space, and adjusting the parameter value C of the first memory parameter to the updated parameter value D, and then re-storing it in the first storage space; after the program upgrade is completed, obtaining the second memory parameter of the second storage space, and replacing the parameter value of the second memory parameter with the updated parameter value D, and then re-storing it in the second storage space.
[0008] Preferably, adjusting the parameter value C to the updated parameter value D includes: performing an arithmetic operation on the parameter value C to obtain the updated parameter value D.
[0009] Preferably, the arithmetic operation is an increment operation of D=C+1.
[0010] Preferably, the comparison of the consistency of the first memory parameter pre-stored in the first storage space and the second memory parameter pre-stored in the second storage space includes: respectively obtaining the first memory parameter pre-stored in the first storage space and the second memory parameter pre-stored in the second storage space; judging whether the first memory parameter and the second memory parameter are equal; if the first memory parameter and the second memory parameter are not equal, determining that they are inconsistent; if the first memory parameter and the second memory parameter are equal, determining that they are consistent.
[0011] Preferably, the step of confirming the mode entered after the medical device is powered on according to the comparison result includes: if the first memory parameter and the second memory parameter are inconsistent, entering the waiting mode for upgrade.
[0012] Preferably, the method of confirming the mode entered after the medical device is powered on based on the comparison result also includes: if the first memory parameter and the second memory parameter are consistent, determining whether the stack address is normal; if the stack address is normal, entering the application mode; if the stack address is abnormal, entering the waiting for upgrade mode.
[0013] Preferably, the determining whether the stack address is normal includes: detecting whether the stack pointer of the application points to a valid address space; if the stack pointer of the application points to a valid address space, determining that the stack address is normal, otherwise determining that the stack address is abnormal.
[0014] The beneficial effects of the present invention are: By setting up two storage spaces in non-volatile memory to store the memory parameters for the start and completion of the program upgrade, and comparing the consistency of these two parameters at power-up, it is possible to effectively determine whether the program upgrade process has been completed normally, thereby avoiding program errors caused by abnormal power failures or programming failures during the programming process, and improving the reliability of medical equipment startup and operation. This solution is simple, reliable, and easy to implement. Since most MCUs have built-in EEPROM, the MCU's internal EEPROM can be directly used, which has a minimal impact on cost. In addition, this method combines stack address detection to form a dual protection mechanism, further improving system reliability and enhancing the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 A schematic flow chart of a method for controlling startup of a medical device according to an embodiment of the present invention is shown; Figure 2 Another schematic diagram shows a flow chart of a medical device startup control method provided by an embodiment of the present invention; Figure 3 A schematic flow chart of a method for controlling startup of a medical device provided by another embodiment of the present invention is shown; Figure 4 A schematic diagram showing the structural principle of a medical device startup control system provided by one embodiment of the present invention is shown; Figure 5 A schematic diagram showing the structural principle of a medical device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0016] The technical solutions of the present invention will be described clearly and completely below with reference to the accompanying drawings and embodiments. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without inventive effort are also within the scope of protection of the present invention. Example 1
[0017] This embodiment provides a medical device startup control method applicable to medical devices capable of remote online program upgrades. The medical device includes a non-volatile memory, which includes a first storage space and a second storage space.
[0018] Figure 1 FIG1 shows a flow chart of a method for controlling the startup of a medical device according to an embodiment of the present invention. Figure 1 As shown, the medical device startup control method includes the following steps: Step S100: Acquire a first memory parameter pre-stored in the first storage space and a second memory parameter pre-stored in the second storage space.
[0019] During this step, upon powering on, the medical device first accesses the first and second storage spaces in the non-volatile memory to read pre-stored first and second memory parameters, respectively. The first memory parameters are stored in the first memory space at the start of each program upgrade, and the second memory parameters are stored in the second memory space after each program upgrade is complete. These two parameters are used to identify the status of the program upgrade. By comparing the consistency of these two parameters, it can be determined whether the previous program upgrade of the medical device was completed successfully.
[0020] Step S200: Comparing the consistency of the first memory parameter and the second memory parameter.
[0021] In this step, the medical device compares the acquired first memory parameter and the second memory parameter to determine whether they are consistent. Specifically, the medical device first acquires the first memory parameter pre-stored in the first storage space and the second memory parameter pre-stored in the second storage space. Then, the medical device determines whether the first memory parameter and the second memory parameter are equal. If the first memory parameter and the second memory parameter are not equal, the medical device determines that the parameters are inconsistent. If the first memory parameter and the second memory parameter are equal, the medical device determines that the parameters are consistent.
[0022] Step S300: Confirming the mode entered after the medical device is powered on according to the comparison result.
[0023] In this step, the medical device determines the working mode to be entered after powering on based on the comparison result of the first memory parameter and the second memory parameter. The entry mode is one of the application mode and the waiting for upgrade mode.
[0024] If the first memory parameter and the second memory parameter are inconsistent, the system will enter the waiting mode for upgrade. This indicates that the last program upgrade process was interrupted and needs to wait for the upgrade to be restarted to avoid system crash caused by executing damaged code.
[0025] If the first and second memory parameters match, the system checks whether the stack address is normal. If so, the system enters application mode. If not, the system enters upgrade waiting mode. By combining parameters and stack status, the risk of misjudging a normal upgrade can be further reduced.
[0026] The specific method for determining whether the stack address is normal is to check whether the application's stack pointer points to a valid address space. If so, the stack address is considered normal; otherwise, it is considered abnormal. By directly checking program integrity through stack pointer verification, data corruption caused by memory errors can be prevented, enhancing the reliability of medical equipment.
[0027] Figure 2Another flow chart of a medical device startup control method provided by an embodiment of the present invention is shown. Figure 1 As shown, during each program upgrade process, the method further includes the following steps: Step S100 ′: when the program upgrade starts, the first memory parameter of the first storage space is obtained, and the parameter value C of the first memory parameter is adjusted to the updated parameter value D, and then stored in the first storage space again.
[0028] Step S200 ′: after the program upgrade is completed, the second memory parameter of the second storage space is obtained, and the parameter value of the second memory parameter is replaced with the updated parameter value D, and then stored in the second storage space again.
[0029] This ensures that the memory parameter updates are strictly synchronized with the upgrade process. That is, the same parameters are stored at the beginning and after the upgrade is completed, so that the success of the program upgrade can be accurately determined. Parameter adjustments are automatically completed during the upgrade process, without additional intervention, reducing implementation complexity.
[0030] The process of adjusting parameter value C to updated parameter value D includes performing an arithmetic operation on parameter value C to obtain updated parameter value D. Arithmetic operations make parameter updates lightweight, reduce the computational burden on the MCU, and improve system response speed, making it particularly suitable for resource-constrained medical device MCUs.
[0031] The specific arithmetic operation is the increment operation of D = C + 1. The increment operation can ensure that the parameter values are unique and ordered, facilitate consistency comparison, and reduce the error rate.
[0032] This method allows medical devices to automatically detect whether the last program upgrade was completed successfully upon power-up and select the appropriate operating mode based on the test result, ensuring proper operation and reliable program upgrades. This method addresses the issue of program corruption caused by abnormal power outages during online upgrades, improving reliability and user experience. Requiring only two memory locations and comparison logic, this method is easy to implement and low-cost. Example 2
[0033] Figure 3 FIG2 shows a flow chart of a method for controlling the startup of a medical device according to another embodiment of the present invention. Figure 3 As shown, the method may include the following steps: Power-on initialization steps: After the medical device is powered on, the parameters C and D stored at addresses A and B are first read from the EEPROM.
[0034] Parameter verification steps: Judgment condition: "C == D?" That is, whether parameters C and D are equal.
[0035] Yes (Y): If they are equal, it means the parameters are consistent and the next step is to check the stack pointer.
[0036] No (N): If they are not equal, it means the parameters are inconsistent and the system will directly enter the "waiting for burning" state.
[0037] Stack pointer verification steps: Judgment condition: Is the APP stack pointer range normal? Yes (Y): If the stack pointer is normal, jump directly to the APP program (i.e., application program), and startup is complete.
[0038] No (N): If the stack pointer is abnormal, it enters the "waiting for burning" state.
[0039] Waiting for the burning step: Entering the waiting state, that is, waiting for user operation or host computer command: Start burning? Yes (Y): If a burn command is received, add 1 to the value of variable C, store it in address A, and proceed to the "burn file" step.
[0040] No (N): If there is no instruction, loop and wait until a signal is received.
[0041] Steps to burn files: Start burning the firmware file and check: Burning completed? Yes (Y): If the burning is completed, add 1 to the value of variable C, store it in address B, and then jump to the APP program.
[0042] No (N): If the burning is not completed, continue the burning process.
[0043] Jump to APP program steps: The process ends and the application runs. Example 3
[0044] Figure 4 The schematic diagram of the structure principle of a medical device startup control system provided by one embodiment of the present invention is shown. Figure 4 As shown, this embodiment provides a medical device startup control system, which includes a non-volatile memory 100 and a microprocessor 200. The non-volatile memory 100 includes a first storage space A and a second storage space B. The microprocessor 200 is configured to execute the method described in the first embodiment.
[0045] The nonvolatile memory 100 in the control system may be an EEPROM, Flash memory, or other type of nonvolatile memory. The first storage space A and the second storage space B may be two independent areas in the nonvolatile memory 100, respectively storing the first memory parameter and the second memory parameter. The microprocessor 200 may be an ARM architecture processor, a RISC-V processor, or other processor suitable for medical devices.
[0046] When the medical device is powered on, the microprocessor 200 first accesses the first storage space A and the second storage space B in the non-volatile memory 100 to read the pre-stored first and second memory parameters, respectively. The microprocessor 200 then compares the consistency of the two parameters and, based on the comparison result, determines the operating mode the medical device should enter.
[0047] If the first and second memory parameters are inconsistent, microprocessor 200 controls the medical device to enter a waiting mode for an upgrade, awaiting the transmission and installation of a remote upgrade program. If the first and second memory parameters are consistent, microprocessor 200 further checks whether the stack address is normal. If so, microprocessor 200 controls the medical device to enter an application mode for normal operation. If not, microprocessor 200 controls the medical device to enter a waiting mode for an upgrade.
[0048] During the program upgrade process, the microprocessor 200 obtains the first memory parameter of the first storage space at the beginning of the upgrade, increments its parameter value C to obtain an updated parameter value D, and re-stores the updated parameter value into the first storage space A. After the program upgrade is completed, the microprocessor 200 obtains the second memory parameter of the second storage space B, replaces the original parameter value with the updated parameter value D, and re-stores it into the second storage space B.
[0049] In this way, the program upgrade process can be effectively monitored to ensure that the medical device can correctly enter the waiting upgrade mode after the program upgrade is interrupted, avoiding device failure caused by incomplete program. Example 4
[0050] Figure 5 FIG1 shows a schematic diagram of the structural principle of a medical device provided by an embodiment of the present invention. Figure 5As shown, this embodiment provides a medical device comprising a non-volatile memory 100, a microprocessor 200, and a remote communication module 300. The remote communication module 300 is configured to remotely transmit an upgrade program. The non-volatile memory 100 comprises a first storage space A and a second storage space B. The first storage space A pre-stores a first memory parameter, and the second storage space B pre-stores a second memory parameter. The first memory parameter is stored in the first storage space A at the beginning of each program upgrade, and the second memory parameter is stored in the second storage space B after each program upgrade is completed.
[0051] The microprocessor 200 is configured to: obtain the first memory parameter and the second memory parameter from the first storage space A and the second storage space B respectively; compare the consistency of the first memory parameter and the second memory parameter; and confirm the mode entered after the medical device is turned on based on the comparison result, wherein the entry mode is one of the application mode and the waiting for upgrade mode.
[0052] The medical device may be an ultrasound machine, a ventilator, an electrocardiogram monitor, an infusion pump, or other medical device that requires regular software upgrades. The remote communication module 300 may be a WiFi module, a Bluetooth module, a 4G / 5G communication module, or other communication module capable of remote data transmission.
[0053] When the medical device is powered on, the microprocessor 200 first reads the first memory parameter and the second memory parameter from the first storage space A and the second storage space B of the non-volatile memory 100, respectively. The microprocessor 200 then compares the two parameters for consistency. If the two parameters are inconsistent, indicating that the previous program upgrade process was interrupted, the microprocessor 200 controls the medical device to enter a waiting mode for upgrades, awaiting the transmission and installation of the remote upgrade program. If the two parameters are consistent, the microprocessor 200 further checks whether the stack address is normal. If the stack address is normal, the microprocessor 200 controls the medical device to enter an application mode and operate the medical device's functions normally. If the stack address is abnormal, the microprocessor 200 controls the medical device to enter a waiting mode for upgrades.
[0054] During the program upgrade process, the microprocessor 200 obtains the first memory parameter in the first storage space A at the beginning of the upgrade, increments its parameter value C to obtain an updated parameter value D, and re-stores the updated parameter value into the first storage space A. After the program upgrade is completed, the microprocessor obtains the second memory parameter in the second storage space B, replaces the original parameter value with the updated parameter value D, and re-stores it into the second storage space B.
[0055] In this way, the medical device can effectively monitor the program upgrade process and ensure that it can correctly enter the waiting upgrade mode after the program upgrade is interrupted, avoiding device failure caused by incomplete program and improving the reliability of medical equipment.
[0056] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A method for controlling the startup of a medical device, wherein the medical device is configured to be capable of remote online program upgrades and includes a non-volatile memory, characterized in that: The non-volatile memory includes a first storage space and a second storage space, and the method includes: Obtaining a first memory parameter pre-stored in the first storage space and a second memory parameter pre-stored in the second storage space, wherein the first memory parameter is stored in the first storage space at the beginning of each program upgrade, and the second memory parameter is stored in the second storage space after each program upgrade is completed; comparing the consistency of the first memory parameter and the second memory parameter; The entry mode of the medical device after startup is confirmed according to the comparison result, wherein the entry mode is one of an application mode and a waiting for upgrade mode.
2. The method according to claim 1, characterized in that Each time the program is upgraded, the method includes: At the beginning of the program upgrade, the first memory parameter of the first storage space is obtained, and the parameter value C of the first memory parameter is adjusted to the updated parameter value D, and then stored back into the first storage space; After the program upgrade is completed, the second memory parameter of the second storage space is obtained, and the parameter value of the second memory parameter is replaced with the updated parameter value D, and then stored in the second storage space again.
3. The method according to claim 2, characterized in that The step of adjusting the parameter value C of the first memory parameter to the updated parameter value D includes: Perform an arithmetic operation on the parameter value C to obtain the updated parameter value D.
4. The method according to claim 3, characterized in that The arithmetic operation is an increment operation of D=C+1.
5. The method according to any one of claims 1 to 4, characterized in that The comparing the consistency of the first memory parameter pre-stored in the first storage space and the second memory parameter pre-stored in the second storage space includes: respectively acquiring a first memory parameter pre-stored in the first storage space and a second memory parameter pre-stored in the second storage space; Determining whether the first memory parameter and the second memory parameter are equal; If the first memory parameter and the second memory parameter are not equal, then it is determined that they are inconsistent; If the first memory parameter and the second memory parameter are equal, it is determined that they are consistent.
6. The method according to claim 5, characterized in that The step of confirming the mode entered after the medical device is powered on according to the comparison result includes: If the first memory parameter is inconsistent with the first memory parameter, the system enters the waiting for upgrade mode.
7. The method according to claim 6, characterized in that The step of confirming the medical device enters a mode after being powered on according to the comparison result further includes: If the first memory parameter and the second memory parameter are consistent, determining whether the stack address is normal; If the stack address is normal, enter application mode; If the stack address is abnormal, it will enter the waiting for upgrade mode.
8. The method according to claim 7, characterized in that Determining whether the stack address is normal includes: Check whether the application's stack pointer points to a valid address space; If the stack pointer of the application program points to a valid address space, the stack address is determined to be normal; otherwise, the stack address is determined to be abnormal.
9. A medical device startup control system comprising a non-volatile memory and a microprocessor, characterized in that: The non-volatile memory includes a first storage space and a second storage space, and the microprocessor is configured to execute the method according to any one of claims 1 to 8.
10. A medical device comprising a microprocessor, a non-volatile memory, and a remote communication module, wherein the remote communication module is configured to remotely transmit an upgrade program, wherein: The non-volatile memory includes a first storage space and a second storage space, wherein the first storage space pre-stores a first memory parameter, and the second storage space pre-stores a second memory parameter, wherein the first memory parameter is stored in the first storage space at the beginning of each program upgrade, and the second memory parameter is stored in the second storage space after each program upgrade is completed; The microprocessor is configured to: Retrieve a first memory parameter and a second memory parameter from the first storage space and the second storage space respectively; comparing the consistency of the first memory parameter and the second memory parameter; The entry mode of the medical device after startup is confirmed according to the comparison result, wherein the entry mode is one of an application mode and a waiting for upgrade mode.
Citation Information
Patent Citations
Software online upgrading method and system
CN112947977A
System operation method and device of electronic chip, electronic chip and storage medium
CN113778485A
Method for upgrading sound equipment on line and sound equipment
CN114217835A
Program upgrading method and device, computer equipment, storage medium and program product
CN116909607A