Ventilator calibration method, device, storage medium and electronic equipment

By initializing the ventilator calibration items through a preset state machine logic framework and configuration file, the complex problems of developing and maintaining the ventilator calibration function are solved, flexible calibration item management and system scalability are achieved, and the development and maintenance of the ventilator calibration function are simplified.

CN118807046BActive Publication Date: 2025-09-23SHENZHEN COMEN MEDICAL INSTR
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410799135.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-20
Publication Date
2025-09-23
Estimated Expiration
2044-06-20

AI Technical Summary

Technical Problem

In the existing technology, the development and maintenance of ventilator calibration functions are complex, with large amounts of code stacking, cumbersome logic, and prone to program errors.

Method used

The logic framework and configuration file of the preset state machine are used to initialize multiple candidate calibration items of the ventilator calibration function. The target calibration item is flexibly selected through the configuration file, and the corresponding calibration function is called to achieve the ventilator calibration result.

Benefits of technology

It simplifies the development and maintenance of ventilator calibration functions, enhances the flexibility and scalability of the system, and can flexibly add, modify and delete candidate calibration items according to actual needs to adapt to the upgrade and improvement of ventilator functions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118807046B_ABST
    Figure CN118807046B_ABST
Patent Text Reader

Abstract

The present disclosure provides a ventilator calibration method, apparatus, storage medium, and electronic device, relating to the field of computer technology. The method comprises initializing configuration files for multiple candidate calibration items in a ventilator calibration function and obtaining a configuration file for a target calibration item among the multiple candidate calibration items; utilizing a preset state machine logic framework to call a corresponding calibration function according to the calibration steps in the target calibration item, and obtaining a calibration result for the target calibration item based on the configuration file and the calibration function. The present disclosure facilitates maintenance and updating of the ventilator calibration function by modifying the configuration file, simplifying the development and maintenance of the ventilator calibration function.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a ventilator calibration method, a ventilator calibration device, a computer-readable storage medium, and an electronic device. Background Art

[0002] At present, medical ventilator is a device that can replace, control or change a person's normal physiological breathing, increase lung ventilation, improve respiratory function, reduce respiratory work consumption, and save heart reserve capacity. It is mainly used for respiratory failure, respiratory support treatment and emergency resuscitation treatment. It is a very important type of medical equipment.

[0003] Because the safety and reliability of medical ventilators are directly related to the health and well-being of patients, medical institutions must periodically test and calibrate the performance of ventilators during use. Developing ventilator calibration functionality presents challenges such as large code stacking, complex calibration logic, and the susceptibility to program errors. However, the calibration logic for the various calibration items in the ventilator calibration function is similar, and the overall calibration logic is relatively simple.

[0004] Therefore, in order to make the ventilator calibration function easier to develop and maintain, it is very necessary to propose a ventilator calibration method supported by a concise and easily extensible software framework.

[0005] The above information disclosed in this Background section is only for enhancement of understanding of the background of the invention and therefore it may contain information that does not form the prior art that is already known to a person of ordinary skill in the art. Summary of the Invention

[0006] The purpose of the embodiments of the present disclosure is to provide a ventilator calibration method, a ventilator calibration device, a computer-readable storage medium, and an electronic device, thereby at least to a certain extent solving the relatively complex problem of developing and maintaining ventilator calibration functions in related technologies.

[0007] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by practice of the present disclosure.

[0008] According to a first aspect of an embodiment of the present disclosure, a ventilator calibration method is provided, comprising:

[0009] Initializing configuration files of multiple candidate calibration items in a ventilator calibration function, and obtaining a configuration file of a target calibration item among the multiple candidate calibration items;

[0010] Using a logic framework of a preset state machine to call a corresponding calibration function according to a calibration step in the target calibration item, and obtaining a calibration result of the target calibration item according to a configuration file of the target calibration item and the calibration function;

[0011] Among them, the configuration files of the multiple candidate calibration items all include a source configuration file and a header configuration file, the source configuration file includes a calibration control structure and a calibration data structure, the calibration control structure is used to store the variables required to control each of the candidate calibration items, and the calibration data structure is used to store the calibration data corresponding to each of the variables.

[0012] In an exemplary embodiment of the present disclosure, the logic framework of the preset state machine is used to call the corresponding calibration function according to the calibration step in the target calibration item, and obtain the calibration result of the target calibration item according to the configuration file of the target calibration item and the calibration function, including:

[0013] Determine all calibration steps in the target calibration item and create a global variable for representing the current calibration step;

[0014] Calling the calibration function corresponding to the current calibration step, and performing calibration according to the calibration function corresponding to the current calibration step and the configuration file of the target calibration item;

[0015] The current calibration step is switched based on the logic framework of the preset state machine, and the global variable is updated according to the switched current calibration step until all calibration steps in the target calibration item are completed.

[0016] In an exemplary embodiment of the present disclosure, calling the calibration function corresponding to the current calibration step includes:

[0017] The configuration file of the target calibration item is passed to a predefined function interface, and the calibration function corresponding to the current calibration step is called through the function interface.

[0018] In an exemplary embodiment of the present disclosure, the method further includes:

[0019] Determining all candidate calibration items in the ventilator calibration function, and defining a calibration function corresponding to each candidate calibration item;

[0020] A function pointer array is created according to all the candidate calibration items, wherein each of the candidate calibration items is a function pointer in the function pointer array and points to a corresponding calibration function.

[0021] In an exemplary embodiment of the present disclosure, the method further includes:

[0022] Pre-designing the logic framework of the state machine;

[0023] When calibrating each of the candidate calibration items, the logical framework of the state machine is referenced.

[0024] In an exemplary embodiment of the present disclosure, after obtaining the calibration result of the target calibration item, the method further includes:

[0025] The calibration result of the target calibration item is written into a preset memory, and the calibration result is sent to a host computer, so as to end the calibration process of the target calibration item controlled by the host computer.

[0026] In an exemplary embodiment of the present disclosure, the plurality of candidate calibration items include at least flow calibration, pressure calibration, proportional valve calibration, oxygen sensor calibration, and air-oxygen factor calibration.

[0027] According to a second aspect of an embodiment of the present disclosure, there is provided a ventilator calibration device, comprising:

[0028] a configuration file acquisition module, configured to initialize configuration files of a plurality of candidate calibration items in a ventilator calibration function, and to acquire a configuration file of a target calibration item among the plurality of candidate calibration items;

[0029] a calibration function calling module, configured to call a corresponding calibration function according to a calibration step in the target calibration item using a logic framework of a preset state machine, and obtain a calibration result of the target calibration item according to a configuration file of the target calibration item and the calibration function;

[0030] Among them, the configuration files of the multiple candidate calibration items all include a source configuration file and a header configuration file, the source configuration file includes a calibration control structure and a calibration data structure, the calibration control structure is used to store the variables required to control each of the candidate calibration items, and the calibration data structure is used to store the calibration data corresponding to each of the variables.

[0031] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: a processor; and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the ventilator calibration method in the first aspect is implemented.

[0032] According to a fourth aspect of an embodiment of the present disclosure, there is provided a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the ventilator calibration method in the first aspect is implemented.

[0033] The technical solutions provided by the embodiments of the present disclosure may have the following beneficial effects:

[0034] The ventilator calibration method in the example embodiment of the present disclosure initializes the configuration files of multiple candidate calibration items in the ventilator calibration function, and obtains the configuration file of the target calibration item in the multiple candidate calibration items; uses the logical framework of the preset state machine to call the corresponding calibration function according to the calibration steps in the target calibration item, and obtains the calibration result of the target calibration item according to the configuration file of the target calibration item and the calibration function. The present disclosure initializes multiple candidate calibration items through the configuration file, and can flexibly select the appropriate target calibration item according to the actual ventilator detection scenario; moreover, through the configuration file, it can also flexibly add, modify and delete candidate calibration items to meet different calibration needs; in addition, the logical framework of the preset state machine can also be adjusted and expanded at any time to adapt to the upgrade and improvement of the ventilator function, thereby enhancing the flexibility and extensibility of the calibration system. Importantly, the present disclosure can achieve maintenance and updates of the ventilator calibration function by modifying the configuration file, which simplifies the development and maintenance of the ventilator calibration function.

[0035] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The accompanying drawings are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification, are used to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and those skilled in the art can derive other drawings based on these drawings without inventive effort.

[0037] Figure 1 A flow chart of a ventilator calibration method in an embodiment of the present disclosure is shown.

[0038] Figure 2 A schematic diagram showing a series of calibration function entries in an embodiment of the present disclosure is shown.

[0039] Figure 3 A block diagram of a ventilator calibration device in an embodiment of the present disclosure is shown.

[0040] Figure 4 A schematic structural diagram of an electronic device suitable for implementing the embodiments of the present disclosure is shown.

[0041] In the drawings, the same or corresponding reference numerals denote the same or corresponding parts. DETAILED DESCRIPTION

[0042] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete and will fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0043] In addition, the accompanying drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. Identical reference numerals in the figures denote identical or similar parts, and thus repetitive descriptions thereof will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities that do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0044] The technical solutions of the embodiments of the present disclosure are described in detail below:

[0045] Because the safety and reliability of medical ventilators are directly related to patients' lives and health, medical institutions must periodically test and calibrate their performance during use. The development of ventilator calibration functions in related technologies often involves large amounts of code, complex calibration logic, and the potential for program errors.

[0046] Based on one or more of the above problems, this exemplary embodiment provides a ventilator calibration method. Taking the terminal device executing this method as an example, the ventilator calibration method in the embodiment of the present disclosure is described in detail. Figure 1 FIG. 1 shows a flow chart of a ventilator calibration method, which may include the following steps S110 and S120:

[0047] Step S110, initializing configuration files of multiple candidate calibration items in the ventilator calibration function, and obtaining a configuration file of a target calibration item among the multiple candidate calibration items;

[0048] Step S120, using a logic framework of a preset state machine to call a corresponding calibration function according to the calibration step in the target calibration item, and obtaining a calibration result of the target calibration item according to the configuration file of the target calibration item and the calibration function;

[0049] Among them, the configuration files of the multiple candidate calibration items all include a source configuration file and a header configuration file, the source configuration file includes a calibration control structure and a calibration data structure, the calibration control structure is used to store the variables required to control each of the candidate calibration items, and the calibration data structure is used to store the calibration data corresponding to each of the variables.

[0050] The present disclosure initializes multiple candidate calibration items through a configuration file, allowing for the flexible selection of appropriate target calibration items based on the actual ventilator detection scenario. Furthermore, through the configuration file, candidate calibration items can be flexibly added, modified, and deleted to meet different calibration requirements. Furthermore, the logical framework of the preset state machine can be adjusted and expanded at any time to accommodate upgrades and improvements to ventilator functions, enhancing the flexibility and scalability of the calibration system. Importantly, the present disclosure enables maintenance and updates of the ventilator calibration function simply by modifying the configuration file, simplifying the development and maintenance of the ventilator calibration function.

[0051] The above steps of this exemplary embodiment are described in more detail below.

[0052] In step S110 , configuration files of a plurality of candidate calibration items in the ventilator calibration function are initialized, and a configuration file of a target calibration item among the plurality of candidate calibration items is obtained.

[0053] In the example implementation of the present disclosure, the ventilator calibration function may include at least flow calibration, pressure calibration, proportional valve calibration, oxygen sensor calibration, air-oxygen factor calibration, oxygen concentration calibration, exhalation valve calibration, resistance calibration, reverse calibration and other candidate calibration items. The present disclosure does not limit the types of candidate calibration items and the achievable calibration functions, and the candidate calibration items can be flexibly configured according to actual needs. For example, flow calibration can include user flow calibration and manufacturer flow calibration, wherein user flow calibration refers to the user (such as a doctor or nurse) setting and adjusting according to the specific situation of the patient before using the ventilator to ensure that the airflow output by the ventilator can meet the needs of the patient; manufacturer flow calibration refers to the calibration of the ventilator's flow sensor during the ventilator production process to ensure that the flow sensor can accurately measure the airflow.

[0054] Before starting ventilator calibration, it is necessary to initialize the configuration files for multiple candidate calibration items within the ventilator calibration function. Each candidate calibration item's configuration file can include a source configuration file and a header configuration file, designated as a .c file and a .h file, respectively. The .c file defines two structure variables: a "calibration control structure" and a "calibration data structure." The "calibration control structure" is used to store the variables required to control each candidate calibration item, and the "calibration data structure" is used to store the calibration data corresponding to each variable. The .h file (also known as the header file) contains declarations of the functions, variables, types, and macros required for the calibration process for use in other files.

[0055] For example, for the flow calibration item, the "calibration control structure" includes the variables required in the calibration process, such as valve opening delay, preset state machine state switching, variables written to the preset memory, variables for finding the maximum flow rate and minimum flow rate, variables for identifying data accuracy, etc. The "calibration data structure" includes the calibration data written to the preset memory, such as the analog signal AD value and the actual flow value.

[0056] Accordingly, the target calibration item can be a candidate calibration item that is currently in need of calibration, determined based on user needs, or a candidate calibration item that has been switched based on calibration logic. This disclosure does not limit this. In the example implementation of this disclosure, the target calibration item is described as a flow calibration item. When the ventilator flow needs to be calibrated, the "calibration control structure" and "calibration data structure" corresponding to the flow calibration item can be obtained for subsequent use.

[0057] In this example, multiple candidate calibration items are initialized through a configuration file, allowing for flexible selection of appropriate target calibration items based on the actual ventilator testing scenario. Furthermore, through the configuration file, candidate calibration items can be flexibly added, modified, and deleted to meet diverse calibration requirements, enhancing the flexibility and scalability of the calibration system.

[0058] In step S120, the logic framework of the preset state machine is used to call the corresponding calibration function according to the calibration steps in the target calibration item, and the calibration result of the target calibration item is obtained according to the configuration file of the target calibration item and the calibration function.

[0059] Still taking the flow calibration item as the target calibration item as an example, the "calibration control structure" and "calibration data structure" of the flow calibration item can be passed into the pre-defined function interface as the actual parameters of the calibration function, and the calibration function corresponding to the target calibration item is called through the function interface so that the calibration function can uniformly process the structure variables.

[0060] In an example implementation, the calibration function interface is implemented by using a preset state machine such as a Switch state machine logic framework to list each calibration step of the candidate calibration items or target calibration items one by one, and in each calibration step, a corresponding function is implemented for calibration.

[0061] For example, all candidate calibration items in the ventilator calibration function can be determined first, and the calibration function corresponding to each candidate calibration item can be defined. For example, for the oxygen concentration calibration item, which is used to calibrate the oxygen concentration sensor in the ventilator, the corresponding calibration function can be a function whose input is the current oxygen concentration sensor reading and whose output is the calibrated oxygen concentration value; for the pressure calibration item, which is used to calibrate the pressure sensor in the ventilator, the corresponding calibration function can be a function whose input is the current pressure sensor reading and whose output is the calibrated pressure value; for the flow calibration item, which is used to calibrate the flow sensor in the ventilator, the corresponding calibration function can be a function whose input is the current flow sensor reading and whose output is the calibrated flow value.

[0062] Then, a function pointer array is created based on all candidate calibration items. For example, all candidate calibration items are taken as elements of the function pointer array and placed in the function pointer array for unified management. Among them, each candidate calibration item is a function pointer in the function pointer array and points to the corresponding calibration function. Specifically, when creating the function pointer array, it can be defined in the order of the candidate calibration items, and the calibration function pointer corresponding to each candidate calibration item is assigned to the corresponding position in the function pointer array, such as assigning the address of the calibration function to the elements of the function pointer array one by one. When a candidate calibration item needs to be executed, a specific element in the function pointer array is accessed through the index value, and the corresponding calibration function is called using the function call operator.

[0063] refer to Figure 2 As shown, a series of calibration function entries are exemplified, including multiple candidate calibration items, such as no operation, user zeroing, manufacturer zeroing, neonatal flow sensor zeroing, user flow calibration, manufacturer flow calibration, pressure calibration, exhalation valve calibration, user oxygen concentration calibration, manufacturer oxygen concentration calibration, air-oxygen coefficient calibration, resistance calibration, oxygen proportional valve calibration, reverse calibration, oxygen source pressure zeroing, and oxygen source pressure calibration. All candidate calibration items are placed in a function pointer array for unified management. When ventilator calibration is required, the corresponding calibration function can be called according to specific needs to implement calibration operations for different sensors.

[0064] When the embodiment of the present disclosure uses the design framework of the Switch state machine to implement the function interface, each Case state represents a different calibration step of the interface. It is necessary to clearly write the corresponding calibration steps and complete the corresponding function implementation in these calibration steps. For example, the calibration steps may include data processing, logical judgment, calling other functions, etc. Through the design and implementation of the calibration steps, it can be ensured that each Case state can correctly complete the specific calibration function. Importantly, it is also necessary to write a corresponding calibration function implementation to assist in completing the specific calibration function. The calibration function may include a predefined library function, a custom function, or other referenced components. The present disclosure does not make specific restrictions on this. Based on this, it can be ensured that each Case state can complete the corresponding calibration function as expected, and make the design of the entire function interface clearer and more maintainable. Moreover, through this structured approach, the execution process of the entire calibration process can be clearly understood, which facilitates the maintenance and debugging of the code. In addition, this design can also improve the readability and scalability of the code, making the relationship between the various calibration function modules clearer.

[0065] For example, when performing ventilator calibration, all calibration steps in the target calibration item can be determined, and a global variable for representing the current calibration step can be created. The calibration function corresponding to the current calibration step can be called, and calibration can be performed according to the calibration function corresponding to the current calibration step and the configuration file of the target calibration item. The current calibration step can be switched based on the logical framework of the preset state machine, and the global variable can be updated according to the current calibration step after switching until all calibration steps in the target calibration item are completed.

[0066] Specifically, first, it is necessary to clarify all the calibration steps in the target calibration item, such as including steps 1 to 3, that is, CalibrationStep{step_1, step_2, step_3}. The global variable created to represent the current calibration step can be CalibrationStep currentStep=step_1, and the global variable can be updated and recorded during the entire calibration process. Each calibration step corresponds to a specific calibration task, and the calibration operation is performed by calling the corresponding function. For example, if the current calibration step is step 1, the calibration function corresponding to step 1 can be called, and the parameters and set values ​​required for calibration can be obtained by reading the configuration file of the target calibration item. The corresponding calibration operation of the ventilator is performed according to the information in the configuration file and the calibration function corresponding to step 1.

[0067] The Switch state machine logic framework is used to manage the switching of calibration steps. Each calibration step is gradually switched to the next calibration step based on the transition conditions and execution order between the calibration states corresponding to each calibration step. After switching to the next calibration step, global variables are updated to record the current calibration progress and status.

[0068] For example, when switching from step 1 to step 2, the global variable is updated to CalibrationStep currentStep = step_2. At this point, the calibration function corresponding to step 2 can be called. Similarly, by reading the configuration file of the target calibration item, the ventilator is calibrated according to the information in the configuration file and the calibration function corresponding to step 2. In this example, global variables can be used to determine the current calibration step and record calibration results.

[0069] Similarly, according to the execution order of all calibration steps in the target calibration item, such as the execution order of each calibration step set in the configuration file, each calibration step is executed in sequence to ensure that all calibration tasks are completed.

[0070] Understandably, the calibration steps for each candidate calibration item may vary depending on the specific ventilator model and configuration, but the overall calibration logic is similar. Throughout the calibration process, global variables are used to conveniently record the current calibration status, while the state machine switches manage the sequence and switching of calibration steps according to a pre-set logical framework. This ensures the accuracy and stability of the ventilator during calibration.

[0071] It should be noted that, in the exemplary embodiments of the present disclosure, before performing ventilator calibration, a logical framework of the state machine may be pre-designed, and when calibrating each candidate calibration item, the logical framework of the state machine may be directly referenced.

[0072] Specifically, the calibration steps of each candidate calibration item and the transition conditions between the calibration states corresponding to each calibration step can be determined according to the calibration requirements of the ventilator. For example, the user's operations and event triggers on the ventilator can be defined as the transition conditions between the calibration states. Furthermore, the start, end and corresponding processing logic of each calibration step are designed, and the operations and logic to be performed are determined according to the different calibration steps. For example, when executing the flow calibration step, it is necessary to read the sensor data and perform corresponding processing. According to the transition conditions between the calibration states, code logic is written to detect and execute the corresponding calibration state transition. In the process of implementing the state machine, detailed debugging and testing are carried out to ensure the correctness and reliability of the calibration state transition and processing logic.

[0073] When developing the software framework for respiratory calibration, you can reference the pre-designed state machine logic framework. Based on the requirements and functionality of respiratory calibration, you can embed specific business logic and processing operations into the corresponding states and transition conditions of the state machine. This state machine design enables automated control and process management of ventilator calibration.

[0074] Finally, the calibration result of the target calibration item can be written into a preset memory and sent to a host computer, thereby terminating the calibration process of the target calibration item under control of the host computer. For example, the calibration result of the target calibration item can be sent to the host computer via a communication interface (such as Ethernet) so that the host computer can perform subsequent processing and analysis. Based on actual calibration requirements, the host computer can determine whether other candidate calibration items need to be processed. If so, the system returns to the corresponding calibration state to perform the next calibration. Otherwise, the calibration process of the target calibration item ends.

[0075] The calibration results for the target calibration items can be in the form of a calibration table generated based on the ventilator's measurement results and the calibration algorithm. This table can be used for subsequent data processing and correction to improve the accuracy of the device's measurements. For example, the calibration table can be written to an EEPROM (erasable programmable read-only memory) or other non-volatile memory to retain the calibration results after the device is powered off. This allows the calibration table to be directly loaded the next time the ventilator is powered on, further improving measurement accuracy.

[0076] The ventilator calibration method in the example embodiment of the present disclosure initializes the configuration files of multiple candidate calibration items in the ventilator calibration function, and obtains the configuration file of the target calibration item in the multiple candidate calibration items; uses the logical framework of the preset state machine to call the corresponding calibration function according to the calibration steps in the target calibration item, and obtains the calibration result of the target calibration item according to the configuration file of the target calibration item and the calibration function. The present disclosure initializes multiple candidate calibration items through the configuration file, and can flexibly select the appropriate target calibration item according to the actual ventilator detection scenario; moreover, through the configuration file, it can also flexibly add, modify and delete candidate calibration items to meet different calibration needs; in addition, the logical framework of the preset state machine can also be adjusted and expanded at any time to adapt to the upgrade and improvement of the ventilator function, thereby enhancing the flexibility and extensibility of the calibration system. Importantly, the present disclosure can achieve maintenance and updates of the ventilator calibration function by modifying the configuration file, which simplifies the development and maintenance of the ventilator calibration function.

[0077] Furthermore, in this exemplary embodiment, a ventilator calibration device is also provided. Figure 3 As shown, the ventilator calibration device 300 may include a configuration file acquisition module 310 and a calibration function calling module 320, wherein:

[0078] The gas flow determination module 310 is used for the configuration file acquisition module, which is used to initialize the configuration files of multiple candidate calibration items in the ventilator calibration function and obtain the configuration file of the target calibration item among the multiple candidate calibration items;

[0079] A calibration function calling module 320 is configured to call a corresponding calibration function according to the calibration steps in the target calibration item using a logic framework of a preset state machine, and obtain a calibration result of the target calibration item according to the configuration file of the target calibration item and the calibration function;

[0080] Among them, the configuration files of the multiple candidate calibration items all include a source configuration file and a header configuration file, the source configuration file includes a calibration control structure and a calibration data structure, the calibration control structure is used to store the variables required to control each of the candidate calibration items, and the calibration data structure is used to store the calibration data corresponding to each of the variables.

[0081] In an optional embodiment, the calibration function calling module 320 includes:

[0082] a variable creation module, configured to determine all calibration steps in the target calibration item and create a global variable for representing the current calibration step;

[0083] a data calibration module, configured to call a calibration function corresponding to the current calibration step, and perform calibration according to the calibration function corresponding to the current calibration step and a configuration file of the target calibration item;

[0084] A variable updating module is used to switch the current calibration step based on the logic framework of the preset state machine, and update the global variable according to the switched current calibration step until all calibration steps in the target calibration item are completed.

[0085] In an optional embodiment, the data calibration module is configured to pass the configuration file of the target calibration item to a predefined function interface, and call the calibration function corresponding to the current calibration step through the function interface.

[0086] In an optional embodiment, the ventilator calibration device 300 also includes a function pointer array creation module, which is configured to determine all candidate calibration items in the ventilator calibration function and define the calibration function corresponding to each candidate calibration item; create a function pointer array based on all the candidate calibration items, wherein each candidate calibration item is a function pointer in the function pointer array and points to the corresponding calibration function.

[0087] In an optional embodiment, the ventilator calibration device 300 further includes: a logical framework reference module, which is configured to pre-design the logical framework of the state machine; and reference the logical framework of the state machine when calibrating each of the candidate calibration items.

[0088] In an optional embodiment, the ventilator calibration device 300 also includes: a data forwarding module, which is configured to write the calibration result of the target calibration item into a preset memory and send the calibration result to the host computer to end the calibration process of the target calibration item through the host computer.

[0089] In an optional embodiment, the multiple candidate calibration items in the ventilator calibration device 300 include at least flow calibration, pressure calibration, proportional valve calibration, oxygen sensor calibration, and air-oxygen factor calibration.

[0090] The specific details of each module in the above-mentioned ventilator calibration device have been described in detail in the corresponding ventilator calibration method, so they will not be repeated here.

[0091] The exemplary embodiments of the present disclosure also provide a computer-readable storage medium on which a program product capable of implementing the above-mentioned method of this specification is stored. In some possible embodiments, various aspects of the present disclosure can also be implemented in the form of a program product, which includes a program code, and when the program product is run on an electronic device, the program code is used to cause the electronic device to execute the steps according to the various exemplary embodiments of the present disclosure described in the above-mentioned "Exemplary Method" section of this specification. The program product can adopt a portable compact disc read-only memory (CD-ROM) and include program code, and can be run on an electronic device, such as a personal computer. However, the program product of the present disclosure is not limited to this, and in this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.

[0092] The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0093] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transfer a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0094] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0095] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C#, C++, and the like, as well as conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a standalone software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0096] The exemplary embodiment of the present disclosure also provides an electronic device capable of implementing the above method. Figure 4 4 to describe the electronic device 400 according to this exemplary embodiment of the present disclosure. Figure 4 The electronic device 400 shown is merely an example and should not limit the functionality and scope of use of the embodiments of the present disclosure.

[0097] like Figure 4 As shown, electronic device 400 may be implemented as a general-purpose computing device. Components of electronic device 400 may include, but are not limited to, at least one processing unit 410, at least one storage unit 420, a bus 430 connecting various system components (including storage unit 420 and processing unit 410), and a display unit 440.

[0098] The storage unit 420 stores program codes that can be executed by the processing unit 410, so that the processing unit 410 performs the steps described in the "Exemplary Method" section above according to various exemplary embodiments of the present disclosure. For example, the processing unit 410 may execute Figure 1 The method steps in .

[0099] The storage unit 420 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 421 and / or a cache memory unit 422 , and may further include a read-only memory unit (ROM) 423 .

[0100] The storage unit 420 may also include a program / utility 424 having a set (at least one) of program modules 425, such program modules 425 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0101] Bus 430 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0102] The electronic device 400 can also communicate with one or more external devices 500 (e.g., a keyboard, a pointing device, a Bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 400, and / or any device that enables the electronic device 400 to communicate with one or more other computing devices (e.g., a router, a modem, etc.). Such communication can occur via an input / output (I / O) interface 450. Furthermore, the electronic device 400 can communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network such as the Internet) via a network adapter 460. As shown, the network adapter 460 communicates with other modules of the electronic device 400 via a bus 430. It should be understood that, although not shown, other hardware and / or software modules can be used in conjunction with the electronic device 400, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0103] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the exemplary embodiment of the present disclosure.

[0104] Furthermore, the figures above are merely illustrative of the processes included in the methods according to exemplary embodiments of the present disclosure and are not intended to be limiting. It is readily understood that the processes illustrated in the figures above do not indicate or limit the temporal order of these processes. Furthermore, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.

[0105] It should be noted that although several modules or units of the device for action execution are mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be concretized in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be concretized.

[0106] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow from the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the claims.

[0107] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A ventilator calibration method, characterized in that, include: Initializing configuration files of multiple candidate calibration items in a ventilator calibration function, and obtaining a configuration file of a target calibration item among the multiple candidate calibration items; Using a logic framework of a preset state machine to call a corresponding calibration function according to a calibration step in the target calibration item, and obtaining a calibration result of the target calibration item according to a configuration file of the target calibration item and the calibration function; The configuration files of the plurality of candidate calibration items each include a source configuration file and a header configuration file. The source configuration file includes a calibration control structure and a calibration data structure. The calibration control structure is used to store variables required to control each of the candidate calibration items. The calibration data structure is used to store calibration data corresponding to each of the variables. The logic framework of the preset state machine is used to call a corresponding calibration function according to the calibration step in the target calibration item, and obtain a calibration result of the target calibration item according to the configuration file of the target calibration item and the calibration function, including: Determine all calibration steps in the target calibration item and create a global variable for representing the current calibration step; Calling the calibration function corresponding to the current calibration step, and performing calibration according to the calibration function corresponding to the current calibration step and the configuration file of the target calibration item; The current calibration step is switched based on the logic framework of the preset state machine, and the global variable is updated according to the switched current calibration step until all calibration steps in the target calibration item are completed.

2. The ventilator calibration method according to claim 1, wherein The calling of the calibration function corresponding to the current calibration step includes: The configuration file of the target calibration item is passed to a predefined function interface, and the calibration function corresponding to the current calibration step is called through the function interface.

3. The ventilator calibration method according to claim 1, wherein: The method further comprises: Determining all candidate calibration items in the ventilator calibration function, and defining a calibration function corresponding to each candidate calibration item; A function pointer array is created according to all the candidate calibration items, wherein each of the candidate calibration items is a function pointer in the function pointer array and points to a corresponding calibration function.

4. The ventilator calibration method according to claim 1, wherein: The method further comprises: Pre-designing the logic framework of the state machine; When calibrating each of the candidate calibration items, the logical framework of the state machine is referenced.

5. The ventilator calibration method according to claim 1, wherein: After obtaining the calibration result of the target calibration item, the method further includes: The calibration result of the target calibration item is written into a preset memory, and the calibration result is sent to a host computer, so as to end the calibration process of the target calibration item controlled by the host computer.

6. The ventilator calibration method according to claim 1, wherein: The plurality of candidate calibration items at least include flow calibration, pressure calibration, proportional valve calibration, oxygen sensor calibration, and air-oxygen factor calibration.

7. A ventilator calibration device, characterized in that: Applied to the ventilator calibration method according to any one of claims 1 to 6, the device comprises: a configuration file acquisition module, configured to initialize configuration files of a plurality of candidate calibration items in a ventilator calibration function, and to acquire a configuration file of a target calibration item among the plurality of candidate calibration items; a calibration function calling module, configured to call a corresponding calibration function according to a calibration step in the target calibration item using a logic framework of a preset state machine, and obtain a calibration result of the target calibration item according to a configuration file of the target calibration item and the calibration function; Among them, the configuration files of the multiple candidate calibration items all include a source configuration file and a header configuration file, the source configuration file includes a calibration control structure and a calibration data structure, the calibration control structure is used to store the variables required to control each of the candidate calibration items, and the calibration data structure is used to store the calibration data corresponding to each of the variables.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processing unit, the ventilator calibration method according to any one of claims 1 to 6 is implemented.

9. An electronic device, characterized in that: include: processing unit; as well as a storage unit, configured to store executable instructions of the processing unit; Wherein, the processing unit is configured to perform the ventilator calibration method according to any one of claims 1 to 6 by executing the executable instructions.

Citation Information

Patent Citations

  • Breathing machine calibration equipment and breathing machine calibration system

    CN106310472A

  • Task verification method and device

    CN111158739A