A positive and negative pressure control logic data structure method, device and storage medium

By defining structures and mapping tables to manage air pressure and port status, it solves the problems of code redundancy and structural confusion in traditional programming methods, implements modular design and alarm mechanisms, and improves the stability and maintainability of the system.

CN118312145BActive Publication Date: 2024-09-24GUANGZHOU SENYANG ELECTRONIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410465073.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-17
Publication Date
2024-09-24
Estimated Expiration
2044-04-17

AI Technical Summary

Technical Problem

The traditional direct operation port programming method leads to code redundancy, chaotic structure, and difficulty in maintenance and debugging. Especially when dealing with complex situations of positive and negative pressure logic, it reduces the readability and stability of the program.

Method used

Using the data structure method, by defining the structure PressureControl and the mapping table pressureMap, the air pressure status and port status are clearly managed, the modular design is separated, and an alarm mechanism is added to improve system stability and security.

Benefits of technology

It simplifies the code logic, improves the maintainability and reusability of the code, ensures state consistency, enhances the stability and security of the system, and reduces the difficulty of handling exceptions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118312145B
    Figure CN118312145B
Patent Text Reader

Abstract

The present invention discloses a positive and negative pressure control logic data structure method, device and storage medium, comprising the following steps: S1: defining a data structure, using a structure PressureControl as a data structure module; S2: creating a mapping table pressureMap to map an air pressure state to a port state; S3: creating an independent module pressure_control_module.py for storing and operating the positive and negative pressure control logic data structure; S4: creating a main program module main.py, and calling a function in the data structure module to process the positive and negative pressure control logic; the present invention improves the maintainability and reusability of the code through the pressure_control_module.py module and the data structure PressureControl, uses the PressureControl structure to store the relationship between the air pressure state and the port state, and uses the mapping table pressureMap to realize the mapping of the air pressure state to the port state, simplifies the logic and maintains the state consistency, improves the stability and safety of the system through the alarm mechanism, thereby solving the problems of difficult code maintenance, complex logic and low system stability, and making the system easier to manage, maintain and expand.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a positive and negative pressure control logic data structure method, device and storage medium. Background Art

[0002] In the traditional programming method, devices are controlled or tasks are executed by directly operating ports. However, the programming method of directly operating ports easily leads to a large amount of branch logic and repeated code, which makes the code large and redundant, resulting in bloated programs. The complex branch logic and direct operation of hardware ports make the code structure chaotic, difficult to understand and maintain, and reduce the readability and maintainability of the code. It is also easy to cause logical confusion, making it difficult to accurately grasp the program execution process, increasing the difficulty of debugging and troubleshooting, and reducing the stability and reliability of the program, especially when dealing with complex situations such as changes in positive and negative pressure logic, which easily leads to complexity and difficulty in maintainability of the code. Summary of the invention

[0003] The purpose of the present invention is to provide a positive and negative pressure control logic data structure method, device and storage medium, which adopts the data structure to control through parameter import, with clear logic, simple modification and strong maintainability.

[0004] The purpose of the present invention can be achieved through the following technical solutions:

[0005] The present application provides a positive and negative pressure control logic data structure method, comprising the following steps:

[0006] S1. Define the data structure, use the structure PressureControl as the data structure module, including two fields pressureState to represent the pressure state, and portState to represent the corresponding port state;

[0007] S2. Establish a mapping relationship and create a mapping table pressureMap to map the air pressure state to the port state, and ensure that each air pressure state has a corresponding port control state;

[0008] S3. Create an independent module pressure_control_module.py, which contains the definition of data structure and management functions for storing and operating positive and negative pressure control logic data structures;

[0009] S4. Create the main program module main.py, which contains the main logic of the program and calls the functions in the data structure module to process the positive and negative pressure control logic.

[0010] Furthermore, according to the defined data structure described in step S1, the PressureControl structure is used as a data structure module to store the air pressure state and the corresponding port state, wherein pressureState is used to record the current air pressure state, and portState is used to record the port state controlled according to the air pressure state, so as to manage and operate the positive and negative pressure control logic in the program.

[0011] Furthermore, according to the defined data structure, a dictionary is used to create a mapping table pressureMap, in which the key is the air pressure state and the value is the corresponding port state. In the mapping table, each air pressure state and the corresponding port state are mapped to ensure that each air pressure state has a correct port control state. The corresponding port state is obtained by accessing the air pressure state in the corresponding key in pressureMap.

[0012] Furthermore, management functions are added to the pressure_control_module.py independent module, and functions for setting and obtaining port status are used to operate the positive and negative pressure control logic data structure. The port status is set to open or closed through set_port_status, and a check is made as to whether a given port number exists in the data structure module. If the port number exists, the port status is updated to the specified status according to the status parameter passed in by the user. If the port number does not exist, the user is prompted that the port number does not exist, and then the updated positive and negative pressure control logic data structure is returned;

[0013] The port status is obtained through get_port_status, which detects and determines whether a given port number exists in the data structure module. If the port number exists, the status of the port is returned. If the port number does not exist, it prompts that the port number does not exist.

[0014] Furthermore, the set port status and get port status functions in the data structure module are imported into the main program module main.py, and then a data structure control_data of positive and negative pressure control logic is created, the set_port_status function is called to update the port status, and then the get_port_status function is called to obtain the status of a specific port, and finally, the updated port status and the status information of the specific port are output.

[0015] Furthermore, the positive and negative pressure control logic data structure includes an IO board and a main board. When powered on, the main board sends a barometer ADC value corresponding to the target air pressure value to the IO board. The barometer ADC value is recorded when the touch screen sets the air pressure. The polling barometer of the IO board is connected to the IO board to monitor multiple air pressure sensors and periodically query each barometer one by one to obtain its current air pressure reading.

[0016] After receiving the target ADC value, the IO board compares it with the barometer ADC value read, and feeds back the comparison result when there is a change to the main board;

[0017] After the mainboard obtains the comparison result, the output port is opened or closed according to the positive and negative pressure control logic data structure.

[0018] Furthermore, an alarm mechanism is added to the pressure_control_module.py module to detect whether the air pressure status and port status exceed the set range to trigger the alarm mechanism. The threshold of the air pressure status is set to 100 through pressure_threshold, and the threshold of the port status is set to 1 through port_threshold. The air pressure status and port status are detected through the detect_alarm function to trigger the alarm mechanism. trigger_alarm_notification triggers the alarm notification and sends an alarm message to the user or system administrator. record_alarm_event records the detailed information of the alarm event, and resolve_alarm handles the abnormal situation and releases the alarm status.

[0019] A positive and negative pressure control logic data structure device includes at least one processor, at least one memory and computer program instructions stored in the memory. When the computer program instructions are executed by the processor, the above-mentioned method is implemented.

[0020] A storage medium stores computer program instructions, which implement the above-mentioned method when the computer program instructions are executed by a processor.

[0021] The beneficial effects of the present invention are:

[0022] Through the definition of independent modules and data structures: By defining an independent pressure_control_module.py module and data structure PressureControl, the modularization and separation of the code are realized, the maintainability and reusability of the code are improved, the problems of chaotic code structure, difficult maintenance and reuse are solved, and the code is easier to manage and expand;

[0023] The PressureControl structure is used to store the relationship between the air pressure state and the port state, and the mapping table pressureMap is used to map the air pressure state to the port state. This simplifies the code logic, maintains the consistency between states, solves the problems of chaotic state management, complex logic, and difficult maintenance, and makes the system data structure clear and the logic explicit.

[0024] An alarm mechanism is added to the pressuFe_control_module.py module to detect whether the air pressure status and port status exceed the set range, trigger alarm notification and record events, effectively respond to abnormal situations, improve the stability and security of the system, solve the problems of untimely handling of abnormal situations and low system stability, and ensure the normal operation and safety of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] For better understanding and implementation, the technical solution of the present application is described in detail below with reference to the accompanying drawings.

[0026] Figure 1 A flow chart of a positive and negative pressure control logic data structure method provided in Example 1 of the present application;

[0027] Figure 2 This is an application flow chart of the positive and negative pressure control logic of a positive and negative pressure control logic data structure method provided in Example 1 of the present application. DETAILED DESCRIPTION

[0028] In order to further explain the technical means and effects taken by the present invention to achieve the predetermined invention purpose, exemplary embodiments will be described in detail here, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are only examples of methods and systems consistent with some aspects of the present application as detailed in the attached claims.

[0029] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0030] The specific implementation methods, features and effects of the present invention are described in detail below in conjunction with the accompanying drawings and preferred embodiments.

[0031] Example 1

[0032] See also Figure 2 This embodiment provides a positive and negative pressure control logic data structure method, device and storage medium, which adopts the data structure to control through parameter import, with clear logic, simple modification and strong maintainability.

[0033] The present invention provides a positive and negative pressure control logic data structure method, comprising the following steps:

[0034] S1. Define the data structure, use the structure PressureControl as the data structure module, including two fields pressureState to represent the pressure state, and portState to represent the corresponding port state;

[0035] S2. Establish a mapping relationship and create a mapping table pressureMap to map the air pressure state to the port state, and ensure that each air pressure state has a corresponding port control state;

[0036] S3. Create an independent module pressure_control_module.py, which contains the definition of data structure and management functions for storing and operating positive and negative pressure control logic data structures;

[0037] S4. Create the main program module main.py, which contains the main logic of the program, and call the function in the data structure module to process the positive and negative pressure control logic; call the function of the data structure module in the main program to implement the processing of the positive and negative pressure control logic, separate the data structure from the program logic, and improve the modularity and reusability of the code.

[0038] Through the negative pressure control logic data structure method, the problems existing in the traditional direct operation port programming method can be effectively solved, the overall quality and maintainability of the code can be improved, the implementation method of the positive and negative pressure control logic can be optimized, and the program structure can be clearer, simpler and easier to maintain; this method can effectively reduce the complexity of the code, improve the readability and stability of the program, so as to better cope with programming needs in complex situations. This modular design improves the modularity and reusability of the code, making the positive and negative pressure control logic easier to maintain and expand, and providing a better foundation for the development and optimization of the program.

[0039] In this embodiment, according to the defined data structure described in step S1, the PressureControl structure is used as a data structure module to store the air pressure state and the corresponding port state, wherein pressureState is used to record the current air pressure state, and portState is used to record the port state controlled according to the air pressure state, so as to manage and operate the positive and negative pressure control logic in the program.

[0040] The PressureControl structure is used as a data structure module to combine the air pressure state and the port state, so that each PressureControl instance can store the current air pressure state and the corresponding port state at the same time.

[0041] The air pressure status and port status are combined in one data structure to establish an association between the two, which is convenient for system management and maintenance, maintains the consistency of the air pressure status and the port status, ensures that the corresponding port status is correctly controlled according to the air pressure status, avoids problems caused by inconsistent status, and realizes unified management and operation of positive and negative pressure control logic through a unified data structure module, improves the clarity and maintainability of the code, and ensures that the recording and operation of the air pressure status and port status are accurate through the definition and use of the data structure module, thereby improving the stability and reliability of the system.

[0042] Using the PressureControl structure as a data structure module to store the air pressure status and port status can achieve effective management and operation of the positive and negative pressure control logic, improve the organization and consistency of data, make the system more structured and controllable, and help improve the reliability and stability of the system.

[0043] In this embodiment, according to the defined data structure, a dictionary is used to create a mapping table pressureMap, in which the key is the air pressure state and the value is the corresponding port state. In the mapping table, each air pressure state and the corresponding port state are mapped to ensure that each air pressure state has a correct port control state. By accessing the air pressure state in the corresponding key in pressureMap, the corresponding port state can be obtained, thereby realizing the mapping relationship between the air pressure state and the port state.

[0044] By accessing the air pressure status in pressureMap, the corresponding port status can be quickly obtained, and the mapping and query functions from air pressure status to port status can be realized. By establishing the mapping relationship, it is ensured that each air pressure status has the correct port control status to avoid inconsistent or erroneous status. The use of the mapping table simplifies the code logic, making the association between the air pressure status and the port status clearer and easier to understand. The mapping table enables centralized management of the relationship between the air pressure status and the port status in the system, which is convenient for maintenance and updating, and improves the maintainability and scalability of the system.

[0045] By establishing the mapping table pressureMap and correctly mapping the air pressure state to the corresponding port state, an accurate mapping relationship between the air pressure state and the port state can be achieved, which improves the stability and reliability of the system, simplifies the code logic, and makes the system easier to maintain and manage.

[0046] In this embodiment, management functions are added to the pressure_control_module.py independent module, and functions for setting and obtaining the port status are used to operate the positive and negative pressure control logic data structure. The port status is set to open or closed through set_port_status, and it is checked whether the given port number exists in the data structure module. If the port number exists, the port status is updated to the specified state according to the status parameter passed by the user. If the port number does not exist, the user is prompted that the port number does not exist, and then the updated positive and negative pressure control logic data structure is returned;

[0047] The port status is obtained through get_port_status, which detects and determines whether a given port number exists in the data structure module. If the port number exists, the status of the port is returned. If the port number does not exist, it prompts that the port number does not exist.

[0048] Add the following management function in the pressure_control_module.py independent module. The specific principle program is as follows:

[0049]

[0050]

[0051] In this embodiment, the set port status and get port status functions in the data structure module are imported into the main program module main.py, and then a data structure control_data of positive and negative pressure control logic is created, the set_port_status function is called to update the port status, and then the get_port_status function is called to obtain the status of a specific port, and finally, the updated port status and the status information of the specific port are output.

[0052] The specific expressions are as follows:

[0053]

[0054]

[0055] In this embodiment, the positive and negative pressure control logic data structure includes an IO board and a main board. When powered on, the main board sends a barometer ADC value corresponding to the target air pressure value to the IO board. The barometer ADC value is recorded when the touch screen sets the air pressure. The polling barometer of the IO board is connected to the IO board to monitor multiple air pressure sensors and periodically query each barometer one by one to obtain its current air pressure reading.

[0056] After receiving the target ADC value, the IO board compares it with the read barometer ADC value, feeds back the comparison result when there is a change to the main board, and sends a message to the main board when the result changes. There is no need to send the barometer ADC value to the main board in real time, which greatly reduces the pressure on the message bus.

[0057] After the mainboard obtains the comparison result, the output port is opened or closed according to the positive and negative pressure control logic data structure.

[0058] The application of positive and negative pressure control logic data structure is realized. The target air pressure value is sent through the mainboard, and the IO board monitors the actual air pressure value. Feedback and control of the output port are performed according to the comparison result to achieve the goal of air pressure control. Then, by sending messages to the mainboard only when the result changes, instead of sending the barometer ADC value in real time, the pressure on the message bus is reduced and the efficiency and stability of the system are improved.

[0059] The data structure is a two-dimensional array arr[A][B], where A is the air pressure state, A0 is the target ADC value greater than the ADC value of the atmospheric pressure gauge, indicating that pressure relief is required, A1 is the target ADC value greater than the ADC value of the atmospheric pressure gauge, indicating that pressure maintenance is required, and A2 is the target ADC value greater than the ADC value of the atmospheric pressure gauge, indicating that pressure is required; B is the port state, B0 represents the switch state of port 0, B1 represents the switch state of port 1, and so on. For example, there are the following data:

[0060]

[0061]

[0062] It means that when the current air pressure is greater than the target air pressure, port 0, port 1, and port 2 are opened, and port 3, port 4, and port 5 are closed;

[0063] When the current air pressure is equal to the target air pressure, port 0, port 2, and port 4 are opened, and port 1, port 3, and port 5 are closed;

[0064] When the current air pressure is lower than the target air pressure, port 3, port 4 and port 5 are opened, and port 0, port 1 and port 2 are closed.

[0065] In this embodiment, an alarm mechanism is added to the pressure_control_module.py module to detect whether the air pressure status and the port status exceed the set range to trigger the alarm mechanism. The threshold of the air pressure status is set to 100 through pressure_threshold, and the threshold of the port status is set to 1 through port_threshold. The air pressure status and the port status are detected through the detect_alarm function to trigger the alarm mechanism. The trigger_alarm_notification triggers the alarm notification and sends an alarm message to the user or system administrator. The record_alarm_event records the detailed information of the alarm event, and the abnormal situation is handled and the alarm status is released through resolve_alarm.

[0066] A positive and negative pressure control logic data structure device includes at least one processor, at least one memory and computer program instructions stored in the memory. When the computer program instructions are executed by the processor, the above-mentioned method is implemented.

[0067] A storage medium stores computer program instructions, which implement the above-mentioned method when the computer program instructions are executed by a processor.

[0068] Example 2

[0069] This embodiment aims to solve the problems existing in the traditional direct operation port programming method and proposes a positive and negative pressure control logic data structure method, aiming to solve the problems of code redundancy, structure confusion, poor readability and maintainability, etc., including:

[0070] Step 1: Define the data structure. Define a structure PressureControlData to store the relevant information of the positive and negative pressure control logic, including control signals, execution tasks, status information, etc. Such a data structure can better organize and manage logical data and reduce duplicate code and branch logic;

[0071] The specific definition data structure is as follows:

[0072] #Define the data structure PressureControlData

[0073] The structure PressureControlData contains the following fields:

[0074] Control signal (control_signal): used to store positive and negative pressure control signals;

[0075] Execute task: store the currently executed task information;

[0076] Status information (status_info): used to record system status information;

[0077] Step 2: Encapsulate the control logic. Encapsulate the positive and negative pressure control logic into two independent functions or modules. The positive pressure control function is responsible for implementing the positive pressure control logic, and the negative pressure control function is responsible for implementing the negative pressure control logic. Each function or module is responsible for performing a specific task, which improves the modularity and reusability of the code.

[0078] The positive pressure control function modularization is specifically expressed as:

[0079] def positive_pressure_control():#Implement positive pressure control logic

[0080] print("Executing positive pressure control logic")

[0081] The modularization of the negative pressure control function is specifically expressed as:

[0082] def negative_pressure_control():#Implement negative pressure control logic

[0083] print("Executing negative pressure control logic")

[0084] The specific expression of calling function module is:

[0085] #Import the encapsulated function module

[0086] import pressure_control_functions

[0087] #Call positive pressure control function

[0088] pressure_control_functions.positive_pressure_control()

[0089] #Call negative pressure control function

[0090] pressure_control_functions.negative_pressure_control()

[0091] Step 3: Use state machine design. Using the state machine design method, the positive and negative pressure control logic is decomposed into different states and state transition conditions. Each state represents the state of the system. The transition between states is triggered by specific conditions, which is conducive to clearly defining the program execution process.

[0092] Among them, the positive and negative pressure control logic is decomposed into different states and state transition conditions, and the state machine design method is used to clearly define the program execution process. The decomposition method is as follows:

[0093] State 1: Initial state

[0094] Transfer condition: triggered when starting the control task;

[0095] Action: Initialize control parameters.

[0096] State 2: Positive pressure control state

[0097] Transfer condition: triggered when a positive pressure control signal is detected;

[0098] Action: Execute positive pressure control logic.

[0099] State 3: Negative pressure control state

[0100] Transfer condition: triggered when a negative pressure control signal is detected;

[0101] Action: Execute negative pressure control logic.

[0102] State 4: End state

[0103] Transfer condition: triggered when the control task is completed;

[0104] Action: Clean up resources and end program execution.

[0105] Step 4: Reduce branch logic, avoid excessive branch logic, simplify the code structure as much as possible, and reduce the complexity of the code. You can reduce branch logic through state machine design and logic splitting and encapsulation to improve code readability and maintainability;

[0106] Step 5: Exception handling and error detection, add appropriate exception handling mechanisms and error detection functions to deal with abnormal situations that may occur in the positive and negative pressure control logic and improve the stability and reliability of the program.

[0107] Among them, the try-except structure can capture the abnormal situations that may occur in the function call, and perform appropriate processing and error message prompts when the exception occurs, thereby improving the stability and reliability of the program. The specific expression is as follows:

[0108]

[0109] The use of positive and negative pressure control logic data structure method can effectively solve the problems existing in traditional programming methods, simplify the code structure, improve readability and maintainability, reduce code complexity, enhance program stability and reliability, and is particularly suitable for handling complex situations such as changes in positive and negative pressure logic.

[0110] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment as above, it is not used to limit the present invention. Any technical personnel in this field can make some changes or modify the technical contents disclosed above into equivalent embodiments without departing from the scope of the technical solution of the present invention. However, any brief modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention are still within the scope of the technical solution of the present invention.

Claims

1. A positive and negative pressure control logic data structure method, characterized in that: The steps include: S1. Define the data structure, use the structure PressureControl as the data structure module, and include two fields: pressureState to represent the pressure state, and portState to represent the corresponding port state; S2. Establish a mapping relationship and create a mapping table pressureMap to map the air pressure state to the port state, and ensure that each air pressure state has a corresponding port control state; S3. Create an independent module pressure_control_module.py, which contains the definition of data structure and management functions for storing and operating positive and negative pressure control logic data structures; S4. Create the main program module main.py, which contains the main logic of the program and calls the functions in the data structure module to process the positive and negative pressure control logic; Add management functions, functions for setting and obtaining port status in the independent module pressure_control_module.py, which are used to operate the positive and negative pressure control logic data structure. The port status is set to open or closed through set_port_status, and check whether the given port number exists in the data structure module. If the port number exists, the port status is updated to the specified status according to the status parameter passed in by the user. If the port number does not exist, the user is prompted that the port number does not exist, and then the updated positive and negative pressure control logic data structure is returned; The port status is obtained through get_port_status, and the given port number is detected and determined to be present in the data structure module. If the port number exists, the status of the port is returned; if the port number does not exist, a prompt is given that the port number does not exist; The positive and negative pressure control logic data structure includes an IO board and a main board. When powered on, the main board sends the barometer ADC value corresponding to the target air pressure value to the IO board. The barometer ADC value is recorded when the touch screen sets the air pressure. The polling barometer of the IO board is connected to the IO board to monitor multiple air pressure sensors and periodically query each barometer one by one to obtain its current air pressure reading. After receiving the target ADC value, the IO board compares it with the barometer ADC value read, and feeds back the comparison result when there is a change to the main board; After the mainboard obtains the comparison result, the output port is opened or closed according to the positive and negative pressure control logic data structure.

2. A positive and negative pressure control logic data structure method according to claim 1, characterized in that: According to the defined data structure described in step S1, the PressureControl structure is used as a data structure module to store the air pressure state and the corresponding port state, wherein pressureState is used to record the current air pressure state, and portState is used to record the port state controlled according to the air pressure state, so as to manage and operate the positive and negative pressure control logic in the program.

3. A positive and negative pressure control logic data structure method according to claim 2, characterized in that: According to the defined data structure, a dictionary is used to create a mapping table pressureMap, where the key is the air pressure state and the value is the corresponding port state. In the mapping table, each air pressure state is mapped to the corresponding port state to ensure that each air pressure state has the correct port control state. The corresponding port state is obtained by accessing the air pressure state in the corresponding key in pressureMap.

4. A positive and negative pressure control logic data structure method according to claim 1, characterized in that: In the main program module main.py, import the set port status and get port status functions in the data structure module, then create a data structure control_data for positive and negative pressure control logic, call the set_port_status function to update the port status, and then call the get_port_status function to get the status of a specific port. Finally, output the updated port status and the status information of the specific port.

5. A positive and negative pressure control logic data structure method according to claim 1, characterized in that: Add an alarm mechanism in the pressure_control_module.py module to detect whether the air pressure status and port status exceed the set range to trigger the alarm mechanism. Set the threshold of the air pressure status to 100 through pressure_threshold, and the threshold of the port status to 1 through port_threshold. Detect the air pressure status and port status through the detect_alarm function to trigger the alarm mechanism. Trigger the alarm notification with trigger_alarm_notification to send an alarm message to the user or system administrator. Record_alarm_event records the detailed information of the alarm event, and resolve_alarm handles the abnormal situation and releases the alarm status.

6. A positive and negative pressure control logic data structure device, characterized in that: It comprises at least one processor, at least one memory and computer program instructions stored in the memory. When the computer program instructions are executed by the processor, a positive and negative pressure control logic data structure method as described in any one of claims 1 to 5 is implemented.

7. A storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by the processor, a positive and negative pressure control logic data structure method as described in any one of claims 1 to 5 is implemented.