Delayed coking device alarm question-answering system based on large model

By introducing knowledge graphs and text processing modules in the chemical field into the large language model, the professional knowledge reserve and reasoning capabilities of the large model are enhanced, the problem of alarm handling in chemical production is solved, efficient and accurate question-and-answer services are achieved, and the safety and efficiency of chemical production is improved.

CN120450042APending Publication Date: 2025-08-08EAST CHINA UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510537791.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-27
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

The lack of professional knowledge reserves in the chemical industry of the big language model makes it difficult to effectively deal with production alarm information during the chemical production process.

Method used

Design a delayed coking device alarm question and answer system based on large models, including knowledge graph storage module, text storage module, general information storage module, knowledge graph inference module, knowledge graph prediction module and question and answer module. Through these modules, we enhance the professional knowledge reserve and reasoning capabilities of the large language model and provide accurate question and answer services.

Benefits of technology

It has improved the auxiliary decision-making capabilities in the chemical field, ensured production safety and efficiency, provided efficient and accurate answers to chemical problems, and enhanced the smoothness and real-timeness of the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120450042A_ABST
    Figure CN120450042A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of chemical engineering, in particular to a delayed coking device alarm question-answering system based on a large model. The question and answer system comprises a knowledge graph storage module, a text storage module, a general information storage module, a knowledge graph reasoning module, a knowledge graph prediction module, a text processing module and a question and answer module: the knowledge graph reasoning module uses a large model to identify a central entity and an alarm type in a question and performs multi-round reasoning; the knowledge graph prediction module is used for carrying out pre-training and carrying out tail entity prediction through the head entity and the relationship output by the knowledge graph reasoning module; and the question and answer module is used for coordinating all the modules and providing a question interface and a result return service for the user. By combining the chemical field knowledge graph, the text processing module, the information storage module and the reasoning module, the reasoning ability of the large language model can be enhanced, the auxiliary decision-making ability in the chemical field is improved, and the production safety and efficiency are guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of chemical industry, and more particularly to a large-scale model-based delayed coking unit alarm question-answering system. Background Art

[0002] With the acceleration of industrialization and the continuous development of the chemical industry, the processes involved in chemical production are becoming increasingly complex, and the challenges facing decision-makers are also increasing. In these complex production processes, process control and production scheduling have become crucial. Especially when dealing with sudden production alarms, how to make effective decisions quickly and take appropriate countermeasures is key to ensuring safe and efficient production operations. However, traditional decision-makers often lack comprehensive professional knowledge, especially when dealing with complex process alarms. They may make misjudgments due to information asymmetry or lack of specific experience.

[0003] On the other hand, with the development of artificial intelligence technology, question-answering systems based on large language models have become an important research direction in the field of natural language processing. Large language models can learn linguistic patterns from large amounts of text data and can understand and generate natural language responses. They can provide users with concise and efficient question-answering services and have achieved significant application results in many fields. However, existing large language models are primarily trained using publicly available data from the Internet. Therefore, they lack the deep understanding and accurate knowledge base of specific domains, especially chemical engineering.

[0004] To solve this problem, it is necessary to introduce a large language model question-answering system into the chemical industry, expand the professional knowledge of the large language model by storing knowledge, and help decision makers deal with alarm information in the production process efficiently and accurately. Summary of the Invention

[0005] The following is a brief summary of one or more aspects to provide a basic understanding of these aspects. This summary is not an exhaustive overview of all conceivable aspects and is neither intended to identify key or critical elements of all aspects nor to define the scope of any or all aspects. Its sole purpose is to present some concepts of one or more aspects in a simplified form as a prelude to the more detailed description that will be provided later.

[0006] The purpose of the present invention is to provide a delayed coking unit alarm question-answering system based on a large model, which solves the limitations of large language models in the application of the chemical industry, especially in the alarm handling during the chemical production process.

[0007] The technical solution adopted by the present invention to solve the above technical problems is to provide a large model-based delayed coking unit alarm question and answer system, including:

[0008] Knowledge graph storage module, used to store chemical industry knowledge graph data and / or provide query services;

[0009] A text storage module, used to store chemical industry text data and the embedding vectors corresponding to the text data, and to provide similar text query services;

[0010] General information storage module, used to store account information and question and answer records;

[0011] The knowledge graph reasoning module uses a large model to identify the central entity and alarm type in the question, and performs multiple rounds of reasoning based on the knowledge graph storage module;

[0012] A knowledge graph prediction module is pre-trained based on the knowledge graph storage module and performs tail entity prediction based on the head entities and relationships output by the knowledge graph reasoning module;

[0013] A text processing module, used to segment and embed text uploaded by users and provide question embedding services, the text processing module is connected to the text storage module;

[0014] The question-and-answer module is used to coordinate various modules and provide users with a question-asking interface and result return services.

[0015] In some embodiments, the knowledge graph storage module includes:

[0016] A knowledge graph database is used to store knowledge graph data related to the delayed coking unit process, including data on chemical products, safety instruments, process logistics, process equipment, abnormal operating conditions, control loops, protective measures, and recommended measures;

[0017] The knowledge graph knowledge query interface is used to provide query and retrieval services for the knowledge graph.

[0018] In some embodiments, the text storage module includes:

[0019] A text database for storing text paragraphs in the field of chemical engineering and the embedding vectors corresponding to the text paragraphs;

[0020] Text query interface, used to provide retrieval services for similar texts.

[0021] In some embodiments, the general information storage module includes:

[0022] A storage unit for storing account information;

[0023] Interface for account management operations.

[0024] In some embodiments, the knowledge graph reasoning module is further configured to:

[0025] After receiving the user's question in the question-answering module, the alarm type is identified through the large model, and the relevant alarm entities are matched in the knowledge graph storage module according to the alarm type;

[0026] Use the alarm and the most relevant relationship to obtain the corresponding embedding vector in the entity dictionary and the relationship dictionary, call the knowledge graph prediction module to perform tail entity prediction, and generate an entity chain based on multiple rounds of reasoning.

[0027] In some embodiments, the knowledge graph reasoning module is further configured to:

[0028] Use the alarm and the most relevant relationship to obtain the ID representation in the entity dictionary and the relationship dictionary, obtain the corresponding embedding vector in the embedding model according to the ID, use the knowledge graph prediction module to make predictions, and form a triple;

[0029] The triple format is head entity, relation, and tail entity.

[0030] In some embodiments, the knowledge graph reasoning module performs recursive queries through new entities in the triples.

[0031] In some embodiments, the alarm types include: MORE, LESS, AS_WELL_AS, PART_OF, REVERSE, NO, OTHER_THAN, EARLY, LATE, BEFORE, AFTER.

[0032] In some embodiments, the knowledge graph prediction module further comprises: performing link prediction by training an embedding model of the knowledge graph;

[0033] The prediction result is returned to the knowledge graph reasoning module.

[0034] In some embodiments, the text processing module further includes: dividing the text uploaded by the user into blocks according to certain rules;

[0035] Vectorize the block text to obtain the embedding vector.

[0036] In some embodiments, the question-and-answer module further includes: providing user registration, login, database creation, and file upload functions;

[0037] Vectorizing and embedding the user's question, and searching similar texts in the text storage module to obtain the document or sentence that best matches the question;

[0038] In the knowledge graph reasoning module, entities and relationships are reasoned based on user questions to obtain knowledge paths that can be used to answer questions;

[0039] The entity path obtained by the knowledge graph reasoning and the retrieved similar text information are provided to the big model for reasoning generation, and the answer result is finally output.

[0040] The large-model-based delayed coking unit alarm question-and-answer system proposed in the present invention can enhance the reasoning ability of the large language model by combining chemical industry knowledge graphs, text processing, information storage and reasoning modules. It not only improves the auxiliary decision-making ability in the chemical industry, ensures production safety and efficiency, and provides accurate and efficient answers to chemical industry questions, but also enhances the smoothness and real-time nature of the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The above features and advantages of the present invention will be better understood after reading the detailed description of the embodiments of the present disclosure in conjunction with the following drawings. In the drawings, components are not necessarily drawn to scale, and components with similar related properties or characteristics may have the same or similar reference numerals, among which:

[0042] Figure 1 A block diagram of a large model-based delayed coking unit alarm question-answering system according to an embodiment of the present invention is disclosed;

[0043] Figure 2 A workflow diagram of a large model-based delayed coking unit alarm question-answering system according to an embodiment of the present invention is disclosed.

[0044] The meanings of the reference numerals in the figures are as follows:

[0045] 100 Delayed coking unit alarm question and answer system based on large model;

[0046] 10. Knowledge graph storage module;

[0047] 11. Knowledge graph database;

[0048] 12. Knowledge graph knowledge query interface;

[0049] 20 text storage modules;

[0050] 21 text databases;

[0051] 22 text query interface;

[0052] 30 general information storage module;

[0053] 31 storage units;

[0054] 32 interfaces;

[0055] 40 knowledge graph reasoning modules;

[0056] 50 knowledge graph prediction module;

[0057] 60 text processing modules;

[0058] 70 question and answer modules. DETAILED DESCRIPTION

[0059] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the invention and are not intended to limit the invention.

[0060] Although the above methods are illustrated and described as a series of acts for simplicity of explanation, it is to be understood and appreciated that these methods are not limited by the order of the acts, as some acts may occur in a different order and / or concurrently with other acts from those illustrated and described herein or not illustrated and described herein but understandable to those skilled in the art according to one or more embodiments.

[0061] Figure 1 The block diagram of the delayed coking unit alarm question-answering system based on a large model according to an embodiment of the present invention is disclosed. Figure 1 As shown, the large model-based delayed coking unit alarm question and answer system 100 includes:

[0062] The knowledge graph storage module 10 is used to store knowledge graph data in the chemical industry and / or provide query services. Specifically, it can store knowledge graphs of entities related to process logistics, process equipment, abnormal working conditions and causal relationships, and provide knowledge graph query services.

[0063] The knowledge graph storage module may include: a knowledge graph database 11 for storing knowledge graph data related to the delayed coking unit process, including data related to chemical products, safety instruments, process logistics, process equipment, abnormal operating conditions, control loops, protective measures, and recommended measures;

[0064] The knowledge graph knowledge query interface 12 is used to provide query and retrieval services for the knowledge graph.

[0065] The text storage module 20 is used to store chemical engineering text data and the embedding vectors corresponding to the text data, and provide similar text query services. Specifically, it can store text paragraphs and the corresponding embedding vectors.

[0066] The text storage module 20 may include: a text database 21 for storing text paragraphs in the field of chemical engineering and embedding vectors corresponding to the text paragraphs;

[0067] The text query interface 22 is used to provide similar text retrieval services.

[0068] The general information storage module 30 is used to store account information and question and answer records, and can also be used to store account passwords, warehouse (database information) and other information.

[0069] The general information storage module 30 may include: a storage unit 31 for storing account information; and an interface 32 for account management operations.

[0070] The knowledge graph reasoning module 40 uses a large model to identify the central entity and alarm type in the question, and performs multiple rounds of reasoning based on the knowledge graph storage module. Specifically, the central entity in the question is extracted using a large data model, and then reasoning is performed based on the connected knowledge graph storage module 10. Multiple rounds of reasoning can be performed on a given knowledge graph.

[0071] In one embodiment, the knowledge graph reasoning module 40 may be configured with the following steps:

[0072] S41. After receiving the user questions from the question-answering module, the knowledge graph reasoning module 40 identifies the alarm type through the large model and matches the relevant alarm entities in the knowledge graph storage module according to the alarm type.

[0073] Alarm types include but are not limited to: MORE, LESS, AS_WELL_AS, PART_OF, REVERSE, NO, OTHER_THAN, EARLY, LATE, BEFORE, and AFTER. MORE can represent more, higher, increasing, or larger; LESS can represent less, lower, smaller, or decreasing; AS_WELL_AS can represent accompanying; PART_OF can represent part; REVERSE can represent opposite; NO can represent none or blank; OTHER_THAN can represent abnormal; EARLY can represent early; LATE can represent late; BEFORE can represent before; and AFTER can represent after.

[0074] S42. The knowledge graph reasoning module 40 uses the alarm and the most relevant relationship to obtain the corresponding embedding vector in the entity dictionary and the relationship dictionary, and calls the knowledge graph prediction module to perform tail entity prediction, and generates an entity chain based on multiple rounds of reasoning.

[0075] Optionally, the alarm and the most relevant relationship are used to obtain the ID representation in the entity dictionary and the relationship dictionary, the corresponding embedding vector is obtained in the embedding model according to the ID, and the knowledge graph prediction module is used to perform prediction to form a triple, where the format of the triple is head entity, relationship, and tail entity.

[0076] When the large model cannot directly answer the question through the entity chain, the knowledge graph reasoning module performs recursive queries through the new entities in the triples; when the entity chain is still insufficient to answer the question after the query, the current entity chain and the predicted relationship are returned to the question-answering module as reference information.

[0077] In this embodiment, alarm-related triples are obtained through SPARQL query and added to the entity chain. The large model determines whether the existing entity chain is sufficient to answer the question. If it is not sufficient to answer the question, the query continues to go down through the newly found entities in the triples and stores them in the entity chain until the entity chain is sufficient to answer the question or the query rounds reach three rounds.

[0078] Furthermore, the specific steps of entity extraction and multi-round reasoning of the knowledge graph reasoning module 40 are as follows:

[0079] Step S421: Deploy an interface to receive user questions and use a large model to match the user questions with deviation types in the knowledge graph.

[0080] Step S422: Search for related entities in the knowledge graph based on the deviation type, and match the entities with the user questions again;

[0081] Step S423: Retrieve the matched entities on the knowledge graph as the relationship in the triple of the head entity and the tail entity and store them in a list;

[0082] Step S424: Use the large model to match the relationship in the knowledge graph that is most relevant to the question and determine whether the relationship is in the list. If not, request the link prediction module to predict the tail entity and add the triple to the entity chain. If it is in the list, proceed to the next step of reasoning.

[0083] Step S425: Use the large model to score the relationships in the list, select the relationships with the highest scores related to the question, and add the triples containing these relationships to the entity chain;

[0084] Step S426: Use the large model to determine whether the existing entity chain can answer the question. If it can, use the depth-first search algorithm to traverse the entity path and return;

[0085] Step S427: If the existing entity chain is not sufficient to answer the question, reasoning is performed again based on the inferred new entity.

[0086] The depth-first search algorithm can be used to traverse the entity chain to obtain the entity path and the entity chain itself and return it to the question-answering module as the background knowledge queried by the knowledge graph.

[0087] The knowledge graph prediction module 50 trains the knowledge graph embedding model, performs link prediction, performs pre-training based on the knowledge graph storage module, and performs tail entity prediction based on the head entity and relationship output by the knowledge graph reasoning module. Optionally, the knowledge graph prediction module 50 performs pre-training based on the connected knowledge graph storage module 10, and then performs prediction based on the head entity and relationship obtained by the connected knowledge graph reasoning module 40.

[0088] Furthermore, the knowledge graph prediction module 50 trains the knowledge graph embedding model and performs link prediction in the following specific steps:

[0089] Step S51: establishing a knowledge graph based on the HAZOP analysis report of the delayed coking unit;

[0090] Step S52: Parse the knowledge graph into a triple format of [entity, relationship, entity] and divide it into a training set, a test set, and a validation set;

[0091] Step S53: Use the ConvE embedding model to train the knowledge graph;

[0092] Step S54: Use Flask to deploy the interface, receive the head entity and relationship, use the ConvE model to predict the tail entity, and the interface returns the tail entity.

[0093] Among them, Hazard and Operability Study (HAZOP) is a systematic analysis method usually used to identify and evaluate potential hazards and operational problems;

[0094] ConvE (Convolutional Knowledge Graph Embedding) is an embedding model based on convolutional neural networks (CNNs), specifically designed to learn low-dimensional vector representations of entities and relationships in knowledge graphs.

[0095] Flask is a Python microframework that is widely used to quickly build web applications.

[0096] The text processing module 60 is used to segment and embed the text uploaded by the user, and provides question embedding services. The text processing module is connected to the text storage module. Specifically, the text processing module 60 can embed questions, segment the user-uploaded document, embed the text, and store it in the database.

[0097] Furthermore, the steps of embedding the question and embedding the document into blocks for storage are as follows:

[0098] Step S61: Introduce the LangChain framework and use RecursiveCharacterTextSplitter to split the text according to the priority of double line breaks, line breaks, spaces, and empty strings, and set the maximum split string to 300 characters;

[0099] Step S62: extract the text block summary, introduce the BERT model, use the word segmenter to segment the text block summary, and set the word segmentation result to be converted into a PyTorch tensor;

[0100] Step S63: Turn off gradient calculation, then pass the PyTorch tensor to the BERT model, obtain the tensor returned by BERT and convert it to a numpy array;

[0101] Step S64: normalize the obtained vector, combine the vector, text block, and summary into one piece of data and store it in the Milvus database;

[0102] Step S65: The deployment interface receives user questions, embeds the questions using the BERT model, and then returns the embedding vector.

[0103] Among them, LangChain is an open source framework for simplifying and automating the process of interacting with large language models (LLMs);

[0104] RecursiveCharacterTextSplitter is a utility class in the LangChain framework that is used to recursively split long texts.

[0105] The BERT model is a deep learning model for natural language processing tasks. Based on the Transformer architecture, it can capture bidirectional semantic information about words in context. BERT is widely used in tasks such as text classification, question-answering systems, and sentiment analysis.

[0106] PyTorch is a widely used deep learning framework. Tensor is a data structure in PyTorch, similar to a multidimensional array, which can be calculated on the GPU.

[0107] NumPy is a scientific computing library in Python that provides powerful support for multidimensional arrays.

[0108] Milvus is an open source vector database designed for large-scale vector data management.

[0109] The Q&A module 70 is used to coordinate the various modules and provide the user with a question interface and result return service. The Q&A module 70 can be a Java application program that provides user authentication services, a Q&A interface, a text upload interface, and coordinates the work between other modules.

[0110] The question-answering module 70 further includes: providing user registration, login, database creation, and file upload functions;

[0111] Vectorizing and embedding the user's question, and searching similar texts in the text storage module to obtain the document or sentence that best matches the question;

[0112] In the knowledge graph reasoning module, entities and relationships are reasoned based on user questions to obtain knowledge paths that can be used to answer questions;

[0113] The entity path obtained by the knowledge graph reasoning and the retrieved similar text information are provided to the big model for reasoning generation, and the answer result is finally output.

[0114] Furthermore, the question-and-answer module 70 provides a user registration and login interface. After the user registers and logs in, he needs to be verified. After the verification is passed, a user token is generated using JWT. The user needs to provide the token when accessing other interfaces.

[0115] The question-answer module 70 provides users with interfaces for creating and deleting databases and uploading texts. The upload text interface communicates with the text processing module to process texts, and the create and delete database interface communicates with the Milvus database.

[0116] The question-answering module 70 provides a question-asking interface. After a user asks a question, the user requests the text processing module to obtain a text embedding vector. The system searches for relevant text in Milvus based on the vector, then uses a large model to determine whether the relevant text is relevant to the question and adds the relevant text to the background knowledge base. Furthermore, the question-answering system 70 requests the knowledge graph reasoning module to obtain an entity path and adds the entity path to the background knowledge base.

[0117] The question-answering system 70 uses MySQL as a persistent database and Redis as a cache database to dynamically display user questions and answers;

[0118] Among them, JWT is an open standard (RFC 7519) for transmitting information between users and services in a secure way;

[0119] MySQL is an open source relational database management system that is widely used to store structured data such as user information and system configuration.

[0120] Figure 2The following discloses a workflow diagram of a large model-based delayed coking unit alarm question-answering system according to an embodiment of the present invention. Figure 2 As shown in FIG, the workflow of the delayed coking unit alarm question-answering system based on the large model includes the following steps:

[0121] S201: Receive a question input by a user.

[0122] The questions raised by the user are received through the interface of the large-scale delayed coking unit alarm question-answering system, and the questions are generally natural language questions.

[0123] S202: Match the central entity.

[0124] After receiving the question, the question-answering system 70 performs deviation matching on the user question, first identifies the deviation conditions most relevant to the question, and narrows the search scope. Then, the system uses keywords or entity recognition models to retrieve the most likely entity set from the entity set of the knowledge graph, and then selects the entity that best matches the question based on the matching score or confidence level, and establishes the central entity for further reasoning.

[0125] S203: Retrieve entity-related relationships.

[0126] The system pre-writes the set of relationships that each entity may have when it serves as a "head entity" or a "tail entity" in the knowledge graph, and sets a flag to distinguish them. The flag indicates whether the relationship is a relationship when it serves as a head entity or a relationship when it serves as a tail entity.

[0127] For the central entity of the present invention, all possible related relationships are obtained and stored in a relationship list to prepare for subsequent reasoning.

[0128] S204: Determine whether the relationship list contains the relationship most relevant to the question.

[0129] The question-answering system 70 obtains all relationships of type "ObjectProperty" from the knowledge graph, and uses a large model or a similarity-based sorting algorithm to identify the most relevant relationships for the current question.

[0130] If the most relevant relationship is in the relationship list, the process proceeds to step S206 ; if the most relevant relationship is not in the relationship list, the process proceeds to step S205 .

[0131] S205: Predict the tail entity based on the central entity and the most relevant relationship, and then proceed to step S206.

[0132] This step is applicable to the case where the most relevant relationship is missing from the relationship list. The knowledge graph reasoning module receives the central entity and the most relevant relationship, queries the corresponding entity-id dictionary and relationship-id dictionary to obtain their IDs in the graph, and uses the trained knowledge graph embedding model to obtain the embedding vectors corresponding to the entity and relationship.

[0133] The embedding vectors corresponding to the entities and relations are passed into the forward propagation function, and the tail entity with the highest score is selected as the inference result to form a triplet, which is the central entity, the most relevant relation, and the tail entity with the highest score.

[0134] Add the triple to the entity chain list for easy use in subsequent reasoning or answering.

[0135] S206: Obtain an entity chain based on the entity and relationship.

[0136] According to the relationship list and central entity obtained in step S204, the pre-written SparQL template or corresponding query module is used to retrieve the entity E' corresponding to the other end of the relationship, and the (central entity, related relationship, E') triple is stored in the entity chain list for subsequent reasoning.

[0137] S207: Determine whether the entity chain is sufficient to answer the question.

[0138] The currently obtained entity chain is analyzed using the large model: if the user question can be answered based on the entity chain, then the process proceeds to S208; otherwise, the newly retrieved entity E' is used as the central entity to continue iteration.

[0139] If the number of iterations reaches three or more and the system still cannot obtain an entity chain sufficient to answer the question, it will proceed to the next step for text retrieval and auxiliary reasoning.

[0140] S208: Combine entity chains into a query.

[0141] The triples in the above entity chain are combined into natural language or SparQL statements using a large model or rule-based approach to search the Milvus database.

[0142] The text retrieved from the Milvus database is semantically judged by the large model to filter out the parts most relevant to the question as candidate "background knowledge".

[0143] S209. Determine whether the entity chain can be used as background knowledge.

[0144] If it is determined in step S207 that the entity chain is sufficient to answer the question, the entity chain is used as the final background knowledge.

[0145] If the entity chain is not sufficient to answer the question, tell the big model that the entity chain is only for reference and that more information or more reasoning clues are needed.

[0146] S210. Use a depth-first search algorithm to obtain an undirected entity path.

[0147] Use the depth-first search algorithm to start traversal from the matched central entity, regardless of whether the central entity is the head entity or the tail entity, and eventually traverse all entities in the entity chain as the background knowledge of the large model.

[0148] The depth-first search algorithm is an algorithm used to traverse or search data structures such as trees and graphs. Its core idea is to explore a branch as deeply as possible until it reaches the end (a leaf node or a node with no unvisited neighbors), then backtrack to the previous fork point and continue exploring other branches.

[0149] S211. Use a depth-first search algorithm to obtain a directed entity path.

[0150] Use the depth-first search algorithm to traverse from the matched central entity, only caring about the case where the central entity is the head entity. Use the large model to determine the most relevant relationship with the central entity among the alternative relationships, only caring about the most relevant relationship, and finally obtain a directed entity path and save it as background knowledge.

[0151] S212. Use questions to directly match relevant text.

[0152] The question-answering module 70 will request the text processing module to obtain the embedding vector of the question, and then use the Euclidean distance to find the most relevant text from the Milvus database. The large model will then determine whether the text is relevant to the question and retain the relevant text as background knowledge.

[0153] S213: Get answers based on background knowledge.

[0154] The question-answering module 70 combines the background knowledge, entity chain, entity path and question obtained according to the above steps into a prompt, asks the big model questions, and obtains the big model's answer when it has relevant knowledge.

[0155] Compared with the prior art, the large-scale delayed coking unit alarm question-and-answer system proposed in the present invention has the following technical effects:

[0156] 1) Knowledge expansion in the chemical industry: To address the problem of insufficient knowledge of large language models in the chemical industry, the background knowledge and knowledge graphs in the chemical industry are introduced to enhance the auxiliary decision-making capabilities of large models in the chemical industry.

[0157] 2) Improved text matching accuracy: By matching text summaries with questions and using a large model as a filter, the relevance of background knowledge and questions is significantly improved.

[0158] 3) Knowledge graph reasoning module: By introducing the knowledge graph reasoning module, the sources of background knowledge acquisition are expanded and the structure and reliability of background knowledge are enhanced.

[0159] 4) Knowledge graph prediction: Supplements the deficiencies in the knowledge graph and improves its completeness and practicality.

[0160] 5) Question and answer caching and multi-round dialogue: Use the Redis database to cache user questions and answers, achieve dynamic updates and display, and provide the questions and answers as background input to the large model to support multi-round dialogue functions.

[0161] 6) Entity chain reasoning optimization: The depth-first search algorithm is used for one-way and two-way traversal, which strengthens the structure of the entity chain in knowledge graph reasoning and makes the connection between entities closer.

[0162] As used in this application and the claims, unless the context clearly indicates otherwise, the words "a," "an," "an," and / or "the" are not intended to refer to the singular but may include the plural. Generally speaking, the terms "comprises" and "include" only indicate the inclusion of the steps and elements specifically identified, and these steps and elements do not constitute an exclusive list. A method or apparatus may also include other steps or elements.

[0163] Those skilled in the art will appreciate that information, signals, and data may be represented using any of a variety of different technologies and techniques. For example, data, instructions, commands, information, signals, bits, symbols, and chips cited throughout the foregoing description may be represented by voltages, currents, electromagnetic waves, magnetic fields or particles, optical fields or particles, or any combination thereof.

[0164] Those skilled in the art will further appreciate that the various illustrative logic blocks, modules, circuits, and algorithmic steps described in conjunction with the embodiments disclosed herein can be implemented as electronic hardware, computer software, or a combination of the two. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps are generally described above in terms of their functionality. Whether such functionality is implemented as hardware or software depends on the specific application and the design constraints imposed on the overall system. A skilled person may implement the described functionality in different ways for each specific application, but such implementation decisions should not be interpreted as resulting in a departure from the scope of the present invention.

[0165] The various illustrative logic modules and circuits described in conjunction with the embodiments disclosed herein may be implemented or executed using a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A general-purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, such as a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP core, or any other such configuration.

[0166] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software module may reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read and write information from / to the storage medium. In an alternative, the storage medium may be integrated into the processor. The processor and storage medium may reside in an ASIC. The ASIC may reside in a user terminal. In an alternative, the processor and storage medium may reside in a user terminal as discrete components.

[0167] The above embodiments are provided to persons familiar with the art for implementing or using the present invention. Personnel familiar with the art may make various modifications or changes to the above embodiments without departing from the inventive concept of the present invention. Therefore, the scope of protection of the present invention is not limited to the above embodiments, but should be the maximum scope of the innovative features mentioned in the claims.

Claims

1. A delayed coking unit alarm question and answer system based on a large model, characterized in that: include: Knowledge graph storage module, used to store chemical industry knowledge graph data and / or provide query services; A text storage module, used to store chemical industry text data and the embedding vectors corresponding to the text data, and to provide similar text query services; General information storage module, used to store account information and question and answer records; The knowledge graph reasoning module uses a large model to identify the central entity and alarm type in the question, and performs multiple rounds of reasoning based on the knowledge graph storage module; A knowledge graph prediction module is pre-trained based on the knowledge graph storage module and performs tail entity prediction based on the head entities and relationships output by the knowledge graph reasoning module; A text processing module, used to segment and embed text uploaded by users and provide question embedding services, the text processing module is connected to the text storage module; The question-and-answer module is used to coordinate various modules and provide users with a question-asking interface and result return services.

2. The large model-based delayed coking unit alarm question-answering system according to claim 1, characterized in that: The knowledge graph storage module includes: A knowledge graph database is used to store knowledge graph data related to the delayed coking unit process, including data on chemical products, safety instruments, process logistics, process equipment, abnormal operating conditions, control loops, protective measures, and recommended measures; The knowledge graph knowledge query interface is used to provide query and retrieval services for the knowledge graph.

3. The large model-based delayed coking unit alarm question-answering system according to claim 1, characterized in that: The text storage module includes: A text database for storing text paragraphs in the field of chemical engineering and the embedding vectors corresponding to the text paragraphs; Text query interface, used to provide retrieval services for similar texts.

4. The large model-based delayed coking unit alarm question-answering system according to claim 1, characterized in that: The general information storage module includes: A storage unit for storing account information; Interface for account management operations.

5. The large model-based delayed coking unit alarm question-answering system according to claim 1, characterized in that: The knowledge graph reasoning module is further configured to: After receiving the user's question in the question-answering module, the alarm type is identified through the large model, and the relevant alarm entities are matched in the knowledge graph storage module according to the alarm type; Use the alarm and the most relevant relationship to obtain the corresponding embedding vector in the entity dictionary and the relationship dictionary, call the knowledge graph prediction module to perform tail entity prediction, and generate an entity chain based on multiple rounds of reasoning.

6. The large model-based delayed coking unit alarm question-answering system according to claim 5, characterized in that: The knowledge graph reasoning module is further configured to: Use the alarm and the most relevant relationship to obtain the ID representation in the entity dictionary and the relationship dictionary, obtain the corresponding embedding vector in the embedding model according to the ID, use the knowledge graph prediction module to make predictions, and form a triple; The triple format is head entity, relation, and tail entity.

7. The large model-based delayed coking unit alarm question-answering system according to claim 6, characterized in that: The knowledge graph reasoning module performs recursive queries through new entities in the triples.

8. The large model-based delayed coking unit alarm question-answering system according to claim 5, characterized in that: The alarm types include: MORE, LESS, AS_WELL_AS, PART_OF, REVERSE, NO, OTHER_THAN, EARLY, LATE, BEFORE, and AFTER.

9. The large model-based delayed coking unit alarm question-answering system according to claim 1, characterized in that: The knowledge graph prediction module further includes: performing link prediction by training an embedding model of the knowledge graph; The prediction result is returned to the knowledge graph reasoning module.

10. The large model-based delayed coking unit alarm question and answer system according to claim 1, characterized in that: The text processing module further includes: dividing the text uploaded by the user into blocks according to certain rules; Vectorize the block text to obtain the embedding vector.

11. The large model-based delayed coking unit alarm question-answering system according to claim 1, characterized in that: The question-answering module further includes: providing user registration, login, database creation, and file upload functions; Vectorizing and embedding the user's question, and searching similar texts in the text storage module to obtain the document or sentence that best matches the question; In the knowledge graph reasoning module, entities and relationships are reasoned based on user questions to obtain knowledge paths that can be used to answer questions; The entity path obtained by the knowledge graph reasoning and the retrieved similar text information are provided to the big model for reasoning generation, and the answer result is finally output.