Ship engine fault diagnosis method and diagnosis device based on knowledge graph
By constructing operating condition feature vectors and relational attributes, and calculating relational validity weights, dynamic constraints on knowledge graph relations are realized in the fault diagnosis of marine engines. This solves the problem of misjudgment caused by operating condition drift and improves the accuracy and reliability of diagnosis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JIANGSU UNIV OF SCI & TECH IND TECH RES INST OF ZHANGJIAGANG
- Filing Date
- 2026-03-27
- Publication Date
- 2026-06-19
AI Technical Summary
Existing knowledge graph-based methods for diagnosing ship engine faults fail to effectively distinguish the validity of relationships under different operating conditions, leading to fault diagnosis results being incorrectly guided by historical operating conditions during operating condition drift, resulting in systematic misjudgments.
By collecting multidimensional operating data of ship engines, a working condition feature vector is constructed, the working condition stability index and offset statistics are calculated, relational attributes are configured, relational validity weights are calculated, and migration suppression is applied during the working condition migration stage to achieve controlled inference to generate fault diagnosis results that match the current working condition.
It improves the accuracy of fault diagnosis and engineering reliability, avoids misjudgment caused by operating condition drift, and dynamically matches the current operating conditions of the engine.
Smart Images

Figure CN121936573B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of ship fault diagnosis technology, specifically to a ship engine fault diagnosis method and device based on knowledge graphs. Background Technology
[0002] During long-term service, the operating status of marine engines is affected by various factors such as navigation area, load changes, fuel quality, ambient temperature and humidity, and changes in navigation conditions, exhibiting continuous changes, phased migrations, and difficult-to-revert operating condition drift characteristics. For example, as an engine gradually transitions from a low-load port operating condition to a full-load navigation operating condition, its thermal equilibrium state, combustion characteristics, and the distribution of various operating parameters will all undergo systematic changes.
[0003] Existing knowledge graph-based methods for diagnosing marine engine faults typically construct a knowledge graph containing entities and their relationships, including fault types, symptom characteristics, parameter anomalies, and remedial measures, and then perform diagnosis based on rule-based or graph-based reasoning. However, these methods generally implicitly assume that the relationships between entities in the knowledge graph remain constant and valid across both the time and operational condition dimensions.
[0004] In practical applications, this assumption does not hold. Extensive engineering practice shows that the same symptom or parameter anomaly can have completely different engineering semantics under different operating conditions. For example, an increase in exhaust temperature during stable cruise conditions usually indicates combustion abnormalities, while during condition transitions or thermal balance adjustments, this phenomenon may be a normal response. Because existing technologies fail to distinguish the applicability of relationships within the knowledge graph to different operating conditions, high-confidence rules formed under historical stable operating conditions remain activated even after condition drift occurs, leading to fault diagnosis results being incorrectly guided by historical operating conditions and resulting in systematic misjudgments.
[0005] Therefore, there is an urgent need for a fault diagnosis method that can dynamically constrain the validity of relations in a knowledge graph under the condition of continuous drift in the operating conditions of a ship engine, and perform controlled reasoning accordingly. Summary of the Invention
[0006] To address the aforementioned shortcomings mentioned in the background art, the present invention aims to provide a knowledge graph-based method, diagnostic device, non-volatile storage medium, and computer program product for diagnosing ship engine faults. By performing stage identification and drift detection of engine operating conditions, and introducing a relationship validity control mechanism for operating condition constraints during the knowledge graph reasoning process, fault relationships formed under historical operating conditions are ensured to participate in reasoning only within their applicable operating condition range. This avoids the knowledge graph reasoning results being erroneously influenced by historical stable operating conditions, thereby improving the accuracy of fault diagnosis and engineering reliability.
[0007] A first aspect of the present invention provides a method for diagnosing ship engine faults based on knowledge graphs, the method comprising the following steps:
[0008] Step S1: Collect multi-dimensional operating data of the ship's engine to construct a working condition feature vector that characterizes the changing trend and fluctuation characteristics of the engine's operating status.
[0009] Step S2: Calculate the stability index of the engine operating condition based on the operating condition feature vector, and determine the current operating condition stage of the engine by combining the offset statistics that characterize the cumulative change of the operating condition distribution, including the stable operating condition stage and the operating condition transition stage.
[0010] Step S3: Construct a knowledge graph of ship engine failures and configure relational attributes related to operating conditions for at least some graph relationships to characterize the operating condition applicability characteristics of the corresponding relationships;
[0011] Step S4: Based on the operating condition feature vector and the relationship attribute corresponding to the current operating condition stage, calculate the relationship validity weight of the graph relationship under the current operating condition, and apply migration suppression to at least some of the graph relationships formed in the stable operating condition stage when the engine is in the operating condition migration stage.
[0012] Step S5: Perform controlled reasoning on the fault knowledge graph based on relation validity weights, that is, only activate graph relations whose relation validity weights meet preset conditions to generate ship engine fault diagnosis results that match the current operating condition stage.
[0013] As an example, the stability index of engine operating conditions is calculated based on the operating condition feature vector, and the current operating condition stage of the engine is determined by combining the offset statistics characterizing the cumulative change in the operating condition distribution, including:
[0014] Step S21: Extract the trend features that characterize the changing trend of the operating parameters and the fluctuation features that characterize the degree of fluctuation of the operating parameters from the operating condition feature vector, and calculate the operating condition stability index based on the trend features and fluctuation features.
[0015] Step S22: Construct working condition monitoring statistics based on the working condition feature vector, and perform cumulative processing on the working condition monitoring statistics to obtain offset statistics that characterize the cumulative change of working condition distribution over time.
[0016] Step S23: When the operating condition stability index is lower than the first preset threshold and the offset statistics do not exceed the second preset threshold, the engine operating state is determined to be in a stable operating condition stage; when the operating condition stability index is continuously higher than the first preset threshold or the offset statistics exceed the second preset threshold, the engine operating state is determined to be in an operating condition transition stage.
[0017] As an example, configuring relationship attributes related to operating conditions for at least some of the graph relationships includes:
[0018] To represent the causal relationship or symptom representation relationship of a fault, relational attributes related to operating conditions are configured. These relational attributes include at least: a condition prototype attribute for characterizing the characteristics of the corresponding operating condition when the causal relationship is established; a condition applicability attribute for characterizing the applicable operating conditions of the causal relationship to limit the effectiveness of the causal relationship under different operating conditions; a condition drift sensitivity attribute for characterizing the sensitivity of the causal relationship to changes in operating conditions; a relation reliability attribute for characterizing the historical reliability of the causal relationship; and a timeliness attribute for characterizing the decay characteristics of the causal relationship over time.
[0019] As an example, based on the operating condition feature vector corresponding to the current operating condition stage and the relationship attributes, the relationship validity weight of the graph relationship under the current operating condition is calculated, including:
[0020] Step S41: Based on the working condition feature vector corresponding to the current working condition stage and the working condition prototype attribute of the graph relationship, calculate the degree of working condition deviation of the graph relationship under the current operating condition.
[0021] Step S42: Determine the applicability factor of the graph relationship under the current operating conditions based on the degree of deviation of the operating conditions and the applicable range attribute and the drift sensitivity attribute of the graph relationship.
[0022] Step S43: Based on the reliability and timeliness attributes of the graph relationship, the working condition applicability factor is modified to reflect the historical reliability of the graph relationship and its effectiveness over time.
[0023] Step S44: Based on the modified operating condition applicability factor, determine the relationship validity weight of the graph relationship in the current operating condition stage.
[0024] As an example, based on a modified operating condition suitability factor, the validity weight of the graph relationships in the current operating condition stage is determined, including:
[0025] The modified operating condition applicability factor is used as a weight value to characterize the effectiveness of the graph relationship in the current operating condition stage, and the weight value is determined as the relationship effectiveness weight corresponding to the graph relationship in the current operating condition stage.
[0026] A second aspect of the present invention provides a knowledge graph-based fault diagnosis device for marine engines, the device comprising:
[0027] The data acquisition and operating condition feature construction module is used to collect multi-dimensional operating data of ship engines in order to construct an operating condition feature vector that characterizes the changing trend and fluctuation characteristics of engine operating status.
[0028] The operating condition stage determination module is used to calculate the stability index of the engine operating condition based on the operating condition feature vector, and combine it with the offset statistics that characterize the cumulative change of the operating condition distribution to determine the current operating condition stage of the engine, including the stable operating condition stage and the operating condition transition stage.
[0029] The knowledge graph construction and relation attribute configuration module is used to construct a knowledge graph of ship engine failures and configure relation attributes related to operating conditions for at least some graph relations to characterize the operating condition applicability characteristics of the corresponding relations.
[0030] The relation validity weight calculation module is used to calculate the relation validity weight of the graph relation under the current operating condition based on the operating condition feature vector and the relation attribute corresponding to the current operating condition stage, and to apply migration suppression to at least some of the graph relations formed in the stable operating condition stage when the engine is in the operating condition migration stage.
[0031] The controlled reasoning module is used to perform controlled reasoning on the fault knowledge graph based on the relation validity weights, that is, to activate only the graph relations whose relation validity weights meet preset conditions, and generate ship engine fault diagnosis results that match the current operating condition stage.
[0032] As an example, the working condition stage determination module includes:
[0033] The stability calculation unit is used to parse the trend features that characterize the changing trend of the operating parameters and the fluctuation features that characterize the degree of fluctuation of the operating parameters from the operating condition feature vector, and to calculate the operating condition stability index based on the trend features and fluctuation features.
[0034] The offset statistics construction unit is used to construct operating condition monitoring statistics based on the operating condition feature vector, and to perform cumulative processing on the operating condition monitoring statistics to obtain offset statistics that characterize the cumulative change of operating condition distribution over time.
[0035] The stage determination unit is used to determine the engine operating state as a stable operating state stage when the operating condition stability index is lower than a first preset threshold and the offset statistics do not exceed a second preset threshold; and to determine the engine operating state as an operating condition transition stage when the operating condition stability index is continuously higher than the first preset threshold or the offset statistics exceed the second preset threshold.
[0036] As an example, the knowledge graph construction and relation attribute configuration module is specifically used for:
[0037] To represent the causal relationship or symptom representation relationship of a fault, relational attributes related to operating conditions are configured. These relational attributes include at least: a condition prototype attribute for characterizing the characteristics of the corresponding operating condition when the causal relationship is established; a condition applicability attribute for characterizing the applicable operating conditions of the causal relationship to limit the effectiveness of the causal relationship under different operating conditions; a condition drift sensitivity attribute for characterizing the sensitivity of the causal relationship to changes in operating conditions; a relation reliability attribute for characterizing the historical reliability of the causal relationship; and a timeliness attribute for characterizing the decay characteristics of the causal relationship over time.
[0038] As an example, the relation validity weight calculation module includes:
[0039] The working condition deviation calculation unit is used to calculate the degree of working condition deviation of the graph relationship under the current operating condition based on the working condition feature vector corresponding to the current working condition stage and the working condition prototype attribute of the graph relationship.
[0040] The working condition applicability factor determination unit is used to determine the working condition applicability factor of the graph relationship under the current operating condition based on the degree of working condition deviation and the working condition applicability range attribute and working condition drift sensitivity attribute of the graph relationship.
[0041] The applicability factor correction unit is used to correct the working condition applicability factor based on the relationship reliability attribute and timeliness attribute of the graph relationship, so as to reflect the historical reliability of the graph relationship and its effectiveness over time.
[0042] The weight determination unit is used to determine the relationship validity weight of the graph relationship in the current working condition stage based on the modified working condition applicability factor.
[0043] As an example, the weight determination unit is specifically used for:
[0044] The modified operating condition applicability factor is used as a weight value to characterize the effectiveness of the graph relationship in the current operating condition stage, and the weight value is determined as the relationship effectiveness weight corresponding to the graph relationship in the current operating condition stage.
[0045] A third aspect of the present invention also provides a non-volatile storage medium having a computer program stored thereon, which, when executed by a processor, implements the method as described in any of the preceding claims.
[0046] A fourth aspect of the present invention also provides a computer program product, comprising a computer program that, when executed by a processor, implements the method as described in any of the preceding claims.
[0047] Compared with the prior art, the present invention has the following significant advantages:
[0048] This invention addresses the problem of semantic invalidation of relations in knowledge graphs caused by continuous drift in operating conditions during long-term operation of ship engines. By introducing an operating condition stage determination and relation validity weighting mechanism, the graph relations representing fault causal relationships or symptom representations participate in reasoning only under their applicable operating conditions. Furthermore, it suppresses historical stable operating condition relations during the operating condition migration stage. This avoids the problem in existing technologies where relations are assumed to be constant and valid, leading to fault diagnosis results being incorrectly guided by historical operating conditions. As a result, the knowledge graph reasoning results can dynamically match the current operating conditions of the engine. Attached Figure Description
[0049] Figure 1 This is a schematic diagram of the overall process of the knowledge graph-based ship engine fault diagnosis method disclosed in an embodiment of the present invention;
[0050] Figure 2 This is a schematic diagram of the main structure of the knowledge graph-based ship engine fault diagnosis device disclosed in an embodiment of the present invention;
[0051] Figure 3 This is a schematic diagram of the working condition stage determination module disclosed in an embodiment of the present invention;
[0052] Figure 4 This is a schematic diagram of the relation validity weight calculation module disclosed in an embodiment of the present invention.
[0053] Figure label:
[0054] 100: Knowledge Graph-Based Ship Engine Fault Diagnosis Device; 10: Data Acquisition and Operating Condition Feature Construction Module; 20: Operating Condition Stage Determination Module; 30: Knowledge Graph Construction and Relationship Attribute Configuration Module; 40: Relationship Validity Weight Calculation Module; 50: Controlled Inference Module; 201: Stability Calculation Unit; 202: Deviation Statistics Construction Unit; 203: Stage Determination Unit; 401: Operating Condition Deviation Calculation Unit; 402: Operating Condition Applicability Factor Determination Unit; 403: Applicability Factor Correction Unit; 404: Weight Determination Unit. Detailed Implementation
[0055] The specific embodiments of this disclosure will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit this disclosure.
[0056] Please see Figure 1 This invention provides a knowledge graph-based method for diagnosing ship engine faults, the method comprising the following steps:
[0057] Step S1: Collect multi-dimensional operating data of the ship's engine to construct a working condition feature vector that characterizes the changing trend and fluctuation characteristics of the engine's operating status.
[0058] The solution of this invention can be applied to ship engine monitoring systems, ship engine room integrated management systems, or shore-based remote operation and maintenance systems. These systems continuously collect key operating parameters during engine operation using various sensors deployed on the ship's engine, and store and manage the collected data in chronological order.
[0059] Multidimensional operating data includes at least the following parameters that reflect the engine's thermal, mechanical, and combustion states: engine speed, load, exhaust temperature, lubricating oil pressure, lubricating oil temperature, coolant temperature, and fuel consumption rate. Each operating parameter corresponds to a set of operating data at the same sampling time, thus constituting the time series data of the engine operation process.
[0060] After data acquisition, the collected multidimensional operational data undergoes preprocessing. Preprocessing includes removing or correcting outlier data, aligning operational data from different sources according to time, and standardizing operational parameters to eliminate the impact of differences in the units and ranges of different parameters on subsequent analysis.
[0061] Furthermore, the continuously collected operational data is processed within a preset time window. Multidimensional operational data within the same time window are treated as a single analysis unit, and a condition feature vector is constructed based on the changes in operational parameters within that time window. This condition feature vector comprehensively characterizes the engine's operational status change trend and the fluctuation characteristics of its operational parameters within a corresponding time period. Specifically:
[0062] For any running parameter First, calculate its time window. The trend characteristics within the time period are used to reflect whether the operating parameters show a continuous upward or downward trend during the current time period. For example, the slope obtained from least squares fitting can be used, and its calculation form is as follows:
[0063] ;
[0064] in: This indicates the trend of the k-th running parameter within the current time window; This represents the mean of the time index; Indicates parameters The mean within that time window.
[0065] Simultaneously, the operating parameters are calculated within the same time window. The fluctuation characteristics within the time period. These fluctuation characteristics describe the degree of dispersion of the operating parameters within that time period, and their calculation form is as follows:
[0066] ;
[0067] in: This represents the fluctuation characteristics of the k-th operating parameter within the current time window.
[0068] Step S2: Calculate the stability index of the engine operating condition based on the operating condition feature vector, and determine the current operating condition stage of the engine by combining the offset statistics that characterize the cumulative change of the operating condition distribution, including the stable operating condition stage and the operating condition transition stage.
[0069] During continuous engine operation, by quantitatively analyzing the changes in the operating condition feature vector over time, we can identify whether the engine is in a relatively stable state or whether it is transitioning from one operating condition to another. This provides a clear basis for determining the operating condition stage for subsequent relational validity constraints and controlled reasoning based on knowledge graphs.
[0070] In its implementation, this invention does not rely solely on operating parameters at a single moment for judgment, but comprehensively considers the changing trend, fluctuation degree, and whether the distribution of operating parameters undergoes a sustained shift within the time window. By introducing a joint judgment mechanism of operating condition stability index and shift statistics, the judgment of operating condition stages can simultaneously reflect short-term stability characteristics and medium- to long-term distribution change characteristics, avoiding misjudgments caused by instantaneous disturbances or short-term fluctuations.
[0071] As an example, the stability index of engine operating conditions is calculated based on the operating condition feature vector, and the current operating condition stage of the engine is determined by combining the offset statistics characterizing the cumulative change in the operating condition distribution, including:
[0072] Step S21: Extract the trend features that characterize the changing trend of the operating parameters and the fluctuation features that characterize the degree of fluctuation of the operating parameters from the operating condition feature vector, and calculate the operating condition stability index based on the trend features and fluctuation features.
[0073] In this step, trend features characterizing the changing trends of each operating parameter are extracted from the operating condition feature vector. Fluctuation characteristics that characterize the degree of fluctuation of each operating parameter Then, the above features are combined and calculated to obtain the operating condition stability index used to characterize the stability of engine operating conditions. For example, it can be calculated in the following form:
[0074] ;
[0075] in: This indicates the stability index of the operating conditions corresponding to the current time window; Indicates the number of runtime parameters involved in the calculation; and These represent the weighting coefficients corresponding to the trend characteristic and the volatility characteristic, respectively.
[0076] ;
[0077] In the formula, , The preset dimensionless importance coefficients reflect the relative importance of trend characteristics and fluctuation characteristics in the evaluation of operating condition stability, for example, 0.8 and 0.2 respectively; and A pre-defined reference dimension conversion factor, such as the normal fluctuation range of the trend characteristics and fluctuation characteristics of each parameter under historical stable operating conditions or design operating conditions.
[0078] Using the above calculation method, when the overall trend of engine operating parameters is small and the fluctuation range is low, the operating condition stability index... A smaller value indicates that the engine is in a relatively stable operating state; when the operating parameters show a significant trend or fluctuate greatly, the operating condition stability index... The corresponding increase indicates a decrease in the stability of the engine's operating state.
[0079] Step S22: Construct working condition monitoring statistics based on the working condition feature vector, and perform cumulative processing on the working condition monitoring statistics to obtain offset statistics that characterize the cumulative change of working condition distribution over time.
[0080] In this step, based on the obtained operating condition stability index, the engine operating conditions are further detected from a time-cumulative perspective to determine whether there are continuous changes. Specifically, by constructing and accumulating operating condition monitoring statistics, the distribution of operating parameters is identified as having significantly deviated from historical reference states.
[0081] In practical implementation, the operating condition stability index will be used. As input to the operating condition monitoring statistics, and to construct the instantaneous offset. .in: This represents the instantaneous offset corresponding to the current time window; This represents the reference average value of the operating condition stability index obtained from statistics during a historical stable operating condition period.
[0082] Based on this, the instantaneous offset is accumulated over time to obtain the cumulative offset statistic, which is calculated as follows:
[0083] ;
[0084] To avoid the impact of short-term fluctuations on the accumulation results, and to enhance the detection capability for continuous changes in operating conditions, this invention maintains the historical minimum value of the cumulative offset statistic during the accumulation process:
[0085] ;
[0086] Obtain the offset statistic used to characterize the cumulative change of the operating condition distribution over time. .in: This represents the offset statistic at the current moment, reflecting the cumulative degree of deviation of the operating condition distribution relative to the historical reference state. When the engine operating conditions remain relatively stable, the offset statistic fluctuates within a small range; when the operating conditions undergo continuous changes, the offset statistic gradually increases over time.
[0087] Step S23: When the operating condition stability index is lower than the first preset threshold and the offset statistics do not exceed the second preset threshold, the engine operating state is determined to be in a stable operating condition stage; when the operating condition stability index is continuously higher than the first preset threshold or the offset statistics exceed the second preset threshold, the engine operating state is determined to be in an operating condition transition stage.
[0088] This step achieves reliable differentiation of engine operating condition stages by jointly determining the results of instantaneous stability analysis and time cumulative offset analysis.
[0089] Specifically, let the first preset threshold be... The second preset threshold is Then the criteria for determining the steady-state condition can be expressed as: and When the above conditions are met simultaneously, it indicates that the overall trend of engine operating parameters is gentle, the degree of fluctuation is low, and there is no significant cumulative shift in the distribution of operating parameters. At this time, it can be determined that the engine is in a stable operating condition.
[0090] Accordingly, the criteria for determining the condition transition phase can be expressed as follows: or The meanings are as follows: the engine operating parameters show a significant trend change or increased fluctuation within a short period of time; the distribution of engine operating parameters undergoes a continuous cumulative shift over time. When either of the above conditions is met, it indicates that the engine operating condition is transitioning from one state to another, and the engine operating state is thus determined to be in the condition transition stage.
[0091] Through the above-mentioned working condition stage determination mechanism, the present invention can identify working condition migration behavior in a timely manner at an early stage when the working condition changes, providing a reliable stage determination basis for subsequent relationship validity weight calculation and migration suppression strategy implementation.
[0092] Step S3: Construct a knowledge graph of ship engine failures and configure relational attributes related to operating conditions for at least some graph relationships to characterize the operating condition applicability characteristics of the corresponding relationships;
[0093] This step aims to address the issue that the same fault symptoms or parameter anomalies of ship engines may have different engineering semantics under different operating conditions. By introducing operating condition constraint information into the relationships at the knowledge graph level, the graph relationships are no longer regarded as constant and valid in the time and operating condition dimensions, thus providing a structured foundation for subsequent operating condition-based relationship validity calculations and controlled reasoning.
[0094] In the specific implementation process, the first step is to construct a knowledge graph of ship engine failures. This knowledge graph includes failure entities, symptom entities, parameter anomaly entities, and operating condition entities, which are linked through relationships. These relationships include at least those representing causal relationships between failures and relationships representing symptom representations, such as the causal relationship between failures and symptoms, and the representational relationship between symptoms and parameter anomalies.
[0095] After completing the basic structure of the knowledge graph, we processed the relation types that are highly sensitive to operating conditions and whose engineering semantics are prone to shift with changes in operating conditions.
[0096] As an example, configuring relationship attributes related to operating conditions for at least some of the graph relationships includes:
[0097] To represent the causal relationship or symptom representation relationship of a fault, relational attributes related to operating conditions are configured. These relational attributes include at least: a condition prototype attribute for characterizing the characteristics of the corresponding operating condition when the causal relationship is established; a condition applicability attribute for characterizing the applicable operating conditions of the causal relationship to limit the effectiveness of the causal relationship under different operating conditions; a condition drift sensitivity attribute for characterizing the sensitivity of the causal relationship to changes in operating conditions; a relation reliability attribute for characterizing the historical reliability of the causal relationship; and a timeliness attribute for characterizing the decay characteristics of the causal relationship over time.
[0098] The operating condition prototype attribute describes the typical operating condition characteristics corresponding to when the graph relationship is confirmed to be valid in historical data or empirical rules, providing a reference benchmark for subsequent operating condition matching and deviation calculation. The operating condition applicability attribute limits the effective range of the graph relationship in the operating condition space, ensuring that the graph relationship only participates in inference when the operating condition similarity condition is met. The operating condition drift sensitivity attribute reflects the sensitivity of the graph relationship to changes in operating conditions, distinguishing between graph relationships that are highly sensitive to changes in operating conditions and relatively stable graph relationships. Furthermore, the relationship credibility attribute characterizes the reliability of the graph relationship during historical diagnosis or verification, and the timeliness attribute reflects the potential decay of the effectiveness of the graph relationship over time.
[0099] By simultaneously introducing the above-mentioned multiple relational attributes, this invention can describe the graph relations from multiple dimensions such as working condition matching, scope of application, sensitivity, and historical reliability.
[0100] It should be noted that the aforementioned relational attributes are numerical attributes that are pre-modeled and configured in a computable form when constructing the ship engine fault knowledge graph. Specifically, these relational attributes are used to characterize the degree of matching between the graph relations and the operating conditions, as well as their response characteristics to changes in operating conditions. Therefore, they are recorded in the graph storage structure in the form of vectors or numerical parameters so that they can directly participate in the calculation of subsequent relation validity weights.
[0101] For example, when constructing a knowledge graph of ship engine failures, for a causal relationship of failure that represents "abnormal fuel injector atomization leading to increased exhaust temperature", corresponding relationship attributes can be configured on the graph relationship.
[0102] The prototype operating condition attribute can be represented by the mean of the operating condition feature vectors corresponding to when the graph relationship was confirmed to be valid in historical diagnostics. For example: collect multiple operating condition samples when the graph relationship was verified to be valid in historical diagnostics. Each sample includes multi-dimensional operating parameters such as speed, load, exhaust temperature, and lubricating oil pressure. Calculate the arithmetic mean of each parameter to obtain the prototype operating condition feature vector. This vector represents the working condition prototype attribute of the graph relationship.
[0103] The applicable operating condition range attribute can be represented by a numerical parameter characterizing the deviation of the applicable operating condition from the allowable range of the graph relationship. For example: calculate the operating condition feature vector and the operating condition prototype feature vector of the operating condition sample when the above verification is valid. The distance between them (e.g., Euclidean distance) is used to obtain a set of distance values. A quantile of this set of distances (e.g., the 90th quantile) is then taken as the applicable range parameter. For example, if the 90th percentile is calculated to be 0.4, then we set: This indicates the degree of deviation between the current operating condition and the prototype operating condition. The relationship may be valid when the value is less than 0.4; its validity decreases significantly when the value exceeds 0.4.
[0104] The aforementioned operating condition drift sensitivity attribute can be represented by a coefficient used to adjust the intensity of the response of the spectrum relationship to changes in operating conditions. For example: a sensitivity coefficient is set based on the degree of dependence of the fault mechanism on changes in operating conditions. For example, for injector failures that are highly sensitive to load changes, one could take... For relationships that are not sensitive to changes in operating conditions, a smaller value can be taken, such as... .
[0105] The reliability attribute of the relationship can be numerically configured based on the successful verification ratio of the graph relationship in historical diagnostic samples. For example: the ratio of the number of times the graph relationship was correctly verified in historical diagnoses to the total number of verifications is calculated and used as the reliability attribute. For example, if this relationship was involved in 16 diagnoses, with 15 correct and 1 incorrect, then:
[0106]
[0107] The reliability attribute of this relationship can also be dynamically updated using an exponential decay method to reflect the latest verification results.
[0108] The timeliness attribute can be represented by a time constant, which describes the rate at which the validity of the graph relationship decays over time. For example: the time constant is set according to the aging pattern of knowledge. For example, if the half-life of this relationship is estimated to be 180 days, then:
[0109]
[0110] This indicates that after 260 days, the credibility of an unverified relationship decreases to its original level. Multiples. For knowledge with a short update cycle, a smaller value can be set. .
[0111] This step ensures that at least some graph relations in the knowledge graph have clear operational condition applicable semantics, which can be used to calculate the validity weight of relations and implement controlled reasoning based on the current operational condition, thereby avoiding the indiscriminate activation of historical relations when the operational condition changes.
[0112] Step S4: Based on the operating condition feature vector and the relationship attribute corresponding to the current operating condition stage, calculate the relationship validity weight of the graph relationship under the current operating condition, and apply migration suppression to at least some of the graph relationships formed in the stable operating condition stage when the engine is in the operating condition migration stage.
[0113] Based on determining the engine's current operating condition stage, the operating condition information is introduced into the knowledge graph relationship level. The applicability of different graph relationships under the current operating condition is quantitatively evaluated, thereby avoiding the indiscriminate application of relationships formed under historical stable operating conditions to the current operating state, and improving the adaptability of the fault diagnosis reasoning process to changes in operating conditions.
[0114] In its specific implementation, this invention calculates the validity weight of relations so that different relations have different degrees of participation in reasoning under the current operating conditions. When a state transition phase is detected, relations that are no longer applicable are suppressed, serving as a continuous and adjustable control basis for subsequent controlled reasoning.
[0115] As an example, based on the operating condition feature vector corresponding to the current operating condition stage and the relationship attributes, the relationship validity weight of the graph relationship under the current operating condition is calculated, including:
[0116] Step S41: Based on the working condition feature vector corresponding to the current working condition stage and the working condition prototype attribute of the graph relationship, calculate the degree of working condition deviation of the graph relationship under the current operating condition.
[0117] In this step, let the characteristic vector of the current operating condition be denoted as . The working condition prototype attributes corresponding to the graph relationship are: The deviation between the current operating condition and the typical operating condition when this relationship holds can be characterized by calculating the distance between the two. The calculation form is as follows: .in: Representing spectral relationships The degree of deviation from the current operating conditions; This represents the L2 norm operation.
[0118] Using the above method, if the current operating condition is close to the corresponding prototype operating condition, the degree of deviation of the operating condition is small; when the difference between the two is large, the degree of deviation of the operating condition increases accordingly.
[0119] Step S42: Determine the applicability factor of the graph relationship under the current operating conditions based on the degree of deviation of the operating conditions and the applicable range attribute and the drift sensitivity attribute of the graph relationship.
[0120] In this step, let the applicable range attribute of the working condition of the graph relationship be: The operating condition drift sensitivity attribute is Then, an operating condition suitability factor can be constructed based on the degree of deviation from the operating condition, and its calculation form is as follows:
[0121] ;
[0122] in: Representing spectral relationships The operating condition suitability factor under the current operating conditions; This is used to characterize the sensitivity of the graph relationship to changes in operating conditions; This is used to define the scope of application of the graph relationship in the working space.
[0123] When the deviation from the operating condition is small or the graph relationship is not sensitive to changes in the operating condition, the operating condition suitability factor takes a larger value; when the deviation from the operating condition is large and the graph relationship is sensitive to changes in the operating condition, the operating condition suitability factor decreases accordingly.
[0124] Step S43: Based on the reliability and timeliness attributes of the graph relationship, the working condition applicability factor is modified to reflect the historical reliability of the graph relationship and its effectiveness over time.
[0125] Let the reliability attribute of the graph relationship be . The time-sensitive attribute is The time interval between the current time and the most recent confirmation of the relationship is . Then, the suitability factor for the operating condition can be corrected, and its calculation form is as follows:
[0126] ;
[0127] in: This indicates the modified operating condition suitability factor.
[0128] By introducing relationship reliability and timeliness attributes, the applicability of relationships with low historical reliability or those that have not been verified for a long time under current operating conditions can be further reduced.
[0129] Step S44: Based on the modified operating condition applicability factor, determine the relationship validity weight of the graph relationship in the current operating condition stage.
[0130] As an example, based on a modified operating condition suitability factor, the validity weight of the graph relationships in the current operating condition stage is determined, including:
[0131] The modified operating condition applicability factor is used as a weight value to characterize the effectiveness of the graph relationship in the current operating condition stage, and the weight value is determined as the relationship effectiveness weight corresponding to the graph relationship in the current operating condition stage.
[0132] The modified operating condition suitability factor is directly used as the relation validity weight, i.e. .in: Representing spectral relationships The relation validity weight under the current working condition stage is used to characterize the degree to which the relation participates in reasoning in the subsequent knowledge graph reasoning process.
[0133] When the engine is in the condition transition phase, to prevent the graph relationships formed in the stable operating condition phase from continuing to dominate fault diagnosis reasoning in the current phase, a migration inhibition factor is introduced into the relationship validity weight of the graph relationships. This dynamically reduces their validity under the current operating condition, that is, reduces the influence of the relationships formed in the stable operating condition phase in the current operating condition phase. The form is as follows:
[0134]
[0135] For example, migration inhibitors The calculation method is illustrated below with an example:
[0136] Based on the aforementioned operating condition stability index and offset statistics This paper quantifies the degree of migration in the current operating condition stage. To this end, the degree to which the operating condition stability index and the deviation statistic exceed their corresponding thresholds are normalized, as follows:
[0137] ;
[0138] ;
[0139] in, This refers to the stability index of the operating conditions corresponding to the current time window. This is the offset statistic corresponding to the current time window. and These are the first preset threshold and the second preset threshold used above, respectively.
[0140] Based on this, the normalization results are combined to obtain the migration intensity parameter, which characterizes the degree of migration under the current operating conditions. Its calculation form is as follows: .in, and This is a weighting coefficient used to balance the influence of the stability index and the offset statistic.
[0141] Furthermore, the migration inhibition factor is determined based on the migration intensity parameter, and its calculation form is as follows:
[0142] ;
[0143] in, This is the suppression intensity adjustment coefficient, used to control the decay rate of the migration suppression factor as the degree of migration changes with the operating condition.
[0144] Using the above calculation method, when the engine is operating under stable conditions, the migration strength parameter... The value is zero or close to zero, at which point the migration inhibition factor... When the value is close to 1, it does not inhibit the effectiveness weight of the relationship. As the engine enters the working condition migration stage and the degree of migration gradually increases, the migration inhibition factor decreases accordingly, thereby exerting a gradually increasing inhibition effect on the graph relationship formed in the stable working condition stage.
[0145] Step S5: Perform controlled reasoning on the fault knowledge graph based on relation validity weights, that is, only activate graph relations whose relation validity weights meet preset conditions to generate ship engine fault diagnosis results that match the current operating condition stage.
[0146] During the long-term operation of a ship's engine, the same symptom or parameter anomaly may correspond to different fault semantics under different operating conditions. If the relationships are not filtered during the inference phase, high-confidence relationships formed during the stable operating condition phase may continue to dominate the inference results during the condition transition phase. To address this, this invention introduces relationship validity weights as constraints during the inference phase to achieve dynamic control of the inference path.
[0147] In practice, the validity weights of each graph relation calculated in step S4 are first obtained under the current working condition. Then, these validity weights are compared with preset activation conditions to determine whether the corresponding graph relation participates in the current round of reasoning. The preset conditions can be set in the form of a relation validity weight threshold. That is, when the validity weight of a graph relation is greater than or equal to the threshold, the graph relation is considered to have sufficient applicability under the current working condition and is thus activated to participate in knowledge graph reasoning; when the validity weight is lower than the threshold, the relation's participation in the current reasoning process is suppressed.
[0148] After filtering the graph relationships, the associations between fault entities, symptom entities, and abnormal parameter entities are analyzed solely based on the activated graph relationships to generate fault diagnosis results that match the current operating condition stage. It is understandable that, since the relationships involved in the reasoning have been constrained by the operating condition stage perception and relationship validity weighting mechanism, the obtained diagnostic results can effectively reflect the actual fault semantics of the engine under the current operating condition.
[0149] Through the above-mentioned controlled reasoning method, the present invention avoids the problem of using historical stable operating condition relationships for reasoning when operating conditions change, so that the fault diagnosis results can be dynamically adjusted with changes in operating conditions, thereby improving the rationality and engineering applicability of the diagnosis results in complex and dynamic operating scenarios.
[0150] Please see Figure 2This invention also provides a knowledge graph-based ship engine fault diagnosis device 100, the device comprising:
[0151] The data acquisition and operating condition feature construction module 10 is used to collect multi-dimensional operating data of the ship engine in order to construct an operating condition feature vector that characterizes the changing trend and fluctuation characteristics of the engine's operating status.
[0152] The operating condition stage determination module 20 is used to calculate the stability index of the engine operating condition based on the operating condition feature vector, and combine it with the offset statistics that characterize the cumulative change of the operating condition distribution to determine the current operating condition stage of the engine, including the stable operating condition stage and the operating condition transition stage.
[0153] The knowledge graph construction and relation attribute configuration module 30 is used to construct a knowledge graph of ship engine failures and configure relation attributes related to operating conditions for at least some graph relations to characterize the operating condition applicability characteristics of the corresponding relations.
[0154] The relation validity weight calculation module 40 is used to calculate the relation validity weight of the graph relation under the current operating condition based on the operating condition feature vector and the relation attribute corresponding to the current operating condition stage, and to apply migration suppression to at least some of the graph relations formed in the stable operating condition stage when the engine is in the operating condition migration stage.
[0155] The controlled reasoning module 50 is used to perform controlled reasoning on the fault knowledge graph based on the relation validity weight, that is, to activate only the graph relations whose relation validity weights meet the preset conditions, and generate a ship engine fault diagnosis result that matches the current working condition stage.
[0156] As an example, please refer to Figure 3 The working condition stage determination module 20 includes:
[0157] The stability calculation unit 201 is used to parse the trend features that characterize the changing trend of the operating parameters and the fluctuation features that characterize the degree of fluctuation of the operating parameters from the operating condition feature vector, and to calculate the operating condition stability index based on the trend features and fluctuation features.
[0158] The offset statistics construction unit 202 is used to construct operating condition monitoring statistics based on the operating condition feature vector, and to perform cumulative processing on the operating condition monitoring statistics to obtain offset statistics that characterize the cumulative change of operating condition distribution over time.
[0159] The stage determination unit 203 is used to determine the engine operating state as a stable operating state stage when the operating condition stability index is lower than the first preset threshold and the offset statistics do not exceed the second preset threshold; and to determine the engine operating state as an operating condition transition stage when the operating condition stability index is continuously higher than the first preset threshold or the offset statistics exceed the second preset threshold.
[0160] As an example, the knowledge graph construction and relation attribute configuration module 30 is specifically used for:
[0161] To represent the causal relationship or symptom representation relationship of a fault, relational attributes related to operating conditions are configured. These relational attributes include at least: a condition prototype attribute for characterizing the characteristics of the corresponding operating condition when the causal relationship is established; a condition applicability attribute for characterizing the applicable operating conditions of the causal relationship to limit the effectiveness of the causal relationship under different operating conditions; a condition drift sensitivity attribute for characterizing the sensitivity of the causal relationship to changes in operating conditions; a relation reliability attribute for characterizing the historical reliability of the causal relationship; and a timeliness attribute for characterizing the decay characteristics of the causal relationship over time.
[0162] As an example, please refer to Figure 4 The relation validity weight calculation module 40 includes:
[0163] The working condition deviation calculation unit 401 is used to calculate the degree of working condition deviation of the graph relationship under the current operating condition based on the working condition feature vector corresponding to the current working condition stage and the working condition prototype attribute of the graph relationship.
[0164] The working condition applicability factor determination unit 402 is used to determine the working condition applicability factor of the graph relationship under the current operating condition based on the degree of working condition deviation and the working condition applicability range attribute and working condition drift sensitivity attribute of the graph relationship.
[0165] The applicability factor correction unit 403 is used to correct the working condition applicability factor according to the relationship reliability attribute and timeliness attribute of the graph relationship, so as to reflect the historical reliability of the graph relationship and its effectiveness over time.
[0166] The weight determination unit 404 is used to determine the relationship validity weight corresponding to the current working condition stage of the graph relationship based on the modified working condition applicability factor.
[0167] As an example, the weight determination unit 404 is specifically used for:
[0168] The modified operating condition applicability factor is used as a weight value to characterize the effectiveness of the graph relationship in the current operating condition stage, and the weight value is determined as the relationship effectiveness weight corresponding to the graph relationship in the current operating condition stage.
[0169] This invention also provides a non-volatile storage medium storing a computer program thereon, which, when executed by a processor, implements the method described in any of the preceding claims.
[0170] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements the method described in any of the preceding claims.
[0171] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A ship engine fault diagnosis method based on a knowledge graph, characterized in that, The method includes the following steps: Step S1: Collect multi-dimensional operating data of the ship's engine to construct a working condition feature vector that characterizes the changing trend and fluctuation characteristics of the engine's operating status. Step S2: Calculate the stability index of the engine operating condition based on the operating condition feature vector, and determine the current operating condition stage of the engine by combining the offset statistics that characterize the cumulative change of the operating condition distribution, including the stable operating condition stage and the operating condition transition stage. Step S3: Construct a knowledge graph of ship engine failures and configure relational attributes related to operating conditions for at least some graph relationships to characterize the operating condition applicability characteristics of the corresponding relationships; Based on the operating condition feature vector and the relationship attributes corresponding to the current operating condition stage, calculate the relationship validity weight of the graph relationship under the current operating condition, including: Step S41: Based on the working condition feature vector corresponding to the current working condition stage and the working condition prototype attribute of the graph relationship, calculate the degree of working condition deviation of the graph relationship under the current operating condition. Step S42: Determine the applicability factor of the graph relationship under the current operating conditions based on the degree of deviation of the operating conditions and the applicable range attribute and the drift sensitivity attribute of the graph relationship. Step S43: Based on the reliability and timeliness attributes of the graph relationship, the working condition applicability factor is modified to reflect the historical reliability of the graph relationship and its effectiveness over time. Step S44: Based on the modified operating condition applicability factor, determine the relationship validity weight of the graph relationship in the current operating condition stage; Step S4: Based on the operating condition feature vector and the relationship attribute corresponding to the current operating condition stage, calculate the relationship validity weight of the graph relationship under the current operating condition, and apply migration suppression to at least some of the graph relationships formed in the stable operating condition stage when the engine is in the operating condition migration stage. Step S5: Perform controlled reasoning on the fault knowledge graph based on relation validity weights, that is, only activate graph relations whose relation validity weights meet preset conditions to generate ship engine fault diagnosis results that match the current operating condition stage. 2.The knowledge graph-based ship engine fault diagnosis method according to claim 1, characterized in that, Based on the aforementioned operating condition feature vector, the stability index of the engine's operating condition is calculated, and the current operating condition stage of the engine is determined by combining the offset statistics characterizing the cumulative change in the operating condition distribution, including: Step S21: Extract the trend features that characterize the changing trend of the operating parameters and the fluctuation features that characterize the degree of fluctuation of the operating parameters from the operating condition feature vector, and calculate the operating condition stability index based on the trend features and fluctuation features. Step S22: Construct working condition monitoring statistics based on the working condition feature vector, and perform cumulative processing on the working condition monitoring statistics to obtain offset statistics that characterize the cumulative change of working condition distribution over time. Step S23: When the operating condition stability index is lower than the first preset threshold and the offset statistics do not exceed the second preset threshold, the engine operating state is determined to be in a stable operating condition stage; when the operating condition stability index is continuously higher than the first preset threshold or the offset statistics exceed the second preset threshold, the engine operating state is determined to be in an operating condition transition stage. 3.The knowledge graph-based ship engine fault diagnosis method according to claim 2, characterized in that, The configuration of relationship attributes related to operating conditions for at least some of the graph relationships includes: To represent the causal relationship or symptom representation relationship of a fault, relational attributes related to operating conditions are configured. These relational attributes include at least: a condition prototype attribute for characterizing the characteristics of the corresponding operating condition when the causal relationship is established; a condition applicability attribute for characterizing the applicable operating conditions of the causal relationship to limit the effectiveness of the causal relationship under different operating conditions; a condition drift sensitivity attribute for characterizing the sensitivity of the causal relationship to changes in operating conditions; a relation reliability attribute for characterizing the historical reliability of the causal relationship; and a timeliness attribute for characterizing the decay characteristics of the causal relationship over time.
4. The knowledge graph-based ship engine fault diagnosis method according to claim 3, characterized in that, Based on the modified operating condition applicability factor, the validity weight of the graph relationships in the current operating condition stage is determined, including: The modified operating condition applicability factor is used as a weight value to characterize the effectiveness of the graph relationship in the current operating condition stage, and the weight value is determined as the relationship effectiveness weight corresponding to the graph relationship in the current operating condition stage.
5. A knowledge graph-based ship engine fault diagnosis device, used to implement the knowledge graph-based ship engine fault diagnosis method according to any one of claims 1-4, characterized in that, The device includes: The data acquisition and operating condition feature construction module is used to collect multi-dimensional operating data of ship engines in order to construct an operating condition feature vector that characterizes the changing trend and fluctuation characteristics of engine operating status. The operating condition stage determination module is used to calculate the stability index of the engine operating condition based on the operating condition feature vector, and combine it with the offset statistics that characterize the cumulative change of the operating condition distribution to determine the current operating condition stage of the engine, including the stable operating condition stage and the operating condition transition stage. The knowledge graph construction and relation attribute configuration module is used to construct a knowledge graph of ship engine failures and configure relation attributes related to operating conditions for at least some graph relations to characterize the operating condition applicability characteristics of the corresponding relations. The relation validity weight calculation module is used to calculate the relation validity weight of the graph relation under the current operating condition based on the operating condition feature vector and the relation attribute corresponding to the current operating condition stage, and to apply migration suppression to at least some of the graph relations formed in the stable operating condition stage when the engine is in the operating condition migration stage. The controlled reasoning module is used to perform controlled reasoning on the fault knowledge graph based on the relation validity weights, that is, to activate only the graph relations whose relation validity weights meet preset conditions, and generate ship engine fault diagnosis results that match the current operating condition stage.
6. The knowledge graph-based marine engine fault diagnosis device according to claim 5, characterized in that, The operating condition stage determination module includes: The stability calculation unit is used to parse the trend features that characterize the changing trend of the operating parameters and the fluctuation features that characterize the degree of fluctuation of the operating parameters from the operating condition feature vector, and to calculate the operating condition stability index based on the trend features and fluctuation features. The offset statistics construction unit is used to construct operating condition monitoring statistics based on the operating condition feature vector, and to perform cumulative processing on the operating condition monitoring statistics to obtain offset statistics that characterize the cumulative change of operating condition distribution over time. The stage determination unit is used to determine the engine operating state as a stable operating state stage when the operating condition stability index is lower than a first preset threshold and the offset statistics do not exceed a second preset threshold; and to determine the engine operating state as an operating condition transition stage when the operating condition stability index is continuously higher than the first preset threshold or the offset statistics exceed the second preset threshold.
7. The knowledge graph-based marine engine fault diagnosis device according to claim 6, characterized in that, The knowledge graph construction and relation attribute configuration module is specifically used for: To represent the causal relationship or symptom representation relationship of a fault, relational attributes related to operating conditions are configured. These relational attributes include at least: a condition prototype attribute for characterizing the characteristics of the corresponding operating condition when the causal relationship is established; a condition applicability attribute for characterizing the applicable operating conditions of the causal relationship to limit the effectiveness of the causal relationship under different operating conditions; a condition drift sensitivity attribute for characterizing the sensitivity of the causal relationship to changes in operating conditions; a relation reliability attribute for characterizing the historical reliability of the causal relationship; and a timeliness attribute for characterizing the decay characteristics of the causal relationship over time.
8. A non-volatile storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the knowledge graph-based ship engine fault diagnosis method as described in any one of claims 1-4.
9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the knowledge graph-based ship engine fault diagnosis method as described in any one of claims 1-4.