Gas path detection automatic planning method based on knowledge graph
Through the automatic gas circuit detection planning method based on the knowledge graph, the gas circuit knowledge map is generated and the main gas circuit and bronchial path are automatically planned, which solves the problem of inefficient gas circuit detection and realizes efficient gas cabinet detection planning.
Patent Information
- Application Number
- CN202410080587.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-19
- Publication Date
- 2025-07-22
AI Technical Summary
In the prior art, the gas circuit detection planning is inefficient, and it mainly relies on manual analysis of the gas cabinet schematic diagram, which leads to low detection efficiency and it is difficult to reasonably plan the complex gas circuit of large gas cabinets.
A knowledge graph-based method is adopted to generate a gas path knowledge graph through the gas path schematic diagram, automatically plan the main gas path and the bronchial path, and output detection and planning information in a unified format.
Automatic planning of gas circuit detection is realized, reducing the difficulty of manual planning and improving the efficiency of inspection and planning.
Smart Images

Figure CN120354978A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of automatic detection planning, and specifically relates to an automatic planning method for gas circuit detection based on a knowledge graph. Background Art
[0002] In the actual production and manufacturing process of a gas holder, detecting the gas circuit is a necessary step to ensure product quality. However, there is relatively little research and application on automatic planning methods for gas circuit detection. Currently, it mainly relies on manual analysis of the gas holder schematic diagram to formulate a gas circuit detection plan. Since the manual gas circuit detection planning method has high requirements for the worker's level, is affected by subjective factors, and there are many components and complex gas circuits when detecting a large gas holder, it is difficult to make a reasonable plan, resulting in low detection efficiency. Summary of the Invention
[0003] Aiming at the above problems, the purpose of the present invention is to design an automatic planning method for gas circuit detection based on a knowledge graph to solve the problem of low efficiency in gas circuit detection planning.
[0004] The technical solution adopted by the present invention to achieve the above purpose is as follows:
[0005] An automatic planning method for gas circuit detection based on a knowledge graph includes the following steps:
[0006] 1) Obtain gas circuit information from the gas circuit schematic diagram and convert it into a gas circuit knowledge graph;
[0007] 2) Analyze the main gas circuit based on the gas circuit knowledge graph and perform main gas circuit detection planning;
[0008] 3) Analyze the main gas circuit based on the gas circuit knowledge graph and perform branch gas circuit detection planning;
[0009] 4) Output the main gas circuit detection planning information and the branch gas circuit detection planning information in a unified format.
[0010] The step 1) includes the following steps:
[0011] 1.1) Based on the gas circuit schematic diagram, define the main gas circuit and the branch gas circuit respectively;
[0012] 1.2) Organize the gas circuit information in the gas circuit schematic diagram into a formatted file, read the formatted file and convert it into a gas circuit knowledge graph.
[0013] The step 1.1) includes the following steps:
[0014] 1.1.1) Obtain the start port and the end port in the gas circuit schematic diagram, and number them respectively in the order from left to right;
[0015] 1.1.2) Obtain the device interfaces in the pneumatic circuit schematic diagram, number them according to their positions, number the interfaces below the pneumatic circuit as Interface 1, the interfaces above the pneumatic circuit as Interface 2, and the interfaces on the side of the pneumatic circuit as Interface 3;
[0016] 1.1.3) Define the pneumatic circuit with the start port as the starting point and the end port as the ending point and passing only through Interface 1 and Interface 2 as the main pneumatic circuit;
[0017] 1.1.4) Define the pneumatic circuit with the start port as the starting point and the end port as the ending point and passing through Interface 3 as the branch pneumatic circuit.
[0018] The pneumatic circuit knowledge graph includes:
[0019] The connection between the start port and the device forms: <start port, connection, device>;
[0020] The connection between the two-interface device and its device interface forms: <device, connection, Interface 1> and <device, connection, Interface 2>;
[0021] The connection between the three-interface device and its device interface adds: <device, connection, Interface 3>;
[0022] The connection between the device and the end port forms: <device, connection, end port>.
[0023] The said step 2) includes the following steps:
[0024] 2.1) Obtain all start ports and end ports from the pneumatic circuit knowledge graph;
[0025] 2.2) Calculate all paths from the start port to the end port one by one and save them;
[0026] 2.3) Analyze all the saved paths, delete all paths containing "Interface 3", and record the remaining paths as the main pneumatic circuit;
[0027] 2.4) Analyze all the main pneumatic circuits, and obtain the operable devices and their interface information included in each main pneumatic circuit;
[0028] 2.5) Set the operation device interface status during detection for each main pneumatic circuit: When a certain main pneumatic circuit is detected, the interface status of all operation devices of other main pneumatic circuits is closed, the interfaces 1 and 2 of all operation devices of this main pneumatic circuit are open, and the interface 3 of the three-interface operation device is closed.
[0029] The said step 3) includes the following steps:
[0030] 3.1) Obtain all start ports and end ports from the pneumatic circuit knowledge graph;
[0031] 3.2) Retrieve all the devices containing Interface 3 from the gas path knowledge graph and include them in the untested set;
[0032] 3.3) Determine whether the untested set is empty. If the untested set is not empty, select Interface 3 of one device and proceed to step 3.4). Otherwise, complete the bronchial gas path detection plan;
[0033] 3.4) Calculate the shortest path from the selected device Interface 3 to all reachable start ports, denoted as the start path;
[0034] 3.5) Calculate the shortest path from the selected device Interface 3 to all reachable end ports, denoted as the end path;
[0035] 3.6) Combine the start path and the end path pairwise arbitrarily to obtain the comprehensive path;
[0036] 3.7) Determine whether there are duplicate nodes in all the comprehensive paths. If there are duplicate nodes, delete the path. Otherwise, record it as a feasible path;
[0037] 3.8) Calculate the shortest path among all the feasible paths, denoted as the detection path of the device Interface 3;
[0038] 3.10) Analyze the operable devices and their interface information included in the detection path of the device Interface 3;
[0039] 3.11) Set the states of the operable device interfaces during the detection of the bronchial gas path: When a certain gas path is being detected, the states of all the interfaces of the operable devices of other gas paths are closed, the Interface 1 of all the operable devices of this gas path is open, the Interface 2 is closed, and the Interface 3 of the three-interface operable device is open;
[0040] 3.12) Loop through steps 3.3) to 3.11) until all the device Interfaces 3 are detected.
[0041] The main gas path detection plan information includes: the start port and end port numbers, the main gas path operating parts, the main gas path operating part interfaces and their states; the bronchial gas path detection plan information includes the currently detected device interface, the corresponding bronchial gas path operating parts, the corresponding bronchial gas path operating part interfaces and their states.
[0042] A gas path detection automatic planning system based on a knowledge graph, comprising:
[0043] A gas path knowledge graph generation module, which is used to obtain gas path information from the gas path schematic diagram and convert it into a gas path knowledge graph;
[0044] A main gas path detection planning module, which is used to analyze the main gas path based on the gas path knowledge graph and perform main gas path detection planning;
[0045] The bronchial airway detection planning module is used to analyze the main airway based on the airway knowledge graph and perform bronchial airway detection planning;
[0046] The airway detection planning result output module is used to output the main airway detection planning information and the bronchial airway detection planning information in a unified format.
[0047] The present invention has the following beneficial effects and advantages:
[0048] The automatic airway detection planning method based on the knowledge graph proposed by the present invention realizes generating a knowledge graph according to the airway information provided by the airway schematic diagram, and automatically completes the airway detection planning, reducing the difficulty of manually planning the airway detection and improving the efficiency of the gas cabinet detection planning. Description of the Drawings
[0049] Figure 1 It is the automatic airway detection planning flowchart provided by the embodiment of the present invention;
[0050] Figure 2 It is the main airway detection planning algorithm flowchart provided by the embodiment of the present invention;
[0051] Figure 3 It is the bronchial airway detection planning algorithm flowchart provided by the embodiment of the present invention. Detailed Embodiments
[0052] In order to make the design scheme and technical advantages of the present invention clearer, the present invention will be described in detail below with reference to the drawings and specific examples. The preferred embodiments of the present invention are given in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing the embodiments is to make the disclosure of the present invention more thorough and comprehensive.
[0053] An automatic airway detection planning method based on a knowledge graph includes:
[0054] The airway knowledge graph generation module is used to obtain airway information from the airway schematic diagram and convert it into an airway knowledge graph, where the main information includes the start port, end port, devices and their interfaces, etc.;
[0055] The main airway detection planning module is used to obtain airway information from the airway knowledge graph, analyze the main airway, and implement the main airway detection planning;
[0056] The bronchial airway detection planning module is used to obtain the untested device interfaces and related airway information from the airway knowledge graph and implement the bronchial airway detection planning;
[0057] The airway detection planning result output module sorts out the completed main airway and bronchial airway detection planning information and outputs it in a unified format.
[0058] The gas circuit knowledge graph generation module generates a knowledge graph, specifically as follows:
[0059] 1) According to the gas circuit schematic diagram, number the start port and the end port from left to right respectively;
[0060] 2) According to the gas circuit schematic diagram, number the device interfaces as follows: the lower one is interface 1, the upper one is interface 2, and the side one is interface 3.
[0061] 3) According to the gas circuit schematic diagram, define the gas circuit starting from the start port and ending at the end port and only passing through interface 1 and interface 2 as the main gas circuit.
[0062] 4) According to the gas circuit schematic diagram, define the gas circuit starting from the start port and ending at the end port and passing through interface 3 as the branch gas circuit.
[0063] 5) According to the above definitions, organize the gas circuit information in the gas circuit schematic diagram into a structured file, read the structured file and convert it into a gas circuit knowledge graph, which includes the start port connected to the device to form (start port, connection, device), the two-path device connected to the device interface to form (device, connection, interface 1) and (device, connection, interface 2), the three-path device connected to the device interface to form an additional (device, connection, interface 3), and the device connected to the end port to form (device, connection, end port).
[0064] The main gas circuit detection planning module uses the main gas circuit detection planning algorithm for planning, specifically as follows:
[0065] 1) Obtain all start ports and end ports from the gas circuit knowledge graph;
[0066] 2) Calculate all paths from the start port to the end port one by one and save them;
[0067] 3) Analyze all the saved paths, delete all paths containing "interface 3", and record the remaining paths as the main gas circuit;
[0068] 4) Analyze all the main gas circuits to obtain the operable devices and their interface information included in each main gas circuit;
[0069] 5) Set the operation device interface status when each main gas circuit is detected. When a certain main gas circuit is detected, all interface statuses of the operation devices of other main gas circuits are closed, the interface 1 and interface 2 of all operation devices of this main gas circuit are open, and the interface 3 of the three-interface operation device is closed.
[0070] The branch gas circuit detection planning module uses the branch gas circuit detection planning algorithm for planning, specifically as follows:
[0071] 1) Obtain all start ports and end ports from the gas circuit knowledge graph;
[0072] 2) All devices containing interface 3 obtained from the gas path knowledge graph will be included in the untested set. By default, the main gas path only detects interfaces 1 and 2 of the devices, and all interfaces 3 of the devices are not detected;
[0073] 3) Determine whether all detections of device interface 3 are completed. If the untested set is not empty, select the interface 3 of one device for step 4). If the untested set is empty, proceed to step 13);
[0074] 4) Calculate the shortest path from the selected device interface 3 to all reachable start ports, denoted as the start path;
[0075] 5) Calculate the shortest path from the selected device interface 3 to all reachable end ports, denoted as the end path;
[0076] 6) Combine the start path and the end path pairwise to obtain the comprehensive path;
[0077] 7) Determine whether there are duplicate nodes in all comprehensive paths. If there are duplicate nodes, delete the path. If there are no duplicate nodes, denote it as a feasible path;
[0078] 8) Calculate the shortest path among all feasible paths, denoted as the detection path of this device interface 3;
[0079] 10) Analyze the operable devices and their interface information included in the detection path of this device interface 3;
[0080] 11) Set the interface states of the operable devices when the gas path is detected. When a certain gas path is detected, all interface states of the operable devices of other gas paths are closed. Interface 1 of all operable devices of this gas path is open, interface 2 is closed, and interface 3 of the three-interface operable device is open;
[0081] 12) Loop through steps 3) to 11) until all detections of device interface 3 are completed;
[0082] 13) The detection planning of the branch gas path ends.
[0083] The gas path detection planning result output module sorts out the detection planning information of the completed main gas path and branch gas path and outputs it in a unified format. The output information of the main gas path detection planning includes the start port and end port numbers, the main gas path operating parts, the interfaces of the main gas path operating parts and their states, etc. The output information of the branch gas path detection planning includes the currently detected device interface, the corresponding branch gas path operating parts, the interfaces of the corresponding branch gas path operating parts and their states, etc.
[0084] Embodiment
[0085] The present invention discloses an automatic planning method for gas circuit detection based on a knowledge graph, including: a gas circuit knowledge graph generation module, a main gas circuit detection planning module, a branch gas circuit detection planning module, and a gas circuit detection planning result output module.
[0086] Please refer to Figure 1 as shown in Figure 1 the flowchart of the automatic planning for gas circuit detection based on the knowledge graph provided by the embodiment of the present invention.
[0087] S1: Obtain gas circuit information from the gas circuit schematic diagram, where the main information includes start ports, end ports, devices and their interfaces, etc. The specific information is as follows;
[0088] 1) According to the gas circuit schematic diagram, number the start ports and end ports from left to right respectively;
[0089] 2) According to the gas circuit schematic diagram, number the device interfaces as follows: the lower one is interface 1, the upper one is interface 2, and the side one is interface 3.
[0090] 3) According to the gas circuit schematic diagram, define the gas circuit that starts from the start port and ends at the end port and only passes through interface 1 and interface 2 as the main gas circuit.
[0091] 4) According to the gas circuit schematic diagram, define the gas circuit that starts from the start port and ends at the end port and passes through interface 3 as the branch gas circuit.
[0092] S2: Organize the above information into a structured file and input it into the gas circuit knowledge graph generation module to convert it into a gas circuit knowledge graph. The gas circuit knowledge graph mainly includes the connection between the start port and the device to form (start port, connection, device), the connection between the two-path device and the device interface to form (device, connection, interface 1) and (device, connection, interface 2), the connection between the three-path device and the device interface to form an additional (device, connection, interface 3), the connection between the device and the end port to form (device, connection, end port), etc.;
[0093] S3: As Figure 2 shown, the main gas circuit detection planning module adopts a main gas circuit detection planning algorithm including:
[0094] (1) Obtain all start ports and end ports from the gas circuit knowledge graph;
[0095] (2) Calculate all paths from the start port to the end port one by one and save them;
[0096] (3) Analyze all the saved paths, delete all the paths containing "interface 3", and record the remaining paths as the main gas circuit;
[0097] (4) Analyze all the main gas circuits to obtain the operable devices and their interface information included in each main gas circuit;
[0098] (5) Set the interface states of the operating devices for each main gas path during detection. When a certain main gas path is being detected, all interface states of the operating devices of other main gas paths are closed, interfaces 1 and 2 of all operating devices of this main gas path are open, and interface 3 of the three-interface operating device is closed.
[0099] S4: As Figure 3 shown, the branch gas path detection planning module adopts a branch gas path detection planning algorithm, including:
[0100] (1) Obtain all start ports and end ports from the gas path knowledge graph;
[0101] (2) Obtain all devices containing interface 3 from the gas path knowledge graph and add them to the undetected set. By default, the main gas path only detects interfaces 1 and 2 of the devices, and all device interface 3s are not detected;
[0102] (3) Determine whether all device interface 3s have been detected. If the undetected set is not empty, select the interface 3 of a device from it and proceed to step 4). If the undetected set is empty, proceed to step 13);
[0103] (4) Calculate the shortest path from the selected device interface 3 to all reachable start ports, denoted as the start path;
[0104] (5) Calculate the shortest path from the selected device interface 3 to all reachable end ports, denoted as the end path;
[0105] (6) Combine the start path and the end path pairwise to obtain a comprehensive path;
[0106] (7) Determine whether there are duplicate nodes in all comprehensive paths. If there are duplicate nodes, delete the path. If there are no duplicate nodes, denote it as a feasible path;
[0107] (8) Calculate the shortest path among all feasible paths, denoted as the detection path of this device interface 3;
[0108] (10) Analyze the operable devices and their interface information included in the detection path of this device interface 3;
[0109] (11) Set the interface states of the operating devices for the gas path during detection. When a certain gas path is being detected, all interface states of the operating devices of other gas paths are closed, interface 1 of all operating devices of this gas path is open, interface 2 is closed, and interface 3 of the three-interface operating device is open;
[0110] (12) Loop through steps 3) to 11) until all device interface 3s are detected;
[0111] (13) The bronchial airway detection plan is completed.
[0112] S5: Organize the completed main airway detection plan information through the airway detection plan result output module and output it in a unified format. The main airway detection plan output information includes the start port and end port numbers, the main airway operating parts, the main airway operating part interfaces and their states, etc.
[0113] S6: Organize the completed bronchial airway detection plan information through the airway detection plan result output module and output it in a unified format. The bronchial airway detection plan output information includes the current detection device interface, the corresponding bronchial airway operating parts, the corresponding bronchial airway operating part interfaces and their states, etc.
[0114] The automatic airway detection planning method of the present invention is based on a knowledge graph. A method is invented to solve the problem of low efficiency in the air cabinet airway detection planning. Only by providing simple airway information through the airway schematic diagram, the automatic airway detection planning can be realized, and concise and clear information can be output to guide the airway detection. The present invention can effectively reduce the difficulty of airway detection planning.
Claims
1. An automatic planning method for gas path detection based on a knowledge graph, characterized in that, It includes the following steps: 1) Obtain the gas path information from the gas path schematic diagram and convert it into a gas path knowledge graph; 2) Analyze the main gas path based on the gas path knowledge graph and conduct the detection planning for the main gas path; 3) Analyze the main gas path based on the gas path knowledge graph and conduct the detection planning for the branch gas paths; 4) Output the detection planning information for the main gas path and the branch gas paths in a unified format.
2. The automatic planning method for gas path detection based on a knowledge graph according to claim 1, characterized in that The step 1) includes the following steps: 1.1) Define the main gas path and the branch gas paths respectively based on the gas path schematic diagram; 1.2) Organize the gas path information in the gas path schematic diagram into a formatted file, read the formatted file and convert it into a gas path knowledge graph.
3. The automatic planning method for gas path detection based on a knowledge graph according to claim 2, wherein, The step 1.1) includes the following steps: 1.1.1) Obtain the start port and the end port in the gas path schematic diagram, and number them respectively in the order from left to right; 1.1.2) Obtain the device interfaces in the gas path schematic diagram, and number them according to their positions. The interfaces below the gas path are numbered as interface 1, the interfaces above the gas path are numbered as interface 2, and the interfaces on the side of the gas path are numbered as interface 3; 1.1.3) Define the gas path with the start port as the starting point and the end port as the ending point and only passing through interface 1 and interface 2 as the main gas path; 1.1.4) Define the gas path with the start port as the starting point and the end port as the ending point and passing through interface 3 as the branch gas path.
4. The automatic planning method for gas circuit detection based on a knowledge graph according to claim 2, characterized in that The gas path knowledge graph includes: The start port is connected to the device to form: <start port, connection, device>; The two-interface device is connected to the device interface to form: <device, connection, interface 1> and <device, connection, interface 2>; The three-interface device is connected to the device interface to form an addition: <device, connection, interface 3>; The device is connected to the end port to form: <device, connection, end port>.
5. The automatic planning method for gas circuit detection based on a knowledge graph according to claim 1, characterized in that The step 2) includes the following steps: 2.1) Obtain all the start ports and end ports from the gas path knowledge graph; 2.2) Calculate all the paths from the start port to the end port one by one and save them; 2.3) Analyze all the saved paths, delete all the paths containing "interface 3", and record the remaining paths as the main gas path; 2.4) Analyze all the main gas paths, and obtain the operable devices and their interface information included in each main gas path; 2.5) Set the operation device interface states during the detection of each main gas path: when a certain main gas path is detected, the interface states of all the operation devices of other main gas paths are closed, the interfaces 1 and 2 of all the operation devices of this main gas path are open, and the interface 3 of the three-interface operation device is closed.
6. The automatic planning method for gas circuit detection based on a knowledge graph according to claim 1, characterized in that, The step 3) includes the following steps: 3.1) Obtain all the start ports and end ports from the gas path knowledge graph; 3.2) Obtain all the devices containing interface 3 from the gas path knowledge graph and list them in the untested set; 3.3) Judge whether the untested set is empty. If the untested set is not empty, select the interface 3 of a device from it for step 3.4), otherwise, complete the detection planning for the branch gas paths; 3.4) Calculate the shortest path from the selected device interface 3 to all the reachable start ports, and record it as the start path; 3.5) Calculate the shortest paths from the selected device interface 3 to all reachable end ports, and record them as end paths; 3.6) Arbitrarily combine the start paths and the end paths in pairs to obtain comprehensive paths; 3.7) Determine whether there are duplicate nodes in all the comprehensive paths. If there are duplicate nodes, delete that path; otherwise, record it as a feasible path; 3.8) Calculate the shortest path among all the feasible paths and record it as the detection path of the device interface 3; 3.10) Analyze the operable devices and their interface information included in the detection path of the device interface 3; 3.11) Set the states of the operable device interfaces during the detection of the branch air path: When a certain air path is being detected, the states of all the interfaces of the operable devices of other air paths are closed, the interface 1 of all the operable devices of this air path is open, the interface 2 is closed, and the interface 3 of the three-interface operable device is open; 3.12) Loop through steps 3.3) to 3.11) until all the device interfaces 3 have been detected.
7. The automatic planning method for gas circuit detection based on a knowledge graph according to claim 1, characterized in that The main air path detection planning information includes: the start port and end port numbers, the main air path operating parts, the main air path operating part interfaces and their states; the branch air path detection planning information includes the currently detected device interface, the corresponding branch air path operating parts, the corresponding branch air path operating part interfaces and their states.
8. An automatic planning system for gas circuit detection based on a knowledge graph, characterized in that, It includes: An air path knowledge graph generation module, which is used to obtain air path information from the air path schematic diagram and convert it into an air path knowledge graph; A main air path detection planning module, which is used to analyze the main air path based on the air path knowledge graph and perform main air path detection planning; A branch air path detection planning module, which is used to analyze the main air path based on the air path knowledge graph and perform branch air path detection planning; An air path detection planning result output module, which is used to output the main air path detection planning information and the branch air path detection planning information in a unified format.