Charger fault diagnosis method based on knowledge graph
By building a knowledge graph and using BERT, LSTM, and Prophet models combined with reinforcement learning, the problems of difficulty in integrating multi-source data and insufficient dynamic fault prediction in traditional charger fault diagnosis are solved, efficient and adaptive fault diagnosis and maintenance are achieved, and the accuracy and operation and maintenance efficiency of charger fault diagnosis are improved.
Patent Information
- Application Number
- CN202510566137.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2025-08-15
AI Technical Summary
The fault diagnosis of traditional chargers relies on manual experience, is difficult to integrate multi-source data, is low in efficiency in identifying complex fault patterns, lack of dynamic fault prediction capabilities, low utilization rate of user interaction feedback, cannot adapt to new fault patterns, lack of intuitiveness in diagnosis results, cannot predict future fault probability, and high maintenance costs.
Build a knowledge graph to integrate multi-source data, use the BERT model to extract the causal relationship and timing mode of failure, combine the LSTM and Prophet models for diagnostic path optimization, dynamically update the model through reinforcement learning and user feedback, generate visual reports, predict future failure probability, and optimize diagnostic path weights.
Improve the accuracy and intelligence of charger fault diagnosis, simplify operation processes, reduce manual analysis time, predict faults in advance, reduce maintenance costs, provide intuitive diagnostic results and repair steps, and enhance transparency and trust.
Smart Images

Figure CN120494796A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of charging equipment fault detection, and in particular to a charger fault diagnosis method based on a knowledge graph. Background Art
[0002] Traditional charger fault diagnosis is highly dependent on the experience and expertise of maintenance personnel, including manually consulting manuals, checking components one by one, or relying on vague descriptions provided by users. Differences in judgment among different maintenance personnel may lead to inconsistent diagnostic paths, affecting accuracy. Components need to be tested one by one, including measuring resistance and checking fuses, which is time-consuming and unable to quickly locate complex faults. Expert experience is difficult to systematically store and share, resulting in high learning costs for new maintenance personnel.
[0003] Existing technologies have limitations in their use of data for charger fault diagnosis. The temporal characteristics of sensor data are not fully modeled, making it difficult to predict dynamic faults. Existing systems typically use static models, which are difficult to cope with new fault modes or equipment changes. They cannot predict future failure probabilities in advance and can only perform post-analysis, making preventive maintenance impossible. They only focus on fault location accuracy and ignore actual needs such as diagnostic efficiency and maintenance costs.
[0004] Traditional diagnostic result presentation methods lack intuitiveness and are mostly text descriptions. Users need to associate the fault path with the maintenance steps themselves, which can easily lead to misunderstandings. Visual tools cannot be used to intuitively display the fault location or step demonstrations, resulting in a high operational error rate. Summary of the Invention
[0005] The purpose of this invention is to provide a charger fault diagnosis method based on knowledge graph.
[0006] The problem to be solved by the present invention is: it aims to solve the problems of difficulty in integrating multi-source data, low efficiency in identifying complex fault patterns, insufficient dynamic fault prediction capabilities, low utilization of user interactive feedback, and inability to adapt to new fault modes in charger fault diagnosis. By constructing a knowledge graph to integrate multi-source data, combining BERT and LSTM models to extract fault causal relationships and timing patterns, using reinforcement learning to optimize the diagnostic path, predicting fault risks through the Prophet model, and dynamically updating the knowledge base and model based on user feedback, accurate diagnosis, predictive maintenance and self-evolution capabilities are achieved, thereby improving the intelligence level and operation and maintenance efficiency of charger fault diagnosis.
[0007] A charger fault diagnosis method based on knowledge graph, the technical solution adopted is as follows: S1: Build a structured knowledge base that includes charger components, failure modes, detection methods, causal relationships, and detection associations. Collect text data, sensor data, and image data, remove outliers, and standardize the format of the collected data. S2: Uses the BERT model to extract failure modes, components, and detection methods from text, defines causal relationships and detection associations, annotates causal strengths and dynamically adjusts them based on user feedback, and stores temporal patterns as nodes and edges in a knowledge graph. S3: Converts user colloquial descriptions into structured data, uses the BERT model to analyze user input, extracts keywords, associates keywords with fault paths in the knowledge graph, and dynamically adjusts weights through rule engine questions. S4: Identify dynamic fault patterns through time series analysis, perform time series modeling based on sensor data, match the features of LSTM output with the time series patterns in the knowledge graph, and generate candidate paths; S5: Optimize the diagnostic path based on causal reasoning and reinforcement learning, calculate the causal path weight, define the state, set the reward function, and perform Q-learning updates; S6: Presents diagnostic results and repair steps, combines the repair manual generation steps in the knowledge graph, and produces a visual report based on the fault path diagram; S7: Predict potential failures and provide maintenance recommendations. The Prophet model is used to predict the probability of failure within the next seven days. Recommendations are generated based on the predictions and a safety risk assessment is performed. S8: Continuously optimize the knowledge graph and model through user feedback, dynamically update the knowledge graph, use online gradient descent to update the LSTM model and reinforcement learning strategy, and perform incremental training for new failure modes.
[0008] Furthermore, the structured knowledge base is constructed in S1, and text data, sensor data, and image data are collected. Outliers are removed from the collected data and the format is standardized, including: A graph database is used to store entities and relationships. Entities include charger components, failure modes, and detection methods, while relationships include causal relationships and detection associations. Text data comes from structured text and unstructured text. Structured text includes manufacturer manuals, and unstructured text includes user community comments. Sensor data includes voltage, current, and temperature sensors, saved as CSV files containing timestamps, voltage values, current values, and temperatures. Image data comes from smartphone cameras taking photos of the charger's appearance. The Z-score method was used to remove outliers from the data, and multi-source data were aligned based on timestamps.
[0009] Furthermore, S2 defines causal relationships and detects associations, labels causal strengths and dynamically adjusts them based on user feedback, and stores temporal patterns as nodes and edges in the knowledge graph, including: Perform causal relationship modeling and define rules based on charger domain knowledge, including that an input short circuit will inevitably cause a fuse to blow. Entity pairs are input into the BERT model, which outputs relationship labels. Conduct detection relationship modeling and use detection method-component mapping, including multimeter measurement of resistance-capacitance; Labeling causal strength , , expert score is the score of the maintenance expert on the causal relationship, the number of historical cases is the number of times the causal relationship has been verified in historical data, the logical reasoning strength is calculated by dividing the logical necessity by the logical possibility, and the BERT confidence is the confidence of the model in the relationship classification; Dynamically adjust causal strength based on user feedback , , is the learning rate, is the smoothing term; LSTM is used to analyze time series data. The knowledge graph entity nodes are fault modes and components, the time series nodes are timestamps and sensor values, the causal edges include input short circuits causing fuses to blow, and the time series edges include the temperature values corresponding to the timestamps.
[0010] Furthermore, keywords are extracted from S3, associated with the fault path in the knowledge graph, and the weights are dynamically adjusted by asking questions in the rule engine, including: The keyword confidence is half the product of the BERT output probability and the knowledge base relevance. Based on the BERT model, user questions and knowledge base entries are converted into vectors. The cosine similarity between the user question vector and the knowledge base entry vector is calculated and recorded as the knowledge base relevance. Match keyword combinations with paths in the knowledge graph, and calculate path matching scores. ,Path coverage is calculated by multiplying the number of times a keyword appears in the path by the node weight and dividing it by the path length; Build a rule base and define rule triggering conditions based on user answers and sensor data. ,in is the new path weight, is the original path weight, is a smoothing factor. The user feedback confidence is calculated as (semantic consistency × historical credibility + rule matching) / 3. Historical credibility is the accuracy of the user's past answers. Rule matching is whether the answer conforms to the logic in the rule base. Questions are generated through the rule engine. After the user answers, the path weights are immediately recalculated and sorted.
[0011] Furthermore, in S4, time series modeling is performed based on sensor data, the features output by LSTM are matched with the time series patterns in the knowledge graph, and candidate paths are generated, including: A hybrid model is constructed by combining LSTM and ARIMA. LSTM captures long-term dependencies, while ARIMA models short-term trends. Extract the hidden state vector of LSTM as the pattern feature, convert the time series pattern in the knowledge graph into a vector, and perform dynamic time warping , ,in is the LSTM feature vector, is the knowledge graph pattern vector; The path priority formula is: , where the real-time data weight is calculated by dividing the current sensor outlier value by the historical maximum outlier value, and the paths with P ≥ 0.5 are retained.
[0012] Furthermore, the calculation of causal path weights, definition of states, setting of reward functions, and Q-learning updates in S5 include: Represent the fault path as a causal graph and set node weights based on the conditional probability of the Bayesian network; Path weight formula for ,in is the conditional probability of the causal edge, is the causal strength, is the prior confidence of the node, calculated based on the Bayesian network; Design the state space. The state vector includes sensor data, excluded paths, and remaining candidate paths. The state representation formula is sensor feature ⊕ excluded path encoding ⊕ candidate path weight, where ⊕ represents vector concatenation. The multi-objective reward formula is set as α⋅accuracy reward + β⋅efficiency reward + γ⋅cost penalty, where the accuracy reward is 1.0 if the diagnosis is correct and -0.5 otherwise, the efficiency reward is inversely proportional to the number of diagnostic steps, and the cost penalty is the resource consumption. α, β, and γ are weights, and the sum of the three is 1. Perform Q-learning updates with the learning rate set to 0.1 and the discount factor set to 0.9. Use the causal path weights as state features to optimize long-term rewards and randomly explore new paths with a probability of 0.1.
[0013] Furthermore, generating a visual report based on the fault path diagram in S6 includes: A fault tree diagram is used to hierarchically display the fault path and mark the fault time points. LaTeX is used to generate PDF reports, and a web interface is built based on React, allowing users to click on steps to view detailed instructions.
[0014] Furthermore, the Prophet model is used in S7 to predict the probability of failure within the next 7 days, generate recommendations based on the prediction results, and conduct a safety risk assessment, including: The Prophet model uses a multi-layer Prophet architecture, including trend terms, seasonal terms, holiday effects, and external features. The trend term uses a logistic growth model, the seasonal term is decomposed using Fourier series, and the external features include equipment operating load and historical maintenance records. The Prophet model input is time series data in a two-column format. External features are added as auxiliary inputs. A list of dates for the next seven days is created. The Prophet model is run and the output is the probability of failure and confidence interval for each day in the future. The suggestion generation logic is set based on priority sorting. The urgency is calculated as the probability of failure multiplied by the severity, and the cost-effectiveness is the ratio of maintenance cost to potential loss. If the failure does not occur after the user implements the suggestion, the weight of the suggestion is reduced. If the failure still occurs, the model is retrained and the threshold is optimized. Conduct a safety risk assessment. The risk level is the probability of failure multiplied by the severity. The severity is graded into high, medium, and low. A high risk level recommends immediate shutdown and contacting a professional, as the failure may cause a fire. A medium risk level recommends completing an inspection within 24 hours, as the failure may cause component damage.
[0015] Furthermore, the knowledge graph is dynamically updated in S8, and the LSTM model and reinforcement learning strategy are updated using online gradient descent to perform incremental training on new fault modes, including: After users submit feedback, the system immediately triggers the knowledge graph update process, which is updated once a day to scan new data. Using Neo4j's Cypher query language, nodes and edges are dynamically added / deleted, and each updated version is recorded, with rollback support. When multiple users provide conflicting feedback, the final update content is determined based on manual review. Take real-time sensor data as input, update the model according to a fixed daily time window, use the data of the last hour to calculate the gradient, and update the model parameters; When a user reports a new fault, it is automatically labeled as an unseen pattern. The bottom feature layer of the pre-trained model is used to fine-tune the top classifier. The new fault pattern data is mixed with the old data for training to generate an integrated model, and regularization terms are added to limit the variation range of the new parameters.
[0016] The beneficial effects of the present invention are: by combining text, sensor and image data, the working status of the charger is fully captured, thereby improving the accuracy of fault diagnosis; using the BERT model to extract key information from unstructured text and associate it with entities in the knowledge graph, the fault mode and its cause are quickly identified, reducing the time of manual analysis; The system dynamically adjusts the strength of causal relationships based on user feedback, converts problem descriptions in natural language into structured queries, and provides intuitive and easy-to-understand diagnostic results and repair steps. This simplifies operational processes and provides visual reports for viewing detailed fault analysis processes, enhancing transparency and trust. The Prophet model predicts possible future failures, allowing proactive measures to avoid potential problems and reducing the risk of unplanned downtime. It also provides recommendations based on the probability and severity of failures, helping to develop more scientific and reasonable maintenance plans. The knowledge graph stores technical details about the charger, as well as expert experience and historical cases, promoting the effective integration of knowledge from different sources and providing strong support for solving complex problems. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 This is a flow chart of a charger fault diagnosis method based on knowledge graph. DETAILED DESCRIPTION
[0018] The present invention is further clearly and completely described below, but the protection scope of the present invention is not limited thereto.
[0019] A charger fault diagnosis method based on knowledge graph, the technical solution adopted is as follows: S1: Build a structured knowledge base that includes charger components, failure modes, detection methods, causal relationships, and detection associations. Collect text data, sensor data, and image data, remove outliers, and standardize the format of the collected data. S2: Uses the BERT model to extract failure modes, components, and detection methods from text, defines causal relationships and detection associations, annotates causal strengths and dynamically adjusts them based on user feedback, and stores temporal patterns as nodes and edges in a knowledge graph. S3: Converts user colloquial descriptions into structured data, uses the BERT model to analyze user input, extracts keywords, associates keywords with fault paths in the knowledge graph, and dynamically adjusts weights through rule engine questions. S4: Identify dynamic fault patterns through time series analysis, perform time series modeling based on sensor data, match the features of LSTM output with the time series patterns in the knowledge graph, and generate candidate paths; S5: Optimize the diagnostic path based on causal reasoning and reinforcement learning, calculate the causal path weight, define the state, set the reward function, and perform Q-learning updates; S6: Presents diagnostic results and repair steps, combines the repair manual generation steps in the knowledge graph, and produces a visual report based on the fault path diagram; S7: Predict potential failures and provide maintenance recommendations. The Prophet model is used to predict the probability of failure within the next seven days. Recommendations are generated based on the predictions and a safety risk assessment is performed. S8: Continuously optimize the knowledge graph and model through user feedback, dynamically update the knowledge graph, use online gradient descent to update the LSTM model and reinforcement learning strategy, and perform incremental training for new failure modes.
[0020] refer to Figure 1 The figure shows a flow chart of a charger fault diagnosis method based on knowledge graph.
[0021] Furthermore, the structured knowledge base is constructed in S1, and text data, sensor data, and image data are collected. Outliers are removed from the collected data and the format is standardized, including: A graph database is used to store entities and relationships. Entities include charger components, failure modes, and detection methods, while relationships include causal relationships and detection associations. Text data comes from structured text and unstructured text. Structured text includes manufacturer manuals, and unstructured text includes user community comments. Sensor data includes voltage, current, and temperature sensors, saved as CSV files containing timestamps, voltage values, current values, and temperatures. Image data comes from smartphone cameras taking photos of the charger's appearance. The Z-score method was used to remove outliers from the data, and multi-source data were aligned based on timestamps.
[0022] Furthermore, S2 defines causal relationships and detects associations, labels causal strengths and dynamically adjusts them based on user feedback, and stores temporal patterns as nodes and edges in the knowledge graph, including: Perform causal relationship modeling and define rules based on charger domain knowledge, including that an input short circuit will inevitably cause a fuse to blow. Entity pairs are input into the BERT model, which outputs relationship labels. Conduct detection relationship modeling and use detection method-component mapping, including multimeter measurement of resistance-capacitance; Labeling causal strength , , expert score is the score of the maintenance expert on the causal relationship, the number of historical cases is the number of times the causal relationship has been verified in historical data, the logical reasoning strength is calculated by dividing the logical necessity by the logical possibility, and the BERT confidence is the confidence of the model in the relationship classification; Dynamically adjust causal strength based on user feedback , , is the learning rate, is the smoothing term; LSTM is used to analyze time series data. The knowledge graph entity nodes are fault modes and components, the time series nodes are timestamps and sensor values, the causal edges include input short circuits causing fuses to blow, and the time series edges include the temperature values corresponding to the timestamps.
[0023] Furthermore, keywords are extracted from S3, associated with the fault path in the knowledge graph, and the weights are dynamically adjusted by asking questions in the rule engine, including: The keyword confidence is half the product of the BERT output probability and the knowledge base relevance. Based on the BERT model, user questions and knowledge base entries are converted into vectors. The cosine similarity between the user question vector and the knowledge base entry vector is calculated and recorded as the knowledge base relevance. Match keyword combinations with paths in the knowledge graph, and calculate path matching scores. ,Path coverage is calculated by multiplying the number of times a keyword appears in the path by the node weight and dividing it by the path length; Build a rule base and define rule triggering conditions based on user answers and sensor data. ,in is the new path weight, is the original path weight, is a smoothing factor. The user feedback confidence is calculated as (semantic consistency × historical credibility + rule matching) / 3. Historical credibility is the accuracy of the user's past answers. Rule matching is whether the answer conforms to the logic in the rule base. Questions are generated through the rule engine. After the user answers, the path weights are immediately recalculated and sorted.
[0024] Furthermore, in S4, time series modeling is performed based on sensor data, the features output by LSTM are matched with the time series patterns in the knowledge graph, and candidate paths are generated, including: A hybrid model is constructed by combining LSTM and ARIMA. LSTM captures long-term dependencies, while ARIMA models short-term trends. Extract the hidden state vector of LSTM as the pattern feature, convert the time series pattern in the knowledge graph into a vector, and perform dynamic time warping , ,in is the LSTM feature vector, is the knowledge graph pattern vector; The path priority formula is: , where the real-time data weight is calculated by dividing the current sensor outlier value by the historical maximum outlier value, and the paths with P ≥ 0.5 are retained.
[0025] Furthermore, the calculation of causal path weights, definition of states, setting of reward functions, and Q-learning updates in S5 include: Represent the fault path as a causal graph and set node weights based on the conditional probability of the Bayesian network; Path weight formula for ,in is the conditional probability of the causal edge, is the causal strength, is the prior confidence of the node, calculated based on the Bayesian network; Design the state space. The state vector includes sensor data, excluded paths, and remaining candidate paths. The state representation formula is sensor feature ⊕ excluded path encoding ⊕ candidate path weight, where ⊕ represents vector concatenation. The multi-objective reward formula is set as α⋅accuracy reward + β⋅efficiency reward + γ⋅cost penalty, where the accuracy reward is 1.0 if the diagnosis is correct and -0.5 otherwise, the efficiency reward is inversely proportional to the number of diagnostic steps, and the cost penalty is the resource consumption. α, β, and γ are weights, and the sum of the three is 1. Perform Q-learning updates with the learning rate set to 0.1 and the discount factor set to 0.9. Use the causal path weights as state features to optimize long-term rewards and randomly explore new paths with a probability of 0.1.
[0026] Furthermore, generating a visual report based on the fault path diagram in S6 includes: A fault tree diagram is used to hierarchically display the fault path and mark the fault time points. LaTeX is used to generate PDF reports, and a web interface is built based on React, allowing users to click on steps to view detailed instructions.
[0027] Furthermore, the Prophet model is used in S7 to predict the probability of failure within the next 7 days, generate recommendations based on the prediction results, and conduct a safety risk assessment, including: The Prophet model uses a multi-layer Prophet architecture, including trend terms, seasonal terms, holiday effects, and external features. The trend term uses a logistic growth model, the seasonal term is decomposed using Fourier series, and the external features include equipment operating load and historical maintenance records. The Prophet model input is time series data in a two-column format. External features are added as auxiliary inputs. A list of dates for the next seven days is created. The Prophet model is run and the output is the probability of failure and confidence interval for each day in the future. The suggestion generation logic is set based on priority sorting. The urgency is calculated as the probability of failure multiplied by the severity, and the cost-effectiveness is the ratio of maintenance cost to potential loss. If the failure does not occur after the user implements the suggestion, the weight of the suggestion is reduced. If the failure still occurs, the model is retrained and the threshold is optimized. Conduct a safety risk assessment. The risk level is the probability of failure multiplied by the severity. The severity is graded into high, medium, and low. A high risk level recommends immediate shutdown and contacting a professional, as the failure may cause a fire. A medium risk level recommends completing an inspection within 24 hours, as the failure may cause component damage.
[0028] Furthermore, the knowledge graph is dynamically updated in S8, and the LSTM model and reinforcement learning strategy are updated using online gradient descent to perform incremental training on new fault modes, including: After users submit feedback, the system immediately triggers the knowledge graph update process, which is updated once a day to scan new data. Using Neo4j's Cypher query language, nodes and edges are dynamically added / deleted, and each updated version is recorded, with rollback support. When multiple users provide conflicting feedback, the final update content is determined based on manual review. Take real-time sensor data as input, update the model according to a fixed daily time window, use the data of the last hour to calculate the gradient, and update the model parameters; When a user reports a new fault, it is automatically labeled as an unseen pattern. The bottom feature layer of the pre-trained model is used to fine-tune the top classifier. The new fault pattern data is mixed with the old data for training to generate an integrated model, and regularization terms are added to limit the variation range of the new parameters.
[0029] The present invention provides a charger fault diagnosis method based on knowledge graph, which realizes efficient and adaptive fault diagnosis and maintenance through the integration of multiple technologies, constructs a structured knowledge base, integrates charger components, fault modes and detection methods, uses a graph database to store entities and causal relationships, and detect associations, and extracts information through the BERT model, annotates the causal strength and dynamically adjusts it, converts the user's spoken description into structured data, matches the fault path in the knowledge graph, dynamically adjusts the weight, analyzes the time series data, combines dynamic time regularization to match the time series pattern in the knowledge graph, generates candidate paths, optimizes the diagnostic path weight, designs a multi-objective reward function, generates a visualization report, predicts the failure probability in the next 7 days, generates maintenance recommendations based on the risk level, continuously optimizes the knowledge graph and model through user feedback, improves the diagnostic accuracy and maintenance efficiency, and reduces the need for manual intervention.
Claims
1. A charger fault diagnosis method based on knowledge graph, characterized in that: include: S1: Build a structured knowledge base that includes charger components, failure modes, detection methods, causal relationships, and detection associations. Collect text data, sensor data, and image data, remove outliers, and standardize the format of the collected data. S2: Uses the BERT model to extract failure modes, components, and detection methods from text, defines causal relationships and detection associations, annotates causal strengths and dynamically adjusts them based on user feedback, and stores temporal patterns as nodes and edges in a knowledge graph. S3: Converts user colloquial descriptions into structured data, uses the BERT model to analyze user input, extracts keywords, associates keywords with fault paths in the knowledge graph, and dynamically adjusts weights through rule engine questions. S4: Identify dynamic fault patterns through time series analysis, perform time series modeling based on sensor data, match the features of LSTM output with the time series patterns in the knowledge graph, and generate candidate paths; S5: Optimize the diagnostic path based on causal reasoning and reinforcement learning, calculate the causal path weight, define the state, set the reward function, and perform Q-learning updates; S6: Presents diagnostic results and repair steps, combines the repair manual generation steps in the knowledge graph, and produces a visual report based on the fault path diagram; S7: Predict potential failures and provide maintenance recommendations. The Prophet model is used to predict the probability of failure within the next seven days. Recommendations are generated based on the predictions and a safety risk assessment is performed. S8: Continuously optimize the knowledge graph and model through user feedback, dynamically update the knowledge graph, use online gradient descent to update the LSTM model and reinforcement learning strategy, and perform incremental training for new failure modes.
2. A charger fault diagnosis method based on knowledge graph according to claim 1, characterized in that: S1 builds a structured knowledge base, collects text data, sensor data, and image data, removes outliers from the collected data, and standardizes the format, including: A graph database is used to store entities and relationships. Entities include charger components, failure modes, and detection methods, while relationships include causal relationships and detection associations. Text data comes from structured text and unstructured text. Structured text includes manufacturer manuals, and unstructured text includes user community comments. Sensor data includes voltage, current, and temperature sensors, saved as CSV files containing timestamps, voltage values, current values, and temperatures. Image data comes from smartphone cameras taking photos of the charger's appearance. The Z-score method was used to remove outliers from the data, and multi-source data were aligned based on timestamps.
3. The charger fault diagnosis method based on knowledge graph according to claim 1, characterized in that: S2 defines causal relationships and detects associations, labels causal strengths and dynamically adjusts them based on user feedback, and stores temporal patterns as nodes and edges in the knowledge graph, including: Perform causal relationship modeling and define rules based on charger domain knowledge, including that an input short circuit will inevitably cause a fuse to blow. Entity pairs are input into the BERT model, which outputs relationship labels. Conduct detection relationship modeling and use detection method-component mapping, including multimeter measurement of resistance-capacitance; Labeling causal strength , , expert score is the score of the maintenance expert on the causal relationship, the number of historical cases is the number of times the causal relationship has been verified in historical data, the logical reasoning strength is calculated by dividing the logical necessity by the logical possibility, and the BERT confidence is the confidence of the model in the relationship classification; Dynamically adjust causal strength based on user feedback , , is the learning rate, is the smoothing term; LSTM is used to analyze time series data. The knowledge graph entity nodes are fault modes and components, the time series nodes are timestamps and sensor values, the causal edges include input short circuits causing fuses to blow, and the time series edges include the temperature values corresponding to the timestamps.
4. The charger fault diagnosis method based on knowledge graph according to claim 1, characterized in that: The keywords are extracted from S3, associated with the fault path in the knowledge graph, and the weights are dynamically adjusted by asking questions in the rule engine, including: The keyword confidence is half the product of the BERT output probability and the knowledge base relevance. Based on the BERT model, user questions and knowledge base entries are converted into vectors. The cosine similarity between the user question vector and the knowledge base entry vector is calculated and recorded as the knowledge base relevance. Match keyword combinations with paths in the knowledge graph, and calculate path matching scores. ,Path coverage is calculated by multiplying the number of times a keyword appears in the path by the node weight and dividing it by the path length; Build a rule base and define rule triggering conditions based on user answers and sensor data. ,in is the new path weight, is the original path weight, is a smoothing factor. The user feedback confidence is calculated as (semantic consistency × historical credibility + rule matching) / 3. Historical credibility is the accuracy of the user's past answers. Rule matching is whether the answer conforms to the logic in the rule base. Questions are generated through the rule engine. After the user answers, the path weights are immediately recalculated and sorted.
5. The charger fault diagnosis method based on knowledge graph according to claim 1, characterized in that: In S4, time series modeling is performed based on sensor data, the features of LSTM output are matched with the time series patterns in the knowledge graph, and candidate paths are generated, including: A hybrid model is constructed by combining LSTM and ARIMA. LSTM captures long-term dependencies, while ARIMA models short-term trends. Extract the hidden state vector of LSTM as the pattern feature, convert the time series pattern in the knowledge graph into a vector, and perform dynamic time warping , ,in is the LSTM feature vector, is the knowledge graph pattern vector; The path priority formula is: , where the real-time data weight is calculated by dividing the current sensor outlier value by the historical maximum outlier value, and the paths with P ≥ 0.5 are retained.
6. The charger fault diagnosis method based on knowledge graph according to claim 1, characterized in that: S5 calculates the causal path weight, defines the state, sets the reward function, and performs Q-learning updates, including: Represent the fault path as a causal graph and set node weights based on the conditional probability of the Bayesian network; Path weight formula for ,in is the conditional probability of the causal edge, is the causal strength, is the prior confidence of the node, calculated based on the Bayesian network; Design the state space. The state vector includes sensor data, excluded paths, and remaining candidate paths. The state representation formula is sensor feature ⊕ excluded path encoding ⊕ candidate path weight, where ⊕ represents vector concatenation. The multi-objective reward formula is set as α⋅accuracy reward + β⋅efficiency reward + γ⋅cost penalty, where the accuracy reward is 1.0 if the diagnosis is correct and -0.5 otherwise, the efficiency reward is inversely proportional to the number of diagnostic steps, and the cost penalty is the resource consumption. α, β, and γ are weights, and the sum of the three is 1. Perform Q-learning updates with the learning rate set to 0.1 and the discount factor set to 0.
9. Use the causal path weights as state features to optimize long-term rewards and randomly explore new paths with a probability of 0.
1.
7. The charger fault diagnosis method based on knowledge graph according to claim 1, characterized in that: The S6 generates a visual report based on the fault path diagram, including: A fault tree diagram is used to hierarchically display the fault path and mark the fault time points. LaTeX is used to generate PDF reports, and a web interface is built based on React, allowing users to click on steps to view detailed instructions.
8. The charger fault diagnosis method based on knowledge graph according to claim 1, characterized in that: S7 uses the Prophet model to predict the probability of failure within the next seven days, generates recommendations based on the prediction results, and performs a safety risk assessment, including: The Prophet model uses a multi-layer Prophet architecture, including trend terms, seasonal terms, holiday effects, and external features. The trend term uses a logistic growth model, the seasonal term is decomposed using Fourier series, and the external features include equipment operating load and historical maintenance records. The Prophet model input is time series data in a two-column format. External features are added as auxiliary inputs. A list of dates for the next seven days is created. The Prophet model is run and the output is the probability of failure and confidence interval for each day in the future. The suggestion generation logic is set based on priority sorting. The urgency is calculated as the probability of failure multiplied by the severity, and the cost-effectiveness is the ratio of maintenance cost to potential loss. If the failure does not occur after the user implements the suggestion, the weight of the suggestion is reduced. If the failure still occurs, the model is retrained and the threshold is optimized. Conduct a safety risk assessment. The risk level is the probability of failure multiplied by the severity. The severity is graded into high, medium, and low. A high risk level recommends immediate shutdown and contacting a professional, as the failure may cause a fire. A medium risk level recommends completing an inspection within 24 hours, as the failure may cause component damage.
9. The charger fault diagnosis method based on knowledge graph according to claim 1, characterized in that: The S8 dynamically updates the knowledge graph, uses online gradient descent to update the LSTM model and reinforcement learning strategy, and performs incremental training for new fault modes, including: After users submit feedback, the system immediately triggers the knowledge graph update process, which is updated once a day to scan new data. Using Neo4j's Cypher query language, nodes and edges are dynamically added / deleted, and each updated version is recorded, with rollback support. When multiple users provide conflicting feedback, the final update content is determined based on manual review. Take real-time sensor data as input, update the model according to a fixed daily time window, use the data of the last hour to calculate the gradient, and update the model parameters; When a user reports a new fault, it is automatically labeled as an unseen pattern. The bottom feature layer of the pre-trained model is used to fine-tune the top classifier. The new fault pattern data is mixed with the old data for training to generate an integrated model, and regularization terms are added to limit the variation range of the new parameters.
Citation Information
Cited By
Network situation monitoring system and method
CN120729633A
Box transformer substation multi-parameter state monitoring and fault early warning system based on industrial internet
CN120785044A
Tail gas emission prediction and fault early warning method fusing knowledge graph and machine learning
CN121071684A
Ballast water emergency receiving processing fault diagnosis method and system based on knowledge graph
CN121167207A
Ballast water emergency receiving and processing fault diagnosis method and system based on knowledge graph
CN121167207B