An automatic monitoring method for closed paths within a pipeline network section
By automatically monitoring closed paths within the pipeline network interval, the breadth priority search algorithm and DCS system remind operators are used to remind operators, which solves the problem of pipeline closed state detection in petrochemical enterprises, and improves pipeline safety and production efficiency.
Patent Information
- Application Number
- CN202210758752.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-30
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2042-06-30
AI Technical Summary
In petrochemical enterprises, whether the pipeline is in a closed state needs to be checked actively by the operator, which leads to high labor costs and time costs, and it is difficult to detect abnormalities in complex pipeline environments in a timely manner, which may lead to pipeline overpressure accidents.
Using an automatic monitoring method of closed paths within the pipeline network interval, a two-way connection search diagram is constructed by analyzing the basic properties of the equipment, using the breadth-first search algorithm to search for closed paths from any unchecked pipeline as the starting point, and provides visualization through the DCS system. Remind and sound-light alarm to realize automatic monitoring and pressure relief treatment.
It reduces the cost and time of manual inspection, improves production safety, timely avoids pipeline overpressure accidents, reduces the degree of manual participation, and improves the level of production management.
Smart Images

Figure CN115289403B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of safety control technology, and in particular to an automatic monitoring method for a closed path within a pipe network section. Background Art
[0002] With the continuous development and change of science and technology, the industrial industry has a stronger demand for automation. However, while improving the efficiency of automated production, safety is also particularly important. In oil refining production, the pressure of the medium in the pipeline exceeds the allowable operating pressure, which can lead to catastrophic accidents. The "Petrochemical Enterprise Design Fire Protection B Standard" (GB 50160-2008) also points out: "For liquid hydrocarbons, Class A B, and Class B A liquid pipelines with valves closed at both ends and the medium pressure may increase due to external influences, pressure relief safety measures should be taken."
[0003] At present, in the oil storage and transportation operations of petrochemical enterprises, operators are responsible for actively checking whether the pipeline is in a closed state. When the equipment is shut down, operators not only need to pay attention to the operation of the oil movement operation, but also need to check the opening and closing of the boundary valves of the oil pipeline network, as well as the opening and closing of the pipeline extending to the upstream and downstream equipment. In a complex pipeline network environment, this requires operators to have rich operating experience and also requires a lot of labor and time costs.
[0004] Petrochemical enterprises generally have hundreds of oil pipelines and oil pipeline equipment. If some pipelines are closed due to equipment abnormalities, operators may not be able to detect it at the first time and cannot relieve pressure in time. If it is possible to automatically search for pipelines in closed paths and relieve pressure on the oil pipeline network in time, it will also greatly improve production safety. Summary of the invention
[0005] In order to overcome the deficiencies of the above technologies, the present invention provides an automatic monitoring method for closed paths within a pipe network section.
[0006] The present invention aims to monitor the equipment within the factory area. When the shutdown of the equipment causes one or more pipelines (pipe networks) to enter a closed state, the relevant personnel are prompted to take pressure relief measures in time, thereby avoiding overpressure in the pipeline, reducing safety accidents, and improving the management level of production.
[0007] Terminology explanation:
[0008] 1) Pressure relief equipment: refers to equipment that can release the pressure in the pipeline after the pipeline is connected to such equipment, such as storage tanks, receiving devices and pressure relief valves.
[0009] 2) Divide and conquer: Divide a complex problem into two or more identical or similar sub-problems, and then divide the sub-problems into smaller sub-problems until the final sub-problem can be solved simply and directly. The solution to the original problem is the combination of the solutions to the sub-problems.
[0010] 3) Oil pipeline network: The oil pipeline network (also called pipeline, pipeline) is a network structure composed of pipelines and connected equipment. It is equipped with corresponding pumps and storage tanks according to the needs of the process flow and is designed and installed into a complete system to complete the tasks of oil loading and unloading and transfer.
[0011] 4) Breadth-first search algorithm: Its alias is also called BFS. It is a blind search method that aims to systematically expand and check all nodes in the graph to find the result.
[0012] 5) DCS: Distributed Control System, distributed control system.
[0013] 6) OMS: Oil Movement System, oil movement system.
[0014] The technical solution adopted by the present invention to overcome the technical problems is:
[0015] A method for automatically monitoring a closed path within a pipe network section comprises the following steps:
[0016] Step S1, parse and obtain the basic attributes of all devices in the pipe network section, and store the basic attributes of the devices obtained by parsing as a single graph node in sequence;
[0017] Step S2: Based on the basic attributes of all devices obtained through analysis, a two-way connection search graph is constructed, and the bit number value of the device is read;
[0018] Step S3: Use a breadth-first search method to search for devices in a closed path, starting from any unchecked pipe, until the search cannot be continued with the current check node as the starting point.
[0019] Furthermore, in step S1, the equipment includes at least a tank, a pump, a valve, a pipeline, a flow meter, a conveying device, a blind plate, and a head; the basic attributes common to each device include device code, device type, and connection relationship between devices.
[0020] Furthermore, before step S1, step S0 is also included: assuming that the entire pipe network section includes n sub-pipeline network sections, each sub-pipeline network section corresponds to a flow chart, wherein n≥1.
[0021] Furthermore, for n flowcharts, n threads are used to execute step S1 and step S2 in parallel.
[0022] Furthermore, in step S2, in the process of reading the bit number values of the equipment, except for the bit number values of the PID control valve and the centrifugal pump, the bit number values of other equipment need to be read.
[0023] Furthermore, in step S2, the bit number values of the required devices are read once and the read bit number values are stored.
[0024] Furthermore, in step S3, after a closed path is retrieved, a visual reminder and / or an audible and visual alarm is provided through the DCS system.
[0025] Furthermore, step S3 specifically includes the following:
[0026] Step S3.1, take out the queue head node as the current check node;
[0027] Step S3.2, find the reachable nodes of the current check node;
[0028] Step S3.3, judging whether the reachable node is a pressure relief device: if so, setting all devices in the current search interval not to be in a closed path, and then executing the next step; otherwise, directly executing the next step;
[0029] Step S3.4, determine whether the reachable node is isolated from other search intervals, where the situation where the reachable node is isolated from other search intervals includes that the valve is in a closed state, the volume pump is in a closed state, or the valve is blinded: if so, directly return to step S3.1 to continue searching until the search can no longer be diffused starting from the current check node; otherwise, add the reachable node to the queue, and then return to step S3.1 to continue searching until the search can no longer be diffused starting from the current check node.
[0030] Furthermore, the search results are stored using a skip list data structure; the nodes to be visited are stored using a queue data structure.
[0031] Furthermore, in step S3.4, returning to step S3.1 to continue searching is specifically divided into two situations:
[0032] 1) If there are still nodes in the current search interval in the queue that have not been searched, continue searching the current interval;
[0033] 2) If the node in the queue is empty, change the search interval to search.
[0034] The beneficial effects of the present invention are:
[0035] 1. The present invention uses the DCS system as a platform. In the industrial production process, the closed state of the equipment in the pipe network section is monitored by automatic inspection of the program, which replaces the manual inspection of the closed state of the equipment in the pipe network section by the monitoring operator. It can ensure that pressure relief measures are taken in time to avoid pipeline overpressure and reduce the occurrence of safety accidents, save manpower consumption, reduce the degree of manual participation in the production process, and avoid the uncertainties caused by manual control.
[0036] 2. There are often multiple independent sub-pipeline network sections in the factory area. Each sub-pipeline network section corresponds to a flow chart. The program uses a multi-threaded method to execute simultaneously and uses the divide-and-conquer idea to search, which greatly improves the search efficiency.
[0037] 3. The program background automatically monitors the equipment in the factory area, and when it detects the equipment in a closed path, it promptly prompts the monitoring operator in a visual manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 The present invention is a flowchart of a method for automatically monitoring a closed path within a pipe network section according to an embodiment of the present invention.
[0039] Figure 2 This is a schematic diagram of an embodiment of the present invention using three threads to perform parallel processing on three flow charts.
[0040] Figure 3 This is a flow chart of searching for a device in a closed path according to an embodiment of the present invention.
[0041] Figure 4 A schematic diagram of device distribution and connection in a certain search interval according to an embodiment of the present invention. DETAILED DESCRIPTION
[0042] In order to facilitate those skilled in the art to better understand the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. The following is only exemplary and does not limit the protection scope of the present invention.
[0043] The present invention discloses an automatic monitoring method for a closed path within a pipe network section, such as Figure 1 As shown, the following steps are included:
[0044] Step S0: Assume that the entire pipe network section includes n sub-pipe network sections, each sub-pipe network section corresponds to a flow chart, wherein n≥1.
[0045] In the plant area of a petrochemical enterprise, the entire pipe network section generally has multiple sub-pipe network sections, and accordingly, each sub-pipe network section corresponds to a flow chart, and the number of sub-pipe network sections is assumed to be n, that is, there are n flow charts, where n ≥ 1. In this embodiment, it is assumed that the search for closed paths is performed in units of search sections, but each sub-pipe network section generally includes more than one search section, and there may be multiple search sections, and each search section is independent of each other, that is, they are not connected to each other.
[0046] Step S1, parse and obtain the basic attributes of all equipment in the pipe network section, and store the basic attributes of the equipment obtained by parsing in sequence as a single graph node.
[0047] Specifically, the equipment described in the petrochemical enterprise of this embodiment includes at least tanks, pumps, valves, pipelines, flow meters, conveying devices, blind plates, and heads, among which the equipment that affects the closed path search is pumps and valves. Further, the tanks include at least spherical tanks, external floating roof tanks, internal floating roof tanks, dome tanks, and horizontal tanks; the pumps include at least centrifugal pumps, cam pumps, screw pumps, and barrel pumps, among which cam pumps and screw pumps are collectively referred to as volumetric pumps, and centrifugal pumps and barrel pumps are collectively referred to as centrifugal pumps; the valves include at least manual valves, interlock valves, switch-type control valves, switch-stop control valves, electric regulating valves, and PID regulating valves, among which the PID regulating valve is automatically switched by the pressure in the pipeline, and other valves are controlled by manual switching; the conveying device includes at least docks and loading platforms.
[0048] In this embodiment, the information of the equipment and the connection relationship between the equipment are stored by default as an XML document generated by the bpmn flowchart. Therefore, parsing and obtaining the basic attributes of all equipment in the pipe network section is to parse the text content in the XML document. The physical equipment includes at least tanks, pumps, valves, pipes, flow meters, conveying devices, blind plates, and caps. In addition to the physical equipment, the XML document also includes page connectors and intersections. The page connectors are used to connect multiple flowcharts. These two are devices abstracted by the OMS system and are also stored in the XML document. They need to be parsed out during parsing.
[0049] Since there are many types of devices and the properties of various devices are not exactly the same, in this embodiment, only the basic properties of all devices, namely device codes, device types and connection relationships, need to be parsed. The basic properties of the parsed devices are then stored as a single graph node in turn to facilitate the subsequent construction of a two-way connection search graph. In order to improve the scalability and versatility of the program, the device properties of the graph nodes are stored using the Map storage structure; the reachable device graph nodes are stored using the List storage structure.
[0050] Step S2: Based on the basic attributes of all devices obtained through analysis, a two-way connection search graph is constructed, and the bit number value of the device is read.
[0051] The main innovation of the present invention is to complete the search of a bidirectional connection search graph (also called a connectivity graph), but searching for a closed path is different from searching for an oil product movement path. The key point of searching for a closed path is to determine the accessibility of the equipment in the path to the pressure relief equipment. Therefore, this step is mainly based on the basic properties of the equipment analyzed in step S1 and the connection relationship between the equipment to construct a bidirectional connection search graph, which is convenient for the reachability determination in the subsequent step S3.
[0052] Reading the bit number value specifically means: reading the current state of the device through the lower computer, and then the DCS platform obtains the current state of the device read by the lower computer. Generally, the current state of the device can be represented by the numerical values 1 and 2. For example, 1 can represent the open state and 2 can represent the closed state. The lower computer is a hardware device connected to the equipment in the factory. In the process of reading the bit number value of the device in this embodiment, except for the bit number values of the PID control valve and the centrifugal pump, the bit number values of other devices need to be read; in addition, due to the large number of devices in the factory, in order to improve the efficiency of program execution, this embodiment adopts a one-time reading of the bit number value of the required device, and stores the read bit number value, specifically in the memory of the server where the OMS system is located. When searching for devices in the closed path later, the required bit number can be loaded from the memory for judgment.
[0053] In this embodiment, the position number value is read mainly to obtain the switch state of the valve, the switch state of the displacement pump and the blind plate state of the valve.
[0054] In order to improve efficiency, this embodiment adopts a multi-threading method. Specifically, for n flowcharts in the factory area, n threads are used to execute step S1 and step S2 in parallel, that is, each thread is responsible for the device parsing stage and the stage of building a two-way connection search graph in a flowchart, and then the threads are coordinated by locking and other methods to obtain the overall search graph. Multiple threads simultaneously execute the search graph construction task, and the idea of divide and conquer is used for search, so as to construct a highly efficient automatic monitoring method for the closed state of the pipe network interval. Figure 2 As shown, it is a schematic diagram of using three threads to process three flow charts in parallel.
[0055] Step S3: Use a breadth-first search method to search for devices in a closed path, starting from any unchecked pipe, until the search cannot be continued with the current check node as the starting point.
[0056] The key point of the present invention is to complete the search of the connected graph. For the search of the connected graph, there are usually two search algorithms to implement it, one is the depth-first search, and the other is the breadth-first search. The present invention uses the breadth-first search method to search the connected graph. The main purpose of searching the closed path is to avoid the oil pipeline being in a closed state. All oil pipelines must be checked. Therefore, this embodiment uses any unchecked oil pipeline as the starting point device to perform a reachability search until the current check node is used as the starting point and the diffusion search cannot continue. The closed state of each search interval is consistent, that is, each time the search is diffused outward from the starting point until it cannot diffuse, the search interval is connected, and whether there is a pressure relief device is also consistent. When the program is executed, the closed state of each search interval is recorded. When the next search interval accesses the search interval that already has results, the closed state of the current search interval is merged with the closed state of the search interval with the existing results, and the devices in the search interval with the existing results are no longer accessed. This ensures that each device can know the closed state of all devices by checking only once, thereby greatly improving the search efficiency.
[0057] In addition, the initial default devices are all in the closed path. The reasons for this are: on the one hand, there may be pressure relief points on the pipeline, and it is uncertain whether there are pressure relief points for pipelines that have not been checked; on the other hand, there is a manual pressure relief valve in the system, and its switch status will also affect the determination of whether the pipeline is closed. Therefore, in order to improve scalability and versatility, it is necessary to check the closed status of each pipeline. Starting from the pipeline, the initial default devices are all in the closed path.
[0058] Step S3 specifically includes the following: Figure 3 As shown:
[0059] Step S3.1, take out the queue head node as the current check node.
[0060] Step S3.2, find the reachable nodes of the current check node.
[0061] Step S3.3, determine whether the checked reachable node is a pressure relief device: if so, set all devices in the current search interval to not be in a closed path, and then execute the next step; otherwise, directly execute the next step.
[0062] Step S3.4, determine whether the reachable node is isolated from other search intervals, where the situation where the reachable node is isolated from other search intervals includes that the valve is in a closed state, the volume pump is in a closed state, or the valve is blinded: if so, directly return to step S3.1 to continue searching until the search can no longer be diffused starting from the current check node; otherwise, add the reachable node to the queue, and then return to step S3.1 to continue searching until the search can no longer be diffused starting from the current check node.
[0063] In step S3.4, returning to step S3.1 to continue searching is specifically divided into two situations:
[0064] 1) If there are still nodes in the current search interval in the queue that have not been searched, continue searching the current interval;
[0065] 2) If the node in the queue is empty, change the search interval to search.
[0066] Since there are a large number of equipment in the refinery area, this embodiment is preferred. The search results are stored using a skip list data structure, which has higher execution efficiency when processing more data than a normal List; the nodes to be accessed are stored using a queue data structure.
[0067] In step S3, after the closed path is retrieved, that is, after the equipment in the closed path is retrieved, a visual reminder and / or an audible and visual alarm is provided through the DCS system, wherein the visual reminder refers to a pop-up alarm prompt on the operation station, and the operator can view the closed path in the flow chart. The closed path is generally displayed in red so that the operator can take timely measures.
[0068] Below, we use a simple case to explain in detail the principle of searching for a closed path in the present invention. Figure 4As shown, suppose valves V3 and V5 are open, pump P1 is open, and other valves (i.e., V1, V2, and V4) are closed. Randomly select a pipeline as the starting point. Assuming that pipeline PI1 is first taken as the starting point, the reachable nodes of pipeline PI1 are blind plate B1 and valve V2 in the closed state. It is not connected to other devices, and PI1 is a closed pipeline. Then randomly select an unvisited pipeline PI2, then the reachable node of pipeline PI2 is valve V1 in the closed state (valve V2 has been visited and no logical judgment is performed), and it is not connected to other devices. PI2 is a closed pipeline. Then randomly pick up an unvisited pipe PI3. The reachable nodes of pipe PI3 are pipe PI6 and pipe PI7. Put pipe PI6 and pipe PI7 into the queue and take out the head node PI6 in the queue. The reachable node of PI6 is valve V3 in the open state. Put valve V3 into the queue and take out the head node PI7 in the queue. The reachable node of PI7 is valve V4 in the closed state. The search cannot be extended further and is not put into the queue. Take out the head node V3 of the queue. The reachable node of V3 is PI5. Put PI5 into the queue and take out the head node PI5 of the queue. Its reachable device is tank T1, and the tank can be depressurized. Therefore, all pipes PI3, PI5, PI6, and PI7 in the current search interval are set to an unclosed state. Then randomly take an unvisited pipeline PI8. The reachable node of PI8 is the pump P1 in the open state. Put P1 into the queue, take out the current queue head node P1. The reachable node of P1 is PI9. Put PI9 into the queue, take out the current queue head node PI9. The reachable node of PI9 is the valve V5 in the open state. Put V5 into the queue, take out the current queue head node V5. The reachable node of V5 is PI10. Put PI10 into the queue, take out the current queue head node PI10. The reachable device of PI10 is tank T2. The tank can be depressurized. Therefore, set the pipelines PI8, PI9, and PI10 in the current search interval to an unclosed state.
[0069] The existing technology relies solely on monitoring operators to manually check the closed status of equipment in industrial plants. The automatic monitoring of the present invention not only saves manpower costs, reduces the degree of manual participation in the production process, but also avoids the uncertainties caused by manual control. The automatic inspection method can also promptly remind the monitoring operator to release pressure on the closed pipe network, reduce safety accidents, and improve the management level of production.
[0070] The above only describes the basic principles and preferred embodiments of the present invention. Those skilled in the art may make many changes and improvements based on the above description, and these changes and improvements should fall within the protection scope of the present invention.
Claims
1. A method for automatically monitoring a closed path within a pipe network section, characterized in that: Includes steps: Step S0: Assume that the entire pipe network section includes n sub-pipe network sections, and each sub-pipe network section corresponds to a flow chart, where n≥1; Step S1, parse and obtain the basic attributes of all devices in the pipe network section, and store the basic attributes of the devices obtained by parsing as a single graph node in sequence; Step S2: Based on the basic attributes of all devices obtained through analysis, a two-way connection search graph is constructed, and the bit number value of the device is read; Step S3, using a breadth-first search method to search for devices in a closed path, starting from any unchecked pipe, until the search cannot be continued with the current check node as the starting point; For n flowcharts, n threads are used to execute step S1 and step S2 in parallel.
2. The automatic monitoring method for closed paths in a pipe network section according to claim 1 is characterized in that: In step S1, the equipment includes at least a tank, a pump, a valve, a pipeline, a flow meter, a conveying device, a blind plate, and a head; the basic attributes common to each device include the device code, the device type, and the connection relationship between the devices.
3. The automatic monitoring method for closed paths in a pipe network section according to claim 1 is characterized in that: In step S2, in the process of reading the bit number values of the equipment, except for the bit number values of the PID control valve and the centrifugal pump, the bit number values of other equipment need to be read.
4. The automatic monitoring method for closed paths in a pipe network section according to claim 1 or 3, characterized in that: In step S2, the bit number values of the required devices are read once and the read bit number values are stored.
5. The automatic monitoring method for closed paths in a pipe network section according to claim 1, characterized in that: In step S3, after the closed path is retrieved, a visual reminder and / or an audible and visual alarm is provided through the DCS system.
6. The automatic monitoring method for closed paths in a pipe network section according to claim 1, characterized in that: Step S3 specifically includes the following: Step S3.1, take out the queue head node as the current check node; Step S3.2, find the reachable nodes of the current check node; Step S3.3, judging whether the reachable node is a pressure relief device: if so, setting all devices in the current search interval not to be in a closed path, and then executing the next step; otherwise, directly executing the next step; Step S3.4, determine whether the reachable node is isolated from other search intervals, where the situation where the reachable node is isolated from other search intervals includes that the valve is in a closed state, the volume pump is in a closed state, or the valve is blinded: if so, directly return to step S3.1 to continue searching until the search can no longer be diffused starting from the current check node; otherwise, add the reachable node to the queue, and then return to step S3.1 to continue searching until the search can no longer be diffused starting from the current check node.
7. The automatic monitoring method for closed paths in a pipe network section according to claim 6, characterized in that: The search results are stored using a skip list data structure; the nodes to be visited are stored using a queue data structure.
8. The method for automatically monitoring a closed path in a pipe network section according to claim 6, characterized in that: In step S3.4, returning to step S3.1 to continue searching is specifically divided into two situations: 1) If there are still nodes in the current search interval in the queue that have not been searched, continue searching the current interval; 2) If the node in the queue is empty, change the search interval to search.
Citation Information
Patent Citations
Online detection method for closed cavity of low-temperature liquid pipe network
CN113483270A
Path calculation method for oil product movement control system
CN114565120A