PLC program fault diagnosis method and system based on multi-modal large model and medium

By automatically identifying and analyzing PLC ladder diagrams using a multimodal large model, the problem of low efficiency in traditional PLC fault diagnosis is solved, achieving efficient and accurate fault diagnosis, and making it suitable for intelligent fault location in complex systems.

CN120631954BActive Publication Date: 2025-12-12CHINA NUCLEAR EQUIP TECH RES (SHANGHAI) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511105845.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-08
Publication Date
2025-12-12
Estimated Expiration
2045-08-08

AI Technical Summary

Technical Problem

Traditional PLC program fault diagnosis methods are inefficient, rely on manual experience, and are difficult to meet the demands of modern industry for real-time performance, accuracy, and intelligence, especially in complex systems where efficient fault diagnosis is difficult to achieve.

Method used

A PLC program fault diagnosis method based on a multimodal large model is adopted. Through intent recognition, graph database query language and fault diagnosis to generate intelligent agents, target nodes in the PLC ladder diagram are automatically identified and faults are located. Weighted analysis is performed using graph database and large language model to achieve intelligent fault diagnosis.

Benefits of technology

It significantly improves the efficiency and accuracy of PLC fault diagnosis, and realizes intelligent parsing and structured storage of PLC ladder diagrams of any style, providing an efficient and reliable fault diagnosis solution for complex systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120631954B_ABST
    Figure CN120631954B_ABST
Patent Text Reader

Abstract

The application relates to a PLC program fault diagnosis method and system based on a multi-modal large model and a medium, wherein the method comprises the following steps: acquiring input user instruction information, classifying the user instruction information through an intention recognition intelligent agent, and generating a corresponding intention number; generating a Cypher query language according to the intention number through the intelligent agent, obtaining a node ID corresponding to the intention number, determining a target node in a PLC program ladder diagram according to the node ID through a graph database, and querying and fault locating the equipment state of the target node; and performing weighted analysis on the related nodes of the target node through a fault diagnosis generation intelligent agent to obtain a fault diagnosis conclusion. Compared with the prior art, the application significantly improves the efficiency and accuracy of PLC troubleshooting, and provides an efficient and reliable solution for the industrial automation field.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of industrial automatic control, and in particular to a PLC program fault diagnosis method and system based on a multi-modal large model and a medium. BACKGROUND

[0002] With the rapid development of industrial automation technology, programmable logic controllers (PLC) as the core equipment of industrial control systems are widely used in intelligent manufacturing and other fields. PLC controls the operation of industrial equipment by executing pre-written programs (such as ladder diagrams), and in the actual operation process, the equipment controlled by PLC may malfunction due to design defects, external interference or equipment aging, etc., resulting in PLC program errors and causing production line downtime.

[0003] Traditional PLC program troubleshooting methods mainly rely on manual experience, and technicians need to manually analyze ladder diagram logic, check device operation data, and diagnose in combination with on-site conditions. This method is not only inefficient, but also requires high professional skills of technicians, and is prone to misdiagnosis or missed diagnosis. In addition, with the increasing complexity and automation level of industrial equipment, the difficulty of troubleshooting is further increased, and the traditional method has been difficult to meet the real-time, accuracy and intelligent requirements of modern industry. For example, patent application CN114528897A discloses a device fault diagnosis method based on knowledge and data fusion driving. This method constructs a fault atlas by combining device mechanism knowledge and device operation data for diagnosis, which is only suitable for subdivided independent devices of vertical type, such as signal analysis of a specific device to determine the fault, and cannot realize fault diagnosis of the entire complex system. SUMMARY

[0004] The purpose of the present application is to overcome the defects of the prior art and provide a PLC program fault diagnosis method, system and medium based on a multi-modal large model, which significantly improves the efficiency and accuracy of PLC troubleshooting, and provides an efficient and reliable solution for the field of industrial automation.

[0005] The purpose of the present application can be achieved by the following technical solutions:

[0006] A PLC program fault diagnosis method based on a multi-modal large model, comprising the following steps:

[0007] Obtain the input user instruction information, and classify the user instruction information through an intelligent agent based on intent recognition, and generate a corresponding intent number;

[0008] Generate a Cypher query language according to the intent number generated by the intelligent agent using a graph database query language, and obtain a node ID corresponding to the intent number;

[0009] determine a target node in a PLC program ladder diagram according to the node ID by using a graph database, and query and locate faults of a device state of the target node;

[0010] The related nodes of the target node are analyzed by using the intelligent agent generated by the fault diagnosis to obtain a fault diagnosis conclusion.

[0011] Further, the categories of the instruction information include general knowledge question answering, professional knowledge question answering, device state querying, line state querying and line simulation.

[0012] Further, the construction steps of the graph database specifically include:

[0013] A PLC ladder diagram picture is acquired, and image preprocessing is performed on the PLC ladder diagram picture;

[0014] A basic unit in the PLC ladder diagram is recognized by using a multi-modal large model;

[0015] The basic unit is subjected to cluster analysis to form a target node;

[0016] A graph matrix is constructed according to the PLC ladder diagram picture after image preprocessing, and pathfinding calculation is performed to determine the relationship between the target node and the remaining basic units;

[0017] The target node and the relationship between the target node and the remaining basic units are stored in the graph database through structured storage, and the construction of the graph database is completed.

[0018] Further, the basic unit includes multiple types of normally open point positions, normally closed point positions, logic point positions, device bit numbers and annotations.

[0019] Further, the specific steps of constructing the graph matrix according to the PLC ladder diagram picture after image preprocessing include: setting the value of the matrix position corresponding to the black pixel point in the PLC ladder diagram picture after preprocessing to 0, and setting the value of the matrix position corresponding to the pixel point of other colors to 1, to construct the graph matrix, wherein 0 represents a road and 1 represents an obstacle in the graph matrix.

[0020] Further, the A* pathfinding algorithm is used to perform pathfinding calculation to determine the relationship between the target node and the remaining basic units, and the specific steps include:

[0021] The connection between the target node and the road is found by using the number of connected regions in the graph matrix, and the connection is determined as a navigation point;

[0022] All the navigation points are combined according to the starting points and the arrival points to obtain all possible paths of the navigation task in the graph matrix;

[0023] The A* pathfinding algorithm is used to check the possible paths: if there is a path, it means that the node at the starting point and the node at the arrival point have a direct correlation; if there is no path, it means that the node at the starting point and the node at the arrival point have no direct correlation.

[0024] Further, the intelligent agent for fault diagnosis is used to perform weighted analysis on the related nodes of the target node, and the specific steps for obtaining the fault diagnosis conclusion include:

[0025] The current state and the constant state of the target node and its related nodes are compared using a large language model:

[0026] If there is a node in the target node and its related nodes whose current state is inconsistent with the constant state, the node whose current state is inconsistent with the constant state is identified as a fault node;

[0027] If the current state and the constant state of the target node and its related nodes are completely consistent, the related nodes of the target node are analyzed by weighting according to the node weight, and a possibility ranking of fault nodes is generated.

[0028] Further, the node weight is matched with the type of the related node, and the nodes of the series device, the hub node, the related node closer to the target node, and the related node that is a fault node in the historical record are given higher node weights.

[0029] According to another aspect of the present application, a computer readable storage medium is provided, and a computer program is stored on the computer readable storage medium, and the computer program can realize the PLC program fault diagnosis method based on the multi-modal large model when executed by a processor.

[0030] According to another aspect of the present application, a PLC program fault diagnosis system based on a multi-modal large model is provided, comprising:

[0031] An intent number generation module is configured to obtain input user instruction information, classify the user instruction information through an intent recognition intelligent agent, and generate a corresponding intent number;

[0032] A query language generation module is configured to generate a Cypher query language according to the intent number through a graph database query language generation intelligent agent, and obtain a node ID corresponding to the intent number;

[0033] A state query and fault positioning module is configured to determine a target node in a PLC program ladder diagram according to the node ID through a graph database, and query and locate a fault of the target node;

[0034] A fault diagnosis module is configured to utilize fault diagnosis to generate a weighted analysis of the related nodes of the target node by the agent, and obtain a fault diagnosis conclusion.

[0035] Compared with the prior art, the present application has the following beneficial effects:

[0036] 1. The present application obtains the input user instruction information, classifies the user instruction information through the intent recognition agent, generates the corresponding intent number, generates the Cypher query language according to the intent number by the agent using the graph database query language, obtains the node ID corresponding to the intent number, determines the target node in the PLC program ladder diagram according to the node ID using the graph database, and queries and locates the fault of the device state of the target node, thereby significantly improving the efficiency and accuracy of PLC troubleshooting.

[0037] 2. The present application obtains the PLC ladder diagram picture, performs image preprocessing on the PLC ladder diagram picture, identifies the basic unit in the PLC ladder diagram through a multi-modal large model, performs cluster analysis on the basic unit to form a target node, constructs a map matrix according to the PLC ladder diagram picture after image preprocessing and performs pathfinding calculation to determine the relationship between the target node and the remaining basic units, stores the target node and the relationship between the target node and the remaining basic units in the graph database through structured storage, completes the construction of the graph database, makes up for the deficiency of the multi-modal large model in graph modal reasoning, realizes intelligent analysis and structured storage of any style PLC ladder diagram, and provides an efficient and reliable data basis for subsequent fault diagnosis and analysis. BRIEF DESCRIPTION OF DRAWINGS

[0038] Figure 1 A flowchart of a PLC program fault diagnosis method based on a multi-modal large model is provided.

[0039] Figure 2 A flowchart of the construction of the graph database is provided. DETAILED DESCRIPTION

[0040] The present application will be described in detail below in conjunction with the drawings and specific embodiments. The present embodiment is implemented on the premise of the technical solution of the present application, and detailed implementation and specific operation processes are given, but the protection scope of the present application is not limited to the following embodiments.

[0041] English abbreviations involved:

[0042] Programmable Logic Controller: Programmable Logic Controller, PLC

[0043] Example 1

[0044] The embodiment provides a PLC program fault diagnosis method based on a multi-modal large model, as shown in the following steps. Figure 1

[0045] S1, acquire input user instruction information, and classify the user instruction information through an intention recognition intelligent agent, and generate a corresponding intention number.

[0046] An intelligent agent refers to a software module based on artificial intelligence technology, which can independently perceive the environment, analyze information and execute specific tasks. The application first constructs an intention recognition intelligent agent for accurately identifying the category of user instructions, ensuring the efficiency and pertinence of subsequent processing. The intelligent agent divides the user instructions into multiple predefined categories based on the semantic understanding ability of the multi-modal large model. In the application, the classification function of intention recognition is realized through prompt word engineering, which is a technology that uses carefully designed input prompts to guide the large model to generate specific outputs. After the intelligent agent classifies the user input, the subsequent graph database query language generation process is triggered. The predefined categories of instruction information include:

[0047] (1) general knowledge question and answer, such as "Please introduce the current situation of China's industrial development"

[0048] (2) professional knowledge question and answer, such as "What does K6 in Mitsubishi PLC ladder diagram represent"

[0049] (3) device state query, such as "How is the running state of X point"

[0050] (4) line state query, such as "Find the path from the bus to X point"

[0051] (5) line simulation, such as "If X0 point is a normally closed point, can the line from the bus to X1 still be turned on?"

[0052] For example, when the user inputs "Find the path from the bus to X point", the classification intelligent agent recognizes it as the "line query" category and triggers the subsequent graph database query language generation process. Since PLC-related terms may have multiple expressions in different user habits (for example, "input port", "bus", "vertical common line" all represent the same concept), the application uses the semantic understanding ability of the intelligent agent to unify the different descriptions of the terms to the unique node ID in the database. Specifically, the intelligent agent will extract the target device (bus, X point) and convert it to the node ID (bus, X) in the database.

[0053] ​For knowledge Q&A, a knowledge Q&A agent is used to give answers to general / professional questions. The knowledge Q&A agent is constructed through prompt engineering, and the agent realizes question answering in combination with RAG technology. First, a knowledge base containing various related materials is constructed, and the documents in the library are preprocessed and indexed for easy retrieval. Then the user's question is parsed. Subsequently, relevant documents are retrieved in the knowledge base based on the question, key information is extracted and integrated, and the information is input into a generation model to convert it into a natural and fluent answer.

[0054] S2, the graph database query language generation agent generates a Cypher query language according to the intention number, and obtains a node ID corresponding to the intention number.

[0055] The graph database query language generation agent flexibly generates a query statement (such as "MATCH (a {name: 'bus'}), (b {name:'X'}) MATCH p = shortestPath((a)-[:connect*]-(b)) RETURN p") for the graph database based on the converted node ID and the task classification given by the intention recognition agent. Cypher is a special query language for graph databases (such as Neo4j), and its syntax is similar to SQL, but is specifically used to describe nodes, edges and their relationships in a graph structure. The graph database query language generation agent generates exactly this Cypher query language. The graph database query language generation agent is also realized through prompt engineering. The application uses the semantic understanding ability of the agent to map the same term described in different ways to a unique node ID in the database, ensuring the consistency and accuracy of the data. This method not only solves the problem of term diversity, but also improves the intelligence and accuracy of the query.

[0056] S3, the graph database determines the target node in the PLC program ladder diagram according to the node ID, and queries and locates the fault of the target node.

[0057] A graph database is a database specifically designed to store and process graph-structured data, which represents entities and their relationships through nodes and edges. Compared with traditional relational databases, graph databases have higher efficiency and flexibility in handling complex relationship queries. The construction steps of the graph database include:

[0058] The PLC ladder diagram picture is obtained by calling the software operation agent based on the multi-modal large model, automatically opening the PLC program management software specified by different PLC manufacturers, automatically taking screenshots and saving them as pixel graphs. The PLC ladder diagram picture is preprocessed based on classical image processing algorithms such as Gaussian filtering, global thresholding, erosion, and dilation to optimize image quality.

[0059] The basic unit in the PLC ladder diagram is identified by the multi-modal large model. Since the end-to-end inference capability of the multi-modal large model in the graph mode is still insufficient, the present application does not use the multi-modal large model to directly perform end-to-end understanding on the entire PLC ladder diagram, but uses the open word detection capability of the multi-modal large model to identify the basic unit in the PLC ladder diagram of different styles, which includes multiple types of normally open point positions, normally closed point positions, logic point positions, device bit numbers and annotations. The open word detection capability of the multi-modal large model is used to identify the basic unit in the PLC drawing of different styles, and the open word detection can obtain a generalization capability far exceeding that of a traditional target detection model. The open word detection capability is an important function of the multi-modal large model, which means that the model can identify and extract any key words or semantic information in the data without limiting a specific vocabulary table, without defining the categories or ranges of these elements in advance.

[0060] According to the different pixel densities of different regions in the PLC ladder diagram, the clustering boundary is determined, and the identified nodes and texts are subjected to clustering analysis to form a target node. The semantic understanding capability of the large language model is used to determine the device bit number, annotation and other attributes of the target node.

[0061] A map matrix is constructed from the PLC ladder diagram picture after image preprocessing, and pathfinding calculation is performed to determine the relationship between the target node and the remaining basic units. The specific steps of constructing the map matrix from the PLC ladder diagram picture after image preprocessing include: setting the value of the matrix position corresponding to the black pixel point in the PLC ladder diagram picture after preprocessing to 0, and setting the value of the matrix position corresponding to the pixel point of other colors to 1, to construct the map matrix, where 0 represents a road and 1 represents an obstacle. An A* pathfinding algorithm is used to perform pathfinding calculation to determine the relationship between the target node and the remaining basic units, and the specific steps include:

[0062] The connection between the target node and the road is found by the number of connected regions in the map matrix, and the connection is determined as a navigation point;

[0063] All navigation points are combined according to the starting point and the arrival point to obtain all possible paths of the navigation task in the map matrix;

[0064] All possible paths are tested using the A* pathfinding algorithm: if there is a path, it means that the node at the starting point and the node at the arrival point have a direct relationship; if there is no path, it means that the node at the starting point and the node at the arrival point have no direct relationship.

[0065] The target node and its relationship with the remaining basic units are stored in the graph database through structured storage, and the construction of the graph database is completed.

[0066] S4, the fault diagnosis generation agent performs weighted analysis on the related nodes of the target node to obtain a fault diagnosis conclusion.

[0067] The specific steps of the fault diagnosis generation agent performing weighted analysis on the related nodes of the target node to obtain a fault diagnosis conclusion include:

[0068] Using a large language model to compare the current state and the normal state of the target node and its related nodes:

[0069] If there is a node in the target node and its related nodes whose current state is inconsistent with the normal state, the node whose current state is inconsistent with the normal state is identified as a fault node;

[0070] If the current state and the normal state of the target node and its related nodes are completely consistent, the related nodes of the target node are analyzed by weighting according to the node weight to generate a fault node possibility ranking.

[0071] According to the weighting rules, the fault diagnosis generation agent calculates the importance score for each device node. Combined with real-time signals and historical data, the node weight of the device node is dynamically adjusted. The node weight is matched with the type of the related node:

[0072] (1) Since the nodes of the series device have higher dependency in the logical path, its failure may directly affect the operation of the entire system, so it is given a higher weight.

[0073] (2) The hub node has more important functions in the system, and its failure may cause a wider range of influence, so it is given a higher weight.

[0074] (3) In troubleshooting, devices closer to the target node are more likely to be the direct cause of the failure, so the related nodes closer to the target node are given a higher weight.

[0075] (4) The related nodes that are fault nodes in the historical record are given a higher node weight.

[0076] The fault node possibility ranking helps maintenance personnel quickly locate the fault, combined with the RAG technology, and refers to the device manual to provide more troubleshooting information, and is comprehensively sorted into a fault diagnosis conclusion.

[0077] Through the graph database and external knowledge base, the weight, historical fault cases, normal operation data and maintenance records are stored to build a long-term memory bank that can be queried. When analyzing a new fault, the multi-modal large model can retrieve related weights and cases from the memory bank, combine real-time signals and historical data for comprehensive reasoning, and continuously optimize the diagnosis model according to new fault cases to adapt to complex and variable industrial environments.

[0078] An interactive system based on B / S architecture is constructed, aiming to provide intelligent and visual PLC ladder diagram management and troubleshooting support for users such as operators and production line managers, and to realize full-process automation and intelligentization from data acquisition to fault diagnosis. The specific functions are as follows: first, the system can read the state data of sensors and other devices in real time, and display the dynamic simulation of the influence on the corresponding position of the PLC ladder diagram, helping users to intuitively understand the device running state; second, the system supports users to input questions through natural language, and gives fault judgment conclusion and troubleshooting suggestions combined with the highlighted display in the PLC ladder diagram, providing clear and accurate operation and maintenance guidance for users; in addition, the system also has the function of historical version management of drawings, supporting users to view and compare different versions of PLC ladder diagram, ensuring the traceability and consistency of design changes; at the same time, the system provides maintenance log management function, records the detailed information of each fault diagnosis (such as fault description, diagnosis basis, maintenance steps, etc.), which is convenient for subsequent query and analysis, and provides data basis for the self-learning ability of the system.

[0079] Embodiment 2

[0080] The embodiment provides a computer readable storage medium, and a computer program is stored on the computer readable storage medium. When the computer program is executed by a processor, the PLC program fault diagnosis method based on a multi-modal large model as proposed in the embodiment 1 can be realized.

[0081] The rest is the same as in embodiment 1.

[0082] Embodiment 3

[0083] The embodiment provides a PLC program fault diagnosis system based on a multi-modal large model, comprising:

[0084] An intent number generation module is configured to acquire input user instruction information, classify the user instruction information through an intent recognition intelligent agent, and generate a corresponding intent number.

[0085] A query language generation module is configured to generate a Cypher query language according to the intent number by using a graph database query language, so as to obtain a node ID corresponding to the intent number.

[0086] A state query and fault positioning module is configured to determine a target node in a PLC program ladder diagram according to the node ID by using a graph database, and query and locate a fault of a device state of the target node.

[0087] A fault diagnosis module is configured to perform weighted analysis on related nodes of the target node by using a fault diagnosis generation intelligent agent, so as to obtain a fault diagnosis conclusion.

[0088] To verify the effectiveness of the PLC program fault diagnosis system based on a multi-modal large model proposed in the application, a test was conducted on a cleaning machine production line in a certain machinery factory. The results show that as an external system, the system does not have a negative impact on the production efficiency and safety of the production line. The system is installed on the mobile PC of the maintenance personnel. When an abnormal fault occurs in the automated production line, the maintenance personnel can describe the current fault phenomenon of the automated production line through the system, and the AI fault self-diagnosis system automatically pushes the causes of the fault phenomenon, the damaged components and names, and quickly guides the maintenance personnel to handle the fault. The response time of the system state update is less than 1 second, the fault self-diagnosis gives the diagnosis result within 5 seconds after receiving the fault signal, and the maintenance scheme recommendation is generated within 5 seconds after the diagnosis is completed. The operator can obtain information in time and respond. The accuracy of fault self-diagnosis should reach more than 95%, the effective rate of maintenance scheme recommendation is higher than 90%, and the accuracy of fault data report is 100%.

[0089] Meanwhile, the architecture of the application has good scalability and robustness. The system can adapt to the needs of increasing the number of devices including the production line and upgrading the functions, and can flexibly add new device types, diagnosis algorithms and function modules. The application helps to realize more intelligent fault diagnosis of automated production lines and provides strong support for the development of related technical fields

[0090] The rest is the same as in Example 1.

[0091] The above describes the preferred embodiments of the application in detail. It should be understood that those skilled in the art can make many modifications and changes to the application without creative labor according to the concept of the application. Therefore, any technical solution obtained by logical analysis, reasoning or limited experiment on the basis of the prior art according to the concept of the application shall be within the protection scope determined by the claims.

Claims

1. A PLC program fault diagnosis method based on a multi-modal large model, characterized by, The method comprises the following steps: obtaining input user instruction information, classifying the user instruction information through an intention recognition intelligent agent, and generating a corresponding intention number, the instruction information categories including general knowledge question answering, professional knowledge question answering, device state query, line state query and line simulation simulation; generating a Cypher query language according to the intention number through the intelligent agent, and obtaining a node ID corresponding to the intention number; determining a target node in a PLC program ladder diagram according to the node ID through a graph database, and querying and fault locating a device state of the target node, the graph database construction steps specifically including: obtaining a PLC ladder diagram picture, and performing image preprocessing on the PLC ladder diagram picture; identifying a basic unit in the PLC ladder diagram through a multi-modal large model; performing cluster analysis on the basic unit to form a target node; constructing a map matrix according to the image preprocessed PLC ladder diagram picture and performing pathfinding calculation to determine the relationship between the target node and the remaining basic units; storing the target node and the relationship between the target node and the remaining basic units in the graph database through structured storage to complete the construction of the graph database; performing weighted analysis on the related nodes of the target node through a fault diagnosis generation intelligent agent to obtain a fault diagnosis conclusion. 2.The PLC program fault diagnosis method based on a multi-modal large model according to claim 1, wherein The basic unit includes multiple types of normally open point positions, normally closed point positions, logic point positions, device bit numbers and annotations. 3.The PLC program fault diagnosis method based on a multi-modal large model according to claim 1, wherein, The specific steps of constructing a map matrix according to the image preprocessed PLC ladder diagram picture include: setting the value of the matrix position corresponding to the black pixel point in the preprocessed PLC ladder diagram picture to 0, and setting the value of the matrix position corresponding to the pixel point of other colors to 1 to construct a map matrix, wherein 0 represents a road and 1 represents an obstacle in the map matrix. 4.The PLC program fault diagnosis method based on a multi-modal large model according to claim 3, wherein, The A* pathfinding algorithm is used to perform pathfinding calculation to determine the relationship between the target node and the remaining basic units, and the specific steps include: finding the connection between the target node and the road through the number of connected regions in the map matrix, and determining the connection as a navigation point; combining all the navigation points according to the starting point and the arrival point to obtain all possible paths of the navigation task in the map matrix; using the A* pathfinding algorithm to test the all possible paths: if there is a path, it means that the node at the starting point and the node at the arrival point have a direct correlation; if there is no path, it means that the node at the starting point and the node at the arrival point have no direct relationship. 5.The PLC program fault diagnosis method based on a multi-modal large model according to claim 1, wherein The specific steps of performing weighted analysis on the related nodes of the target node through the fault diagnosis generation intelligent agent to obtain a fault diagnosis conclusion include: comparing the current state and the normal state of the target node and its related nodes through a large language model: if there is a node whose current state and normal state are inconsistent in the target node and its related nodes, the node whose current state and normal state are inconsistent is identified as a fault node; if the current state and the normal state of the target node and its related nodes are completely consistent, the related nodes of the target node are analyzed through node weights to generate a fault node possibility ranking. 6.The PLC program fault diagnosis method based on a multi-modal large model according to claim 1, wherein The node weight matches the type of the related node, and higher node weights are given to nodes of series devices, hub nodes, related nodes closer to the target node, and related nodes that are fault nodes in the historical record.

7. A computer readable storage medium characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the PLC program fault diagnosis method based on the multi-modal large model. 8.A PLC program fault diagnosis system based on a multi-modal large model, characterized in that, Comprise: An intent number generation module is configured to obtain input user instruction information, classify the user instruction information through an intent recognition agent, and generate a corresponding intent number, wherein the categories of the instruction information include general knowledge question answering, professional knowledge question answering, device state query, line state query, and line simulation simulation; A query language generation module is configured to generate a Cypher query language according to the intent number using a graph database query language, and obtain a node ID corresponding to the intent number; A state query and fault location module is configured to determine a target node in a PLC program ladder diagram using a graph database according to the node ID, and query and locate faults of the target node, wherein the construction steps of the graph database specifically include: obtaining a PLC ladder diagram picture, and performing image preprocessing on the PLC ladder diagram picture; identifying basic units in the PLC ladder diagram through a multi-modal large model; performing cluster analysis on the basic units to form a target node; constructing a map matrix according to the image preprocessed PLC ladder diagram picture and performing pathfinding calculation to determine the relationship between the target node and the remaining basic units; storing the target node and the relationship between the target node and the remaining basic units in the graph database through structured storage to complete the construction of the graph database; A fault diagnosis module is configured to perform weighted analysis on related nodes of the target node using a fault diagnosis generation agent to obtain a fault diagnosis conclusion.

Citation Information

Patent Citations

  • Equipment fault diagnosis method based on knowledge and data fusion driving

    CN114528897A

  • Intelligent equipment fault question-answering method and system based on knowledge graph enhancement

    CN119226481A

  • Numerical control system fault diagnosis system and method fusing forward design and reverse case data

    CN120233736A