Methods and apparatus for root cause analysis of abnormal events in chemical production
By combining a bit array index structure with an anomaly event root cause analysis component, the problem of large data volume and diverse data sources in chemical production is solved, enabling fast and accurate root cause analysis, generating detailed root cause description text, and improving the quality control capability of chemical production.
Patent Information
- Application Number
- CN202511081477.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-04
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2045-08-04
AI Technical Summary
The chemical production process generates a large amount of data from diverse sources. Existing root cause analysis methods are unable to accurately identify data related to quality anomalies, leading to misjudgments and inaccurate analysis results.
It employs a summary information filter based on a bit array index structure and a preset abnormal event root cause analysis component, including a preprocessing layer, an abnormal parameter identification layer, an association rule mining layer, an abnormal node determination layer, a root cause node search layer, a prompt word construction layer, and a root cause description text output layer. Natural language root cause description text is generated through hash calculation and Apriori rules.
It enables precise data retrieval and tracing within seconds, improving the accuracy and efficiency of root cause analysis, generating interpretable abnormal root cause reports, and preventing misjudgments.
Smart Images

Figure CN120633812B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent manufacturing technology, and in particular to a method and apparatus for root cause analysis of abnormal events in chemical production. Background Technology
[0002] In the chemical production sector, product quality stability has a crucial impact on a company's market competitiveness. Chemical companies typically need to ensure that each batch of products meets established quality standards under a strict quality control system. However, due to the complexity of chemical production processes, involving numerous factors such as production parameters, equipment status, raw material quality, and operator skill levels, batch product quality anomalies still occur from time to time.
[0003] In related technologies, chemical companies currently rely primarily on traditional root cause analysis methods, such as the "5 Whys" and Fault Tree Analysis (FTA), for quality control and handling of quality anomalies. These methods attempt to identify the root causes of quality anomalies by progressively tracing the causes of problems or constructing a logic tree of the failure.
[0004] However, the amount of data generated during chemical batch production is enormous and comes from diverse sources. Existing root cause analysis methods are unable to efficiently extract valuable information from massive amounts of data, accurately identify data related to quality anomalies, and easily miss key factors, leading to misjudgments and thus reducing the accuracy of root cause analysis results. Summary of the Invention
[0005] This application provides a method and apparatus for root cause analysis of abnormal events in chemical production. To provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. This summary is not intended as a general commentary, nor is it intended to identify key / important components or describe the scope of protection of these embodiments. Its sole purpose is to present some concepts in a simple form as a prelude to the detailed description that follows.
[0006] In a first aspect, embodiments of this application provide a method for root cause analysis of abnormal events in chemical production, applied on a server-side basis, the method comprising:
[0007] Receive an abnormal event root cause analysis request, which carries the target batch QR code of the traceable chemical product containing the abnormal event.
[0008] Based on the target batch QR code and the pre-configured summary information filter, obtain multi-source chemical batch data related to the chemical products to be traced. The pre-configured summary information filter is a query plugin based on a bit array index structure.
[0009] Input multi-source chemical batch data into the preset abnormal event root cause analysis component. The preset abnormal event root cause analysis component includes a preprocessing layer, an abnormal parameter identification layer, an association rule mining layer, an abnormal node determination layer, a root cause node search layer, a prompt word construction layer, and a root cause description text output layer.
[0010] Output the root cause description text that caused the abnormal event in the traceable chemical product, and send the root cause description text to the client for display.
[0011] Optionally, based on the target batch QR code and a pre-configured summary information filter, multi-source chemical batch data related to the chemical product to be traced can be obtained, including:
[0012] Obtain the target summary information corresponding to the target batch QR code from the pre-established mapping relationship between batch QR codes and summary information;
[0013] Based on the target summary information, and combined with the information summarization algorithm, the target summary sequence value corresponding to the chemical product to be traced is calculated;
[0014] The target digest sequence value is input into a hash function to calculate multiple bit array indices of the target digest sequence value in a pre-configured digest information filter;
[0015] Iterate through the array to obtain the discrete chemical batch data associated with the index position of each bit array, and obtain multi-source chemical batch data related to the chemical product to be traced.
[0016] Optionally, the following steps are used to generate a pre-established mapping relationship between batch QR codes and summary information:
[0017] In response to the production completion instruction for the current chemical product being produced, collect multi-type chemical batch data for the current chemical product;
[0018] Determine the original summary information and original batch QR code for multiple types of chemical batch data;
[0019] Establish a mapping relationship between the original summary information and the original batch QR code to obtain the pre-established mapping relationship between the batch QR code and the summary information.
[0020] Optionally, the method also includes:
[0021] Using information summarization algorithms and original summary information, the original summary sequence value of each type of chemical batch data is calculated;
[0022] The original summary sequence value of each type of chemical batch data is input into a hash function to calculate the bit array index of each type of chemical batch data;
[0023] Create each index object of the array using the bit array subscript of each type of chemical batch data;
[0024] Each type of chemical batch data is associated with its corresponding index object to obtain a pre-configured summary information filter.
[0025] Optionally, the preset abnormal event root cause analysis components include a preprocessing layer, an abnormal parameter identification layer, an association rule mining layer, an abnormal node determination layer, a root cause node search layer, a prompt word construction layer, and a root cause description text output layer.
[0026] Input multi-source chemical batch data into the preset anomaly root cause analysis component, including:
[0027] The preprocessing layer cleans the multi-source chemical batch data and calculates the statistical parameters within a sliding window for the attribute values of each chemical identifier after data cleaning, thus obtaining a statistical parameter matrix.
[0028] The abnormal parameter identification layer calculates the Z-score for each column of the statistical parameter matrix and marks the abnormal statistical parameters whose Z-score is greater than the preset abnormal threshold.
[0029] The association rule mining layer uses the Apriori algorithm to mine association rules with support greater than the preset support and confidence greater than the preset confidence in the anomaly statistical parameters, thus obtaining a candidate parameter set.
[0030] The abnormal node determination layer determines abnormal nodes based on the candidate parameter set and the causal graph pre-constructed based on the prior knowledge base;
[0031] The root cause search layer starts from the anomalous node and searches for the shortest path in reverse along the causal edges of the causal graph to generate a sequence of candidate root cause nodes.
[0032] The prompt word construction layer is based on the root cause node sequence to determine the root cause parameter set and impact description, and generates prompt words;
[0033] The root cause description text output layer inputs the root cause set and the impact description into a pre-fine-tuned large language model to obtain the root cause description text that leads to the abnormal events of the chemical product to be traced.
[0034] Optionally, each candidate parameter in the candidate parameter set includes a parameter name and a value range. The causal graph pre-constructed based on the prior knowledge base includes graph nodes and edges. The graph nodes are process, equipment, and raw material parameters, and the edges are directed causal relationships.
[0035] Based on the candidate parameter set and a causal graph pre-constructed based on a prior knowledge base, abnormal nodes are identified, including:
[0036] Find nodes in the cause-effect graph that have exactly the same parameter names as each candidate parameter to obtain an anomaly candidate subgraph;
[0037] For each candidate node in the candidate subgraph of anomalies, the absolute value of the Z-score of each candidate node in the value range is used as the anomaly intensity score to obtain the candidate subgraph carrying the anomaly intensity score.
[0038] Remove nodes in the candidate subgraph that cannot be reached by directed edges from the candidate subgraph carrying abnormal intensity scores, and obtain the alternative subgraph carrying abnormal intensity scores.
[0039] The node with the highest abnormality score in the spare subgraph carrying the abnormality score is marked as an abnormal node.
[0040] Optionally, based on the root cause node sequence, determine the root cause parameter set and impact description, and generate prompt words, including:
[0041] Determine the node ID of each root cause node in the root cause node sequence;
[0042] Based on the node ID of each root cause node, the corresponding parameter name and actual value of the current batch are read from the metadata table of the cause-effect graph to generate a root cause parameter set;
[0043] By using the root cause parameter name in the root cause parameter set, obtain the standard value range corresponding to each root cause parameter name;
[0044] Based on the actual value of the current batch and the standard value range, calculate the deviation of each root cause parameter name;
[0045] Based on the sign and magnitude of the deviation, a corresponding natural language fragment is selected from the preset impact description template library as the impact description for each root cause parameter name;
[0046] Concatenate each root cause parameter name with a description of its impact in a fixed format to form a prompt word string;
[0047] Use the prompt string as the prompt word.
[0048] Optionally, generate a causal graph based on a prior knowledge base by following these steps:
[0049] Load the prior knowledge base, read and parse the variable definition table in the prior knowledge base to obtain the variable set;
[0050] Initialize an undirected complete graph using the set of variables as nodes, and establish undirected edges between each pair of nodes in the undirected complete graph as the initial graph structure;
[0051] Read and parse the causal relationship table in the prior knowledge base;
[0052] Traverse any group of nodes in the initial graph structure and find the causal relationship of any group of nodes from the causal relationship table as a directed edge. Continue to execute the step of traversing any group of nodes in the initial graph structure until all nodes in the initial graph structure have been traversed, and generate a partial directed graph.
[0053] Detect whether a directed graph contains directed cycles;
[0054] The edge added last in the directed cycle is deleted to ensure that the node path has a start and end node, resulting in a causal graph constructed based on the prior knowledge base.
[0055] Optionally, a pre-tuned large language model can be generated by following these steps:
[0056] Triples were extracted from the enterprise's historical root cause analysis report to obtain the original corpus file. The triples include a set of historical root cause parameters, a description of historical impact, and a text describing historical root causes.
[0057] Preprocess the triples to obtain key-value pairs containing historical cue words and historical root cause description text;
[0058] Download the general large language model base that matches the task from the model repository and load it into the local video memory to obtain the large language model;
[0059] The fine-tuning framework is invoked, and key-value pairs are used to fine-tune the large language model to obtain a pre-fine-tuned large language model.
[0060] Secondly, embodiments of this application provide a root cause analysis device for abnormal events in chemical production, the device comprising:
[0061] The request receiving module is used to receive abnormal event root cause analysis requests, which carry the target batch QR code of the traceable chemical product containing the abnormal event.
[0062] The chemical batch data acquisition module is used to acquire multi-source chemical batch data related to the chemical products to be traced based on the target batch QR code and the pre-configured summary information filter. The pre-configured summary information filter is a query plugin based on a bit array index structure.
[0063] The data input module is used to input multi-source chemical batch data into the preset abnormal event root cause analysis component. The preset abnormal event root cause analysis component includes a preprocessing layer, an abnormal parameter identification layer, an association rule mining layer, an abnormal node determination layer, a root cause node search layer, a prompt word construction layer, and a root cause description text output layer.
[0064] The root cause description text output module is used to output the root cause description text of the abnormal event that caused the traceable chemical product, and send the root cause description text to the client for display.
[0065] The technical solutions provided in this application embodiment may include the following beneficial effects:
[0066] In this embodiment, on the one hand, the pre-configured summary information filter is a query plugin based on a bit array index structure. When a request arrives, the system only needs to locate the bit array index through hash calculation to instantly confirm the existence of the data and retrieve discrete data blocks. This allows for accurate retrieval of QR codes to multi-source batch data within seconds, accurately identifying data related to quality anomalies without missing key factors, and improving traceability efficiency. On the other hand, the pre-set anomaly root cause analysis component sequentially sends data to a preprocessing layer, anomaly parameter identification layer, association rule mining layer, anomaly node determination layer, root cause node search layer, prompt word construction layer, and root cause description text output layer. This ensures that the data is first cleaned and statistically quantified, then converged through Apriori rules and causal layer layers, and finally, a large language model generates natural language root cause description text. This achieves an automated closed loop from "raw data → anomaly node → root cause node → readable conclusion," enabling enterprises to obtain accurate and interpretable anomaly root cause reports in the shortest possible time, preventing misjudgments, and thus improving the accuracy of root cause analysis results.
[0067] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. Attached Figure Description
[0068] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0069] Figure 1 This is a schematic flowchart of a method for root cause analysis of abnormal events in chemical production, provided in an embodiment of this application.
[0070] Figure 2 This is a schematic diagram illustrating the interaction between a server and a client, provided in an embodiment of this application.
[0071] Figure 3 This is an architecture diagram of a preset abnormal event root cause analysis component provided in an embodiment of this application;
[0072] Figure 4 This is a simplified UI diagram of a cause-effect graph provided in an embodiment of this application;
[0073] Figure 5This is a schematic diagram of a UI interface for root cause analysis results provided in an embodiment of this application;
[0074] Figure 6 This is a UI diagram illustrating another root cause analysis result provided in an embodiment of this application;
[0075] Figure 7 This is a flowchart illustrating a method for fine-tuning a large language model according to an embodiment of this application.
[0076] Figure 8 This is a schematic diagram of the structure of an abnormal event root cause analysis device for chemical production provided in an embodiment of this application;
[0077] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0078] The following description and accompanying drawings fully illustrate specific embodiments of this application to enable those skilled in the art to practice them.
[0079] It should be understood that the described embodiments are merely some, not all, of the embodiments in this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.
[0080] In the following description, when referring to the accompanying drawings, the same numbers in different drawings denote the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0081] In the description of this application, it should be understood that the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances. Furthermore, in the description of this application, unless otherwise stated, "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship.
[0082] Currently, chemical companies mainly rely on traditional root cause analysis methods, such as the "5 Whys" and Fault Tree Analysis (FTA), for quality control and handling of quality anomalies. These methods attempt to find the root cause of quality anomalies by stepping through the causes of problems or constructing a logic tree of the failure.
[0083] The applicant of this application recognizes that the amount of data generated during the production of chemical batches is enormous and the data sources are diverse. Existing root cause analysis methods are unable to efficiently extract valuable information from massive amounts of data, cannot accurately identify data related to quality anomalies, and are prone to missing key factors, leading to misjudgments and thus reducing the accuracy of root cause analysis results.
[0084] To address the aforementioned issues, this application provides a method and apparatus for root cause analysis of abnormal events in chemical production, thereby resolving the problems existing in the related technologies. In this embodiment, on one hand, a pre-configured summary information filter is a query plugin based on a bit array index structure. When a request arrives, the system only needs to locate the bit array index through hash calculation to instantly confirm the existence of data and retrieve discrete data blocks. This allows for accurate retrieval of QR codes to multi-source batch data within seconds, accurately identifying data related to quality anomalies without missing key factors, while simultaneously improving traceability efficiency. On the other hand, by using a pre-set anomaly root cause analysis component, data is sequentially fed into a preprocessing layer, anomaly parameter identification layer, association rule mining layer, anomaly node determination layer, root cause node search layer, prompt word construction layer, and root cause description text output layer. This ensures that the data is first cleaned and statistically quantified, then converged through Apriori rules and causal layer layers, and finally, a large language model generates natural language root cause description text. This achieves an automated closed loop from "raw data → anomaly node → root cause node → readable conclusion," enabling enterprises to obtain accurate and interpretable anomaly root cause reports in the shortest possible time, preventing misjudgments, and thus improving the accuracy of root cause analysis results. The following is a detailed description using an exemplary embodiment.
[0085] The following will be combined with the appendix Figure 1 -Attached Figure 7 This application provides a detailed description of the root cause analysis method for abnormal events in chemical production, as provided in its embodiments. This method can be implemented using a computer program and can run on a von Neumann architecture-based root cause analysis device for abnormal events in chemical production. The computer program can be integrated into the application or run as a standalone tool application.
[0086] Please see Figure 1 This document provides a flowchart illustrating a method for root cause analysis of abnormal events in chemical production, applicable to the server side. (Example:) Figure 1 As shown, the method in this application embodiment includes the following steps:
[0087] S101, Receive an abnormal event root cause analysis request. The abnormal event root cause analysis request carries the target batch QR code of the chemical product to be traced where the abnormal event exists.
[0088] The Anomaly Root Cause Analysis Request is a client-initiated request used to analyze the root causes of anomalies occurring in chemical production. An anomaly is a deviation from normal standards in product quality or production processes during chemical production. The chemical product to be traced refers to the chemical product exhibiting the anomaly. The target batch QR code is a unique identifier used to identify a specific batch of chemical products.
[0089] In some embodiments of this application, for example Figure 2 As shown, a RESTful API interface is defined on server 110 to receive root cause analysis requests for exception events sent by client 120. Server 110 starts an HTTP server, listening on a predefined port and path, waiting for requests from client 120. Client 120 (such as a terminal device used by an operator) sends an exception event root cause analysis request to server 110 via an HTTP POST request. Server 110's HTTP server receives the request from client 120, parses the target batch QR code in the request body, and obtains the parsed target batch QR code string.
[0090] For example, on a production line, an operator receives a customer complaint that the purity of a batch of chemical products is lower than the standard value, indicating an anomaly. The operator records this anomaly in the system and generates a unique target batch QR code for that batch of chemical products. The QR code contains key information such as the batch number, production date, and production line number. The operator scans the target batch QR code using a handheld terminal device (such as an industrial tablet), triggering the system to initiate an anomaly root cause analysis request, which includes the target batch QR code as a key parameter. Upon receiving the request, the server-side root cause analysis system parses the target batch QR code and extracts the batch information. The batch information is: Target batch QR code: QR123456789; Batch number: Batch12345; Production date: 2024-06-15; Production line number: Line01. Upon receiving the request, the server parses the QR code and extracts the target batch QR code string.
[0091] S102, based on the target batch QR code and the pre-configured summary information filter, obtain multi-source chemical batch data related to the chemical products to be traced. The pre-configured summary information filter is a query plugin based on a bit array index structure.
[0092] The pre-configured summary information filter is a query plugin based on a bit array index structure, used to quickly locate multi-source chemical batch data related to the target batch. Through information digest algorithms and hash functions, the chemical batch data is mapped into a bit array, enabling rapid data existence checks and data block location. The bit array index structure is a compact data structure that achieves efficient query operations through bit arrays and hash functions. The multi-source chemical batch data includes various data related to the target batch, including raw material inspection records, production process parameters, equipment status monitoring data, quality inspection reports, etc., providing comprehensive production background information for subsequent anomaly analysis.
[0093] In some embodiments of this application, the specific process of obtaining multi-source chemical batch data related to the traceable chemical product based on the target batch QR code and a pre-configured summary information filter includes: obtaining the target summary information corresponding to the target batch QR code from the pre-established mapping relationship between batch QR codes and summary information; calculating the target summary sequence value corresponding to the traceable chemical product based on the target summary information and in combination with an information digest algorithm; inputting the target summary sequence value into a hash function to calculate multiple bit array indices of the target summary sequence value in the pre-configured summary information filter; traversing to obtain the discrete chemical batch data associated with the index position of each bit array indices to obtain the multi-source chemical batch data related to the traceable chemical product.
[0094] In one possible implementation, the QR code is first parsed to extract the target batch QR code string. Then, it is compared with the original batch QR code string existing in a pre-established mapping relationship between batch QR codes and digest information to obtain the target digest information corresponding to the target batch QR code string. This target digest information is then used as the target digest information for the target batch QR code. A message digest algorithm (such as SHA-256) is used to process the target digest information to generate a target digest sequence value. The target digest sequence value is then hashed using a hash function to obtain multiple bit array indices. Based on these bit array indices, the associated discrete chemical batch data is retrieved from the digest information filter.
[0095] For example, if the target batch QR code string is QR123456789, the server queries a pre-stored mapping table to find the corresponding summary information for QR123456789, such as SummaryInfo123. The SummaryInfo123 is processed using the SHA-256 algorithm to obtain the target summary sequence value, such as abc123def456. abc123def456 is then hashed using a hash function to obtain multiple bit array indices, such as [1, 5, 10]. Based on the bit array indices [1, 5, 10], the associated discrete chemical batch data, such as raw material inspection records and production process parameters, is retrieved from the summary information filter.
[0096] Specifically, the following steps are followed to generate a pre-established mapping relationship between batch QR codes and summary information: in response to a production end instruction for the currently produced chemical product, collect multiple types of chemical batch data for the current chemical product; determine the original summary information and original batch QR codes for the multiple types of chemical batch data; establish a mapping relationship between the original summary information and the original batch QR codes to obtain the pre-established mapping relationship between batch QR codes and summary information.
[0097] In one possible implementation, the system listens for production end commands triggered by the Production Management System (MES) or operators. The system collects various types of data on the current chemical products from multiple data sources (such as sensors, smart cameras, and chemical instruments), including raw material inspection records, production process parameters, equipment status monitoring data, and quality inspection reports. The system extracts key information from the collected data, generates original summary information, and creates a unique batch QR code for the current batch. The system establishes a mapping relationship between the original summary information and the original batch QR code and stores this mapping relationship in a database or mapping table.
[0098] For example, suppose a chemical company is producing a batch of chemical products, batch number Batch12345. During the production process, the system collects the following data in real time through sensors and smart instruments: Raw material inspection record: Raw material purity is 99.5%, meeting the standard. Production process parameters: Reactor temperature is 150°C, pressure is 10 bar. Equipment status monitoring data: Equipment is operating normally, with no fault alarms. Quality inspection report: Product quality indicators meet the standard. When production is completed, the operator sends a production end command through the MES system, triggering the data collection process. The system collects the above-mentioned multiple types of data from sensors and smart instruments and stores these data in a temporary data buffer. The system extracts key information from the collected data, generates original summary information, such as SummaryInfo123, and generates a unique batch QR code QR123456789 for this batch. The system establishes a mapping relationship between SummaryInfo123 and QR123456789 and stores this mapping relationship in the database. In this way, when the batch data needs to be queried later, simply scan the QR code QR123456789 to quickly locate the corresponding summary information SummaryInfo123, and then obtain the complete multi-type chemical batch data. The mapping relationship in one scenario is shown in Table 1.
[0099] Table 1
[0100]
[0101] Specifically, the process of generating the pre-configured summary information filter includes: using an information digest algorithm and the original summary information to calculate the original summary sequence value of each type of chemical batch data; inputting the original summary sequence value of each type of chemical batch data into a hash function to calculate the bit array index of each type of chemical batch data; establishing each index object of the array using the bit array index of each type of chemical batch data; and associating each type of chemical batch data with its corresponding index object to obtain the pre-configured summary information filter. A pre-configured summary information filter obtained in one scenario is shown in Table 2.
[0102] Table 2
[0103]
[0104] S103, input multi-source chemical batch data into the preset abnormal event root cause analysis component.
[0105] For example Figure 3 As shown, the preset abnormal event root cause analysis component includes a preprocessing layer, an abnormal parameter identification layer, an association rule mining layer, an abnormal node determination layer, a root cause node search layer, a prompt word construction layer, and a root cause description text output layer.
[0106] In some embodiments of this application, the specific process of inputting multi-source chemical batch data into the preset abnormal event root cause analysis component is as follows: the preprocessing layer cleans the multi-source chemical batch data and calculates statistical parameters within a sliding window for the attribute values of each chemical identifier after data cleaning, obtaining a statistical parameter matrix; the abnormal parameter identification layer calculates the Z-score for each column of the statistical parameter matrix and marks the abnormal statistical parameters whose Z-score is greater than a preset abnormal threshold; the association rule mining layer uses the Apriori algorithm to mine abnormal statistical parameters whose support is greater than a preset threshold. Association rules with support and confidence levels greater than a pre-set confidence level are used to obtain a candidate parameter set. The anomaly node determination layer determines anomaly nodes based on the candidate parameter set and a causal graph pre-constructed based on a prior knowledge base. The root cause node search layer starts from the anomaly nodes and searches for the shortest path backward along the causal edges of the causal graph to generate a sequence of candidate root cause nodes. The prompt word construction layer determines the root cause parameter set and impact description based on the root cause node sequence and generates prompt words. The root cause description text output layer inputs the root cause set and impact description into a pre-fine-tuned large language model to obtain the root cause description text that leads to the abnormal event of the traceable chemical product.
[0107] In this embodiment, by employing an information digest algorithm and hash function to construct a digest information filter, and combining it with a multi-layered anomaly root cause analysis component, it is possible to quickly locate multi-source data related to abnormal batches, accurately identify abnormal parameters, mine association rules, determine abnormal nodes, and generate detailed root cause description text. This process significantly improves the diagnostic accuracy of abnormal events and enhances the quality control and risk management capabilities of chemical production.
[0108] Each candidate parameter in the candidate parameter set includes a parameter name and a value range. The causal graph pre-constructed based on the prior knowledge base includes graph nodes and edges. The graph nodes are process, equipment, and raw material parameters, and the edges are directed causal relationships.
[0109] In some embodiments of this application, the specific process of determining anomalous nodes based on a set of candidate parameters and a causal graph pre-constructed based on a prior knowledge base includes: searching for nodes in the causal graph that are completely consistent with the parameter names included in each candidate parameter to obtain an anomalous candidate subgraph; for each anomalous candidate node in the anomalous candidate subgraph, using the absolute value of the Z-score of each anomalous candidate node within the value range as an anomalous strength score to obtain a candidate subgraph carrying an anomalous strength score; removing nodes in the candidate subgraph carrying an anomalous strength score that cannot be reached by directed edges to obtain a spare subgraph carrying an anomalous strength score; and marking the node with the highest anomalous strength score in the spare subgraph carrying an anomalous strength score as an anomalous node.
[0110] Specifically, the process of determining the root cause parameter set and impact description based on the root cause node sequence and generating prompt words includes: determining the node ID of each root cause node in the root cause node sequence; reading the corresponding parameter name and the actual value of the current batch from the metadata table corresponding to the causal graph according to the node ID of each root cause node to generate a root cause parameter set; obtaining the standard value range corresponding to each root cause parameter name through each root cause parameter name in the root cause parameter set; calculating the deviation of each root cause parameter name according to the actual value of the current batch and the standard value range; selecting the corresponding natural language fragment from the preset impact description template library according to the sign and magnitude of the deviation as the impact description of each root cause parameter name; concatenating each root cause parameter name and the impact description of each root cause parameter name into a prompt word string according to a fixed format; and using the prompt word string as the prompt word.
[0111] For example, the batch data for multi-source chemical products includes the following raw material inspection records: Purity: 99.5% (normal range: 99.0% - 100.0%), Impurity content: 0.5% (normal range: 0.0% - 0.3%). Production process parameters include: Reactor temperature: 150°C (normal range: 145°C - 155°C), Reactor pressure: 10 bar (normal range: 8 bar - 12 bar). The mean and standard deviation within the sliding window are calculated as follows: Purity mean: 99.5%, standard deviation: 0.1%; Impurity content mean: 0.5%, standard deviation: 0.05%; Temperature mean: 150°C, standard deviation: 2°C; Pressure mean: 10 bar, standard deviation: 1 bar. Calculate the Z-score: Purity Z-score: (99.5% - 99.5%) / 0.1% = 0; Impurity content Z-score: (0.5% - 0.15%) / 0.05% = 7; Temperature Z-score: (150°C - 150°C) / 2°C = 0; Pressure Z-score: (10 bar - 10 bar) / 1 bar = 0; Mark the statistical parameters for anomalies: The Z-score for impurity content is 7, which is greater than the preset anomaly threshold of 3, and is marked as an anomaly. Assuming the discovered association rule is: anomaly in impurity content corresponds to product quality non-compliance, support: 0.8, confidence: 0.9, the candidate parameter set is obtained: {Impurity content}. Find the node corresponding to impurity content in the causal graph. Calculate the anomaly strength score: The Z-score for impurity content is 7. Determine the anomaly node: the impurity content node. Starting from the impurity content node, a reverse causal graph is searched to find the root cause sequence: raw material supplier → impurity content → product quality failure. The root cause parameter set is {raw material supplier}, and the impact description is: the raw material supplier provides raw materials with excessively high impurity content, leading to product quality failure. A prompt word is generated: the raw material supplier provides raw materials with excessively high impurity content, leading to product quality failure. This prompt word is input into a pre-tuned large language model to generate a detailed root cause description text. Root cause analysis results: the fundamental reason for this product quality failure is the excessively high impurity content of the raw materials provided by the raw material supplier. Specifically, the impurity content reaches 0.5%, far exceeding the normal range of 0.0% - 0.3%. It is recommended to communicate with the raw material supplier and request them to improve their raw material quality control process to ensure that the impurity content of subsequent raw materials meets the standards.
[0112] In some embodiments of this application, the specific process of generating a causal graph based on a prior knowledge base includes: loading the prior knowledge base, reading and parsing the variable definition table in the prior knowledge base to obtain a variable set; initializing an undirected complete graph with the variable set as nodes, and establishing undirected edges between each pair of nodes in the undirected complete graph as the initial graph structure; reading and parsing the causal relationship table in the prior knowledge base; traversing any group of nodes in the initial graph structure, and finding the causal relationship of any group of nodes in the causal relationship table as a directed edge, continuing to execute the step of traversing any group of nodes in the initial graph structure until all nodes in the initial graph structure have been traversed, generating a partially directed graph; detecting whether there is a directed cycle in the partially directed graph; deleting the edge added last in the directed cycle to ensure that the node path has a start and end node, obtaining a causal graph based on the prior knowledge base, such as... Figure 4 As shown.
[0113] S104, output the root cause description text that caused the abnormal event in the traceable chemical product, and send the root cause description text to the client for display.
[0114] Among them, the root cause description text is a natural language text generated after analysis, which describes in detail the root cause of abnormal events in chemical products.
[0115] In one possible implementation, the root cause description text output layer generates detailed root cause description text from a pre-fine-tuned large language model containing a set of root causes and influence descriptions. This root cause description text is then sent to the client via a network communication protocol (such as HTTP / HTTPS). The root cause description text received by the client is, for example... Figure 5 As shown. Users can download the result to the client's desktop by clicking the download PDF button, for example... Figure 6 As shown.
[0116] For example, suppose a chemical company produces a batch of chemical products, batch number Batch12345. During the production process, an anomaly is found in the quality indicators of this batch. After multi-layer processing by the pre-set root cause analysis component, the root cause of the anomaly is ultimately determined to be the excessively high impurity content of the raw materials supplied by the raw material supplier. The system sends the root cause description text to the client via the HTTP protocol. After receiving the text, the client displays it to the operator. The operator can then view the detailed root cause description text on the client, enabling them to quickly locate and resolve the anomaly.
[0117] In this embodiment, on the one hand, the pre-configured summary information filter is a query plugin based on a bit array index structure. When a request arrives, the system only needs to locate the bit array index through hash calculation to instantly confirm the existence of the data and retrieve discrete data blocks. This allows for accurate retrieval of QR codes to multi-source batch data within seconds, accurately identifying data related to quality anomalies without missing key factors, and improving traceability efficiency. On the other hand, the pre-set anomaly root cause analysis component sequentially sends data to a preprocessing layer, anomaly parameter identification layer, association rule mining layer, anomaly node determination layer, root cause node search layer, prompt word construction layer, and root cause description text output layer. This ensures that the data is first cleaned and statistically quantified, then converged through Apriori rules and causal layer layers, and finally, a large language model generates natural language root cause description text. This achieves an automated closed loop from "raw data → anomaly node → root cause node → readable conclusion," enabling enterprises to obtain accurate and interpretable anomaly root cause reports in the shortest possible time, preventing misjudgments, and thus improving the accuracy of root cause analysis results.
[0118] Please see Figure 7 This is a flowchart illustrating a method for fine-tuning a large language model, as provided in this application embodiment. Figure 7 As shown, the method in this application embodiment may include the following steps:
[0119] S201. Extract triples from the enterprise's historical root cause analysis report to obtain the original corpus file. The triples include the set of historical root cause parameters, the description of historical impact, and the text describing historical root causes.
[0120] S202, preprocess the triples to obtain key-value pairs containing historical prompt words and historical root cause description text;
[0121] S203: Download the general large language model base that matches the task from the model repository and load it into the local video memory to obtain the large language model;
[0122] S204 invokes the fine-tuning framework, combines key-value pairs to fine-tune the large language model, and obtains a pre-fine-tuned large language model.
[0123] In this embodiment, on the one hand, the pre-configured summary information filter is a query plugin based on a bit array index structure. When a request arrives, the system only needs to locate the bit array index through hash calculation to instantly confirm the existence of the data and retrieve discrete data blocks. This allows for accurate retrieval of QR codes to multi-source batch data within seconds, accurately identifying data related to quality anomalies without missing key factors, and improving traceability efficiency. On the other hand, the pre-set anomaly root cause analysis component sequentially sends data to a preprocessing layer, anomaly parameter identification layer, association rule mining layer, anomaly node determination layer, root cause node search layer, prompt word construction layer, and root cause description text output layer. This ensures that the data is first cleaned and statistically quantified, then converged through Apriori rules and causal layer layers, and finally, a large language model generates natural language root cause description text. This achieves an automated closed loop from "raw data → anomaly node → root cause node → readable conclusion," enabling enterprises to obtain accurate and interpretable anomaly root cause reports in the shortest possible time, preventing misjudgments, and thus improving the accuracy of root cause analysis results.
[0124] The following are embodiments of the apparatus described in this application, which can be used to execute the embodiments of the method described in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method described in this application.
[0125] Please see Figure 8 This illustration shows a schematic diagram of a root cause analysis device for anomalies in chemical production, provided in an exemplary embodiment of this application. This root cause analysis device for anomalies in chemical production can be implemented as all or part of an electronic device through software, hardware, or a combination of both. The device 1 includes a request receiving module 10, a chemical batch data acquisition module 20, a data input module 30, and a root cause description text output module 40.
[0126] Request receiving module 10 is used to receive abnormal event root cause analysis requests, which carry the target batch QR code of the traceable chemical product with an abnormal event.
[0127] The chemical batch data acquisition module 20 is used to acquire multi-source chemical batch data related to the chemical products to be traced based on the target batch QR code and the pre-configured summary information filter. The pre-configured summary information filter is a query plugin based on a bit array index structure.
[0128] Data input module 30 is used to input multi-source chemical batch data into the preset abnormal event root cause analysis component. The preset abnormal event root cause analysis component includes a preprocessing layer, an abnormal parameter identification layer, an association rule mining layer, an abnormal node determination layer, a root cause node search layer, a prompt word construction layer, and a root cause description text output layer.
[0129] The root cause description text output module 40 is used to output the root cause description text of the abnormal event that caused the traceable chemical product, and send the root cause description text to the client for display.
[0130] It should be noted that the above embodiments of the device for analyzing the root causes of abnormal events in chemical production, when executing the method for analyzing the root causes of abnormal events in chemical production, are only illustrative examples of the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the equipment can be divided into different functional modules to complete all or part of the functions described above. Furthermore, the device for analyzing the root causes of abnormal events in chemical production and the embodiments of the method for analyzing the root causes of abnormal events in chemical production provided in the above embodiments belong to the same concept, and the implementation process is detailed in the method embodiments, which will not be repeated here.
[0131] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0132] In this embodiment, on the one hand, the pre-configured summary information filter is a query plugin based on a bit array index structure. When a request arrives, the system only needs to locate the bit array index through hash calculation to instantly confirm the existence of the data and retrieve discrete data blocks. This allows for accurate retrieval of QR codes to multi-source batch data within seconds, accurately identifying data related to quality anomalies without missing key factors, and improving traceability efficiency. On the other hand, the pre-set anomaly root cause analysis component sequentially sends data to a preprocessing layer, anomaly parameter identification layer, association rule mining layer, anomaly node determination layer, root cause node search layer, prompt word construction layer, and root cause description text output layer. This ensures that the data is first cleaned and statistically quantified, then converged through Apriori rules and causal layer layers, and finally, a large language model generates natural language root cause description text. This achieves an automated closed loop from "raw data → anomaly node → root cause node → readable conclusion," enabling enterprises to obtain accurate and interpretable anomaly root cause reports in the shortest possible time, preventing misjudgments, and thus improving the accuracy of root cause analysis results.
[0133] This application also provides a computer-readable medium having program instructions stored thereon, which, when executed by a processor, implement the abnormal event root cause analysis method for chemical production provided in the above-described method embodiments.
[0134] This application also provides a computer program product containing instructions that, when run on a computer, cause the computer to execute the above-described method embodiments for root cause analysis of abnormal events in chemical production.
[0135] Please see Figure 9This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 9 As shown, the electronic device 1000 may include: at least one processor 1001, at least one network interface 1004, a user interface 1003, a memory 1005, and at least one communication bus 1002.
[0136] The communication bus 1002 is used to realize the connection and communication between these components.
[0137] The user interface 1003 may include a display screen and a camera. Optionally, the user interface 1003 may also include a standard wired interface and a wireless interface.
[0138] The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).
[0139] The processor 1001 may include one or more processing cores. The processor 1001 connects to various parts within the electronic device 1000 using various interfaces and lines. It executes various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 1005, and by calling data stored in the memory 1005. Optionally, the processor 1001 may be implemented using at least one hardware form selected from Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 1001 may integrate one or more of the following: a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), and a modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content to be displayed on the screen; and the modem handles wireless communication. It is understood that the modem may also be implemented as a separate chip, without being integrated into the processor 1001.
[0140] The memory 1005 may include random access memory (RAM) or read-only memory. Optionally, the memory 1005 may include a non-transitory computer-readable storage medium. The memory 1005 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 1005 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 1005 may also be at least one storage system located remotely from the aforementioned processor 1001. Figure 9 As shown, the memory 1005, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and an application for root cause analysis of abnormal events in chemical production.
[0141] exist Figure 9 In the illustrated electronic device 1000, the user interface 1003 is mainly used to provide an input interface for the user and to acquire user input data; while the processor 1001 can be used to call the root cause analysis application for abnormal events in chemical production stored in the memory 1005, and specifically perform the following operations:
[0142] Receive an abnormal event root cause analysis request, which carries the target batch QR code of the traceable chemical product containing the abnormal event.
[0143] Based on the target batch QR code and the pre-configured summary information filter, obtain multi-source chemical batch data related to the chemical products to be traced. The pre-configured summary information filter is a query plugin based on a bit array index structure.
[0144] Input multi-source chemical batch data into the preset abnormal event root cause analysis component. The preset abnormal event root cause analysis component includes a preprocessing layer, an abnormal parameter identification layer, an association rule mining layer, an abnormal node determination layer, a root cause node search layer, a prompt word construction layer, and a root cause description text output layer.
[0145] Output the root cause description text that caused the abnormal event in the traceable chemical product, and send the root cause description text to the client for display.
[0146] In one embodiment, when the processor 1001 executes the operation of obtaining multi-source chemical batch data related to the chemical product to be traced based on the target batch QR code and a pre-configured summary information filter, it specifically performs the following operations:
[0147] Obtain the target summary information corresponding to the target batch QR code from the pre-established mapping relationship between batch QR codes and summary information;
[0148] Based on the target summary information, and combined with the information summarization algorithm, the target summary sequence value corresponding to the chemical product to be traced is calculated;
[0149] The target digest sequence value is input into a hash function to calculate multiple bit array indices of the target digest sequence value in a pre-configured digest information filter;
[0150] Iterate through the array to obtain the discrete chemical batch data associated with the index position of each bit array, and obtain multi-source chemical batch data related to the chemical product to be traced.
[0151] In one embodiment, when the processor 1001 generates a pre-established mapping relationship between batch QR codes and summary information, it specifically performs the following operations:
[0152] In response to the production completion instruction for the current chemical product being produced, collect multi-type chemical batch data for the current chemical product;
[0153] Determine the original summary information and original batch QR code for multiple types of chemical batch data;
[0154] Establish a mapping relationship between the original summary information and the original batch QR code to obtain the pre-established mapping relationship between the batch QR code and the summary information.
[0155] In one embodiment, the processor 1001 also performs the following operations:
[0156] Using information summarization algorithms and original summary information, the original summary sequence value of each type of chemical batch data is calculated;
[0157] The original summary sequence value of each type of chemical batch data is input into a hash function to calculate the bit array index of each type of chemical batch data;
[0158] Create each index object of the array using the bit array subscript of each type of chemical batch data;
[0159] Each type of chemical batch data is associated with its corresponding index object to obtain a pre-configured summary information filter.
[0160] In one embodiment, when the processor 1001 inputs multi-source chemical batch data into a preset abnormal event root cause analysis component, it specifically performs the following operations:
[0161] The preprocessing layer cleans the multi-source chemical batch data and calculates the statistical parameters within a sliding window for the attribute values of each chemical identifier after data cleaning, thus obtaining a statistical parameter matrix.
[0162] The abnormal parameter identification layer calculates the Z-score for each column of the statistical parameter matrix and marks the abnormal statistical parameters whose Z-score is greater than the preset abnormal threshold.
[0163] The association rule mining layer uses the Apriori algorithm to mine association rules with support greater than the preset support and confidence greater than the preset confidence in the anomaly statistical parameters, thus obtaining a candidate parameter set.
[0164] The abnormal node determination layer determines abnormal nodes based on the candidate parameter set and the causal graph pre-constructed based on the prior knowledge base;
[0165] The root cause search layer starts from the anomalous node and searches for the shortest path in reverse along the causal edges of the causal graph to generate a sequence of candidate root cause nodes.
[0166] The prompt word construction layer is based on the root cause node sequence to determine the root cause parameter set and impact description, and generates prompt words;
[0167] The root cause description text output layer inputs the root cause set and the impact description into a pre-fine-tuned large language model to obtain the root cause description text that leads to the abnormal events of the chemical product to be traced.
[0168] In one embodiment, when the processor 1001 determines abnormal nodes based on a causal graph constructed in advance based on a set of candidate parameters and a prior knowledge base, it specifically performs the following operations:
[0169] Find nodes in the cause-effect graph that have exactly the same parameter names as each candidate parameter to obtain an anomaly candidate subgraph;
[0170] For each candidate node in the candidate subgraph of anomalies, the absolute value of the Z-score of each candidate node in the value range is used as the anomaly intensity score to obtain the candidate subgraph carrying the anomaly intensity score.
[0171] Remove nodes in the candidate subgraph that cannot be reached by directed edges from the candidate subgraph carrying abnormal intensity scores, and obtain the alternative subgraph carrying abnormal intensity scores.
[0172] The node with the highest abnormality score in the spare subgraph carrying the abnormality score is marked as an abnormal node.
[0173] In one embodiment, when the processor 1001 executes the process of determining the root cause parameter set and impact description based on the root cause node sequence and generating prompt words, it specifically performs the following operations:
[0174] Determine the node ID of each root cause node in the root cause node sequence;
[0175] Based on the node ID of each root cause node, the corresponding parameter name and actual value of the current batch are read from the metadata table of the cause-effect graph to generate a root cause parameter set;
[0176] By using the root cause parameter name in the root cause parameter set, obtain the standard value range corresponding to each root cause parameter name;
[0177] Based on the actual value of the current batch and the standard value range, calculate the deviation of each root cause parameter name;
[0178] Based on the sign and magnitude of the deviation, a corresponding natural language fragment is selected from the preset impact description template library as the impact description for each root cause parameter name;
[0179] Concatenate each root cause parameter name with a description of its impact in a fixed format to form a prompt word string;
[0180] Use the prompt string as the prompt word.
[0181] In one embodiment, when the processor 1001 generates a causal graph based on a prior knowledge base, it specifically performs the following operations:
[0182] Load the prior knowledge base, read and parse the variable definition table in the prior knowledge base to obtain the variable set;
[0183] Initialize an undirected complete graph using the set of variables as nodes, and establish undirected edges between each pair of nodes in the undirected complete graph as the initial graph structure;
[0184] Read and parse the causal relationship table in the prior knowledge base;
[0185] Traverse any group of nodes in the initial graph structure and find the causal relationship of any group of nodes from the causal relationship table as a directed edge. Continue to execute the step of traversing any group of nodes in the initial graph structure until all nodes in the initial graph structure have been traversed, and generate a partial directed graph.
[0186] Detect whether a directed graph contains directed cycles;
[0187] The edge added last in the directed cycle is deleted to ensure that the node path has a start and end node, resulting in a causal graph constructed based on the prior knowledge base.
[0188] In one embodiment, the processor 1001 also performs the following operations:
[0189] Triples were extracted from the enterprise's historical root cause analysis report to obtain the original corpus file. The triples include a set of historical root cause parameters, a description of historical impact, and a text describing historical root causes.
[0190] Preprocess the triples to obtain key-value pairs containing historical cue words and historical root cause description text;
[0191] Download the general large language model base that matches the task from the model repository and load it into the local video memory to obtain the large language model;
[0192] The fine-tuning framework is invoked, and key-value pairs are used to fine-tune the large language model to obtain a pre-fine-tuned large language model.
[0193] In this embodiment, on the one hand, the pre-configured summary information filter is a query plugin based on a bit array index structure. When a request arrives, the system only needs to locate the bit array index through hash calculation to instantly confirm the existence of the data and retrieve discrete data blocks. This allows for accurate retrieval of QR codes to multi-source batch data within seconds, accurately identifying data related to quality anomalies without missing key factors, and improving traceability efficiency. On the other hand, the pre-set anomaly root cause analysis component sequentially sends data to a preprocessing layer, anomaly parameter identification layer, association rule mining layer, anomaly node determination layer, root cause node search layer, prompt word construction layer, and root cause description text output layer. This ensures that the data is first cleaned and statistically quantified, then converged through Apriori rules and causal layer layers, and finally, a large language model generates natural language root cause description text. This achieves an automated closed loop from "raw data → anomaly node → root cause node → readable conclusion," enabling enterprises to obtain accurate and interpretable anomaly root cause reports in the shortest possible time, preventing misjudgments, and thus improving the accuracy of root cause analysis results.
[0194] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program for root cause analysis of abnormal events in chemical production can be stored in a computer-readable storage medium. When executed, the program can include the processes of the embodiments of the above methods. The storage medium for the program for root cause analysis of abnormal events in chemical production can be a magnetic disk, optical disk, read-only memory, or random access memory, etc.
[0195] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application shall still fall within the scope of this application.
Claims
1. A method for root cause analysis of abnormal events in chemical production, characterized in that, Applied to the server side, the method includes: Receive an abnormal event root cause analysis request, the abnormal event root cause analysis request carrying the target batch QR code of the chemical product to be traced where the abnormal event exists; Based on the target batch QR code and the pre-configured summary information filter, multi-source chemical batch data related to the chemical products to be traced are obtained. The pre-configured summary information filter is a query plugin based on a bit array index structure. The multi-source chemical batch data is input into a preset anomaly root cause analysis component, which includes a preprocessing layer, an anomaly parameter identification layer, an association rule mining layer, an anomaly node determination layer, a root cause node search layer, a prompt word construction layer, and a root cause description text output layer. The preprocessing layer cleans the multi-source chemical batch data and calculates statistical parameters for the attribute values of each chemical identifier within a sliding window, obtaining a statistical parameter matrix. The anomaly parameter identification layer calculates the Z-score for each column of the statistical parameter matrix and marks the abnormal statistical parameters whose Z-scores are greater than a preset anomaly threshold. The association rule mining layer uses Aprilo... The RI algorithm mines association rules with support greater than a preset support and confidence greater than a preset confidence from the anomaly statistical parameters to obtain a candidate parameter set. The anomaly node determination layer determines anomaly nodes based on the candidate parameter set and a causal graph pre-constructed based on a prior knowledge base. The root cause node search layer starts from the anomaly nodes and searches for the shortest path backward along the causal edges of the causal graph to generate a candidate root cause node sequence. The prompt word construction layer determines the root cause parameter set and impact description based on the root cause node sequence and generates prompt words. The root cause description text output layer inputs the prompt words into a pre-fine-tuned large language model to obtain the root cause description text that caused the abnormal event of the traceable chemical product. Output the root cause description text that caused the abnormal event in the traceable chemical product, and send the root cause description text to the client for display.
2. The method according to claim 1, characterized in that, Based on the target batch QR code and the pre-configured summary information filter, obtain multi-source chemical batch data related to the chemical product to be traced, including: Obtain the target summary information corresponding to the target batch QR code from the pre-established mapping relationship between batch QR codes and summary information; Based on the target summary information, and combined with the information summarization algorithm, the target summary sequence value corresponding to the chemical product to be traced is calculated; The target digest sequence value is input into a hash function to calculate multiple bit array indices of the target digest sequence value in a pre-configured digest information filter; Iterate through the array to obtain the discrete chemical batch data associated with the index position of each bit array, and obtain multi-source chemical batch data related to the chemical product to be traced.
3. The method according to claim 2, characterized in that, Generate a pre-established mapping relationship between batch QR codes and summary information by following these steps: In response to a production completion instruction for the currently produced chemical product, collect multiple types of chemical batch data for the current chemical product. Determine the original summary information and original batch QR code of the various types of chemical batch data; Establish a mapping relationship between the original summary information and the original batch QR code to obtain a pre-established mapping relationship between batch QR codes and summary information.
4. The method according to claim 3, characterized in that The method further includes: Using an information digest algorithm and the original digest information, the original digest sequence value of each type of chemical batch data is calculated; The original summary sequence value of each type of chemical batch data is input into a hash function to calculate the bit array index of each type of chemical batch data; Create each index object of the array using the bit array subscript of each type of chemical batch data; Each type of chemical batch data is associated with its corresponding index object to obtain a pre-configured summary information filter.
5. The method according to claim 1, wherein Each candidate parameter in the candidate parameter set includes a parameter name and a value range. The causal graph pre-constructed based on the prior knowledge base includes graph nodes and edges. The graph nodes are process, equipment, and raw material parameters, and the edges are directed causal relationships. The step of determining anomalous nodes based on the candidate parameter set and a causal graph pre-constructed based on a prior knowledge base includes: Find nodes in the causal graph that have exactly the same parameter names as each candidate parameter to obtain an abnormal candidate subgraph; For each anomaly candidate node in the anomaly candidate subgraph, the absolute value of the Z-score of each anomaly candidate node within the value range is used as the anomaly intensity score to obtain a candidate subgraph carrying the anomaly intensity score. Remove nodes in the candidate subgraph that cannot be reached by directed edges from the candidate subgraph carrying abnormal intensity scores, and obtain the alternative subgraph carrying abnormal intensity scores. The node with the highest abnormality score in the spare subgraph carrying the abnormality score is marked as an abnormal node.
6. The method according to claim 1, characterized in that, The process of determining the root cause parameter set and impact description based on the root cause node sequence, and generating prompt words, includes: Determine the node ID of each root cause node in the root cause node sequence; Based on the node ID of each root cause node, the corresponding parameter name and the actual value of the current batch are read from the metadata table corresponding to the cause-effect graph to generate a root cause parameter set; By using the root cause parameter name in the root cause parameter set, the standard value range corresponding to each root cause parameter name is obtained; Based on the actual value of the current batch and the standard value range, calculate the deviation of each root cause parameter name; Based on the sign and magnitude of the deviation, a corresponding natural language fragment is selected from a preset influence description template library as the influence description of each root cause parameter name; Each root cause parameter name and its impact description are concatenated into a prompt word string in a fixed format. Use the aforementioned prompt string as the prompt word.
7. The method according to claim 1, characterized in that, Generate a causal graph based on a prior knowledge base by following these steps: Load the prior knowledge base, read and parse the variable definition table in the prior knowledge base to obtain the variable set; Using the set of variables as nodes, initialize an undirected complete graph, and establish undirected edges between each pair of nodes in the undirected complete graph as the initial graph structure; Read and parse the causal relationship table in the prior knowledge base; Traverse any group of nodes in the initial graph structure, and find the causal relationship of any group of nodes from the causal relationship table as a directed edge. Continue to execute the step of traversing any group of nodes in the initial graph structure until all nodes in the initial graph structure have been traversed, and generate a partial directed graph. Detect whether the partial directed graph contains directed cycles; The edge added last in the directed cycle is deleted to ensure that the node path has a start and end node, thus obtaining a causal graph constructed based on a prior knowledge base.
8. The method according to claim 1, characterized in that Generate a pre-tuned large language model by following these steps: Triples are extracted from the enterprise's historical root cause analysis report to obtain the original corpus file. The triples include a set of historical root cause parameters, a description of historical impact, and a text describing historical root causes. The triples are preprocessed to obtain key-value pairs containing historical prompt words and historical root cause description text; Download the general large language model base that matches the task from the model repository and load it into the local video memory to obtain the large language model; The fine-tuning framework is invoked, and the large language model is fine-tuned by combining the key-value pairs to obtain a pre-fine-tuned large language model.
9. A root cause analysis device for abnormal events in chemical production, characterized in that, The device includes: The request receiving module is used to receive an abnormal event root cause analysis request, which carries the target batch QR code of the traceable chemical product containing the abnormal event. The chemical batch data acquisition module is used to acquire multi-source chemical batch data related to the chemical products to be traced based on the target batch QR code and the pre-configured summary information filter. The pre-configured summary information filter is a query plugin based on a bit array index structure. The data input module is used to input the multi-source chemical batch data into a preset abnormal event root cause analysis component. The preset abnormal event root cause analysis component includes a preprocessing layer, an abnormal parameter identification layer, an association rule mining layer, an abnormal node determination layer, a root cause node search layer, a prompt word construction layer, and a root cause description text output layer. The preprocessing layer cleans the multi-source chemical batch data and calculates statistical parameters within a sliding window for the attribute values of each chemical identifier after data cleaning, obtaining a statistical parameter matrix. The abnormal parameter identification layer calculates the Z-score for each column of the statistical parameter matrix and marks abnormal statistical parameters whose Z-score is greater than a preset abnormal threshold. The association rule mining layer uses... The Apriori algorithm mines association rules with support greater than a preset support and confidence greater than a preset confidence from the anomaly statistical parameters to obtain a candidate parameter set. The anomaly node determination layer determines anomaly nodes based on the candidate parameter set and a causal graph pre-constructed based on a prior knowledge base. The root cause node search layer starts from the anomaly nodes and searches for the shortest path backward along the causal edges of the causal graph to generate a candidate root cause node sequence. The prompt word construction layer determines the root cause parameter set and impact description based on the root cause node sequence and generates prompt words. The root cause description text output layer inputs the prompt words into a pre-fine-tuned large language model to obtain the root cause description text that caused the abnormal event of the traceable chemical product. The root cause description text output module is used to output the root cause description text that caused the abnormal event in the traceable chemical product, and send the root cause description text to the client for display.
Citation Information
Patent Citations
Data storing and processing method, searching method and device thereof
CN101799783A
Abnormal root cause analysis method and device
CN118056189A