Intelligent factory semantic decision generation method and system based on knowledge graph
By acquiring and processing operational data in a smart factory, and using knowledge graphs for semantic feature extraction and matching to generate dynamic decision instructions, the fragmentation problem of equipment operating status representation is solved, and adaptive optimization of equipment control strategies and timeliness and reliability of decision strategies are achieved.
Patent Information
- Application Number
- CN202510825945.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-19
- Publication Date
- 2025-11-11
AI Technical Summary
Existing technologies struggle to effectively integrate semantic information from device log texts, resulting in a lack of contextual relevance in the representation of operational status. This makes it impossible to identify the implicit connections between parameter fluctuation patterns and device operation records. Furthermore, static rule bases cannot adapt to the dynamic changes in device collaboration relationships in the production environment, leading to a mismatch between decision-making strategies and real-time operating conditions. Manual maintenance knowledge bases also suffer from response lag.
By acquiring the operational data set of the smart factory, semantic feature extraction and context-related feature processing are performed. Dynamic semantic matching is then carried out using a knowledge graph structure to generate a set of semantic decision instructions. Based on the operational optimization results, the knowledge graph structure is updated to achieve adaptive optimization of equipment control strategies.
It improves the matching accuracy between equipment control strategies and environmental changes, ensures the timeliness and reliability of decision-making strategies, reduces human intervention, and improves the adaptability and accuracy of decision-making.
Smart Images

Figure CN120928783A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of knowledge graphs, and more specifically, to a method and system for generating semantic decisions for intelligent factories based on knowledge graphs. Background Technology
[0002] With the advancement of industrial intelligent transformation, real-time decision-making in smart factories has become a key support. This technology generates control strategies by analyzing equipment operating status data to achieve autonomous optimization of production processes. Existing technologies typically employ numerical parameter threshold monitoring or preset rule base matching, triggering preset control commands based on isolated analysis of operating parameters such as equipment temperature and pressure, or using logical reasoning through static knowledge bases built from human experience. However, such methods struggle to effectively integrate semantic information from equipment log text, resulting in a lack of contextual relevance in the representation of operating status and an inability to identify the implicit connections between parameter fluctuation patterns and equipment operation records. Furthermore, static rule bases cannot adapt to the dynamic changes in equipment collaboration relationships within the production environment, easily leading to a mismatch between decision-making strategies and real-time operating conditions. Additionally, manually maintained knowledge bases suffer from response lag, limiting the accuracy and adaptability of decision-making in complex production scenarios. Summary of the Invention
[0003] This invention provides a method and system for generating semantic decisions for intelligent factories based on knowledge graphs.
[0004] In a first aspect, embodiments of the present invention provide a method for generating semantic decisions for intelligent factories based on knowledge graphs, including:
[0005] Obtain the operational data set of the smart factory, which includes multiple equipment operating parameters and corresponding semantic description text;
[0006] Semantic feature extraction processing is performed on the running data set to generate target semantic features of the device running parameters and contextual features of the semantic description text;
[0007] Based on a pre-built knowledge graph structure, dynamic semantic matching processing is performed on the target semantic features and the context association features to generate a set of semantic decision instructions corresponding to the device operating parameters;
[0008] Based on the instruction priority and instruction execution conditions in the semantic decision instruction set, a set of equipment control strategies is generated. The set of equipment control strategies is used to adjust the operating parameters of the target equipment in the smart factory.
[0009] The set of equipment control strategies is fed back to the control system of the smart factory to trigger operation optimization, and the semantic node associations in the knowledge graph structure are updated based on the execution results of the operation optimization.
[0010] In a second aspect, embodiments of the present invention provide a computer system, comprising:
[0011] A memory, wherein a computer program is stored;
[0012] A processor is used to load the computer program to implement the knowledge graph-based semantic decision generation method for smart factories as described above.
[0013] The intelligent factory semantic decision generation method and system provided by this invention forms a multimodal data base by timestamping and storing equipment operating parameters and semantic description text. It generates target semantic features by cross-fusing the time-series features of parameter change trends with the topological features of the parameter dependency graph. Semantic path matching is then performed using dynamic association rules of equipment type nodes, operating mode nodes, and fault type nodes in the knowledge graph structure, generating a set of semantic decision instructions with parameter correction direction and magnitude. This method effectively solves the problem of fragmented equipment operating status representation, improves the interpretability of feature extraction through a collaborative verification mechanism of numerical parameters and text description, and achieves adaptive optimization of decision logic through dynamic adjustment of knowledge graph node connections and path weights, significantly enhancing the matching accuracy of equipment control strategies with environmental changes. Simultaneously, the mechanism of updating knowledge graph node associations based on operating optimization results enables the decision knowledge base to continuously absorb new operating modes and fault response experience from the production environment, ensuring the timeliness and reliability of decision strategies while reducing human intervention. Attached Figure Description
[0014] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0015] Figure 1 This is a flowchart of a semantic decision generation method for intelligent factories based on knowledge graphs, provided in an embodiment of the present invention.
[0016] Figure 2 This is a schematic diagram of the composition of a computer system provided in an embodiment of the present invention. Detailed Implementation
[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] Please see Figure 1 , Figure 1 A flowchart illustrating a knowledge graph-based semantic decision generation method for intelligent factories, provided as an embodiment of the present invention, is available. This method can be executed by a computer system and may include the following steps:
[0019] Step S100: Obtain the smart factory's operational data set, which includes multiple equipment operating parameters and corresponding semantic description text.
[0020] The operational dataset is a collection of data containing information related to the operation of various devices within a smart factory. Device operating parameters are specific quantitative indicators describing the operating status of the devices, such as values for temperature, pressure, and energy consumption. These parameters can intuitively reflect the operating status of the devices. Semantic descriptive text, on the other hand, is textual information that describes the device's operating status, operation history, and abnormal events, providing richer background and contextual information.
[0021] As one implementation method, step S100, acquiring the operational data set of the smart factory, may specifically include the following steps S110 to S140:
[0022] Step S110: Collect the operating status data of the target equipment in real time within a preset time period through multiple data acquisition terminals deployed in the smart factory. The operating status data includes temperature parameters, pressure parameters and energy consumption parameters.
[0023] Data acquisition terminals are hardware devices specifically designed to collect operational data from equipment within a smart factory. They can be installed at different locations on the target equipment and acquire operational status data through various sensors. The target equipment is the specific device in the smart factory from which data collection and analysis are required, such as machine tools and robots on the production line. The preset time period is a pre-defined time range, such as 1 hour or 1 day, used to define the time interval for data collection. Temperature parameters in the operational status data reflect the heat generated by the equipment during operation; excessively high temperatures may affect the equipment's performance and lifespan. Pressure parameters reflect the internal or external pressure levels of the equipment; for equipment requiring specific pressure environments, the stability of pressure parameters is crucial. Energy consumption parameters represent the energy consumed by the equipment during operation; analyzing energy consumption parameters allows for the assessment of the equipment's energy utilization efficiency.
[0024] In practical applications, for example, for a CNC machine tool, temperature sensors can be installed in key areas such as near the spindle motor and the cutting area of the tool to monitor temperature changes in real time; pressure sensors can be installed in the hydraulic system to collect hydraulic oil pressure data; and energy consumption can be recorded using devices such as electricity meters. These data acquisition terminals will collect data at preset time intervals, such as once per minute, and transmit the collected temperature, pressure, and energy consumption parameters to the data processing center, thereby completing the collection of operating status data of the target equipment within a preset time period.
[0025] Step S120: Extract the log text corresponding to the operating status data from the smart factory management system. The log text includes historical operation descriptions and abnormal event descriptions of the target equipment.
[0026] A smart factory's management system is a software system used to manage and monitor factory production operations, recording various operational information and events from the equipment. Log records are textual records stored in the management system. Historical operation descriptions record various operations performed on the target equipment, such as starting, stopping, and adjusting parameters. Abnormal event descriptions record abnormal situations that occur during equipment operation, such as fault alarms and performance degradation. Extracting the log record text corresponding to the operational status data is to correlate the actual operating data of the equipment with operations and abnormal situations, in order to gain a more comprehensive understanding of the equipment's operating history and status.
[0027] For example, a smart factory management system meticulously records every equipment operation, including the time, operator, and operation details. When it's necessary to extract log records corresponding to the operating status data of a specific piece of equipment, the system's database can be queried and filtered based on the equipment identifier and the time range of the collected data. For instance, if operating status data for a specific injection molding machine was collected within a preset time period, then the system can extract all log records related to that injection molding machine during that period using the equipment identifier "Injection Molding Machine 001" and the data collection time range "January 1, 2024 to January 2, 2024." This log might contain descriptions of operator adjustments to the injection molding machine's temperature parameters, as well as descriptions of abnormal events such as overheating alarms at certain times.
[0028] Step S130: Perform standardized format conversion on the operating status data and log record text to generate device operating parameters and semantic description text.
[0029] Standardization format conversion involves processing the collected operational status data and log records into a unified format for subsequent analysis and processing. Operational status data may originate from different data acquisition terminals, resulting in inconsistent formats and units; for example, temperature parameters may be expressed in degrees Celsius in some cases and in Fahrenheit in others. Similarly, log records may be presented in different ways. Standardization format conversion transforms this data and text into a unified format and standard, facilitating data storage, retrieval, and analysis.
[0030] For the standardized format conversion of operational status data, data mapping and unit conversion methods can be used. For example, temperature parameters in different units can be uniformly converted to degrees Celsius, and pressure parameters in different formats can be converted to a unified numerical precision and unit. For the standardized format conversion of log text, natural language processing techniques, such as text segmentation, part-of-speech tagging, and named entity recognition, can be used to structure the text, giving it a unified format and semantic representation. For example, temperature data collected from a device recorded in Fahrenheit as "104°F" can be converted to "40°C" using a temperature conversion formula. For the log text "At 10:00 AM today, device 001 experienced a high temperature alarm," word segmentation technology can be used to break it down into words such as "today," "morning," "10:00 AM," "device 001," "experienced," "high temperature," and "alarm," and then part-of-speech tagging and named entity recognition can be performed to convert it into structured text information, such as {Time: "January 1, 2024, 10:00 AM", Device Identifier: "Device 001", Event Type: "High Temperature Alarm"}.
[0031] Step S140: Associate and store the device operating parameters and semantic description text according to the collection timestamp to generate an operating data set, and mark the data type of the device operating parameters and the text source identifier of the semantic description text in the operating data set.
[0032] The data acquisition timestamp is the specific point in time when the data was acquired, uniquely identifying the acquisition time of each set of equipment operating parameters and semantic description text. Associating and storing equipment operating parameters and semantic description text according to their acquisition timestamps establishes a temporal correspondence between the two, allowing subsequent analysis to match the equipment's operating status with the relevant textual descriptions based on time information. The data type identifier identifies the specific type of the equipment operating parameter, such as temperature, pressure, or energy consumption; the text source identifier indicates the source of the semantic description text, such as log records from the management system or operator feedback.
[0033] In actual storage, a database can be used to store the runtime data set. For example, using a relational database like MySQL, a table named "Running Data Set" can be created, containing fields such as device operating parameters, semantic description text, collection timestamp, data type, and text source identifier. The device operating parameters and semantic description text, after being standardized and converted, are matched according to the collection timestamp, and the relevant information is inserted into the table. For example, if the temperature parameter of a certain device is collected at 10:00 AM on January 1, 2024, and the corresponding semantic description text is "Device 001 has an over-temperature alarm," then a record is inserted into the database with the device operating parameter "40℃," the semantic description text "Device 001 has an over-temperature alarm," the collection timestamp "2024-01-01 10:00:00," the data type "temperature," and the text source identifier "Management System Log."
[0034] Step S200: Perform semantic feature extraction processing on the running data set to generate target semantic features of device operating parameters and contextual features of semantic description text.
[0035] Semantic feature extraction is the process of extracting features from a dataset that reflect the semantic information of the data. Target semantic features are representative features obtained after in-depth analysis of equipment operating parameters, which can more accurately describe the equipment's operating status and trends. Contextual features, on the other hand, are features extracted from semantically descriptive text that reflect the contextual relationships between texts, helping to understand the connections between the events and situations described in the text.
[0036] In one implementation, step S200 may specifically include the following steps S210 to S250:
[0037] Step S210: Perform numerical fluctuation analysis on the equipment operating parameters to determine the parameter change trend and parameter correlation within a preset time period.
[0038] Numerical fluctuation analysis is the process of analyzing the numerical changes in equipment operating parameters. By analyzing the fluctuations of parameters within a preset time period, the stability and trend of equipment operation can be understood. Parameter change trend refers to the direction of change of equipment operating parameters over time, such as increasing, decreasing, or remaining stable; parameter correlation refers to the interrelationship between different equipment operating parameters. For example, there may be a correlation between temperature and pressure parameters; when the temperature increases, the pressure may also increase accordingly.
[0039] When performing numerical fluctuation analysis, time series analysis methods, such as moving averages and exponential smoothing, can be used. Taking the moving average method as an example, if a temperature parameter sequence of a device is collected over a preset time period, T1, T2, ..., Tn, a moving window size k is selected, and the average value within each window is calculated as the smoothed value for that time point. By calculating the moving average at different time points, the trend of temperature parameter changes can be obtained. Simultaneously, the correlation coefficient between the operating parameters of different devices can be calculated to determine the parameter correlation. For example, using the Pearson correlation coefficient, if the calculated correlation coefficient is close to 1, it indicates a strong positive correlation between the two parameters; if it is close to -1, it indicates a strong negative correlation; and if it is close to 0, it indicates a weak correlation.
[0040] Step S220: Extract time series features of equipment operating parameters based on parameter change trends, and generate a parameter dependency graph of equipment operating parameters based on parameter correlation.
[0041] Time series features are characteristics extracted from time series data of equipment operating parameters that reflect the patterns of data change, such as trend features, seasonality features, and periodicity features. Extracting time series features allows for a better understanding of the dynamic changes in equipment operating parameters. A parameter dependency graph is a graphical representation used to show the dependencies between different equipment operating parameters. Nodes in the graph represent equipment operating parameters, edges represent the relationships between parameters, and the weights of the edges indicate the strength of the relationship.
[0042] When extracting time-series features, deep learning models, such as Long Short-Term Memory (LSTM) networks, can be used. LSTM networks have memory capabilities, enabling them to handle long-term dependencies in time-series data. By inputting time-series data of equipment operating parameters into an LSTM network, the network can extract time-series features through training and learning. For example, by inputting the time-series temperature parameters of a device over a preset time period into an LSTM network, the hidden layer outputs of the network can serve as the time-series features of the temperature parameters.
[0043] When generating the parameter dependency graph, the graph structure and edge weights can be determined based on the parameter correlations calculated in step S210. For example, if the correlation coefficient between two device operating parameters is 0.8, then the weight of the edge connecting these two parameter nodes in the parameter dependency graph can be set to 0.8. A graph database, such as Neo4j, can be used to store and manage the parameter dependency graph. In Neo4j, nodes are created to represent device operating parameters, relationships are created to represent the associations between parameters, and weight attributes are set for the relationships.
[0044] Step S230: Perform word segmentation on the semantic description text to obtain multiple text units, and call the pre-trained semantic encoding model to perform context encoding on the multiple text units to generate a set of text vectors for the semantic description text.
[0045] Word segmentation is the process of dividing semantically descriptive text into multiple independent text units, such as words and phrases, according to preset rules. Through word segmentation, text can be represented in a structured way, facilitating subsequent processing and analysis. A pre-trained semantic encoding model is a model trained on a large-scale corpus that can convert text into vector representations, and the distance between vectors reflects the semantic similarity between texts. Contextual encoding is the process of converting text units into vectors while considering the contextual information of the text. A text vector set is the collection obtained after converting each text unit in the semantically descriptive text into a vector.
[0046] When performing word segmentation, open-source Chinese word segmentation tools such as Jieba can be used. Jieba supports multiple segmentation modes, such as precise mode, full mode, and search engine mode. For example, for the semantic description text "Device 001 has an overheating alarm", using Jieba's precise mode for segmentation yields the text units "Device 001", "has", "overheating", and "alarm". For pre-trained semantic encoding models, the BERT (Bidirectional Encoder Representations from Transformers) model can be used. The BERT model is a bidirectional encoder based on the Transformer architecture, capable of capturing the contextual information of the text. Inputting the segmented text units into the BERT model, the model outputs a vector representation of each text unit. For example, inputting "Device 001", "has", "overheating", and "alarm" into the BERT model will output four corresponding vectors, which form the text vector set of the semantic description text.
[0047] Step S240: Determine the semantic association strength between semantic description texts based on the vector similarity in the text vector set, and generate context association features based on the semantic association strength.
[0048] Vector similarity is an indicator that measures the degree of similarity between two vectors. Commonly used methods for calculating vector similarity include cosine similarity and Euclidean distance. By calculating the similarity between vectors in a text vector set, the semantic association strength between semantically descriptive texts can be determined. The semantic association strength reflects the semantic similarity and relevance between different semantically descriptive texts; the higher the strength, the closer the semantics of the two texts are. Contextual association features are features generated based on semantic association strength and can reflect the contextual relationships and logical connections between semantically descriptive texts.
[0049] By calculating the cosine similarity between any two vectors in a text vector set, a similarity matrix can be obtained. Based on this similarity matrix, the semantic association strength between the semantically descriptive texts can be determined. When generating contextual features based on semantic association strength, clustering algorithms, such as the K-Means clustering algorithm, can be used. The text vector set is taken as input, and clustering is performed based on the similarity between vectors, grouping text vectors with higher semantic association strength into one class. The center vector of each cluster can serve as the representative vector of that class; these representative vectors constitute the contextual association features. For example, if the text vector set of semantically descriptive texts is input into the K-Means clustering algorithm, and the number of clusters is set to 3, the algorithm will cluster the text vectors into 3 classes, obtaining 3 cluster center vectors; these 3 vectors are the contextual association features.
[0050] Step S250: Perform feature fusion processing on time series features, parameter dependency graph and context association features to generate target semantic features.
[0051] Feature fusion is the process of integrating and synthesizing different types of features. Through feature fusion, information from various features can be fully utilized to generate more representative and comprehensive target semantic features. Time series features reflect the dynamic changes in equipment operating parameters, parameter dependency graphs show the correlations between different equipment operating parameters, and contextual features reflect the contextual relationships between semantic description texts. Fusing them can more comprehensively describe the operating status of the equipment and related events.
[0052] In one implementation, step S250 may specifically include the following steps S251 to S256:
[0053] Step S251: Align the parameter change trend in the time series features with the correlation direction of the device operating parameters in the parameter dependency graph to generate a time-aligned parameter fluctuation pattern.
[0054] Parameter change trends are features in time series data that reflect the direction of change of equipment operating parameters over time. The correlation direction of equipment operating parameters in a parameter dependency graph represents the direction of mutual influence between different parameters. Time alignment matches parameter change trends and correlation directions of equipment operating parameters along the time dimension, ensuring they correspond at the same point in time. The time-aligned parameter fluctuation pattern, obtained after time alignment and comprehensively considering both parameter change trends and correlation directions, more accurately describes the dynamic changes in the equipment's operating state.
[0055] When performing time alignment, the data collection timestamp can be used as a reference to arrange the parameter change trends in the time series features and the correlation directions of the equipment operating parameters in the parameter dependency graph in chronological order. For example, if the time series features record the temperature parameter change trend of a certain device from January 1, 2024 to January 2, 2024, and the parameter dependency graph records the correlation direction between the temperature and pressure parameters, aligning these two pieces of information according to the data collection timestamps yields the temperature parameter change trend at each time point and its correlation direction with the pressure parameter. In this way, time-aligned parameter fluctuation patterns can be generated. For example, at a certain time point, the temperature parameter shows an upward trend and has a positive correlation with the pressure parameter, meaning that an increase in temperature leads to an increase in pressure.
[0056] Step S252: Mark key parameter nodes in the parameter dependency graph according to the parameter fluctuation pattern, and map the set of text vectors with the highest semantic association strength in the context association features to the key parameter nodes.
[0057] Key parameter nodes are those nodes in the parameter dependency graph that significantly impact the device's operating state. These key nodes can be identified based on parameter fluctuation patterns. For example, in a parameter fluctuation pattern, if the change trend of a certain parameter significantly affects multiple other parameters, then the node corresponding to that parameter is a key parameter node. The set of text vectors with the highest semantic association strength among contextual features represents the text information most strongly correlated with the device's operating state. Mapping these vectors to key parameter nodes can provide richer semantic interpretations and background information for the key parameter nodes.
[0058] When labeling key parameter nodes, factors such as the magnitude and frequency of parameter changes in the parameter fluctuation pattern, as well as the strength of their correlation with other parameters, can be considered. For example, if a parameter exhibits significant changes over a period and has a strong correlation with multiple other parameters, then the node corresponding to that parameter is labeled as a key parameter node. When mapping text vector sets, the set of text vectors with the strongest semantic correlation with the key parameter node can be selected from contextual features based on the parameter type and semantic information represented by the key parameter node, and then associated with the key parameter node. For example, if the key parameter node represents a temperature parameter, a set of text vectors semantically related to "excessively high temperature" or "abnormal temperature" can be selected from contextual features and mapped to the key parameter node corresponding to the temperature parameter.
[0059] Step S253: Based on the mapping results of key parameter nodes, superimpose the semantic distribution of the text vector set on the parameter dependency graph to generate a parameter association network containing text semantic annotations.
[0060] The mapping results of key parameter nodes demonstrate the correspondence between the set of text vectors with the highest semantic association strength in the context association features and the key parameter nodes. The semantic distribution of the text vector set is the spatial distribution of the semantic information represented by the text vectors. Overlaying the semantic distribution of the text vector set onto the parameter dependency graph integrates the semantic information of the text into the parameter dependency graph, so that the nodes and edges in the graph not only contain the association relationships between parameters but also contain related text semantic information. The parameter association network with text semantic annotation is the network obtained after overlay processing, which can more intuitively show the relationship between device operating parameters and semantic description text.
[0061] When overlaying semantic distributions, semantic information of text vector sets can be added as annotations to nodes and edges of the parameter dependency graph based on the mapping results of key parameter nodes. For example, for a set of text vectors mapped to a key parameter node, keywords and key information are extracted and added as annotations to that node. For edges connecting key parameter nodes, corresponding semantic annotations are added based on the semantic relationship between the text vector sets associated with the nodes at both ends of the edge. For example, if the key parameter node "temperature parameter" maps to the text vector set "overheating alarm," then the annotation "overheating alarm" is added to the "temperature parameter" node; if the text vector set associated with the edge between the "temperature parameter" node and the "pressure parameter" node contains the semantic information "temperature increases lead to pressure increases," then the annotation "temperature increases lead to pressure increases" is added to that edge.
[0062] Step S254: Extract the node combinations in the parameter association network that simultaneously satisfy the time series fluctuation threshold and semantic label consistency to generate candidate semantic feature clusters.
[0063] The time-series fluctuation threshold is a pre-defined standard for measuring the degree of fluctuation in equipment operating parameters. When the fluctuation amplitude exceeds this threshold, it indicates that the parameter fluctuation is significant. Semantic labeling consistency means that the semantic labels associated with nodes in a node combination are logically consistent; for example, contradictory semantic labels cannot exist. Candidate semantic feature clusters are node combinations extracted from the parameter association network that satisfy both the time-series fluctuation threshold and semantic labeling consistency. These node combinations can serve as potential semantic features for subsequent analysis and decision-making.
[0064] When extracting node combinations, all node combinations in the parameter association network can be traversed. For each node combination, it is checked whether the parameter fluctuations of its nodes meet the time series fluctuation threshold, and the consistency of the semantic annotations associated with the nodes is also checked. For example, if the time series fluctuation threshold is set to a parameter change exceeding 10%, for a node combination containing "temperature parameter" and "pressure parameter", it is checked whether the changes in temperature and pressure parameters exceed 10% within a preset time period, and whether there are logical contradictions in their associated semantic annotations. If a node combination meets the conditions of time series fluctuation threshold and semantic annotation consistency, it is considered a candidate semantic feature cluster.
[0065] Step S255: Perform logical consistency verification on the candidate semantic feature clusters, remove node combinations that conflict with the text source identifier in the context-related features, and form a conflict-free semantic feature set.
[0066] Logical consistency verification is a process of checking the logical rationality of candidate semantic feature clusters to ensure that the combinations of nodes within them are logically sound. In contextual features, the text source identifier represents the source information of the semantic description text. Node combinations that conflict with the text source identifier may contain inaccurate or inconsistent information. By removing these conflicting node combinations, a conflict-free semantic feature set can be formed, improving the accuracy and reliability of the semantic features.
[0067] When performing logical consistency verification, it's possible to check for logical contradictions between the semantic annotations of node combinations within candidate semantic feature clusters, such as whether "temperature increases" and "temperature decreases" occur simultaneously. For node combinations that conflict with the text source identifier in the context-related features, further verification and judgment are required. For example, if a semantic annotation in a node combination originates from management system logs, but the text information corresponding to that source identifier in the context-related features indicates that the annotation is incorrect, then that node combination is removed from the candidate semantic feature cluster. Through this process, a conflict-free semantic feature set is ultimately formed.
[0068] Step S256: Based on the association direction of the device operating parameters in the parameter dependency graph, perform topological sorting on the conflict-free semantic feature set to generate a target semantic feature chain with temporal dependency, and integrate the text semantic annotation of each node in the target semantic feature chain into the target semantic feature.
[0069] Topological sorting is an algorithm for sorting directed acyclic graphs (DAGs). It arranges nodes in order based on their dependencies. In a parameter dependency graph, the direction of association between device operating parameters represents the dependencies between them. By performing topological sorting on a conflict-free semantic feature set, a target semantic feature chain with temporal dependencies can be generated. The nodes in this chain are arranged sequentially according to time and dependencies. Integrating the textual semantic annotations of each node in the target semantic feature chain into target semantic features allows for the synthesis of the relationships and semantic information of device operating parameters, forming a complete semantic feature representation with temporal dependencies.
[0070] Kahn's algorithm can be used for topological sorting. The basic idea of Kahn's algorithm is to select nodes with an in-degree of 0 from the graph, remove them, add them to the sorted result, update the in-degree of the remaining nodes, and repeat this process until there are no nodes left in the graph. For a conflict-free semantic feature set, it can be viewed as a directed acyclic graph, where nodes are semantic features and edges represent the association directions of device operating parameters. Kahn's algorithm is used to perform topological sorting to obtain the target semantic feature chain. For example, if the conflict-free semantic feature set contains three semantic features: "temperature increase," "pressure increase," and "device failure," and the parameter dependency graph shows that "temperature increase" leads to "pressure increase," and "pressure increase" may lead to "device failure," then after topological sorting, the target semantic feature chain is "temperature increase -> pressure increase -> device failure." Integrating the textual semantic annotations of each node in the target semantic feature chain yields the target semantic feature "temperature increase leads to pressure increase, which may in turn cause device failure."
[0071] Step S300: Based on the pre-built knowledge graph structure, perform dynamic semantic matching processing on the target semantic features and contextual features to generate a set of semantic decision instructions corresponding to the device operating parameters.
[0072] The pre-built knowledge graph structure represents knowledge in the form of a graph, containing the relationships and attribute information between various entities (such as equipment, operations, and faults) in a smart factory. Dynamic semantic matching is the process of matching the target semantic features and contextual features with the semantic information in the knowledge graph structure, considering the dynamic changes in these features. The semantic decision instruction set is a series of instructions generated based on the matching results to guide equipment operation. These instructions are related to equipment operating parameters and can provide corresponding decision suggestions based on the actual operating state of the equipment.
[0073] As one implementation method, the pre-constructed knowledge graph structure is generated through the following steps S301 to S306:
[0074] Step S301: Extract equipment entity identifiers, operation entity types, and fault entity descriptions from the historical operation data of the smart factory to generate an initial node set containing entity attributes.
[0075] Historical operational data for a smart factory comprises various data generated by equipment operation over a past period, including equipment operating parameters, operation records, and fault alarm information. Equipment entity identifiers are information used to uniquely identify equipment in the smart factory, such as equipment number and equipment name; operation entity types describe the types of operations performed on the equipment, such as start, stop, and parameter adjustment; fault entity descriptions are textual descriptions of equipment malfunctions, such as "overheating fault" or "motor fault." The initial node set is a collection of extracted equipment entity identifiers, operation entity types, and fault entity descriptions as nodes, along with their attribute information.
[0076] Extracting equipment entity identifiers, operation entity types, and fault entity descriptions can be achieved through data mining and analysis of historical operational data. For example, for equipment operation records in historical operational data, the equipment number and operation type can be extracted, with the equipment number serving as the equipment entity identifier and the operation type as the operation entity type. For fault alarm information, the fault description can be extracted as the fault entity description. Simultaneously, corresponding attribute information is added to each node, such as the equipment entity's model and specifications, the operation entity's execution time, and the operator.
[0077] Step S302: Perform semantic integrity verification on each entity attribute in the initial node set, and filter out the valid node set with complete attribute descriptions and operation record associations.
[0078] Semantic integrity verification checks the semantic information of entity attributes to ensure that attribute descriptions are accurate, complete, and free of missing or incorrect information. Complete attribute descriptions mean that each attribute of the entity has a clear definition and value; for example, the model and specifications of a device entity have specific content. Operation record association means that there is an association between the node and the device's operation records; for example, an operation entity is associated with the operation record of a certain device entity, and a fault entity is associated with the fault record of a certain device entity. The valid node set is the set of nodes that meet the criteria after semantic integrity verification.
[0079] When performing semantic integrity verification, entity attributes can be checked using preset rules and templates. For example, for the model attribute of a device entity, it can be checked whether it conforms to naming rules; for the execution time attribute of an operation entity, it can be checked whether it is in a valid time format. Simultaneously, association analysis is used to check whether nodes have operation record associations. For example, for an operation entity, it can be checked whether it is associated with the operation record of a certain device entity; if there is no association, the node is excluded. For instance, if there is a device entity node in the initial node set with an empty model attribute, after semantic integrity verification, this node does not meet the conditions and is removed from the initial node set. Finally, a valid set of nodes with complete attribute descriptions and operation record associations is selected.
[0080] Step S303: Based on the event record timestamps and operation types in the historical operation data, determine the interaction frequency between device entities and operation entities and the triggering conditions of fault entities in the effective node set.
[0081] Event log timestamps are information recording the time an event occurred in historical operational data. Operation type refers to the various types of operations performed on the device. Interaction frequency is the frequency of interaction between the device entity and the operation entity, such as the number of times the device is started within a certain period. The trigger condition for a fault entity is the condition that causes a fault entity to occur; for example, when the device temperature exceeds a certain threshold, an "overheating fault" will be triggered.
[0082] When determining the interaction frequency, the number of interactions between the device entity and the operation entity within a preset time period can be counted based on the event record timestamps and operation types. For example, the number of times device "Device 001" was started between January 1, 2024 and January 31, 2024 can be counted as the interaction frequency between device "Device 001" and the "Start" operation entity. When determining the triggering conditions of a fault entity, the characteristics of the device's operating parameters at the time of the fault can be identified by analyzing fault records in historical operating data.
[0083] Step S304: Generate dynamic association rules between device entities and operation entities based on the interaction frequency and triggering conditions, and create bidirectional connection edges for each pair of device entities and operation entities based on the dynamic association rules.
[0084] Dynamic association rules are rules generated based on the interaction frequency between device entities and operation entities, as well as the triggering conditions of faulty entities, describing the dynamic relationship between them. Bidirectional connection edges are edges in the knowledge graph structure used to connect device entities and operation entities, indicating a bidirectional association relationship between them; for example, a device can be operated, and an operation can affect a device.
[0085] When generating dynamic association rules, the conditions and actions of the rules can be set based on the interaction frequency and triggering conditions. For example, if the interaction frequency between a device entity and an operation entity is high, and this type of operation occurs frequently under certain triggering conditions, then a rule can be generated: when the preset triggering conditions are met, it is recommended to perform this type of operation on the device. For example, if the interaction frequency between device "Device 001" and the "Adjust Temperature Parameter" operation entity is high, and the temperature parameter adjustment operation is frequently performed when the device pressure exceeds the threshold, then the dynamic association rule can be set to "when the pressure of device 'Device 001' exceeds the threshold P, execute the 'Adjust Temperature Parameter' operation". Based on these dynamic association rules, bidirectional connection edges are created for each pair of device entities and operation entities. In the knowledge graph structure, a graph database (such as Neo4j) can be used to implement the creation of edges.
[0086] Step S305: Extract the historical decision results corresponding to the bidirectional connection edges from the historical operation data, and assign weights to the bidirectional connection edges based on the decision success rate and execution frequency.
[0087] Historical decision results are the outcomes of performing target operations on the target device during past equipment operation, such as whether the operation successfully solved the problem or caused new problems. Decision success rate is the proportion of times the same decision (i.e., performing the same operation on the same device) is successfully achieved; execution frequency is the number of times the decision has been executed in historical operational data.
[0088] Extracting historical decision results corresponding to bidirectional connections from historical operational data requires associating device entities, operation entities, and corresponding event records. For example, for the bidirectional connection between device "Device 001" and the operation entity "Adjust Temperature Parameters," all records of performing the "Adjust Temperature Parameters" operation on "Device 001" are filtered from historical operational data, and the device status change after each operation and whether the expected temperature adjustment target was achieved are recorded. The bidirectional connection is then weighted based on decision success rate and execution frequency. A feasible weighting method is to use a weighted average, which, through weighted assignment, reflects the importance and reliability of different device-operation associations in the knowledge graph.
[0089] Step S306: Store the set of valid nodes, bidirectional connection edges and weight assignments hierarchically according to entity type to generate a knowledge graph structure, and configure a weight update trigger event for each bidirectional connection edge in the knowledge graph structure.
[0090] Hierarchical storage of valid node sets, bidirectional connection edges, and weight assignments by entity type aims to make the knowledge graph structure clearer and easier to manage. Device entities, operation entities, and fault entities can be stored in different layers; for example, device entities can be stored in the "Device Layer," operation entities in the "Operation Layer," and fault entities in the "Fault Layer." In graph databases, different entity types can be distinguished by tags; for example, a "Device" tag can be added to device entities, a "Operation" tag to operation entities, and a "Fault" tag to fault entities.
[0091] For bidirectional connections, the edges are also stored hierarchically according to the type of the entity they are associated with. For example, a bidirectional connection between a device entity and an operation entity is stored in the "Device-Operation Association Layer," and a bidirectional connection between a device entity and a fault entity is stored in the "Device-Fault Association Layer." During storage, the edge's weight information is recorded as an attribute of the edge.
[0092] After generating the knowledge graph structure, configure a weight update trigger event for each bidirectional connection edge. The weight update trigger event automatically updates the weights of the bidirectional connections edge when preset conditions are met. For example, a weight update event is triggered when a new historical decision result is recorded in the system. Weight updates can be implemented using the trigger functionality of graph databases. Taking Neo4j as an example, create a trigger that recalculates the weights of the relevant bidirectional connections edge when a new device operation record is inserted into the database.
[0093] In one implementation, step S300 may specifically include the following steps S310 to S360:
[0094] Step S310: Traverse the set of semantic nodes that match the time series features in the target semantic features from the knowledge graph structure. The set of semantic nodes includes device type nodes and their bound operating mode nodes.
[0095] The time-series features in the target semantic features reflect the changing patterns of equipment operating parameters over time. By traversing the knowledge graph structure, a set of semantic nodes matching these time-series features is found. The equipment type nodes in the semantic node set represent the types of equipment, such as machine tools and robots; the operating mode nodes represent different operating modes of the equipment, such as high-speed operating mode and low-speed operating mode. When traversing the knowledge graph structure, a graph database query language (such as Neo4j's Cypher query language) can be used.
[0096] Step S320: Based on the association direction of the device operating parameters in the parameter dependency graph, locate the target semantic node chain with the highest semantic association strength among the context association features in the semantic node set. The target semantic node chain is formed by connecting the device type node and at least two operating mode nodes through node connection edges.
[0097] The parameter dependency graph illustrates the correlation directions between different device operating parameters. Based on these correlation directions, the target semantic node chain with the highest semantic correlation strength among the contextual features can be found in the semantic node set. The set of text vectors with the highest semantic correlation strength among the contextual features reflects the semantic information most relevant to the device's operating state. By matching this semantic information with the semantic node set, the target semantic node chain can be located.
[0098] The target semantic node chain is formed by connecting device type nodes and at least two operating mode nodes through node connection edges. When locating the target semantic node chain, the association paths between device operating parameters are first determined based on the parameter dependency graph. Then, nodes corresponding to these association paths are searched in the semantic node set. For example, the parameter dependency graph shows that an increase in device temperature leads to an increase in pressure, which in turn affects the device's operating efficiency. In the semantic node set, the operating mode nodes corresponding to "temperature increase," "pressure increase," and "operating efficiency change," as well as the related device type nodes, are found and connected through node connection edges to form the target semantic node chain. For example, if the device type node is "machine tool," the operating mode node corresponding to "temperature increase" is "high temperature operating mode," the operating mode node corresponding to "pressure increase" is "high pressure operating mode," and the operating mode node corresponding to "operating efficiency change" is "low efficiency operating mode," then the target semantic node chain is "machine tool -> high temperature operating mode -> high pressure operating mode -> low efficiency operating mode."
[0099] Step S330: Based on the weight values of the node connection edges, extend the semantic path of the target semantic node chain to generate an extended semantic path containing fault type nodes, and extract the combination relationship between the running mode nodes and fault type nodes in the extended semantic path.
[0100] The weight values of the edges connecting nodes represent the importance and reliability of the association between nodes. Semantic path expansion is performed on the target semantic node chain based on these weight values. Semantic path expansion involves further searching for other nodes related to the nodes in the chain, generating paths containing more information. Fault type nodes represent the types of faults that the device may experience, such as "overheating fault" or "motor fault."
[0101] When expanding semantic paths, starting from a node in the target semantic node chain, edges with higher weights are prioritized for expansion based on their connecting edges. For example, for the target semantic node chain "Machine Tool -> High Temperature Operation Mode -> High Pressure Operation Mode -> Low Efficiency Operation Mode", starting from the "High Temperature Operation Mode" node, fault type nodes connected to it with higher weights are searched. For instance, fault type nodes connected to the "High Temperature Operation Mode" node include "Overheating Fault" and "Thermal Expansion Fault", and the edge connecting the node corresponding to "Overheating Fault" has a higher weight. Therefore, the "Overheating Fault" node is added to the expanded semantic path first. After generating the expanded semantic path containing fault type nodes, the combination relationships between operation mode nodes and fault type nodes in the expanded semantic path are extracted. These combination relationships can be represented in tabular or graphical form. For example, the combination relationship between the operation mode node "High Temperature Operation Mode" and the fault type node "Overheating Fault" can be represented as "High Temperature Operation Mode may cause Overheating Fault". By extracting these combination relationships, a basis can be provided for generating subsequent decision instructions.
[0102] Step S340: Based on the historical decision records corresponding to the fault type nodes in the combination relationship, generate a candidate instruction set containing parameter correction direction and correction magnitude, and label each instruction in the candidate instruction set with the mapping relationship between the operation mode node.
[0103] The historical decision records corresponding to the fault type nodes in the composite relationship record the decisions and measures taken in the past for that fault type, as well as the results of these decisions. Based on these historical decision records, a candidate instruction set containing parameter correction direction and correction magnitude is generated. The parameter correction direction is the direction in which the equipment operating parameters are adjusted, such as increasing or decreasing temperature, increasing or decreasing pressure, etc.; the correction magnitude is the specific numerical value of the parameter adjustment.
[0104] For example, for the fault type node "overheating fault," historical decision records show that when this fault occurs, the temperature is usually lowered by 10°C to resolve the issue. Therefore, the generated candidate instruction set will include the instruction "lower the equipment temperature by 10°C." Simultaneously, each instruction is labeled with its mapping relationship to the operating mode node. For instance, if this instruction maps to the operating mode node "high-temperature operating mode," it indicates that the instruction was formulated for an "overheating fault" occurring under "high-temperature operating mode."
[0105] A rule engine can be used to generate candidate instruction sets. The rule engine automatically generates candidate instructions based on preset rules and historical decision records. Rules for the rule engine can be written using a rule language (such as the Drools rule language).
[0106] Step S350: Perform similarity matching between the candidate instruction set and the text vector set in the context association features, and select the instructions whose text description matches the threshold as the initial decision instructions.
[0107] Similarity matching calculates the similarity between instructions in the candidate instruction set and the set of text vectors in the context-related features. Text description fit is the degree of match between the text description of the instruction and the semantic information represented by the set of text vectors. Through similarity matching, instructions with a text description fit reaching a threshold are selected as the initial decision instructions. The cosine similarity algorithm can be used for similarity matching. The text of the candidate instructions is converted into a vector representation, and then the cosine similarity is calculated with the set of text vectors in the context-related features.
[0108] Step S360: Detect conflicting correction directions for the same device operating parameters in the initial decision instructions. If a conflict exists, reallocate the instruction priority of the initial decision instructions according to the weight value of the node connection edge, and remove the lower priority instruction from the conflicting instructions to form a semantic decision instruction set.
[0109] Initial decision instructions may conflict in their direction of correcting the same equipment operating parameters; for example, one instruction might require increasing the equipment temperature, while another requires decreasing it. To resolve this conflict, the instruction priorities of the initial decision instructions are reallocated based on the weight values of the nodes' connecting edges. Higher weight values indicate more reliable relationships upon which the instruction is based, thus resulting in higher priority.
[0110] Detecting conflicting correction directions for the same equipment operating parameter in initial decision instructions can be achieved by classifying and comparing the instructions. For example, all instructions involving equipment temperature adjustment can be grouped together, and their correction directions can be checked for consistency. If conflicts exist, priority is assigned to each instruction based on the weight of the node connection edges. For instance, if the node connection edge weight for the instruction "increase equipment temperature by 5°C" is 0.8, and the node connection edge weight for the instruction "decrease equipment temperature by 3°C" is 0.6, then the instruction "increase equipment temperature by 5°C" has a higher priority. The lower-priority instruction among the conflicting instructions is removed, i.e., the instruction "decrease equipment temperature by 3°C" is removed. After this processing, a semantic decision instruction set is formed, in which there are no conflicting correction directions for the same equipment operating parameter.
[0111] As one implementation method, step S300, based on the pre-built knowledge graph structure, performs dynamic semantic matching processing on the target semantic features and contextual features, and further includes the following steps S370 to S3120:
[0112] Step S370: During the semantic matching path expansion process, detect whether there are isolated running mode nodes in the expanded semantic path that are not connected to the fault type node.
[0113] During the semantic matching path expansion process, as the path continues to expand, some operating mode nodes may not be connected to fault type nodes. These nodes are called isolated operating mode nodes. Detecting isolated operating mode nodes is to discover potential fault situations so that they can be handled and prevented in a timely manner.
[0114] When detecting isolated run-mode nodes, all run-mode nodes in the extended semantic path are traversed, and each node is checked for a connection edge with a fault-type node. This detection can be implemented using a graph database query language, such as Neo4j.
[0115] Step S380: If an isolated operation mode node exists, extract the text description fragment associated with the isolated operation mode node from the text vector set of context-related features to generate candidate fault attribute descriptions.
[0116] If an isolated operation mode node is detected, text description fragments associated with that isolated operation mode node are extracted from the text vector set of context-related features. These text description fragments may contain information about potential fault conditions that may occur in that operation mode. By organizing and analyzing these text description fragments, candidate fault attribute descriptions are generated.
[0117] When extracting text description fragments, a similarity matching method can be used. The text description of isolated running mode nodes is converted into a vector representation, and then the similarity is calculated with the set of text vectors in the context-related features. The text description fragments with higher similarity are selected.
[0118] Step S390: Perform logical conflict detection between the candidate fault attribute description and the attribute description of the existing fault type node in the knowledge graph structure. If no conflict is detected, add the candidate fault attribute description as a new fault type node.
[0119] Logical conflict detection checks whether there are logical contradictions between the attribute description of a candidate fault and the attribute description of an existing fault type node in the knowledge graph structure. For example, if the attribute description of an existing fault type node "overheating fault" is "equipment temperature exceeds 80℃", while the attribute description of a candidate fault is "equipment temperature is below 20℃", then these two descriptions are logically conflicting.
[0120] When performing logical conflict detection, natural language processing techniques, such as semantic understanding and logical reasoning, can be used. The candidate fault attribute description and the attribute description of existing fault type nodes are converted into logical expressions, and then these logical expressions are checked for contradictions. If no conflict is detected, the candidate fault attribute description is added as a new fault type node. In the graph database, a new node is created, storing the candidate fault attribute description as an attribute of the node. For example, the candidate fault attribute description "vibration anomaly may occur during high-speed operation" is added as a new fault type node "high-speed operation vibration anomaly fault," and the attribute "Description: vibration anomaly may occur during high-speed operation" is added to this node.
[0121] Step S370: Establish connection edges between newly added fault type nodes and isolated operation mode nodes, and initialize the weights of the connection edges according to the association direction of the parameter dependency graph in the target semantic features.
[0122] Establishing connections between newly added fault type nodes and isolated operation mode nodes is to represent the relationship between these two nodes in the knowledge graph. The weights of the connections are initialized based on the association direction of the parameter dependency graph in the target semantic features. The parameter dependency graph shows the association direction between different device operating parameters. By analyzing the association between the device operating parameters corresponding to the isolated operation mode node and the newly added fault type node, the weights of the connections are determined.
[0123] For example, the isolated operation mode node "High-speed operation mode" corresponds to the equipment operating parameter "speed". The newly added fault type node "High-speed operation vibration anomaly fault" may have a positive correlation with "speed", meaning that the higher the speed, the greater the likelihood of vibration anomalies. Based on this correlation, the weights of the connecting edges are initialized. Statistical analysis methods can be used to determine the weights based on the frequency of "high-speed operation vibration anomaly fault" occurring under "high-speed operation mode" in historical data. For example, if the frequency of "high-speed operation vibration anomaly fault" occurring under "high-speed operation mode" is 30% in past operation records, then the weight of the connecting edge is initialized to 0.3. In a graph database, connecting edges can be created and weights set using the Cypher query language.
[0124] Step S3100: If a logical conflict is detected, retrieve the node that matches the candidate fault attribute description from the fault type node of the knowledge graph structure, and extract the corrected attribute description of the matching node.
[0125] If a logical conflict is detected between the candidate fault attribute description and the attribute description of an existing fault type node in the knowledge graph structure, then nodes that partially match the candidate fault attribute description are retrieved from the fault type nodes in the knowledge graph structure. Partial matching means that the candidate fault attribute description and the attribute description of an existing fault type node are similar in certain keywords or semantics.
[0126] When retrieving partially matching nodes, keyword matching and semantic similarity calculation can be used. Candidate fault attribute descriptions are segmented to extract keywords. Then, nodes containing these keywords are searched within the attribute descriptions of fault type nodes in the knowledge graph structure. For each found node, the semantic similarity between the candidate fault attribute description and these node attribute descriptions is calculated, and nodes with higher similarity are selected. For example, if the candidate fault attribute description is "vibration anomalies may occur during high-speed operation," and the node "vibration anomalies may occur during low-speed operation" is found in the fault type nodes of the knowledge graph structure, although "high-speed" and "low-speed" conflict, the keyword "vibration anomalies" is the same, and the semantic similarity is high; therefore, this node is considered a partially matching node. The corrected attribute descriptions of the matching nodes are then extracted; for example, the attribute description of the node "vibration anomalies may occur during low-speed operation" is the corrected attribute description.
[0127] Step S3110: Merge the corrected attribute description with the candidate fault attribute description to generate an updated fault attribute description, and re-execute the logical conflict detection to confirm the addability of the updated fault attribute description.
[0128] The purpose of fusing the revised attribute description with the candidate fault attribute description is to integrate the information from both and generate a more accurate and comprehensive fault attribute description. The fusion method can involve merging and adjusting the two descriptions, retaining useful information and removing conflicting parts. For example, fusing the candidate fault attribute description "vibration anomalies may occur during high-speed operation" and the revised attribute description "vibration anomalies may occur during low-speed operation" generates an updated fault attribute description "vibration anomalies may occur at different operating speeds."
[0129] Re-execute the logical conflict detection, comparing the updated fault attribute description with the attribute descriptions of existing fault type nodes in the knowledge graph structure to check for logical conflicts. If no conflict is detected, the updated fault attribute description can be added to the knowledge graph; if conflicts still exist, further adjustments and integration are needed until the conditions for addition are met.
[0130] Step S3120: Synchronize the newly confirmed fault type nodes and their corresponding connection edges to the instruction execution conditions of the semantic decision instruction set, and trigger the weight update trigger event of the knowledge graph structure to adjust the weight values of the connection edges of the relevant nodes.
[0131] Synchronizing the newly confirmed fault type nodes and their corresponding connections to the instruction execution conditions of the semantic decision instruction set is to ensure that the semantic decision instruction set can take into account the newly discovered fault types and relationships. Adding relevant information about the newly added fault type nodes to the instruction execution conditions of the semantic decision instruction set is crucial. For example, in the instruction "When a device malfunctions, perform the corresponding adjustment operation," the newly added fault type node "High-speed operation vibration abnormality fault" is added to the scope of "fault."
[0132] Triggering a weight update event in the knowledge graph structure adjusts the weight values of the connecting edges between relevant nodes. Due to the addition of fault type nodes and connecting edges, the relationships in the knowledge graph have changed, requiring recalculation and adjustment of the weights of the connecting edges. For example, the weight of the connecting edge between the operating mode node related to the newly added fault type node and other fault type nodes may need to be adjusted. By triggering the weight update event, the graph database triggers automatically recalculate the weights based on the new relationships and historical data to ensure the accuracy and reliability of the knowledge graph structure.
[0133] Step S400: Generate a set of equipment control strategies based on the instruction priority and instruction execution conditions in the semantic decision instruction set. The set of equipment control strategies is used to adjust the operating parameters of the target equipment in the smart factory.
[0134] The instruction priority in the semantic decision instruction set indicates the importance and execution order of each instruction, while the instruction execution condition specifies the preconditions for instruction execution. Based on this information, a device control strategy set is generated. This set of device control strategies is a series of policies used to control the operating parameters of the target device. By executing these strategies, the operating state of the target device can be adjusted to achieve optimal operating results.
[0135] In one implementation, step S400 may specifically include the following steps S410 to S460:
[0136] Step S410: Analyze the correction direction and correction magnitude of each instruction in the semantic decision instruction set, and extract the instruction subset that matches the current operating mode node of the target device.
[0137] Analyzing the correction direction and magnitude of each instruction in the semantic decision instruction set is to clarify the specific adjustment requirements of each instruction for the equipment operating parameters. The correction direction indicates whether the parameter needs to be increased or decreased, and the correction magnitude indicates the specific numerical value of the parameter adjustment. For example, the instruction "reduce the equipment temperature by 10℃" has a correction direction of "decrease" and a correction magnitude of "10℃".
[0138] Extracting a subset of instructions that matches the target device's current operating mode node ensures that only instructions relevant to the device's current operating state are selected. The target device's current operating mode node represents the device's current operating mode, such as "high-speed operating mode" or "low-speed operating mode." In the semantic decision instruction set, each instruction is labeled with a mapping relationship to an operating mode node. By comparing the mapping relationships between the target device's current operating mode node and the instructions, a matching subset of instructions is extracted. For example, if the target device's current operating mode node is "high-speed operating mode," all instructions mapped to "high-speed operating mode" are extracted from the semantic decision instruction set to form an instruction subset.
[0139] Step S420: Sort the instruction subset according to instruction priority and generate an instruction execution queue divided by effective time window. The effective time window is dynamically adjusted according to the correlation between the device operating parameters in the parameter dependency relationship diagram.
[0140] Sort a subset of instructions according to their priority to determine the execution order of the instructions; instructions with higher priority are executed first. Sorting algorithms (such as quicksort) can be used to sort the subset of instructions according to their priority.
[0141] An instruction execution queue is generated, divided by an effective time window, which is the time range from the start to the end of instruction execution. The effective time window is dynamically adjusted based on the correlation between device operating parameters in the parameter dependency graph. The parameter dependency graph shows the correlation between different device operating parameters, and the correlation indicates the degree of mutual influence between parameters. If the correlation between two device operating parameters is high, adjusting one parameter may quickly affect the other, so the corresponding instruction effective time window can be set shorter; if the correlation is low, the effective time window can be set longer.
[0142] For example, consider a subset of instructions containing two instructions: Instruction A, "Decrease equipment temperature by 10°C," and Instruction B, "Increase equipment pressure by 5Pa." The parameter dependency graph shows a high correlation between temperature and pressure. Based on instruction priority, Instruction A has higher priority than Instruction B, so Instruction A is placed in the instruction execution queue first, with its effective time window set to 10 minutes. Because temperature and pressure are highly correlated, Instruction A may rapidly affect pressure during execution; therefore, the effective time window for Instruction B is set to 15 minutes, and Instruction B is executed 5 minutes after Instruction A begins. This method generates an instruction execution queue divided by effective time windows.
[0143] Step S430: Smooth the transition of the correction magnitude of adjacent instructions in the instruction execution queue to generate a piecewise linear adjustment curve. The slope of each interval in the piecewise linear adjustment curve is determined by the ratio of the correction magnitude of the corresponding instruction to the effective time window.
[0144] Smoothing the adjustment range between adjacent instructions in the instruction execution queue is to avoid sudden changes in equipment operating parameters and make parameter adjustments more stable. A piecewise linear adjustment curve is a curve composed of multiple line segments used to represent the change of equipment operating parameters over time.
[0145] When generating a piecewise linear adjustment curve, for two adjacent instructions in the instruction execution queue, the slope of the corresponding interval in the piecewise linear adjustment curve is calculated based on their correction magnitude and effective time window. The slope represents the speed of parameter adjustment and is determined by the ratio of the correction magnitude of the corresponding instruction to the effective time window. For example, instruction A "reduce the equipment temperature by 10°C" has an effective time window of 10 minutes; instruction B "reduce the equipment temperature by another 5°C" has an effective time window of 5 minutes. During the 10 minutes of instruction A's execution, the slope of the temperature adjustment is -10 / 10 = -1°C / minute; during the 5 minutes of instruction B's execution, the slope of the temperature adjustment is -5 / 5 = -1°C / minute. Through this calculation, a piecewise linear adjustment curve is generated, ensuring that the equipment temperature changes smoothly throughout the adjustment process.
[0146] Step S440: Generate a parameter adjustment step size sequence based on the piecewise linear adjustment curve, and insert abnormal monitoring points associated with fault type nodes into the parameter adjustment step size sequence.
[0147] A parameter adjustment step sequence is generated based on the piecewise linear adjustment curve. This sequence is a series of parameter adjustment steps arranged in chronological order to guide specific adjustments to equipment operating parameters. On the piecewise linear adjustment curve, points are taken at time intervals (e.g., every minute), and the parameter change between adjacent points is calculated as the parameter adjustment step. For example, on the piecewise linear adjustment curve, if the temperature decreases from 50℃ to 49℃ in the first minute to the second minute, the parameter adjustment step is -1℃.
[0148] Anomaly monitoring points associated with fault type nodes are inserted into the parameter adjustment step sequence. These anomaly monitoring points are time points used to monitor for abnormal conditions during equipment operation. Fault type nodes indicate the types of faults that the equipment may experience, such as "overheating fault" or "motor fault." During parameter adjustment, anomaly monitoring points are inserted at critical time points where faults may occur to facilitate timely detection and handling of faults.
[0149] In one implementation, step S440 involves inserting anomaly monitoring points associated with fault type nodes into the parameter adjustment step size sequence, which may specifically include the following steps S441 to S446:
[0150] Step S441: Extract parameter fluctuation characteristics based on the historical abnormal patterns of fault type nodes, and determine the potential abnormal triggering location within the slope change range of the piecewise linear adjustment curve.
[0151] The historical anomaly patterns of the fault type node record parameter changes when the equipment experienced that type of fault in the past, such as sudden increases in temperature or drastic pressure fluctuations. Parameter fluctuation characteristics, such as the magnitude and rate of temperature change, are extracted from these historical anomaly patterns.
[0152] Identify potential anomaly trigger locations within the slope variation range of the piecewise linear adjustment curve. The slope variation range of the piecewise linear adjustment curve represents the time period during which the parameter adjustment rate changes. During these time periods, the equipment's operating state may be unstable, and anomalies are prone to occur. For example, a sudden increase or decrease in the slope of the piecewise linear adjustment curve may trigger certain fault types. Based on the parameter fluctuation characteristics of the fault type node, locate the potential anomaly trigger location within the slope variation range. For example, the historical anomaly pattern of the fault type node "overheating fault" shows that this fault is easily triggered when the temperature change rate exceeds 2℃ / minute. In the piecewise linear adjustment curve, if the temperature change rate reaches 2.5℃ / minute within a certain slope variation range, then this time point within that range is identified as a potential anomaly trigger location.
[0153] Step S442: Align the potential anomaly triggering location with the execution time axis of the parameter adjustment step sequence to determine the monitoring time window and parameter fluctuation threshold range for each anomaly monitoring point.
[0154] Aligning the potential anomaly trigger points with the execution timeline of the parameter adjustment step sequence ensures that the timing of potential anomaly triggers accurately corresponds to the specific steps in the parameter adjustment process. The execution timeline of the parameter adjustment step sequence records the execution time of each parameter adjustment step. This alignment process clarifies which specific point in the parameter adjustment process requires anomaly monitoring.
[0155] Determine the monitoring time window and parameter fluctuation threshold range for each anomaly monitoring point. The monitoring time window is the time range within which equipment operating parameters are monitored to determine if any anomalies have occurred. The parameter fluctuation threshold range is the allowable fluctuation range of equipment operating parameters under normal conditions; when parameter fluctuations exceed this range, an anomaly is considered likely. For example, for an anomaly monitoring point corresponding to a potential anomaly trigger location, the monitoring time window is determined to be 5 minutes before and after that location, and the parameter fluctuation threshold range is the temperature within ±3℃ of the set value. If the equipment temperature exceeds the set value ±3℃ within this monitoring time window, a temperature-related anomaly is considered likely.
[0156] Step S443: Configure dynamic monitoring rules within the monitoring time window, wherein the dynamic monitoring rules include the continuous sampling frequency and deviation tolerance of the actual parameter trajectory.
[0157] Configuring dynamic monitoring rules within the monitoring time window allows for more precise monitoring of changes in equipment operating parameters. The actual parameter trajectory is the curve showing the actual parameter changes during equipment operation; monitoring this trajectory allows for the timely detection of anomalies.
[0158] Dynamic monitoring rules include the continuous sampling frequency and deviation tolerance for the actual parameter trajectory. The continuous sampling frequency is the time interval at which the equipment's operating parameters are sampled within the monitoring time window, for example, once every minute. A higher sampling frequency allows for more timely detection of minute changes in parameters, but it also increases the data processing burden. The deviation tolerance is the allowed degree to which the actual parameter trajectory deviates from the normal parameter trajectory, for example, allowing the actual temperature value to deviate from the set value by ±2℃. If the actual parameter trajectory exceeds the deviation tolerance range, an abnormal alarm is triggered. For example, for temperature parameter monitoring, with a continuous sampling frequency of once per minute and a deviation tolerance of ±2℃, the actual temperature value is collected once per minute within the monitoring time window and compared with the set temperature value. If the deviation between the actual temperature value and the set temperature value exceeds ±2℃, an abnormality is considered to have occurred.
[0159] Step S444: Logically bind the dynamic monitoring rules to the attribute constraints of the fault type nodes in the knowledge graph structure to generate a set of abnormal monitoring points carrying fault type identifiers.
[0160] Logically binding dynamic monitoring rules with the attribute constraints of fault type nodes in the knowledge graph structure is to associate detected anomalies with specific fault types. The attribute constraints of fault type nodes in the knowledge graph structure define the characteristics and conditions of equipment operating parameters when that fault type occurs.
[0161] For example, the attribute constraint for the fault type node "overheating fault" is "temperature exceeds 80℃ and lasts for more than 5 minutes", and the dynamic monitoring rule is "continuous sampling frequency is once per minute, deviation tolerance is ±2℃". By logically binding these two, when the device temperature is detected to exceed 80℃ and exceeds the set temperature value ±2℃ for 5 consecutive minutes, it is considered that an "overheating fault" has been triggered.
[0162] This logical binding generates a set of anomaly monitoring points carrying fault type identifiers. Each anomaly monitoring point is associated with one or more fault type identifiers, allowing for rapid identification of the possible fault type when an anomaly is detected. For example, anomaly monitoring point 1 carries a "high temperature fault" identifier, and anomaly monitoring point 2 carries a "pressure anomaly fault" identifier, etc.
[0163] Step S445: Embed the triggering logic of the abnormal monitoring point set in the parameter adjustment step sequence to activate the detection algorithm for the preset fault type within the monitoring time window.
[0164] Embedding triggering logic for anomaly monitoring point sets within the parameter adjustment step sequence ensures timely activation of anomaly monitoring during parameter adjustment. The triggering logic specifies the conditions under which the detection algorithm for a preset fault type is activated.
[0165] For example, for a specific anomaly monitoring point in the set of anomaly monitoring points, the triggering logic is as follows: when the parameter adjustment step sequence reaches the time point corresponding to that anomaly monitoring point, and the conditions in the dynamic monitoring rules are met (such as the actual parameter trajectory exceeding the deviation tolerance range), then the detection algorithm for the preset fault type is activated. Within the monitoring time window, the detection algorithm is activated according to the triggering logic to perform real-time monitoring and analysis of the equipment operating parameters.
[0166] Detection algorithms for preset fault types can be designed based on the characteristics of the fault type. For example, for a "high temperature fault," the detection algorithm can compare the device temperature with a set temperature threshold in real time and calculate the time during which the temperature exceeds the threshold. If the attribute constraints of the fault type node are met, a "high temperature fault" is determined to have occurred.
[0167] Step S446: When the parameter adjustment step size sequence is injected into the execution queue, the trigger logic of the abnormal monitoring point set is synchronously loaded into the interrupt response unit of the control system to ensure the parallel execution of parameter adjustment and abnormal detection.
[0168] When the parameter adjustment step size sequence is injected into the execution queue, the triggering logic of the abnormal monitoring point set is synchronously loaded into the interrupt response unit of the control system. The interrupt response unit of the control system is a module used to handle abnormal situations. When the triggering logic is activated, the interrupt response unit can respond in a timely manner and take appropriate measures.
[0169] By loading the triggering logic into the interrupt response unit, parallel execution of parameter adjustment and anomaly detection is ensured. During parameter adjustment, the triggering logic of the anomaly monitoring point set remains in a monitoring state. Once the triggering condition is met, the interrupt response unit immediately initiates the detection algorithm for the preset fault type without affecting the normal execution of the parameter adjustment step sequence. For example, during the execution of the parameter adjustment step sequence, when the triggering logic of a certain anomaly monitoring point is activated, the interrupt response unit quickly calls the corresponding detection algorithm to perform anomaly detection, while parameter adjustment continues according to the step sequence, ensuring the continuity and stability of equipment operation.
[0170] As one implementation, after activating the detection algorithm for the preset fault type within the monitoring time window in step S445, the method provided by this embodiment of the invention may further include the following steps S447 to S4412:
[0171] Step S447: Determine whether the actual parameter trajectory exceeds the parameter fluctuation threshold range based on the deviation tolerance in the dynamic monitoring rules.
[0172] After activating the detection algorithm for the preset fault type within the monitoring time window, the deviation tolerance in the dynamic monitoring rules is used to determine whether the actual parameter trajectory exceeds the parameter fluctuation threshold range. The actual parameter trajectory is the actual parameter change curve of the equipment during operation, and the parameter fluctuation threshold range is the normal parameter fluctuation range determined based on the attribute constraints of the fault type node and the dynamic monitoring rules.
[0173] For example, the dynamic monitoring rules set the temperature deviation tolerance to ±2℃ and the parameter fluctuation threshold range to ±3℃ of the set temperature value. Within the monitoring time window, the actual temperature value of the device is collected in real time and compared with the set temperature value. If the deviation between the actual temperature value and the set temperature value exceeds ±3℃, it is considered that the actual parameter trajectory has exceeded the parameter fluctuation threshold range, and an anomaly may have occurred.
[0174] Step S448: If the error exceeds the limit, extract the historical stable parameter range bound to the current operating mode node from the knowledge graph structure based on the fault type identifier, and generate an emergency adjustment instruction containing rollback parameter values.
[0175] If the actual parameter trajectory exceeds the parameter fluctuation threshold range, historical stable parameter intervals bound to the current operating mode node are extracted from the knowledge graph structure based on the fault type identifier. The knowledge graph structure records the historical stable parameter intervals of the device under different operating modes; these intervals represent the range of parameter values during normal operation.
[0176] For example, if the fault type is identified as "overheating fault" and the current operating mode node is "high-speed operating mode," the historical stable temperature parameter range under "high-speed operating mode" is extracted from the knowledge graph structure as 60℃-70℃. Based on this historical stable parameter range, an emergency adjustment instruction containing rollback parameter values is generated. The rollback parameter values adjust the equipment parameters back to values within the historical stable parameter range; for example, an emergency adjustment instruction is generated to "adjust the equipment temperature to 65℃."
[0177] Step S449: Insert the emergency adjustment instruction into the current execution position of the execution queue and block the unexecuted steps in the parameter adjustment step sequence.
[0178] Inserting an emergency adjustment command into the current execution position of the execution queue is to adjust device parameters promptly and prevent further deterioration of abnormal conditions. The execution queue records the execution order of parameter adjustment step sequences; inserting the emergency adjustment command into the current execution position ensures that the command can be executed immediately.
[0179] Simultaneously, unexecuted steps in the parameter adjustment step sequence are blocked. Due to an anomaly, the original parameter adjustment step sequence may no longer be applicable, requiring the suspension of unexecuted steps and prioritizing the execution of emergency adjustment instructions. For example, if an anomaly detection is triggered when the parameter adjustment step sequence reaches step 5, generating an emergency adjustment instruction, this instruction is inserted into the execution queue at step 5, and execution of steps 6 and beyond is halted until the emergency adjustment instruction is completed.
[0180] Step S4410: Collect the real-time stable parameters of the target device after executing the emergency adjustment command, and perform deviation matching with the historical stable parameter range.
[0181] The system collects real-time stable parameters of the target device after executing an emergency adjustment command. These real-time stable parameters are the stable parameter values reached by the device within a certain period after the emergency adjustment command is executed. The collected real-time stable parameters are then matched against historical stable parameter ranges to determine the effectiveness of the emergency adjustment command.
[0182] Step S4411: If the deviation matching result exceeds the attribute constraints of the fault type node, then update the parameter fluctuation threshold range and the attribute description of the corresponding node in the knowledge graph structure according to the real-time stable parameters.
[0183] If the deviation matching result exceeds the attribute constraints of the fault type node, it indicates a discrepancy between the actual operating condition of the equipment and the condition recorded in the knowledge graph structure. In this case, it is necessary to update the parameter fluctuation threshold range and the attribute description of the corresponding node in the knowledge graph structure based on the real-time stable parameters. For example, the attribute constraint for the fault type node "overheating fault" is "temperature exceeds 80℃ and duration exceeds 5 minutes." After executing the emergency adjustment command, the real-time stable temperature value is 75℃, but the duration is too long, exceeding the original attribute constraint. In this case, based on the real-time stable parameters, the parameter fluctuation threshold range is updated to 65℃-75℃, and the attribute description of the "overheating fault" node in the knowledge graph structure is updated to "temperature exceeds 75℃ and duration exceeds 3 minutes."
[0184] Step S4412: Synchronize the updated parameter fluctuation threshold range to the potential anomaly trigger location positioning logic of the piecewise linear adjustment curve, and adjust the trigger conditions of the associated instructions in the semantic decision instruction set.
[0185] Synchronizing the updated parameter fluctuation threshold range to the potential anomaly trigger location logic of the piecewise linear adjustment curve is to ensure accurate location of potential anomaly trigger locations during subsequent parameter adjustments. The potential anomaly trigger location logic of the piecewise linear adjustment curve is determined based on the parameter fluctuation threshold range; therefore, the updated parameter fluctuation threshold range will affect the determination of potential anomaly trigger locations.
[0186] Simultaneously, the triggering conditions of associated instructions in the semantic decision instruction set are adjusted. Instructions in the semantic decision instruction set are triggered based on the device's operating status and fault type; updates to the parameter fluctuation threshold range affect the instruction triggering conditions. For example, if the original instruction triggering condition was "temperature exceeds 80℃," and the updated parameter fluctuation threshold range is 65℃-75℃, the instruction triggering condition is adjusted to "temperature exceeds 75℃." This adjustment makes the semantic decision instruction set more aligned with the actual operating conditions of the device, improving the accuracy and effectiveness of decision-making.
[0187] Step S450: Bind the parameter adjustment step sequence and the anomaly monitoring point to the control interface protocol of the target device to generate a device control command stream containing timestamps.
[0188] Binding the parameter adjustment step sequence to the anomaly monitoring point to the target device's control interface protocol is to transmit parameter adjustment and anomaly monitoring information to the target device, enabling the device to adjust parameters according to the set steps and monitor anomalies in real time. The control interface protocol is the protocol for communication between the device and the control system, specifying the data transmission format and communication rules.
[0189] For example, each step in the parameter adjustment step sequence and its corresponding abnormal monitoring point information are encoded according to the control interface protocol format to generate a device control command stream containing timestamps. The timestamps record the execution time of each command, ensuring that the device can execute commands in the correct time sequence. For example, if the parameter adjustment step sequence has three steps: "increase device temperature by 5°C", "increase device pressure by 2Pa", and "increase device speed by 100 rpm", along with the corresponding abnormal monitoring point information, this information is encoded according to the control interface protocol format as: "[timestamp 1] Increase device temperature by 5°C [abnormal monitoring point 1 information]; [timestamp 2] Increase device pressure by 2Pa [abnormal monitoring point 2 information]; [timestamp 3] Increase device speed by 100 rpm [abnormal monitoring point 3 information]".
[0190] Step S460: Verify the consistency between the device control command flow and the constraints of the current operating mode node in the knowledge graph structure. If the verification fails, regenerate the device control command flow based on the instruction subset corresponding to the suboptimal operating mode node in the semantic node set, and integrate the verified device control command flow into a device control strategy set.
[0191] Verifying the consistency between the device control command flow and the constraints of the current operating mode node in the knowledge graph structure is to ensure that the device control command flow conforms to the requirements of the current operating mode. The constraints of the current operating mode node in the knowledge graph structure define the parameter range and operating rules of the device in that operating mode.
[0192] For example, if the current operating mode node is "low-speed operating mode" and its constraint is "the equipment speed shall not exceed 500 rpm", and the equipment control command stream contains the instruction "increase the equipment speed to 600 rpm", then the equipment control command stream is inconsistent with the constraint of the current operating mode node, and the verification fails.
[0193] If verification fails, the device control command flow is regenerated based on the instruction subset corresponding to the suboptimal operating mode node in the semantic node set. The suboptimal operating mode node is the operating mode node that is closest to the current state of the device, excluding the current operating mode node. Appropriate instructions are selected from the instruction subset corresponding to the suboptimal operating mode node to regenerate the device control command flow that meets the constraints.
[0194] Validated equipment control command streams are integrated into a set of equipment control strategies. This set of strategies contains a series of validated equipment control command streams that ensure the safe and stable operation of equipment under different operating modes. By integrating these command streams, a complete equipment control strategy is formed, providing strong support for the production and operation of the smart factory.
[0195] Step S500: Feed back the set of equipment control strategies to the control system of the smart factory to trigger operation optimization, and update the semantic node association relationship in the knowledge graph structure based on the execution result of the operation optimization.
[0196] The set of equipment control strategies is fed back to the control system of the smart factory, which is the core system in the smart factory used to control equipment operation. By transmitting the set of equipment control strategies to the control system, operation optimization operations are triggered, causing the equipment to adjust its operating parameters according to the set strategies, thereby improving the equipment's operating efficiency and stability.
[0197] The semantic node relationships in the knowledge graph structure are updated based on the execution results of the operation optimization. The execution results of the operation optimization reflect the changes in the device's state and performance during actual operation, and the semantic node relationships in the knowledge graph structure can be adjusted and optimized based on these results.
[0198] As one implementation method, step S500 involves feeding back the set of equipment control strategies to the control system of the smart factory to trigger operation optimization, and updating the semantic node associations in the knowledge graph structure based on the execution results of the operation optimization. Specifically, this may include the following steps S510 to S560:
[0199] Step S510: Load the parameter adjustment step sequence in the device control command stream into the execution queue of the control system, and configure the abnormal monitoring point into the real-time monitoring module of the control system.
[0200] The parameter adjustment step sequence from the equipment control command stream is loaded into the execution queue of the control system. The execution queue is a queue in the control system used to store and manage parameter adjustment commands, ensuring that the commands are executed in the correct order. For example, parameter adjustment step sequences such as "increase equipment temperature by 5°C" and "increase equipment pressure by 2Pa" contained in the equipment control command stream are loaded into the execution queue sequentially.
[0201] Simultaneously, abnormal monitoring points are configured into the real-time monitoring module of the control system. The real-time monitoring module is used in the control system to monitor equipment operating parameters in real time. Configuring the information of the abnormal monitoring points into this module enables it to monitor equipment parameters at the corresponding time points and promptly detect anomalies. For example, by configuring the monitoring time window and parameter fluctuation threshold range of the abnormal monitoring points into the real-time monitoring module, the module can issue an alarm promptly when equipment parameters exceed the threshold range.
[0202] Step S520: During the execution of the parameter adjustment step sequence, the operating response data of the target device is collected through the real-time monitoring module, and the actual parameter trajectory corresponding to the piecewise linear adjustment curve is extracted.
[0203] During the execution of the parameter adjustment step sequence, the operational response data of the target equipment is collected through a real-time monitoring module. The operational response data is the actual change of the equipment's operating parameters after the parameter adjustment command is executed, such as the real-time values of parameters like temperature, pressure, and speed.
[0204] Extract the actual parameter trajectory corresponding to the piecewise linear adjustment curve. The piecewise linear adjustment curve is a theoretical parameter change curve generated based on the parameter adjustment step sequence. By comparing the actual parameter trajectory with the piecewise linear adjustment curve, the difference between the actual operation of the equipment and the theoretical expectation can be understood. For example, during the parameter adjustment process, the temperature value of the equipment is collected every preset time interval. These temperature values are connected to form the actual temperature trajectory, which is then compared with the temperature curve in the piecewise linear adjustment curve.
[0205] Step S530: Compare the actual parameter trajectory with the piecewise linear adjustment curve to determine the trajectory deviation. If the trajectory deviation is within the range defined by the abnormal monitoring point, update the parameter threshold attribute of the running mode node in the knowledge graph structure according to the stable interval of the actual parameter trajectory.
[0206] The actual parameter trajectory is compared with the piecewise linear adjustment curve to calculate the deviation between the two. The trajectory deviation is the difference in parameters between the actual parameter trajectory and the piecewise linear adjustment curve at the same point in time.
[0207] If the trajectory deviation is within the range defined by the abnormal monitoring point, it indicates that the equipment is operating normally. The parameter threshold attribute of the operating mode node in the knowledge graph structure is updated based on the stable range of the actual parameter trajectory. The stable range of the actual parameter trajectory is the range of values within which the equipment parameters remain stable over a period of time. For example, if the actual temperature remains stable between 60℃ and 65℃, the temperature parameter threshold attribute of the corresponding operating mode node in the knowledge graph structure is updated to 60℃-65℃ to reflect the actual operating status of the equipment.
[0208] Step S540: If the actual parameter trajectory triggers an abnormal monitoring point, then extract the operating parameter fragment of the target device before the triggering time and perform similarity matching with the historical abnormal patterns of the fault type nodes in the knowledge graph structure.
[0209] If the actual parameter trajectory triggers an anomaly monitoring point, it indicates that the equipment may have encountered an abnormal situation. Capture segments of the target equipment's operating parameters prior to the triggering time; these segments record the equipment's operating state before the anomaly occurred.
[0210] The extracted operational parameter fragments are matched against historical anomaly patterns in the fault type nodes of the knowledge graph structure. The knowledge graph structure records historical anomaly patterns for different fault types, representing the parameter change characteristics of the equipment when that fault occurs. Similarity matching determines which fault type the current anomaly is most similar to. For example, a cosine similarity algorithm is used to calculate the similarity between the operational parameter fragment and the historical anomaly pattern; if the similarity exceeds a threshold (e.g., 0.8), the current anomaly is considered to match that fault type.
[0211] Step S550: Determine the correction strategy corresponding to the fault type node based on the matching result, adjust the execution order and magnitude of subsequent steps in the parameter adjustment step sequence, and update the connection edge weight between the running mode node and the fault type node based on the corrected parameter adjustment step sequence.
[0212] The correction strategy corresponding to the fault type node is determined based on the matching results. Different fault types correspond to different correction strategies. For example, for a "high temperature fault", the correction strategy may be to reduce the equipment temperature; for a "pressure abnormal fault", the correction strategy may be to adjust the pressure parameters.
[0213] Adjust parameters to modify the execution order and magnitude of subsequent steps in the step sequence. Based on the correction strategy, adjust unexecuted steps, for example, change the step of "increase equipment temperature by 5°C" to "decrease equipment temperature by 3°C", and rearrange the execution order of the steps.
[0214] The weights of the connections between the operating mode node and the fault type node are updated based on the revised parameter adjustment step sequence. The edge weights represent the strength of the association between the operating mode and the fault type. Since the parameter adjustment step sequence changes, the device's operating state also changes accordingly, thus requiring updates to the edge weights. For example, if the revised parameter adjustment step sequence reduces the probability of a certain fault occurring in the device, the weight of the connection between the operating mode node and the fault type node is reduced accordingly.
[0215] Step S560: Synchronize the updated connection edge weights to the instruction execution conditions of the semantic decision instruction set, and regenerate the device control instruction stream containing the corrected parameter adjustment step size sequence and inject it into the execution queue.
[0216] The updated edge weights are synchronized to the instruction execution conditions of the semantic decision instruction set, enabling the semantic decision instruction set to take into account the latest association strength information. The instruction execution conditions define the preconditions for instruction execution, and changes in edge weights may affect the execution order and priority of instructions.
[0217] A new device control command stream containing the corrected parameter adjustment step size sequence is generated. This sequence is encoded according to the control interface protocol format and timestamped. The regenerated command stream is then injected into the execution queue, enabling the device to continue adjusting parameters according to the corrected strategy. This optimizes device operation and corrects faults. Through continuous feedback and adjustments, the equipment in the smart factory can operate more stably and efficiently.
[0218] It is understood that the various algorithms involved in the above descriptions of the embodiments of the present invention, such as Euclidean distance algorithm, cosine distance algorithm, Pearson correlation coefficient algorithm, ranking algorithm, etc., can all be obtained from relevant content in the prior art. To save space, they will not be elaborated on in the embodiments of the present invention. In addition, those skilled in the art can supplement the details based on common knowledge in the art when implementing the solution of the present invention. For example, they can use normalization to eliminate dimensional conflicts before feature fusion, use interpolation to eliminate dimensional differences, reasonably set thresholds based on historical data, experience or business scenario requirements, train the model based on a general model training method, set the number of layers in the model structure based on actual needs, select activation functions, etc. The present invention will not provide redundant descriptions of overly detailed implementation processes.
[0219] Please see Figure 2 , Figure 2This is a schematic diagram of a computer system provided in an embodiment of the present invention. The computer system includes at least a processor 101, a communication interface 102, and a memory 103. The processor 101, communication interface 102, and memory 103 can be connected via a bus or other means. The processor 101 (or Central Processing Unit, CPU) is the computing and control core of the computer system, capable of parsing various instructions and processing various data within the computer system. The communication interface 102 may optionally include a standard wired interface or a wireless interface (such as Wi-Fi, mobile communication interface, etc.), and can be used to send and receive data under the control of the processor 101; the communication interface 102 can also be used for data transmission and interaction within the computer system. The memory 103 is a storage device in the computer system used to store programs and data. It is understood that the memory 103 here can include the computer system's built-in memory, or it can include extended memory supported by the computer system. The memory 103 provides storage space, which stores the computer system's operating system; this invention does not limit this storage space.
[0220] In one embodiment, the processor 101 executes the knowledge graph-based smart factory semantic decision generation method provided above in the embodiments of the present invention by running a computer program in the memory 103.
Claims
1. A semantic decision generation method for intelligent factories based on knowledge graphs, characterized in that, include: Obtain the operational data set of the smart factory, which includes multiple equipment operating parameters and corresponding semantic description text; Semantic feature extraction processing is performed on the running data set to generate target semantic features of the device running parameters and contextual features of the semantic description text; Based on a pre-built knowledge graph structure, dynamic semantic matching processing is performed on the target semantic features and the context association features to generate a set of semantic decision instructions corresponding to the device operating parameters; Based on the instruction priority and instruction execution conditions in the semantic decision instruction set, a set of equipment control strategies is generated. The set of equipment control strategies is used to adjust the operating parameters of the target equipment in the smart factory. The set of equipment control strategies is fed back to the control system of the smart factory to trigger operation optimization, and the semantic node associations in the knowledge graph structure are updated based on the execution results of the operation optimization.
2. The method according to claim 1, characterized in that, The acquisition of the smart factory's operational data set includes: By deploying multiple data acquisition terminals in the smart factory, the operating status data of the target equipment is collected in real time within a preset time period. The operating status data includes temperature parameters, pressure parameters, and energy consumption parameters. Extract log text corresponding to the operating status data from the management system of the smart factory. The log text includes historical operation descriptions and abnormal event descriptions of the target equipment. The operating status data and the log record text are subjected to standardized format conversion to generate the device operating parameters and the semantic description text; The device operating parameters and the semantic description text are associated and stored according to the collection timestamp to generate the operating data set, and the data type of the device operating parameters and the text source identifier of the semantic description text are marked in the operating data set.
3. The method according to claim 1, characterized in that, The step of performing semantic feature extraction processing on the operational data set to generate target semantic features of the device operating parameters and contextual features of the semantic description text includes: Numerical fluctuation analysis is performed on the equipment operating parameters to determine the parameter change trend and parameter correlation within the preset time period; Based on the parameter change trend, the time series features of the equipment operating parameters are extracted, and a parameter dependency graph of the equipment operating parameters is generated based on the parameter correlation. The semantic description text is segmented to obtain multiple text units, and a pre-trained semantic encoding model is called to perform context encoding on the multiple text units to generate a set of text vectors for the semantic description text. Based on the vector similarity in the text vector set, the semantic association strength between the semantic description texts is determined, and the context association features are generated based on the semantic association strength. The time series features, the parameter dependency graph, and the context association features are fused to generate the target semantic features.
4. The method according to claim 1, characterized in that, The pre-built knowledge graph structure performs dynamic semantic matching processing on the target semantic features and the context-related features to generate a set of semantic decision instructions corresponding to the device operating parameters, including: Traverse the set of semantic nodes that match the time series features in the target semantic features from the knowledge graph structure. The set of semantic nodes includes device type nodes and their bound operating mode nodes. Based on the association direction of the device operating parameters in the parameter dependency graph, the target semantic node chain with the highest semantic association strength with the context association features is located in the semantic node set. The target semantic node chain is formed by connecting the device type node and at least two operating mode nodes through node connection edges. Based on the weight values of the node connection edges, the target semantic node chain is extended semantically to generate an extended semantic path containing fault type nodes, and the combination relationship between the running mode nodes and fault type nodes in the extended semantic path is extracted. Based on the historical decision records corresponding to the fault type nodes in the combined relationship, a candidate instruction set containing parameter correction direction and correction magnitude is generated, and each instruction in the candidate instruction set is labeled with a mapping relationship to the operating mode node. The candidate instruction set is matched with the text vector set in the context association features to select instructions whose text description matches the threshold as the initial decision instructions. If a conflict exists in the initial decision instruction regarding the correction direction for the same device operating parameters, the instruction priority of the initial decision instruction is reallocated according to the weight value of the node connection edge, and the instruction with lower priority among the conflicting instructions is removed to form the semantic decision instruction set.
5. The method according to claim 4, characterized in that, The step of generating a set of device control strategies based on the instruction priorities and instruction execution conditions in the semantic decision instruction set includes: The correction direction and correction magnitude of each instruction in the semantic decision instruction set are analyzed, and a subset of instructions matching the current operating mode node of the target device are extracted; The instruction subset is sorted according to the instruction priority to generate an instruction execution queue divided by the effective time window. The effective time window is dynamically adjusted according to the correlation between the device operating parameters in the parameter dependency graph. The correction magnitudes of adjacent instructions in the instruction execution queue are smoothly transitioned to generate a piecewise linear adjustment curve. The slope of each interval in the piecewise linear adjustment curve is determined by the ratio of the correction magnitude of the corresponding instruction to the effective time window. A parameter adjustment step size sequence is generated based on the piecewise linear adjustment curve, and anomaly monitoring points associated with the fault type node are inserted into the parameter adjustment step size sequence. The parameter adjustment step sequence is bound to the anomaly monitoring point and the control interface protocol of the target device to generate a device control command stream containing timestamps; Verify the consistency between the device control command flow and the constraints of the current operating mode node in the knowledge graph structure. If the verification fails, regenerate the device control command flow based on the instruction subset corresponding to the suboptimal operating mode node in the semantic node set, and integrate the verified device control command flow into the device control strategy set.
6. The method according to claim 5, characterized in that, The step of feeding back the set of equipment control strategies to the control system of the smart factory to trigger operation optimization, and updating the semantic node associations in the knowledge graph structure based on the execution result of the operation optimization, includes: The parameter adjustment step sequence in the device control command stream is loaded into the execution queue of the control system, and the abnormal monitoring point is configured into the real-time monitoring module of the control system. During the execution of the parameter adjustment step sequence, the real-time monitoring module collects the operating response data of the target device and extracts the actual parameter trajectory corresponding to the piecewise linear adjustment curve. The actual parameter trajectory is compared with the piecewise linear adjustment curve to determine the trajectory deviation. If the trajectory deviation is within the range defined by the anomaly monitoring point, the parameter threshold attribute of the running mode node in the knowledge graph structure is updated according to the stable interval of the actual parameter trajectory. If the actual parameter trajectory triggers the abnormal monitoring point, then the operating parameter fragment of the target device before the triggering time is extracted and matched with the historical abnormal patterns of the fault type nodes in the knowledge graph structure; Based on the matching results, determine the correction strategy corresponding to the fault type node, adjust the execution order and magnitude of subsequent steps in the parameter adjustment step sequence, and update the connection edge weight between the operating mode node and the fault type node based on the corrected parameter adjustment step sequence. The updated connection edge weights are synchronized to the instruction execution conditions of the semantic decision instruction set, and a new device control instruction stream containing the corrected parameter adjustment step sequence is injected into the execution queue.
7. The method according to claim 1, characterized in that, The pre-built knowledge graph structure is generated through the following steps: Extract equipment entity identifiers, operation entity types, and fault entity descriptions from the historical operation data of the smart factory to generate an initial node set containing entity attributes; Perform semantic integrity verification on each entity attribute in the initial node set, and filter out a valid set of nodes with complete attribute descriptions and associated operation records. Based on the event record timestamps and operation types in the historical operation data, the interaction frequency between device entities and operation entities and the triggering conditions of fault entities in the set of valid nodes are determined. Based on the interaction frequency and triggering conditions, dynamic association rules between device entities and operation entities are generated, and bidirectional connection edges are created for each pair of device entities and operation entities based on the dynamic association rules. Extract the historical decision results corresponding to the bidirectional connection edge from the historical operation data, and assign weights to the bidirectional connection edge according to the decision success rate and execution frequency. The set of valid nodes, bidirectional connecting edges, and weight assignments are stored hierarchically according to entity type to generate the knowledge graph structure, and a weight update trigger event is configured for each bidirectional connecting edge in the knowledge graph structure.
8. The method according to claim 4, characterized in that, The dynamic semantic matching processing of the target semantic features and the contextual features based on the pre-constructed knowledge graph structure further includes: During the semantic matching path expansion process, it is detected whether there are isolated running mode nodes in the expanded semantic path that are not connected to fault type nodes; If an isolated operation mode node exists, extract the text description fragment associated with the isolated operation mode node from the text vector set of the context association features to generate a candidate fault attribute description. Logical conflict detection is performed between the candidate fault attribute description and the attribute description of the existing fault type node in the knowledge graph structure. If no conflict is detected, the candidate fault attribute description is added as a new fault type node. Establish connection edges between the newly added fault type node and the isolated operation mode node, and initialize the weights of the connection edges according to the association direction of the parameter dependency graph in the target semantic features; If a logical conflict is detected, then retrieve the node that matches the candidate fault attribute description from the fault type node of the knowledge graph structure, and extract the corrected attribute description of the matching node. The corrected attribute description is fused with the candidate fault attribute description to generate an updated fault attribute description, and the logical conflict detection is re-executed to confirm the addability of the updated fault attribute description. The newly confirmed fault type nodes and their corresponding connecting edges are synchronized to the instruction execution conditions of the semantic decision instruction set, and the weight update trigger event of the knowledge graph structure is triggered to adjust the weight values of the connecting edges of the relevant nodes.
9. The method according to claim 5, characterized in that, The insertion of anomaly monitoring points associated with the fault type node into the parameter adjustment step sequence includes: Based on the historical abnormal patterns of the fault type nodes, parameter fluctuation characteristics are extracted, and potential abnormal triggering locations are determined within the slope variation range of the piecewise linear adjustment curve. Align the potential anomaly triggering locations with the execution time axis of the parameter adjustment step sequence to determine the monitoring time window and parameter fluctuation threshold range for each anomaly monitoring point; Configure dynamic monitoring rules within the monitoring time window, the dynamic monitoring rules including the continuous sampling frequency and deviation tolerance of the actual parameter trajectory; The dynamic monitoring rules are logically bound to the attribute constraints of the fault type nodes in the knowledge graph structure to generate a set of abnormal monitoring points carrying fault type identifiers. The triggering logic of the abnormal monitoring point set is embedded in the parameter adjustment step sequence to activate the detection algorithm for the preset fault type within the monitoring time window; When the parameter adjustment step sequence is injected into the execution queue, the triggering logic of the anomaly monitoring point set is synchronously loaded into the interrupt response unit of the control system to ensure the parallel execution of parameter adjustment and anomaly detection.
10. A computer system, characterized in that, include: A memory, wherein a computer program is stored; A processor is configured to load the computer program to implement the knowledge graph-based intelligent factory semantic decision generation method as described in any one of claims 1-9.
Citation Information
Cited By
Industrial scene-oriented large-scale language model deployment system and method
CN121478988A
Device control method and system based on natural language and electronic device
CN121502011A
Fault early warning and intelligent diagnosis method and system for aluminum electrolysis production key equipment
CN121881058A
Fault early warning and intelligent diagnosis method and system for key equipment of aluminum electrolysis production
CN121881058B
Factory intelligent management method and system based on Internet of Things
CN122044065A