An improved knowledge graph construction method and system for textile weaving

By constructing an improved knowledge graph, the problems of defining entity boundaries and identifying causal relationships for professional terms in the textile weaving field were solved, achieving high-precision energy consumption prediction and anomaly tracing, and improving the model's semantic understanding and causal reasoning capabilities.

CN122153072APending Publication Date: 2026-06-05ZHEJIANG SCI-TECH UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHEJIANG SCI-TECH UNIV
Filing Date
2026-02-25
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing knowledge graphs in the textile weaving field lack entity boundary definition and semantic recognition mechanisms for professional terms, making it difficult to express the temporal logical evolution characteristics and causal relationships under multi-source disturbances in the weaving process. They also lack precise boundary definition and semantic recognition for complex structural terms, resulting in insufficient energy consumption prediction and anomaly tracing capabilities.

Method used

An improved knowledge graph is constructed by defining three types of high-order semantic linking paradigms, introducing a graph entity boundary co-occurrence enhancement mechanism embedded in the extension layer and an attention graph extraction enhancement mechanism with relation type awareness, thereby improving entity recognition and relation extraction capabilities and forming a causal chain knowledge system of equipment, process, parking and energy consumption.

Benefits of technology

It achieves high-precision entity recognition and causal relationship extraction of technical terms in the weaving field, improves the interpretability and anomaly tracing ability of energy consumption prediction, enhances the semantic understanding and causal reasoning depth of the model, and supports energy consumption optimization decision-making under complex working conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122153072A_ABST
    Figure CN122153072A_ABST
Patent Text Reader

Abstract

The application discloses an improved knowledge graph construction method and system for textile weaving, relates to the technical field of textile manufacturing, and solves the problems of insufficient feature description ability of the knowledge graph of the prior art for the textile weaving industry, difficulty in expressing the time sequence logic evolution characteristics and the causal relationship under the multi-source disturbance, lack of entity boundary definition and semantic recognition mechanism for weaving professional terms, and serious semantic mismatch of relationship extraction, the method comprising: constructing a knowledge base data set of the improved knowledge graph, modeling five concept domain ontologies, defining a semantic link paradigm, enhancing co-occurrence of graph entity boundaries, and enhancing attention graph extraction with relationship type perception, carrying out weaving knowledge entity recognition and relationship extraction result reasoning output, introducing a structured energy consumption semantic network to realize the transition of the model from data driving to knowledge driving, and realizing the transition from "numerical correlation" to "causal interpretability" through an embedded semantic layer fusion mechanism.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of textile manufacturing technology, and in particular to an improved knowledge graph construction method and system for textile weaving. Background Technology

[0002] The introduction of Knowledge Graphs (KGs) provides a new technological path to enhance the interpretability and knowledge-driven capabilities of industrial models. Existing research shows that knowledge graphs can structure process parameters, equipment status, and energy consumption indicators into triples, thereby supporting causal reasoning and semantic tracing, and to some extent alleviating the inherent limitations of traditional pure data-driven models that "only look at correlations and don't understand causality." For example, the CarbonKG framework introduces a causal knowledge injection mechanism in multivariate time-series prediction, effectively reducing the model's over-reliance on data correlations and improving prediction bias. However, such frameworks are mostly geared towards general carbon emission or energy scenarios, with limited ability to characterize industry features and lacking a detailed analysis of the specialized semantics and parameter relationships in the weaving field. Current KG research generally focuses on general manufacturing or energy systems, such as industrial chain collaboration and equipment fault diagnosis. Their knowledge structures are mostly static ontologies, making it difficult to express the temporal logical evolution characteristics and causal relationships under multi-source disturbances in the weaving process. Especially in the textile and weaving scenario, a weaving knowledge graph (WKG) system for modeling professional terms and domain entity systems has not yet been formed, and there is a lack of graph entity recognition mechanism for accurately defining the boundaries and semantically recognizing complex structural terms such as "unit energy consumption (kWh / m)" and "stop frequency (times / hour)".

[0003] Therefore, there is an urgent need for a weaving knowledge graph framework that can deeply embed knowledge in the weaving field, support temporal causal reasoning, and have both real-time evolution and high-density semantic expression capabilities. At the same time, it is necessary to strengthen the boundary identification and co-occurrence semantic modeling of weaving professional terms at the entity level, so as to better support energy consumption prediction, anomaly tracing and process optimization decisions under complex working conditions. Summary of the Invention

[0004] The purpose of this application is to overcome the problems of existing knowledge graphs, such as insufficient ability to characterize the features of the textile weaving industry, difficulty in expressing the temporal logical evolution features and causal relationships under multi-source perturbations, lack of entity boundary definition and semantic recognition mechanisms for weaving professional terms, and serious semantic mismatch in relation extraction. This application provides an improved knowledge graph construction method and system for textile weaving.

[0005] Firstly, an improved knowledge graph construction method for textile weaving is provided, including:

[0006] Construct an improved knowledge graph knowledge foundation dataset, wherein the knowledge foundation dataset includes multiple entity sets and relation sets;

[0007] With energy consumption fluctuation tracing as the task orientation, we construct a weaving knowledge graph ontology that includes equipment entity domain, process parameter domain, fault and environment domain, shutdown behavior domain and energy consumption performance domain;

[0008] Three types of higher-order semantic linking paradigms are defined and uniformly expressed as triple semantic linking formulas. The three types of higher-order semantic linking paradigms include: process transmission paradigm for characterizing the direct driving effect of parameter adjustment on energy consumption, anomaly tracing paradigm for energy consumption anomaly diagnosis and causal backtracking, and operating condition mapping paradigm for providing conditional energy consumption templates for prediction models.

[0009] Based on the graph entity boundary co-occurrence enhancement mechanism of the embedded extension layer, the entity boundaries in the improved knowledge graph are enhanced and identified to improve the model's ability to recognize entities of professional terms in the weaving field.

[0010] An attention graph extraction enhancement mechanism based on relation type awareness is used to extract the relationships between entities in the improved knowledge graph to generate logically consistent triple structures.

[0011] Based on the aforementioned entity boundary co-occurrence enhancement mechanism and attention graph extraction enhancement mechanism, entity recognition and relation extraction are performed on the input text to output logically consistent triples that satisfy the constraints of ontology and semantic linking paradigms.

[0012] In some possible implementations, the improved knowledge graph takes the weaving energy consumption mechanism as the main knowledge line, and semantically associates equipment structure, process parameters, shutdown behavior and energy consumption performance to form a causal chain knowledge system of equipment, process, shutdown and energy consumption.

[0013] In some possible implementations, the entity set includes a device entity domain, a process parameter domain, an energy consumption performance domain, and a device status and environment domain, and the relationship set includes device-process association, process-shutdown association, and shutdown-energy consumption association.

[0014] In some possible implementations, the device entity domain is used to define the physical carrier and operational anchor point of the energy source; the process parameter domain is used to reflect the dynamic adjustment variables and complexity of the operation layer; the fault and environment domain is used to introduce external disturbances as potential anomaly inducing conditions; the shutdown behavior domain is used to describe dynamic events and, in combination with duration, frequency and triggering cause, to reflect the direct driving effect of disturbances on energy consumption; and the energy consumption performance domain is used to constitute the semantic endpoint of the causal chain of process, disturbance and energy consumption.

[0015] In some possible implementations, the triple semantic linking formula is:

[0016]

[0017] Among them, Th weave To weave semantic linking relationships in a graph, Re n For the main field i With the object field j The causal relationship exists.

[0018] Among some possible implementations, the graph entity boundary co-occurrence enhancement mechanism based on the embedded extension layer includes:

[0019] Domain vocabulary construction and semantic co-occurrence initialization: By statistically analyzing the corpus related to loom energy consumption, a high-frequency domain vocabulary covering key terms in the weaving field is constructed. An initial semantic graph structure is formed based on word co-occurrence relationships. Semantic proximity between words is calculated using co-occurrence frequency and contextual mutual information to initialize domain-specific word vectors before model pre-training, enabling the model to have the ability to semantically recognize and infer contextual information of weaving field terms.

[0020] Embedding matrix expansion and semantic alignment optimization: Modify the input embedding matrix of the pre-trained model, align the newly added domain terms with the original vocabulary in terms of features and initialize their semantic representations, and perform symmetric bidirectional updates according to the co-occurrence-enhanced embedding initialization formula, which is:

[0021]

[0022]

[0023] in, Indicator The prior initialization of the embedding vector, Indicator With words The number of times windows co-occur in the corpus. These are the co-occurrence weighting coefficients. This is the normalization factor; similarly, Simultaneous updates are implemented to achieve symmetrical bidirectional association.

[0024] Among some possible implementations, relationship-type-aware attention graph extraction enhancement mechanisms include:

[0025] Based on the knowledge graph ontology, a legal relationship mapping mask rule base for entity types and relationship types is constructed to clarify the combination boundary of subject and object entities under different relationship types. The rule base is used as a hard structural constraint in attention calculation to filter illegal entity combinations.

[0026] A relation-aware attention module is constructed, which takes Transformer-encoded relation features and text features as input, and constructs a relation-text attention feature set Q / K / V through three sets of independent linear transformation functions:

[0027] ;

[0028]

[0029]

[0030] Where LinearQ is the linear transformation function for relational queries, LinearK is the linear transformation function for text keys, and LinearV is the linear transformation function for text values;

[0031] Relational features are mapped to queries, and textual features are mapped to keys and values. Semantic similarity between relations and tokens is calculated using matrix multiplication, and masking rules are used to filter out illegal entity types. Attention weights (attn_weights) are then obtained after Softmax normalization.

[0032]

[0033] The attention weights attn_weights are used to perform weighted aggregation of text feature vectors to generate a relation-aware text representation.

[0034] Secondly, an improved knowledge graph construction system for textile weaving is provided, including:

[0035] The knowledge foundation construction module is used to construct the knowledge foundation dataset of the improved knowledge graph, wherein the knowledge foundation dataset includes multiple entity sets and relation sets;

[0036] The concept domain ontology modeling module is used to construct a weaving knowledge graph ontology, including equipment entity domain, process parameter domain, fault and environment domain, shutdown behavior domain, and energy consumption performance domain, with energy consumption fluctuation tracing as the task orientation.

[0037] The semantic linking paradigm definition module is used to define three types of higher-order semantic linking paradigms and to express the three types of higher-order semantic linking paradigms in a unified way as a triple semantic linking formula. The three types of higher-order semantic linking paradigms include: the process transmission paradigm for characterizing the direct driving effect of parameter adjustment on energy consumption, the anomaly tracing paradigm for energy consumption anomaly diagnosis and causal backtracking, and the operating condition mapping paradigm for providing conditional energy consumption templates for prediction models.

[0038] The boundary enhancement module is used to enhance the co-occurrence recognition of entity boundaries in the improved knowledge graph based on the co-occurrence enhancement mechanism of the graph entity boundaries embedded in the extension layer, so as to improve the model's ability to recognize entities of professional terms in the weaving field.

[0039] An extraction enhancement module is used for an attention graph extraction enhancement mechanism based on relation type awareness to extract the relationships between entities in the improved knowledge graph to generate logically consistent triple structures.

[0040] The inference output module is used to perform entity recognition and relation extraction on the input text based on the graph entity boundary co-occurrence enhancement mechanism and the attention graph extraction enhancement mechanism, so as to output logically consistent triples that satisfy the constraints of ontology and semantic linking paradigm.

[0041] Thirdly, a computer-readable storage medium is provided that stores program code for execution by a device, the program code including steps for performing a method as described in any of the implementations of the first aspect above.

[0042] Fourthly, an electronic device is provided, the electronic device including a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the method as described in any of the implementations of the first aspect above.

[0043] This application offers the following advantages: Firstly, it constructs an improved Weaving Knowledge Graph (WKG) for the weaving field, further enhancing the model's semantic understanding and causal reasoning depth. This improved WKG centers on knowledge reasoning, introducing a structured energy consumption semantic network to transform the model from data-driven to knowledge-driven, enabling it to optimize energy consumption and regulate cleaner production based on prediction results. Secondly, the improved WKG is based on a unified weaving ontology, employing a semantic linking paradigm to integrate loom operating parameters, process characteristics, energy consumption performance, and external disturbances into a reasonable knowledge network. Through an embedded semantic layer fusion mechanism, the model can invoke domain knowledge in energy consumption prediction, achieving a leap from "numerical correlation" to "causal interpretability." Attached Figure Description

[0044] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments of this application and their descriptions are used to explain this application and do not constitute an undue limitation of this application.

[0045] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0046] Figure 1 This is a flowchart of an improved knowledge graph construction method for textile weaving according to Embodiment 1 of this application;

[0047] Figure 2 This is a schematic diagram of the graph ontology and semantic linking paradigm design in the improved knowledge graph construction method for textile weaving according to Embodiment 1 of this application;

[0048] Figure 3 This is a schematic diagram of the domain-driven co-occurrence embedding optimization mechanism in the improved knowledge graph construction method for textile weaving according to Embodiment 1 of this application;

[0049] Figure 4 This is an architecture diagram of the attention graph extraction enhancement mechanism for relation type awareness in the improved knowledge graph construction method for textile weaving according to Embodiment 1 of this application.

[0050] Figure 5 This is a structural block diagram of the improved knowledge graph construction system for textile weaving according to Embodiment 2 of this application;

[0051] Figure 6 This is a schematic diagram of the internal structure of the electronic device according to Embodiment 4 of this application.

[0052] Figure label:

[0053] 100. Knowledge Foundation Construction Module; 200. Concept Domain Ontology Modeling Module; 300. Semantic Linking Paradigm Definition Module; 400. Boundary Enhancement Module; 500. Extraction Enhancement Module; 600. Inference Output Module. Detailed Implementation

[0054] 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.

[0055] Example 1

[0056] like Figure 1 As shown in Embodiment 1 of this application, an improved knowledge graph construction method for textile weaving includes:

[0057] S100. Construct an improved knowledge graph foundation dataset, which includes multiple entity sets and relation sets.

[0058] Using the energy consumption mechanism of weaving as the core knowledge thread, this model semantically associates equipment structure, process parameters, shutdown behavior, and energy consumption performance, forming a causal chain knowledge system of "equipment—process—shutdown—energy consumption." This knowledge graph contains 1,175 entities and three types of relation sets, as shown in Table 1. Entities are divided into equipment entity domains (111 loom models, 268 transmission components, 80 mechanism attributes), process parameter domains (210 parameter nodes), energy consumption performance domains (194 energy consumption feature nodes), and equipment status and environment domains (140 air supply system components, 172 weaving auxiliary components). Relation sets, as shown in Table 2, include equipment-process associations, process-shutdown associations, and shutdown-energy consumption associations. Based on this knowledge graph, the model can achieve causal backtracking and anomaly tracing of high-energy-consumption patterns during prediction, and can output parameter optimization suggestions based on the knowledge rule base, thereby enhancing interpretability and energy-saving guidance capabilities while maintaining prediction accuracy.

[0059] Table 1: Entity Set of Weaving Knowledge Graph

[0060]

[0061] Table 2: Relationship Set of Weaving Knowledge Graph

[0062]

[0063] S200, with energy consumption fluctuation tracing as the task orientation, constructs a weaving knowledge graph ontology including equipment entity domain, process parameter domain, fault and environment domain, shutdown behavior domain and energy consumption performance domain.

[0064] After completing the establishment of the knowledge base dataset, in order to adapt to the tasks of loom energy consumption modeling and causal reasoning, the knowledge graph was constructed in accordance with the task-driven graph ontology design principle, that is, with "energy consumption fluctuation source analysis" as the core objective, a multi-level and evolvable domain concept system was constructed. At the ontology level, with "energy consumption fluctuation tracing" as the task orientation, five core conceptual domains are designed progressively along the logic of weaving process: the equipment entity domain is used to describe the basic structure such as loom model, drive system and control module to define the physical carrier and operating anchor point of energy consumption source; the process parameter domain focuses on adjustable variables such as warp and weft tension, speed, opening and closing ratio, humidity setting and yarn specifications to reflect the dynamic adjustment and complexity of the operation layer; the fault and environment domain introduces external disturbances such as equipment aging, sensor drift, raw material batch differences and environmental temperature and humidity as potential abnormal inducing conditions; the shutdown behavior domain describes dynamic events such as warp stop, weft stop, fault stop and manual interruption, and combines duration, frequency and triggering cause to reflect the direct driving effect of disturbance on energy consumption; the energy consumption performance domain describes key indicators such as energy consumption per unit meter, fluctuation coefficient and additional energy consumption during recovery period as the semantic endpoint of the "process-disturbance-energy consumption" causal chain. Through heterogeneous semantic mapping, these five domains achieve unified modeling of multi-source data, integrating structured process parameters, sensor streams, and natural language logs into the same knowledge space, thereby providing a causal and interpretable knowledge foundation for energy consumption prediction.

[0065]

[0066] in, It is composed of the map body; For device entity domain; This is the process parameter domain; For fault and environment domains; For parking behavior domain; This is the energy consumption performance domain.

[0067] S300. Define three types of higher-order semantic linking paradigms and express them uniformly as triple semantic linking formulas. The three types of higher-order semantic linking paradigms include: the process transmission paradigm for characterizing the direct driving effect of parameter adjustment on energy consumption, the anomaly tracing paradigm for energy consumption anomaly diagnosis and causal backtracking, and the operating condition mapping paradigm for providing conditional energy consumption templates for prediction models.

[0068] Since static ontology is insufficient to support causal reasoning, this embodiment introduces three high-order semantic linking paradigms within the ontology framework. First, the process transmission paradigm presents a chain structure of "process parameter change → state disturbance / stop event → energy consumption result," such as "weft tension setting → triggering weft stop → leading to an increase in unit energy consumption," used to characterize the direct driving effect of parameter adjustments on energy consumption. Second, the anomaly causation paradigm reveals the indirect path through which environmental or raw material disturbances affect energy consumption via stop behavior, such as "abnormal humidity → inducing stoppage → causing power fluctuations," suitable for energy consumption anomaly diagnosis and causal backtracking. Finally, the operating condition mapping paradigm emphasizes the static mapping of loom structure and process combination to energy consumption levels, such as "loom configuration + weave type → determining unit energy consumption," providing a conditional energy consumption template for the prediction model. All are unified into a triple semantic linking formula:

[0069]

[0070] Among them, Th weave To weave semantic linking relationships in a graph, Re n For the main field i With the object field j The causal relationship exists.

[0071] S400: Based on the graph entity boundary co-occurrence enhancement mechanism of the embedded extension layer, the co-occurrence enhancement recognition of entity boundaries in the improved knowledge graph is performed to improve the model's ability to recognize entities of professional terms in the weaving field.

[0072] In the construction of a knowledge graph for the energy consumption domain of loom production, the entity recognition task exhibits a high degree of domain specialization and structural complexity. This challenge mainly stems from the widespread use of complex structural terms in weaving processes, such as "unit energy consumption (kWh / m³)" and "number of stops (times / hour)". Traditional Named Entity Recognition (NER) methods suffer from significant bottlenecks in boundary definition and type classification, especially when dealing with entities containing specialized terminology and complex structures. To address this issue, this embodiment proposes a graph-enhanced entity recognition mechanism, aiming to improve the recognition accuracy and semantic consistency of large language models for domain-specific entities. It achieves end-to-end optimization from "general word recognition" to "deep understanding of textile professional terms," ​​constructing a "foundation of professional vocabulary."

[0073] To enhance the model's ability to represent specialized vocabulary in the weaving field, this embodiment designs an embedding extension layer driven by a domain lexicon. Specifically, the first step involves domain lexicon construction and semantic co-occurrence initialization. Through statistical analysis of corpora related to loom energy consumption, a high-frequency domain lexicon is constructed, covering key terms such as "warp tension," "weft stop time," "process complexity," and "kWh / m." An initial semantic graph structure is formed based on word co-occurrence relationships. Semantic proximity between words is calculated using co-occurrence frequency and contextual mutual information, thereby initializing domain-specific word vectors before pre-training, enabling the model to semantically recognize and infer contextual information about weaving terms. The second step involves embedding matrix expansion and semantic alignment optimization. The input embedding matrix of the pre-trained model is modified, aligning the newly added domain terms with the original vocabulary in terms of features, initializing their semantic representations, and performing symmetrical bidirectional updates based on the co-occurrence-enhanced embedding initialization formula. The co-occurrence-enhanced embedding initialization formula is as follows:

[0074]

[0075]

[0076] in, Indicator The prior initialization of the embedding vector, Indicator With words The number of times windows co-occur in the corpus. These are the co-occurrence weighting coefficients. This is the normalization factor; similarly, Simultaneous updates are implemented to achieve symmetrical bidirectional association.

[0077] Domain-driven embedding optimization not only improves the model's ability to recognize specialized terminology entities, but also provides a more stable semantic foundation and feature input for downstream tasks of energy consumption prediction mapping (such as causal relationship extraction, energy consumption event attribution, and process anomaly diagnosis). Its overall architecture and optimization process are as follows: Figure 3 As shown.

[0078] S500, an enhanced attention graph extraction mechanism based on relation type awareness, extracts relationships between entities in the improved knowledge graph to generate logically consistent triple structures.

[0079] After entity recognition and boundary optimization, relation extraction becomes a key step in the construction of a knowledge graph for the energy consumption domain of looms. Its core task is to identify the semantic dependency relationships between entities and generate logically consistent and reasonable triple structures. The accuracy of relation extraction directly determines the logical completeness of the knowledge graph and the interpretability and reliability of downstream energy consumption reasoning. However, due to the highly specialized terminology and complex syntactic structure of the corpus in the weaving domain, traditional relation extraction methods often suffer from insufficient generalization, boundary ambiguity, and semantic mismatch when dealing with high-order semantic relationships such as "component-applicable-environmental conditions" or "fault type-cause-control logic". To address the above challenges, this embodiment proposes a relation type-aware attention graph extraction enhancement mechanism. By combining entity type constraints and relation attention awareness features, the semantic controllability and structural consistency optimization of relation extraction are achieved. The mechanism mainly includes two core modules: (1): a structure rule-driven entity-relation consistency constraint module; (2): a relation attention guidance module enhanced by high-frequency semantic links. The overall architecture is as follows: Figure 4 As shown.

[0080] To accurately capture the semantic association between text sequences and relation types, this embodiment first combines the domain knowledge graph ontology to construct a legal relation mapping mask rule base (M) for entity types and relation types, clarifying the combination boundaries of subject and object entities under different relation types.

[0081]

[0082]

[0083] in, A predefined legal rule base for the domain; main entity and object entity They belong to the main entity set respectively With object entity set ; This indicates whether the entity pairs at positions i and j under relation r can form a valid triple. This mask serves as a hard structural constraint in attention weight calculation, effectively filtering out illegal entity combinations and reducing the recall rate of false triples.

[0084] Based on a legal mapping mask rule base in the textile field, this embodiment designs a relation-aware attention module to model the guiding effect of relation types on contextual features at the semantic level. This module uses the relation features encoded by Transformer (… (encoding relation type context representation) and text features ( Taking token-level text context embeddings as input, the relationship – the attention feature set of the text – is constructed through three sets of independent linear transformation functions:

[0085] ;

[0086] ;

[0087] ;

[0088] Where LinearQ is the linear transformation function for relational queries, LinearK is the linear transformation function for text keys, and LinearV is the linear transformation function for text values.

[0089] Relational features are mapped to queries of dimension [batch_size, 1, hidden_dim], explicitly modeling the "focus of relation types on text content"; while text features are mapped to keys and values, preserving token-level fine-grained semantics. Semantic similarity between relations and tokens is calculated through matrix multiplication, and illegal entity type propagation is filtered using masking rules. Attention weights attn_weights are obtained after Softmax normalization.

[0090]

[0091] Finally, the Value vector is weighted and aggregated using this weight to generate a relation-aware text representation weighted_feat with dimensions [batch_size, hidden_dim].

[0092] This mechanism employs relation-driven dynamic attention modeling, enabling different relation types to adaptively focus on semantically relevant key tokens within the text. Leveraging a lightweight linear structure and a scalable attention mechanism, this method significantly improves the model's accuracy in capturing relation-dependent semantics and its cross-text generalization performance while maintaining computational efficiency.

[0093] S600, based on the entity boundary co-occurrence enhancement mechanism and the attention graph extraction enhancement mechanism, performs entity recognition and relation extraction on the input text to output logically consistent triples that satisfy the constraints of ontology and semantic linking paradigm.

[0094] Based on the entity boundary co-occurrence enhancement in step S400 and the relation type-aware attention extraction mechanism in step S500, entity recognition and relation extraction are performed on the input text (including natural language logs) and structured data in the weaving domain, generating logically consistent triples that satisfy the constraints of ontology and semantic linking paradigms. This enables the model to achieve causal backtracking and anomaly tracing in high-energy-consuming patterns during the prediction process, thereby enhancing the interpretability of the prediction.

[0095] To enhance the interpretability and knowledge-driven capability of loom energy consumption prediction, this application introduces a weaving knowledge graph as a structured knowledge foundation, organizing process parameters, equipment status, and energy consumption indicators in the form of triples to support causal reasoning and semantic tracing, thereby alleviating the limitations of traditional pure data-driven models that "only look at correlations and do not understand causality". To address the challenges of highly dense terminology, complex syntactic structures, and difficulty in expressing temporal logical evolution and multi-source perturbation causal relationships in the weaving scenario, this application introduces a domain-terminated co-occurrence embedding extension layer during the training phase. This enhances the entity boundary definition and type recognition capabilities of complex terminology. Furthermore, it employs a relation type-aware attention graph extraction enhancement mechanism and a legal mapping mask rule base to achieve structural constraints and semantic focus on the relation extraction process. This generates structurally valid and semantically consistent triples, which are incrementally written into the improved knowledge graph. Finally, during the inference phase, the application leverages the aforementioned knowledge base and enhanced entity recognition / relation extraction capabilities to achieve causal backtracking and anomaly tracing of high-energy-consuming patterns. Based on the knowledge rule base, it outputs parameter optimization suggestions to enhance the interpretability and energy-saving guidance capabilities of the model's predictions.

[0096] To verify the effectiveness of the improved knowledge graph, this embodiment conducted experimental evaluations on two core modules. Table 3 shows the recognition results for different entity types. Overall, the model performed best on the three entity types of energy consumption parameters, transmission components, and power system components, with F1-Scores of 0.8646, 0.9100, and 0.9597, respectively. This indicates that the improved embedding layer and type-aware mechanism can effectively capture the contextual relationships and semantic boundaries of domain-specific terms. Among them, the "power system components" category performed the most stably, with both precision and recall rates exceeding 0.94, indicating that this type of entity has clear semantic boundaries and significant co-occurrence patterns in the text. The recognition effect of "energy consumption parameters" was also outstanding, reflecting the model's ability to understand numerical entities. In contrast, the recall rates of the "opening mechanism components" and "process parameters" categories were lower (0.825 and 0.600, respectively), mainly due to the presence of many structural overlaps and implicit nesting issues in the process description text, which increased the difficulty of boundary recognition. However, the overall F1 score was above 0.69, validating the significant gains of the domain vocabulary expansion and semantic co-occurrence optimization strategies. In summary, the entity recognition module achieved a leap from "general naming recognition" to "weaving semantic recognition," laying an accurate semantic foundation for subsequent relation extraction and energy-efficient reasoning.

[0097] Table 3: Entity Recognition Results

[0098]

[0099] Table 4 shows the performance comparison between the improved weaving graph model and mainstream relation extraction frameworks (Uie, DeepKE, and spaCy). The results show that WKG outperforms the comparison models in both entity boundary recognition and relation type recognition tasks, achieving F1 scores of 0.8394 and 0.8014 respectively, representing improvements of approximately 11% and 15% compared to the original DeepKE. Specifically, the entity recognition precision reaches 0.8582, and the recall rate is 0.8215, reflecting the model's ability to achieve both accuracy and coverage in complex domain texts. Relation recognition also performs exceptionally well. This indicates that by introducing a relation type-aware attention mechanism and structured mask constraints, the model achieves simultaneous improvement in semantic coupling and logical consistency in complex weaving corpora.

[0100] Table 4: Comparison of Evaluation Index Values ​​for Each Model

[0101]

[0102] Example 2

[0103] like Figure 5 As shown, Embodiment 2 of this application relates to an improved knowledge graph construction system for textile weaving, comprising:

[0104] The knowledge foundation construction module 100 is used to construct the knowledge foundation dataset of the improved knowledge graph, wherein the knowledge foundation dataset includes multiple entity sets and relation sets;

[0105] The Concept Domain Ontology Modeling Module 200 is used to construct a weaving knowledge graph ontology, including equipment entity domain, process parameter domain, fault and environment domain, shutdown behavior domain and energy consumption performance domain, with energy consumption fluctuation tracing as the task orientation.

[0106] The semantic linking paradigm definition module 300 is used to define three types of higher-order semantic linking paradigms and to express the three types of higher-order semantic linking paradigms in a unified way as a triple semantic linking formula. The three types of higher-order semantic linking paradigms include: the process transmission paradigm for characterizing the direct driving effect of parameter adjustment on energy consumption, the anomaly tracing paradigm for energy consumption anomaly diagnosis and causal backtracking, and the operating condition mapping paradigm for providing conditional energy consumption templates for prediction models.

[0107] The boundary enhancement module 400 is used to enhance the co-occurrence of entity boundaries in the graph based on the embedded extension layer, so as to improve the model's ability to recognize entities of technical terms in the weaving field.

[0108] Extraction enhancement module 500 is used for the relationship type-aware attention graph extraction enhancement mechanism to extract the relationships between entities in the improved knowledge graph to generate logically consistent triple structures.

[0109] The inference output module 600 is used to perform entity recognition and relation extraction on the input text based on the graph entity boundary co-occurrence enhancement mechanism and the attention graph extraction enhancement mechanism, so as to output logically consistent triples that satisfy the constraints of ontology and semantic linking paradigm.

[0110] It should be noted that other specific implementations of the improved knowledge graph construction system for textile weaving in this embodiment can be found in the specific implementations of the improved knowledge graph construction method for textile weaving described above. To avoid redundancy, they will not be repeated here.

[0111] Example 3

[0112] This application relates to a computer-readable storage medium in embodiment 3, which stores program code for execution by a device, the program code including steps for performing the method as described in any implementation of embodiment 1 of this application;

[0113] The computer-readable storage medium may be a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM); the computer-readable storage medium may store program code, and when the program stored in the computer-readable storage medium is executed by a processor, the processor is used to perform the steps of the method in any of the implementations of Embodiment 1 of this application.

[0114] Example 4

[0115] like Figure 6 As shown, an electronic device according to Embodiment 4 of this application includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor. When the program or instructions are executed by the processor, they implement the method in any of the implementations in Embodiment 1 of this application.

[0116] The processor can be a general-purpose central processing unit (CPU), microprocessor, application-specific integrated circuit (ASIC), graphics processing unit (GPU), or one or more integrated circuits, used to execute related programs to implement the method in any of the implementations of Embodiment 1 of this application.

[0117] The processor can also be an integrated circuit electronic device with signal processing capabilities. In implementation, each step of the method in any of the implementations of Embodiment 1 of this application can be completed by the integrated logic circuitry in the processor's hardware or by software instructions.

[0118] The aforementioned processor can also be a general-purpose processor, digital signal processor, application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory; the processor reads information from the memory and, in conjunction with its hardware, completes the functions required by the units included in the data processing apparatus of the embodiments of this application, or executes the methods in any implementation of Embodiment 1 of this application.

[0119] The above are merely preferred embodiments of this application; however, the scope of protection of this application is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in this application, based on the technical solution and its improved concept, should be covered within the scope of protection of this application.

Claims

1. An improved knowledge graph construction method for textile weaving, characterized in that, include: Construct an improved knowledge graph knowledge foundation dataset, wherein the knowledge foundation dataset includes multiple entity sets and relation sets; With energy consumption fluctuation tracing as the task orientation, we construct a weaving knowledge graph ontology that includes equipment entity domain, process parameter domain, fault and environment domain, shutdown behavior domain and energy consumption performance domain; Three types of higher-order semantic linking paradigms are defined and uniformly expressed as triple semantic linking formulas. The three types of higher-order semantic linking paradigms include: process transmission paradigm for characterizing the direct driving effect of parameter adjustment on energy consumption, anomaly tracing paradigm for energy consumption anomaly diagnosis and causal backtracking, and operating condition mapping paradigm for providing conditional energy consumption templates for prediction models. Based on the graph entity boundary co-occurrence enhancement mechanism of the embedded extension layer, the entity boundaries in the improved knowledge graph are enhanced and identified to improve the model's ability to recognize entities of professional terms in the weaving field. An attention graph extraction enhancement mechanism based on relation type awareness is used to extract the relationships between entities in the improved knowledge graph to generate logically consistent triple structures. Based on the aforementioned entity boundary co-occurrence enhancement mechanism and attention graph extraction enhancement mechanism, entity recognition and relation extraction are performed on the input text to output logically consistent triples that satisfy the constraints of ontology and semantic linking paradigms.

2. The improved knowledge graph construction method for textile weaving according to claim 1, characterized in that, The improved knowledge graph takes the energy consumption mechanism of weaving as the main knowledge line, and semantically associates equipment structure, process parameters, shutdown behavior and energy consumption performance to form a causal chain knowledge system of equipment, process, shutdown and energy consumption.

3. The improved knowledge graph construction method for textile weaving according to claim 1 or 2, characterized in that, The entity set includes the equipment entity domain, process parameter domain, energy consumption performance domain, and equipment status and environment domain. The relationship set includes the association between equipment and process, the association between process and shutdown, and the association between shutdown and energy consumption.

4. The improved knowledge graph construction method for textile weaving according to claim 1, characterized in that, The equipment entity domain is used to define the physical carrier and operating anchor point of the energy consumption source; the process parameter domain is used to reflect the dynamic adjustment variables and complexity of the operation layer; the fault and environment domain is used to introduce external disturbances as potential anomaly inducing conditions; the shutdown behavior domain is used to describe dynamic events and combine duration, frequency and triggering cause to reflect the direct driving effect of disturbance on energy consumption; the energy consumption performance domain is used to form the semantic endpoint of the causal chain of process, disturbance and energy consumption.

5. The improved knowledge graph construction method for textile weaving according to claim 1, characterized in that, The semantic linking formula for the triplet is: Among them, Th weave To weave semantic linking relationships in a graph, Re n For the main field i With the object field j The causal relationship exists.

6. The improved knowledge graph construction method for textile weaving according to claim 1, characterized in that, The graph entity boundary co-occurrence enhancement mechanism based on the embedded extension layer includes: Domain vocabulary construction and semantic co-occurrence initialization: By statistically analyzing the corpus related to loom energy consumption, a high-frequency domain vocabulary covering key terms in the weaving field is constructed. An initial semantic graph structure is formed based on word co-occurrence relationships. Semantic proximity between words is calculated using co-occurrence frequency and contextual mutual information to initialize domain-specific word vectors before model pre-training, enabling the model to have the ability to semantically recognize and infer contextual information of weaving field terms. Embedding matrix expansion and semantic alignment optimization: Modify the input embedding matrix of the pre-trained model, align the newly added domain terms with the original vocabulary in terms of features and initialize their semantic representations, and perform symmetric bidirectional updates according to the co-occurrence-enhanced embedding initialization formula, which is: in, Indicator The prior initialization of the embedding vector, Indicator With words The number of times windows co-occur in the corpus. These are the co-occurrence weighting coefficients. This is the normalization factor; similarly, Simultaneous updates are implemented to achieve symmetrical bidirectional association.

7. The improved knowledge graph construction method for textile weaving according to claim 1, characterized in that, Attention graph extraction enhancement mechanisms based on relation type awareness include: Based on the knowledge graph ontology, a legal relationship mapping mask rule base for entity types and relationship types is constructed to clarify the combination boundary of subject and object entities under different relationship types. The rule base is used as a hard structural constraint in attention calculation to filter illegal entity combinations. A relation-aware attention module is constructed, which takes Transformer-encoded relation features and text features as input, and constructs a relation-text attention feature set Q / K / V through three sets of independent linear transformation functions: ; ; ; Where LinearQ is the linear transformation function for relational queries, LinearK is the linear transformation function for text keys, and LinearV is the linear transformation function for text values; Relational features are mapped to queries, and textual features are mapped to keys and values. Semantic similarity between relations and tokens is calculated using matrix multiplication, and masking rules are used to filter out illegal entity types. Attention weights (attn_weights) are then obtained after Softmax normalization. The attention weights attn_weights are used to perform weighted aggregation of text feature vectors to generate a relation-aware text representation.

8. An improved knowledge graph construction system for textile weaving, characterized in that, include: The knowledge foundation construction module is used to construct the knowledge foundation dataset of the improved knowledge graph, wherein the knowledge foundation dataset includes multiple entity sets and relation sets; The concept domain ontology modeling module is used to construct a weaving knowledge graph ontology, including equipment entity domain, process parameter domain, fault and environment domain, shutdown behavior domain, and energy consumption performance domain, with energy consumption fluctuation tracing as the task orientation. The semantic linking paradigm definition module is used to define three types of higher-order semantic linking paradigms and to express the three types of higher-order semantic linking paradigms in a unified way as a triple semantic linking formula. The three types of higher-order semantic linking paradigms include: the process transmission paradigm for characterizing the direct driving effect of parameter adjustment on energy consumption, the anomaly tracing paradigm for energy consumption anomaly diagnosis and causal backtracking, and the operating condition mapping paradigm for providing conditional energy consumption templates for prediction models. The boundary enhancement module is used to enhance the co-occurrence recognition of entity boundaries in the improved knowledge graph based on the co-occurrence enhancement mechanism of the graph entity boundaries embedded in the extension layer, so as to improve the model's ability to recognize entities of professional terms in the weaving field. An extraction enhancement module is used for an attention graph extraction enhancement mechanism based on relation type awareness to extract the relationships between entities in the improved knowledge graph to generate logically consistent triple structures. The inference output module is used to perform entity recognition and relation extraction on the input text based on the graph entity boundary co-occurrence enhancement mechanism and the attention graph extraction enhancement mechanism, so as to output logically consistent triples that satisfy the constraints of ontology and semantic linking paradigm.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program code for execution by the device, the program code including steps for performing the method as described in any one of claims 1-7.

10. An electronic device, characterized in that, The electronic device includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the method as described in any one of claims 1-7.