Question and answer method for chemical production
By combining a hypergraph model with dynamic updates via graph attention networks and a large language model, the data processing problem of multiple coupled relationships in chemical production was solved, achieving efficient and accurate data analysis and responses.
Patent Information
- Application Number
- CN202510898499.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-01
- Publication Date
- 2025-10-17
AI Technical Summary
Data processing methods involving multiple coupled relationships in chemical production lead to the loss of key process relationship information. Traditional methods require manual intervention when facing complex or information-deficient problems, resulting in low information acquisition efficiency and inference bias. Furthermore, traditional graph structures cannot adapt to dynamic process changes.
A target hypergraph model with dynamic updates using graph attention network is adopted. By extracting key information of the target production question, a target subgraph is generated. Combined with a large language model, deep semantic understanding and logical reasoning are performed to generate accurate production answers.
It fully preserves the semantic relationships between multiple factors, improves the accuracy and efficiency of answering chemical production questions, avoids reasoning bias and information redundancy, and enhances the accuracy and reliability of data analysis.
Smart Images

Figure CN120806142A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data integration, in particular to a method for answering questions in chemical production. BACKGROUND
[0002] With the deepening of the global informationization process, the amount of data accumulated in the production, operation and management of various industries has increased explosively. These data cover structured data (such as database tables, business system records) and unstructured data (such as text reports, log information, process documents) and other multiple forms, and the association between data is increasingly complex. In this context, intelligent question-answering systems, as a key tool for realizing data value mining, have upgraded their core requirements from simple information retrieval to deep analysis and intelligent reasoning of complex data relationships.
[0003] At present, the data processing and question-answering technology in the related art mainly relies on traditional methods, including keyword-based retrieval systems and shallow semantic analysis models based on traditional graph structures. However, for data in the field of chemical production, there are a large number of multi-coupling relationships between process parameters, such as the conversion rate of ethylene being influenced by multiple factors such as reaction temperature, feed flow rate, and catalyst activity. However, traditional methods can only express up to two relationships, resulting in the loss of key process relationship information in chemical production when retrieving and answering data, and further leading to reasoning bias when analyzing process fluctuations and predicting parameter trends. Moreover, traditional methods of data question-answering require the questioner to ask precise and clear questions, while the chemical production technology is complex and the level of use by operators varies, or the questions asked are comprehensive, such as the user asking "the reason for the recent decline in conversion rate of device A". The implicit process dependency chain (such as the amount of feed and product quantity) needs to be traced, and manual intervention is required to supplement parameters when facing complex or information-lacking questions, resulting in low information acquisition efficiency. At the same time, existing technologies often rely on global knowledge graph retrieval when dealing with complex chemical production problems, resulting in serious interference from redundant information, which not only reduces reasoning efficiency, but also may introduce irrelevant information and lead to result bias. SUMMARY
[0004] The present application aims to solve at least one of the above technical problems.
[0005] To solve the above problems, the present application provides a method for answering questions in chemical production, comprising: extracting target key information of a target production question obtained in advance, inputting the target key information into a target hypergraph model constructed in advance, and obtaining a target subgraph, wherein the target hypergraph model is dynamically updated using a graph attention network; extracting pre-stored real production data and generating a historical reasoning path according to the target subgraph; generating a prompt word according to the target production problem, the real production data, the historical reasoning path, and a preset problem template; inputting the prompt word into a pre-constructed large language model to obtain a target production answer of the target production problem.
[0006] Optionally, the method for constructing the target hypergraph model comprises: obtaining historical key information according to pre-acquired historical production data, and generating an initial hypergraph model according to the historical key information; updating the initial hypergraph model based on the relative importance of neighbor nodes of each node by using a trained graph attention network to obtain the target hypergraph model, wherein the graph attention network is trained by using key information obtained from historical problems and a plurality of historical subgraphs.
[0007] Optionally, the method for obtaining historical key information according to pre-acquired historical production data and generating an initial hypergraph model according to the historical key information comprises: acquiring data types of each of the historical production data, and constructing initial nodes according to the data types of each of the historical production data; acquiring data relationships between each of the historical production data, and constructing initial hyperedges according to the data relationships between each of the historical production data; constructing the initial hypergraph model based on the initial nodes and the initial hyperedges.
[0008] Optionally, the method for updating the initial hypergraph model based on the relative importance of neighbor nodes of each node by using a trained graph attention network to obtain the target hypergraph model comprises: acquiring attention weights of each neighbor node connected to each initial node in the initial hypergraph model by using the trained graph attention network, and obtaining updated nodes according to the attention weights, the initial nodes, and each neighbor node by using a graph attention update rule; updating the initial hypergraph model according to the updated nodes to obtain the target hypergraph model.
[0009] Optionally, the method for updating the initial hypergraph model according to the updated nodes to obtain the target hypergraph model comprises: performing feature extraction on the updated nodes by using a multi-head attention mechanism, and performing fusion processing on the extracted features to obtain target nodes; updating the initial hypergraph model according to the target nodes to obtain the target hypergraph model.
[0010] Optionally, the method for constructing the large language model comprises: generating a historical reasoning path according to the historical subgraph and a call request, and calling historical answer data according to the call request; generating a preset question and answer template based on the historical reasoning path, the historical question, the historical answer data, a preset question template, and a preset answer template; training a preset language model pre-constructed using the preset question and answer template to obtain the large language model.
[0011] Optionally, the extracting target key information of a target production question pre-acquired includes: preprocessing the target production question to obtain a first question, wherein the preprocessing includes spoken language cleaning, term replacement, and word segmentation processing; using a trained chemical production language processing model to perform intent recognition and entity recognition on the first question to obtain a question intent type and a key entity.
[0012] Optionally, the inputting the target key information into a target hypergraph model pre-constructed to obtain a target subgraph includes: matching a target node in the target hypergraph model according to the key entity, obtaining a neighbor node corresponding to the target node, matching the target node to obtain a relationship node according to the question intent type, and generating an intent rule according to the question intent type and the relationship node; generating a target subgraph according to the neighbor node, the intent rule, and a hyperedge relationship between each target node and the neighbor node in the target hypergraph model.
[0013] Optionally, the extracting pre-stored real production data according to the target subgraph includes: generating a structured data request according to the target subgraph; sending the structured data request to a storage system to obtain the real production data returned by the storage system according to the structured data request.
[0014] Optionally, the obtaining historical key information from pre-acquired historical production data includes: preprocessing the pre-acquired historical production data to obtain first historical data; performing normalization processing on the first historical data to obtain a first historical vector; performing fusion processing on the first historical vector to obtain a plurality of second historical vectors; extracting the historical key information according to the relationship between the plurality of second historical vectors and the type of each second vector.
[0015] The beneficial effects of the chemical production question and answer method of the present application are: by extracting the key information of the target production problem and inputting the dynamically updated target hypergraph model, using the high-order relationship expression capability of the multi-element hyperedge connecting the multi-element entity in the hypergraph, the semantic association between the multi-element factors is completely preserved, so that the output target subgraph can accurately reflect the "many-to-many" process data relationship, fundamentally avoiding the reasoning deviation in subsequent data analysis, improving the accuracy of complex relationship modeling, and effectively solving the problem of key process relationship information loss caused by the multi-element coupling relationship between chemical production parameters. Through the graph attention network (GAT) for dynamic updating of the target hypergraph model, the core defect of the traditional graph structure in the multi-element relationship modeling of chemical production, i.e. "static weight cannot adapt to dynamic process changes", is completely solved. That is, the traditional technology uses fixed weight to express the association between nodes (such as "the influence weight of reaction temperature on conversion rate is constant"), but the coupling relationship of process parameters in chemical production will change dynamically with factors such as raw material batch and equipment state. For example, when the catalyst activity decays, the influence weight of temperature on conversion rate needs to be significantly improved. GAT realizes the self-adaptive adjustment of the hyperedge weight through the learnable attention weight matrix and attention vector, improves the modeling accuracy, and further improves the accuracy of target subgraph generation and data retrieval. Based on the target subgraph, real production data is extracted and a historical reasoning path is automatically generated, improving the information completion efficiency and avoiding the processing delay and reasoning deviation caused by manual intervention when facing complex or information missing, realizing the technical leap from "passive query" to "active completion". The target production problem, real data, historical reasoning path and preset template are integrated to generate a prompt word, through the semantic filtering capability of the target subgraph, only the core nodes and relationship chains strongly related to the problem are extracted, reducing the information redundancy of the prompt word. At the same time, the structured historical reasoning path provides an interpretable logic chain for the answer generation of the subsequent large language model, avoiding the reasoning deviation caused by irrelevant information and improving the reliability of the answer. The prompt word is input into the large language model to generate the target production answer, realizing the technical upgrade from "keyword matching" to "semantic understanding + logical reasoning". Compared with the traditional shallow semantic analysis model, the deep semantic understanding capability of the large language model is used, combined with the accurate data and historical reasoning path provided by the hypergraph, effectively improving the accuracy of the answer to the chemical production problem. BRIEF DESCRIPTION OF DRAWINGS
[0016] Figure 1 The flowchart of the chemical production question and answer method of the present application. DETAILED DESCRIPTION
[0017] In order to make the above objectives, characteristics and advantages of the present application more apparent, specific embodiments of the present application will be described in detail below with reference to the accompanying drawings. Although some embodiments of the present application are shown in the drawings, it should be understood that the present application can be implemented in various forms, and should not be interpreted as being limited to the embodiments set forth herein, but rather, these embodiments are provided so as to more thoroughly and completely understand the present application. It should be understood that the drawings and embodiments of the present application are merely for exemplary purposes, and are not intended to limit the scope of protection of the present application.
[0018] It should be understood that each step described in the method embodiments of the present application can be performed in different order, and / or in parallel. In addition, the method embodiments can include additional steps and / or omit the steps shown. The scope of the present application is not limited in this respect.
[0019] As used herein, the term "comprising" and variations thereof, are open-ended, and mean "including but not limited to"; the term "based on" means "based, at least in part, on"; the term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments"; the term "optional" means "optional in at least some embodiments". Related definitions are given throughout the description. It should be noted that the concepts mentioned in the present application are merely for distinguishing different devices, modules or units, and are not intended to limit the functions of these devices, modules or units.
[0020] It should be noted that the modification of "one" or "more" mentioned in the present application is illustrative rather than limiting, and those skilled in the art should understand that, unless otherwise explicitly indicated in the context, it should be understood as "one or more".
[0021] The names of the messages or information exchanged between the devices in the embodiments of the present application are merely for illustrative purposes, and are not intended to limit the scope of the messages or information.
[0022] As Figure 1 shown, the question and answer method for chemical production provided by the embodiments of the present application comprises: Step S1, extracting target key information of a target production question obtained in advance, inputting the target key information into a target hypergraph model constructed in advance, and obtaining a target subgraph, wherein the target hypergraph model is dynamically updated by using a graph attention network.
[0023] Specifically, the hypergraph model is an extended form of a graph, which is composed of a set of nodes and a set of hyperedges, and each node is connected by a hyperedge to form a graph structure, wherein the node can be understood as a "keyword", and the hyperedge connects two or more keywords, which can be understood as a "relationship" describing the connected keywords. Unlike the edge of the ordinary graph, which only connects two vertices, the hyperedge in the hypergraph model can connect any number of nodes to represent the complex multi-element relationship between nodes, such as the many-to-many relationship in social networks, recommendation systems, and bioinformatics. There are a large number of multi-element coupling relationships in chemical production, and the production process chain is complex and complicated. The use of hypergraph models can better represent the relationship between parameters in chemical production. Therefore, a target hypergraph model is constructed in advance and trained using historical production data. That is, the historical production data and the historical subgraph (representing the logical relationship between non-separated data) drawn according to the historical production data are used to train the constructed initial target hypergraph model to obtain the trained target hypergraph model. When applied to question answering, the target key information extracted according to the target production question is input, and the corresponding target subgraph is output. It should be noted that the target key information can be keywords in the target question, relationships between each keyword, and question intent types, etc. For example, the target question is "What is the trend of the ethylene conversion rate of device A in the past three months and its influencing factors?", wherein the time keyword is "the past three months", the device keyword is "device A", the index keyword is "ethylene conversion rate", and the question intent type is a same period query. At the same time, the graph attention network (GAT) is introduced to dynamically update the target hypergraph model, and the attention mechanism is used to capture the relevance of each node and hyperedge in the target hypergraph model, and the relevant weights are prepared for each node based on the principle of chemical production process, so that the target hypergraph model is more clear.
[0024] Step S2, extracting pre-stored real production data according to the target subgraph and generating a historical reasoning path.
[0025] Specifically, the target subgraph is the relevant node and hyperedge information retrieved by the target hypergraph model according to the target keyword. It expresses the real production data required to solve the target problem and the thrust path for generating the target production answer based on the real production data. Since a wide variety of data types are generated during chemical production, further analysis will not be performed on each data point. For example, the pre-stored production database will only record the conversion rate of unit A in the current month, and will not compare the conversion rate difference between unit A and unit B in the current month, or the change in the conversion rate of unit A in two months. Therefore, the target subgraph will contain nodes and hyperedges related to the target key information and question intent type. The pre-organized and stored real production data can be retrieved based on the nodes in the target subgraph, such as the real production data of the time node "August", the unit node "A unit", and the indicator node "ethylene conversion rate", such as "the ethylene conversion rate of unit A in August is 90%". The nodes and hyperedges in the target subgraph can also be used to form a semantic graph context, forming a historical reasoning path such as "capacity utilization rate" → "output" → "equipment efficiency" or "change in the conversion rate of unit A in August and September" = "conversion rate of unit A in September" - "conversion rate of unit A in August", for subsequent target production answer generation.
[0026] Step S3: Generate prompt words based on the target production problem, the real production data, the historical reasoning path, and the preset problem template.
[0027] Step S4: input the prompt word into a pre-built large language model to obtain a target production answer to the target production question.
[0028] Specifically, after obtaining the real production data and historical reasoning path, the target production question, the real production data, the historical reasoning path, and the preset question template are used to generate prompt words, which are then input into a large language model (such as GPT, PaLM, LLaMA, etc.) to obtain the target production answer of the preset template, for example, The prompt words can be expressed as: Target production question: What is the trend of ethylene conversion rate change of unit A and its influencing factors in the past three months? Actual production data: In March 2024, the ethylene conversion rate of Unit A was 90%, and in May 2024, the ethylene conversion rate of Unit A was 87%. From March to May 2024, the catalyst aged and the temperature fluctuated significantly; Historical reasoning path: Change in ethylene conversion rate of Unit A from March to May 2024 = Ethylene conversion rate of Unit A in March 2024 - Ethylene conversion rate of Unit A in May 2024. From March to May 2024, except for changes in catalyst and temperature, other parameters of Unit A remained unchanged or changed slightly. Catalyst aging and temperature, which changed significantly, were the influencing factors. Preset question template: Based on the above prompt words, please generate natural language answers, visual outputs, and provide suggestions.
[0029] The target production answer obtained can be expressed as: Natural language answer: "From March to May 2024, the ethylene conversion rate of device A decreased by 3%, mainly due to catalyst aging and increased temperature fluctuations, leading to a decrease in conversion rate"; Visual output: a line chart is generated to show the trend of the ethylene conversion rate of device A from March to May 2024; Multiple rounds of interaction: actively ask "Do you want to know the production capacity data of other areas?" to guide the subsequent question and answer.
[0030] In this embodiment, by extracting the key information of the target production question and inputting the dynamically updated target hypergraph model, the high-order relationship expression capability of the multi-element hyperedge in the hypergraph is utilized, the semantic association between multiple factors is completely preserved, the output target subgraph can accurately reflect the "many-to-many" process data relationship, and the reasoning bias in subsequent data analysis is fundamentally avoided, the accuracy of complex relationship modeling is improved, and the problem of key process relationship information loss caused by multiple coupling relationships between chemical production parameters in related technologies is effectively solved. Through the graph attention network (GAT), the target hypergraph model is dynamically updated, which completely solves the core defect of "static weight cannot adapt to dynamic process changes" in traditional graph structure in chemical production multi-element relationship modeling. That is, traditional technologies use fixed weights to express the association between nodes (such as "the influence weight of reaction temperature on conversion rate is constant"), but the coupling relationship of process parameters in chemical production will change dynamically with factors such as raw material batch and equipment state. For example, when the catalyst activity decays, the influence weight of temperature on conversion rate needs to be significantly improved. GAT realizes the self-adaptive adjustment of hyperedge weight through learnable attention weight matrix and attention vector, improves the modeling accuracy, and further improves the accuracy of target subgraph generation and answer data retrieval. Based on the target subgraph, real production data is extracted and a historical reasoning path is automatically generated, which improves the information completion efficiency and avoids the processing delay caused by manual intervention and the reasoning bias when facing complex or information missing, realizing the technical leap from "passive query" to "active completion". The target production question, real data, historical reasoning path, and preset template are integrated to generate prompt words, the semantic filtering capability of the target subgraph is used to extract only the core nodes and relationship chains that are strongly related to the question, reducing the information redundancy of the prompt words. At the same time, the structured historical reasoning path provides an interpretable logical chain for the answer generation of the subsequent large language model, avoiding the reasoning bias caused by irrelevant information and improving the reliability of the answer. The prompt words are input into the large language model to generate the target production answer, realizing the technical upgrade from "keyword matching" to "semantic understanding + logical reasoning". Compared with traditional shallow semantic analysis models, the deep semantic understanding capability of the large language model is utilized, combined with the accurate data provided by the hypergraph and the historical reasoning path, effectively improving the accuracy of the answer to the chemical production question.
[0031] Optionally, the method for constructing the target hypergraph model comprises: obtaining historical key information according to the pre-acquired historical production data, and generating an initial hypergraph model according to the historical key information; Specifically, structured data (such as tables, database records) and unstructured data (such as documents, text records, log information) are extracted from a multi-source data system such as a chemical production database to obtain historical key information, and key information extraction is performed on the historical key information, that is, entity recognition and relationship extraction are performed on the historical key information, that is, methods such as named entity recognition and dependency syntax analysis are used to extract entities that can be used as nodes and candidate relationships between entities, and an initial hypergraph model is constructed according to the extracted entities and relationships.
[0032] The initial hypergraph model is updated based on the relative importance of the neighbor nodes of each node using the trained graph attention network to obtain the target hypergraph model, wherein the graph attention network is trained using the key information obtained from the historical problems and a plurality of historical subgraphs.
[0033] Specifically, the graph attention network (GAT) is used to learn the hypergraph, and the corresponding node is updated by the relative importance of a plurality of neighbor nodes of each node. It should be noted that the graph attention network needs to be trained using the key information obtained from the historical problems of chemical production and a plurality of corresponding historical subgraphs before use to improve the accuracy of the graph attention network, and the graph attention network provides dynamic weights for the nodes to dynamically evaluate the influence degree of the neighbor nodes, effectively improving the updating efficiency of the hypergraph model, and the updated node features can reflect more accurate multi-source heterogeneous information.
[0034] Optionally, the method for obtaining historical key information according to the pre-acquired historical production data and generating an initial hypergraph model according to the historical key information comprises: obtaining the data type of each historical production data, and constructing an initial node according to the data type of each historical production data; obtaining the data relationship between each historical production data, and constructing an initial hyperedge according to the data relationship between each historical production data; constructing the initial hypergraph model based on the initial node and the initial hyperedge.
[0035] Specifically, the initial nodes are defined according to the data type of each historical production data, including but not limited to keywords in the text, named entities (personal names, organizations, place names, etc.); field names, primary keys, foreign keys in tables; operation events, timestamps, user identifiers in log records; each initial node is assigned an initial feature representation, including the original text of the historical production data corresponding to the initial node, the type of the data source to which the initial node belongs, statistical information, etc. The initial hyperedge is defined according to the data relationship between each historical production data, each initial hyperedge can connect multiple initial nodes, and is used to express multi-element and high-order semantic relationships. The initial hyperedge includes but is not limited to co-occurrence hyperedges formed by co-occurrence fields / keywords in the same record; semantic hyperedges constructed based on semantic similarity (such as BERT cosine similarity); business hyperedges defined based on chemical production rules (such as the hyperedge formed between the "conversion rate" node and the "operation" log and the "catalyst type" field); each initial hyperedge can contain metadata such as weight and type identifier, forming a directed or undirected hypergraph model. Based on multiple initial nodes and initial hyperedges, an initial hypergraph model is constructed, which can express multiple relationships between data and support complex graph computing.
[0036] Optionally, the initial hypergraph model is updated based on the relative importance of the neighbor nodes of each node using the trained graph attention network to obtain a target hypergraph model, including: The attention weight of each initial node and each neighbor node connected to the initial node in the initial hypergraph model is obtained using the trained graph attention network, and an updated node is obtained according to the attention weight, the initial node and each neighbor node using a graph attention update rule; The initial hypergraph model is updated according to the updated node to obtain the target hypergraph model.
[0037] Specifically, the attention weight of each initial node and each neighbor node connected to the initial node is represented as: , wherein, represents the attention weight between the initial node i and the initial hyperedge e connected to the initial node i, a represents the attention vector of the scientific system, which is configured for the graph attention network, E i represents the set of all initial hyperedges containing the node i, W represents a learnable weight matrix for feature transformation, which is configured for the graph attention network, h i represents the feature vector of the initial node i, LeakyReLU() represents an activation function with a leaky rectified linear unit, e' represents any initial hyperedge in the hyperedge set Ei to which the initial node i belongs, and e has the same effect, but is used to traverse the sum, h e represents the aggregated representation of the features of the initial nodes connected to the initial hyperedge e, and the following strategy is used to generate: , , wherein, vj represents a neighbor node j, and hj represents a feature vector of the neighbor node j. It should be noted that the interaction between the node and the neighbor node must be implemented through the hyperedge, and thus the neighbor node features of the initial node are aggregated through the initial hyperedge.
[0038] The updated node is obtained according to the attention weight, the initial node and each neighbor node as: , wherein, represents an updated node, represents an activation function, for example, ReLU, Agg vj∈e (h j ) represents a feature aggregation operation of all neighbor nodes within the initial hyperedge e.
[0039] After obtaining the updated node, the corresponding initial node is replaced by the updated node, and the updating of the initial hypergraph model is completed, and a target hypergraph model with higher accuracy is obtained.
[0040] Optionally, the updating of the initial hypergraph model according to the updated node to obtain the target hypergraph model comprises: adopting a multi-head attention mechanism to extract features of the updated node, and performing fusion processing on the extracted features to obtain a target node; updating the initial hypergraph model according to the target node to obtain the target hypergraph model.
[0041] Specifically, a multi-head attention mechanism is adopted, and multiple attention heads (such as 8 heads) are run in parallel, each head learns a feature representation of a different semantic space of an updated node, and finally the comprehensive features are spliced or averaged to obtain a target node, and the initial hypergraph model is updated with the target node to obtain a target hypergraph model, which can reflect more accurate multi-source heterogeneous information and effectively improve the expression ability of the target hypergraph model for complex relationships (such as simultaneously capturing the time dimension and spatial dimension relationships of “production capacity”).
[0042] Optionally, the method for constructing the large language model comprises: generating a historical reasoning path according to the historical subgraph and a call request, and calling historical answer data according to the call request; generating a preset question and answer template based on the historical reasoning path, the historical question, the historical answer data, a preset question template and a preset answer template; training a preset language model constructed in advance using the preset question and answer template to obtain the large language model.
[0043] Specifically, based on the corresponding historical answer data obtained by invoking the invocation request generated according to the historical subgraph, the preset question and answer template is generated according to the historical reasoning path, the historical question, the historical answer data and the preset question template and the preset answer template, wherein the preset question template can include "please generate a natural language answer according to the above content", and the preset answer template can include a natural language answer, a visual answer (such as a table, a trend chart and the like) and a multi-round question and answer suggestion and the like.
[0044] Optionally, the extracting the target key information of the target production question pre-acquired comprises: The target production question is pre-processed to obtain a first question, wherein the pre-processing comprises spoken language cleaning, term replacement and word segmentation processing. The trained chemical production language processing model is used for intent recognition and entity recognition on the first question to obtain a question intent type and a key entity.
[0045] Specifically, since the target production question proposed by the operator may have problems such as spoken language, the target production question is pre-processed to obtain a processed first question, for example, the target production question "What is the change trend of the ethylene conversion rate of device A in the past three months and its influencing factors?". The pre-processing operation includes but is not limited to spoken language cleaning: eliminating oral language, stop words (such as "ah", "is it", "this"); term replacement: replacing "device A" with standard code "device_A", replacing "production capacity" with "ethylene conversion rate" and the like; word segmentation processing: using a word segmentation tool combined with a domain library, such as a BERT-based chemical field word segmentation model for word segmentation, to improve the recognition ability of professional terms. The first question is input into a chemical production language processing model (for example, a natural language processing model), and finally the question intent type such as a same period query (such as "change compared with last year"), an anomaly detection (such as "whether the failure rate is higher than the standard") and a ranking and sorting (such as "ranking of production capacity of each workshop") and the key entity such as time "the past three months", device "device A", index "ethylene conversion rate" and the like are output. The question intent type and the key entity are input into a target hypergraph model as target key information. It should be noted that the preset language processing model is trained using historical production questions and corresponding historical question intent types, historical key entities to obtain a trained chemical production language processing model.
[0046] Optionally, the inputting the target key information into the pre-constructed target hypergraph model to obtain a target subgraph comprises: According to the key entity, a target node in the target hypergraph model is matched, the corresponding neighbor node of the target node is obtained, the target node is matched according to the problem intention type to obtain a relationship node, and an intention rule is generated according to the problem intention type and the relationship node; According to the neighbor node, the intention rule, and the hyperedge relationship between each target node and the neighbor node in the target hypergraph model, a target subgraph is generated.
[0047] Specifically, after the target key information is input into the target hypergraph model, according to the identified problem intention type and key entity, the corresponding target node and intention rule are matched in the pre-constructed target hypergraph model. That is, according to the identified key entity (such as “capacity utilization rate” and “East China region”), the corresponding target node is found in the target hypergraph model to obtain the neighbor node. Meanwhile, in the case of missing entity or ambiguous semantics, the structure reasoning ability of the hypergraph is used for information completion, the target hyperedge connects these factors and the target node to reflect the physical and chemical dependence relationship, that is, the relationship node is obtained according to the problem intention type, for example, the problem intention type is a same period query, but the specific time information is not given in the question, then the intention rule is generated according to the obtained relationship node such as “first quarter” and “second quarter”, that is, “compare the conversion rate of device A in the first quarter and the second quarter”. After the above operations are completed, according to the neighbor node, the intention rule, and the hyperedge relationship between each target node and the neighbor node in the target hypergraph model, a target subgraph is generated, which contains all the core target nodes (such as index nodes, time nodes, and region nodes) participating in the current question and answer task and the logical relationship therebetween, and it is identified that “frequent feed fluctuation” and “catalyst addition amount decrease” are the main influence paths, forming a semantic graph context.
[0048] Optionally, the extracting pre-stored real production data according to the target subgraph comprises: According to the target subgraph, a structured data request is generated, including but not limited to, for example, a SQL query statement: such as querying “capacity utilization rate of East China region in 2024Q1” from a business database; a GraphQL query: used to obtain hierarchical nested information from a structured knowledge graph or a data lake API; a RESTful API request: such as calling an interface of an MES system or an ERP platform to obtain device status or production records.
[0049] The structured data request is sent to a storage system, such as a traditional relational database (such as PostgreSQL, SQL Server); a data lake or big data platform (such as Hive, Iceberg); an industrial knowledge graph system (such as Neo4j or an ontology database based on RDF / SPARQL); the real production data such as "conversion rate is 87.4%" and "decrease by 2.3%" is obtained by calling and returning the storage system according to the structured data request.
[0050] Optionally, the historical key information obtained according to the pre-acquired historical production data comprises: The pre-acquired historical production data is pre-processed to obtain first historical data; The first historical data is normalized to obtain a first historical vector; The first historical vector is fused to obtain a plurality of second historical vectors; The historical key information is extracted according to the relationship between the plurality of second historical vectors and the type of each second vector.
[0051] Specifically, the acquired historical production data is multi-source data, which can be structured data or unstructured data, and there may be impurities such as filtering interference, so the acquired historical production data needs to be pre-processed to obtain first historical data after preliminary processing. The pre-processing operation includes but is not limited to: data cleaning (such as missing value filling, outlier processing); format standardization (unified time format, field naming). Then the entity or field features extracted in each first historical data are mapped to a unified embedding space, and a shared feature encoder or embedding model (such as BGE-M3, Qwen3, etc.) is used for vectorization to obtain a first historical vector, ensuring that entity features from different sources can be compared and calculated in the same semantic space. Different sources of first historical vectors are fused into final representation vectors, second historical vectors, by methods such as weighted average, splicing, attention mechanism, etc. The fusion strategy can assign different weights according to the importance or semantic relevance of the data sources to generate more rich and contextually semantic multi-source fusion vectors. Finally, the historical key information is extracted according to the relationship between the plurality of second historical vectors and the type of each second vector, improving the cleanliness of the historical key information extraction.
[0052] Although the present application is disclosed as above, the protection scope of the present application is not limited to this. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the present application, and these changes and modifications will fall within the protection scope of the present application.
Claims
1. A question-answering method for chemical production, characterized in that: include: Extracting the target key information of the target production problem obtained in advance, inputting the target key information into a pre-built target hypergraph model to obtain a target subgraph, wherein the target hypergraph model is dynamically updated using a graph attention network; Extracting pre-stored real production data and generating a historical reasoning path according to the target subgraph; Generate prompt words according to the target production problem, the real production data, the historical reasoning path and the preset problem template; The prompt word is input into a pre-built large language model to obtain a target production answer to the target production question.
2. The question-answering method for chemical production according to claim 1, characterized in that: The method for constructing the target hypergraph model includes: Obtaining historical key information based on pre-acquired historical production data, and generating an initial hypergraph model based on the historical key information; Using the trained graph attention network, the initial hypergraph model is updated based on the relative importance of each node's neighbor nodes to obtain the target hypergraph model, wherein the graph attention network is trained using key information obtained from historical questions and multiple historical subgraphs.
3. The question-answering method for chemical production according to claim 2, characterized in that: Obtaining historical key information based on pre-acquired historical production data, and generating an initial hypergraph model based on the historical key information includes: Acquire a data type of each of the historical production data, and construct an initial node according to the data type of each of the historical production data; Acquire a data relationship between each of the historical production data, and construct an initial hyperedge according to the data relationship between each of the historical production data; The initial hypergraph model is constructed based on the initial nodes and the initial hyperedges.
4. The question-answering method for chemical production according to claim 3, characterized in that: The method uses the trained graph attention network to update the initial hypergraph model based on the relative importance of each node's neighbor nodes to obtain a target hypergraph model, including: Using the trained graph attention network, obtain the attention weight of each initial node and each of the connected neighbor nodes in the initial hypergraph model, and use the graph attention update rule to obtain an updated node according to the attention weight, the initial node and each of the neighbor nodes; The initial hypergraph model is updated according to the update node to obtain the target hypergraph model.
5. The question-answering method for chemical production according to claim 4, characterized in that: Updating the initial hypergraph model according to the update node to obtain the target hypergraph model includes: A multi-head attention mechanism is used to extract features of the update node, and the extracted features are fused to obtain the target node; The initial hypergraph model is updated according to the target node to obtain the target hypergraph model.
6. The question-answering method for chemical production according to claim 2, characterized in that: The method for constructing the large language model includes: generating a historical reasoning path and a call request according to the historical subgraph, and calling historical answer data according to the call request; Generate a preset question and answer template based on the historical reasoning path, the historical question, the historical answer data, the preset question template and the preset answer template; The pre-built preset language model is trained using the preset question-answer template to obtain the large language model.
7. The question-answering method for chemical production according to claim 6, characterized in that: The extraction of pre-acquired target key information of the target production problem includes: Preprocessing the target production question to obtain a first question, wherein the preprocessing includes spoken language cleaning, term replacement, and word segmentation processing; Using the trained chemical production language processing model, the intent recognition and entity recognition of the first question are performed to obtain the question intent type and key entities.
8. The question-answering method for chemical production according to claim 7, characterized in that: Inputting the target key information into a pre-built target hypergraph model to obtain a target subgraph includes: Match the target node in the target hypergraph model according to the key entity, obtain the corresponding neighbor node of the target node, match the target node according to the question intention type to obtain the relationship node, and generate the intention rule according to the question intention type and the relationship node; A target subgraph is generated according to the neighbor nodes, the intention rules, and the hyperedge relationships between each target node and the neighbor nodes in the target hypergraph model.
9. The question-answering method for chemical production according to claim 1, characterized in that: Extracting pre-stored real production data according to the target subgraph includes: generating a structured data request according to the target subgraph; The structured data request is sent to a storage system, and the real production data is retrieved and returned by the storage system according to the structured data request.
10. The question-answering method for chemical production according to claim 2, characterized in that: The historical key information obtained based on the pre-acquired historical production data includes: Preprocessing the previously acquired historical production data to obtain first historical data; Normalizing the first historical data to obtain a first historical vector; performing fusion processing on the first historical vectors to obtain a plurality of second historical vectors; The historical key information is extracted according to the relationship between a plurality of second historical vectors and the type of each second vector.