Knowledge graph and bom semantic embedding method and system based on dynamic relationship attention network, computer device and storage medium
Patent Information
- Application Number
- CN202610914914.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-24
- Publication Date
- 2026-09-25
AI Technical Summary
[0005]鉴于上述的分析,本发明实施例旨在提供一种基于动态关系注意力网络的知识图谱与BOM语义嵌合方法、系统、计算机设备及存储介质,用以解决现有技术中知识图谱与物料清单系统间语义关联不足、结构信息利用不充分以及多业务场景适应性差的问题
本发明提出了一种基于动态关系注意力网络的知识图谱与BOM语义嵌合方法,用以实现产品结构与领域知识的智能化关联。
Smart Images

Figure CN122819404A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of knowledge graph and product data processing technology, and in particular to a method, system, computer device and storage medium for semantic embedding of knowledge graph and BOM based on dynamic relational attention network. Background Technology
[0002] Against the backdrop of rapid development in information technology and intelligent manufacturing, the integrated management of knowledge graphs and Bills of Materials (BOMs) has gradually become a key technology for enterprises to improve product development efficiency and enhance the level of intelligent manufacturing. Traditional methods mostly achieve the association between BOMs and knowledge graphs through rule matching or shallow semantic models. However, these methods have significant limitations when dealing with complex product structures and large-scale knowledge graph entities. Early technologies mainly relied on keyword matching and manual rules, which were not only inefficient but also difficult to adapt to the dynamic changes of multi-source heterogeneous data. With the development of deep learning technology, semantic embedding methods based on neural networks have been introduced into this field. By extracting feature representations of BOM nodes and knowledge graph entities through word vectors or sequence models, the accuracy of semantic association has been improved to some extent. However, these methods still fail to fully explore the hierarchical structure information of BOMs and lack quantitative evaluation of the credibility of knowledge graph entities, thus limiting their application effectiveness in real-world industrial scenarios.
[0003] In recent years, the successful application of the Transformer architecture in natural language processing has propelled semantic representation methods based on pre-trained language models to become mainstream. These methods obtain deep semantic representations through training on large-scale corpora, enabling them to better capture technical features in BOM text descriptions and domain concepts in knowledge graph entities. However, practical applications still suffer from the following problems: First, they ignore the unique tree-like hierarchical structure of BOMs, failing to integrate product hierarchy relationships into the semantic association process; second, they lack consideration for the differentiated needs of multi-view BOMs, making them unsuitable for the specific requirements of different business scenarios such as design and manufacturing; third, traditional methods rely on simple text matching or static rules, making it difficult to effectively capture the semantic information inherent in the BOM's hierarchical structure and adapt to the differentiated needs of different views. Therefore, traditional static models struggle to cope with the dynamic changes in BOMs and knowledge graphs, requiring retraining the entire model when data is updated, resulting in high computational costs and poor real-time performance.
[0004] Furthermore, the differences in entity credibility in knowledge graphs and the computational efficiency issues during dynamic updates have not been fully considered, resulting in low accuracy and poor real-time performance of association results, making it difficult to support the multi-dimensional knowledge fusion needs throughout the product lifecycle. Summary of the Invention
[0005] Based on the above analysis, the embodiments of the present invention aim to provide a method, system, computer device, and storage medium for semantic integration of knowledge graph and BOM based on dynamic relational attention network, in order to solve the problems of insufficient semantic association between knowledge graph and bill of materials system, insufficient utilization of structural information, and poor adaptability to multiple business scenarios in the prior art.
[0006] First, this invention provides a method for semantic embedding of knowledge graphs and BOMs based on dynamic relational attention networks, the method comprising: Obtain the BOM node set and the knowledge graph entity set; Based on the BOM nodes and their hierarchical weights in the BOM node set, and the knowledge graph entities and their confidence in the knowledge graph entity set, a structural semantic association is performed between the knowledge graph and the BOM using a dynamic relational attention network. Cross-view knowledge fusion is performed on multi-view BOMs to form a knowledge graph and BOM semantic integration result.
[0007] Based on the above solution, the present invention also makes the following improvements: Furthermore, the method also includes: When changes in the BOM structure and knowledge graph are detected, the dynamic relationship attention network is dynamically updated based on mini-batch training and knowledge propagation.
[0008] Furthermore, the structural semantic association between the knowledge graph and the BOM is performed by: Obtain the semantic embedding vectors of each BOM node in the BOM node set and each knowledge graph entity in the knowledge graph entity set; based on the semantic embedding vectors of the BOM nodes and knowledge graph entities, obtain the association scores between the corresponding BOM nodes and knowledge graph entities. Based on the association scores between BOM nodes and knowledge graph entities, and combined with the hierarchical weights of BOM nodes and the confidence of knowledge graph entities, the attention weights of the dynamic relationship attention network are calculated. Based on the attention weights of the calculated dynamic relational attention network, a structural semantic association between the knowledge graph and the BOM is established.
[0009] Furthermore, BOM nodes With knowledge graph entities Attention weights Represented as: (1) in, Represents BOM node With knowledge graph entities The correlation score, Represents the learning parameters, Represents BOM node Hierarchical weights Representing entities in a knowledge graph confidence level This represents the total number of candidate knowledge graph entities.
[0010] Furthermore, BOM nodes Hierarchical weights Represented as: (2) in, This represents the preset attenuation factor. Represents BOM node The hierarchy depth in the BOM structure.
[0011] Furthermore, knowledge graph entities confidence level Represented as: (3) in, Representing entities in a knowledge graph Connectivity in a knowledge graph.
[0012] Furthermore, BOM nodes With knowledge graph entities Correlation score Represented as: (4) in, , These represent BOM nodes respectively. Knowledge Graph Entities semantic embedding vector, Represents the weight matrix. This indicates the bias term.
[0013] Second, this invention provides a knowledge graph and BOM semantic embedding system based on a dynamic relational attention network, the system comprising: The collection retrieval module is used to retrieve the BOM node set and the knowledge graph entity set; The structural semantic association module is used to perform structural semantic association between the knowledge graph and the BOM based on the BOM node set and its hierarchical weights, the knowledge graph entity set and its confidence, and the dynamic relational attention network. The semantic embedding module is used to perform cross-view knowledge fusion on multi-view BOMs to form a knowledge graph and BOM semantic embedding result.
[0014] Third, the present invention provides a computer device, including a processor, a memory, and a computer program stored in the memory and executable by the processor. When the computer program is executed by the processor, it implements the aforementioned steps of the knowledge graph and BOM semantic embedding method based on dynamic relational attention network.
[0015] Fourth, the present invention also provides a computer-readable storage medium storing a computer program thereon, wherein the computer program, when executed, implements the aforementioned steps of the knowledge graph and BOM semantic embedding method based on dynamic relational attention network.
[0016] Compared with the prior art, the present invention can achieve at least one of the following beneficial effects: This invention proposes a knowledge graph and BOM semantic embedding method based on dynamic relational attention network to achieve intelligent association between product structure and domain knowledge.
[0017] First, a semantic embedding method based on a large industrial model is used to generate high-dimensional vector representations of BOM nodes and knowledge graph entities, respectively. A sub-model for calculating association scores is designed to achieve refined semantic matching. Second, a dynamic relational attention network mechanism is introduced, comprehensively considering three dimensions: basic association score, BOM hierarchical weights, and knowledge graph entity confidence. Attention allocation is adaptively adjusted through learnable parameters to effectively integrate semantic, structural, and confidence information. Next, a multi-view BOM differentiated embedding strategy is proposed. Utilizing a configurable parameter system and feature enhancement mechanism, personalized processing is performed for the specific needs of the design and manufacturing stages, and a cross-view knowledge fusion channel is established. Finally, a dynamic update method based on mini-batch training and knowledge propagation is designed. Through incremental learning and local update strategies, real-time updates and maintenance of the knowledge network are achieved while ensuring computational efficiency. These innovations together constitute a complete, adaptive, and multi-scenario applicable knowledge graph and BOM semantic embedding solution.
[0018] This invention's technology is primarily applied in fields such as intelligent manufacturing, product lifecycle management, and industrial knowledge graphs, and is particularly suitable for industries with complex product structures and high knowledge intensity, such as complex equipment manufacturing, automotive, and aerospace. By overcoming the aforementioned technical bottlenecks, this patent provides a novel solution for the deep semantic fusion of knowledge graphs and Bill of Materials (BOM).
[0019] In this invention, the above-described technical solutions can be combined with each other to achieve more preferred combinations. Other features and advantages of this invention will be set forth in the following description, and some advantages may become apparent from the description or be learned by practicing the invention. The objects and other advantages of this invention can be realized and obtained from what is particularly pointed out in the description and drawings. Attached Figure Description
[0020] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Throughout the drawings, the same reference numerals denote the same parts. Figure 1 The flowchart illustrates the knowledge graph and BOM semantic embedding method based on dynamic relational attention network provided in this embodiment of the invention.
[0021] Figure 2 This is a schematic diagram of the structure of a knowledge graph and BOM semantic embedding system based on a dynamic relational attention network provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the main modules of a computer device according to an embodiment of the present invention. Detailed Implementation
[0022] Preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, which form part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not intended to limit the scope of the present invention.
[0023] A specific embodiment of the present invention discloses a method for semantic integration of knowledge graph and BOM based on dynamic relational attention network, the flowchart of which is shown below. Figure 1 As shown.
[0024] Step S1: Obtain the BOM node set and the knowledge graph entity set.
[0025] First, define two key element sets: the BOM node set. and knowledge graph entity set BOM Node Collection This represents the various components within a product structure, ranging from the top-level product to the lowest-level parts. Knowledge graph entity set. It contains various knowledge graph entities related to the product.
[0026] In practice, multi-view BOM data can be extracted from Enterprise Resource Planning (ERP) or Product Lifecycle Management (PLM) systems. This type of data is typically stored in structured tables or XML format and needs to be converted into a standardized set of BOM nodes using a parsing program. Each BOM node should contain key attributes such as part number, name, description, functional identifier, and its hierarchical depth in the BOM tree. Simultaneously, knowledge graph entity data is extracted from a domain knowledge base or knowledge graph database to form a knowledge graph entity set. Each entity must contain a unique identifier, type, textual description, and association information with other entities.
[0027] Step S2: Based on the BOM nodes and their hierarchical weights in the BOM node set, and the knowledge graph entities and their confidence in the knowledge graph entity set, perform structural semantic association between the knowledge graph and the BOM using a dynamic relational attention network.
[0028] Step S21: Obtain the semantic embedding vectors of each BOM node in the BOM node set and each knowledge graph entity in the knowledge graph entity set; based on the semantic embedding vectors of the BOM nodes and knowledge graph entities, obtain the association scores between the corresponding BOM nodes and knowledge graph entities.
[0029] In this embodiment, the function of step S21 can be achieved using a semantic association model. Specifically, the semantic association model embeds a BOM node encoder, a knowledge graph entity encoder, and an association score calculation sub-model. The BOM node encoder encodes the BOM nodes to obtain their semantic embedding vectors; the knowledge graph entity encoder encodes the knowledge graph entities to obtain their semantic embedding representations. The association score calculation sub-model calculates the association score between the semantic embedding vectors of the BOM nodes and the knowledge graph entities to obtain the association score between the corresponding BOM node and the knowledge graph entity. A detailed explanation follows.
[0030] In the specific implementation process, in order to establish the semantic relationship between the two sets, this embodiment uses an industrial large model to generate their semantic embedding vectors respectively.
[0031] For BOM nodes Through a specific Transformer encoder ( Generate its semantic embedding vector ,Right now: (1) in, These are the parameters for the BOM encoder.
[0032] Similarly, for knowledge graph entities It uses a specialized knowledge graph Transformer ( Generate its semantic embedding vector ,Right now: (2) in, These are the parameters for the knowledge graph encoder.
[0033] In the specific implementation, for each BOM node, a pre-trained language model, such as an industrial version of BERT or RoBERTa, is selected as the basis for the Transformer encoder. The parameters of this encoder need to be fine-tuned using domain-specific corpora, including technical documents for parts and functional descriptions. The textual information of each BOM node (such as a sequence concatenated with its name and description) is input into this encoder, outputting a fixed-dimensional semantic embedding vector; a dimension of 768 or 1024 is recommended. Similarly, for knowledge graph entities, a knowledge-enhanced Transformer model (KG-Transformer) is used. This model incorporates graph structure information between entities during training to ensure that the generated semantic embedding vector simultaneously encodes semantic and structural features. The training of both encoders can be performed in batches using the AdamW optimizer with an initial learning rate of 2e-5 and a cosine decay strategy.
[0034] After obtaining the semantic embedding vector, this embodiment calculates the association score through an association score calculation sub-model, as detailed below. The association score calculation sub-model first concatenates the semantic embedding vectors of the BOM node and the knowledge graph entity (using symbols). (represented), and then passed through a trainable weight matrix. Perform a linear transformation on a 2d×1 (dimensional) and add a bias term. Finally, it is activated by the Sigmoid function. A nonlinear transformation is performed to obtain the final association score, which reflects the semantic association strength between BOM nodes and knowledge graph entities.
[0035] Specifically, BOM node With knowledge graph entities Correlation score Represented as: (3) In practice, the association score calculation sub-model can be implemented using a lightweight neural network layer. Specifically, the semantic embedding vectors of BOM nodes and knowledge graph entities are concatenated to form a higher-dimensional combined vector. This combined vector is then input into a linear transformation layer containing a trainable weight matrix and bias terms. The dimension of the matrix should be set according to the dimension of the embedding vectors. For example, when the dimension of a single vector is d, the dimension after concatenation is 2d, and the dimension of the weight matrix is 2d×1. The result of the linear transformation is then mapped through a sigmoid activation function, finally outputting a scalar value between 0 and 1, which is the association score. This score represents the semantic relevance strength between BOM nodes and knowledge graph entities. During the model training phase, labeled sample pairs (i.e., BOM node and knowledge graph entity pairs whose association is known) need to be prepared. The mean squared error or binary cross-entropy is used as the loss function, and the weight parameters in the scoring model are optimized using mini-batch gradient descent. The batch size can be set to 32 or 64. Through iterative training, the model can learn an effective mapping from the semantic embedding space to the association confidence.
[0036] Furthermore, it should be noted that in real-world industrial scenarios, the BOM (Bill of Materials) is constantly adjusted with product design iterations. Therefore, to address the multi-view BOM requirements throughout the product lifecycle, this embodiment also proposes a differentiated integration strategy for multi-view BOMs adapted to multiple business scenarios. This strategy achieves precise adaptation to different business scenarios through a configurable parameter system and feature enhancement mechanism.
[0037] (1) Design BOM processing module: Based on the requirements of the product design stage, this module adopts the following specific parameter configuration.
[0038] The tiered decay rate (corresponding to the subsequently preset decay factor) is set to... The slower decay rate preserves more of the design intent of the upper layers.
[0039] The semantic embedding vector of the BOM node uses the following BOM feature enhancement vector. : (4) in, This indicates a predefined functional feature identifier. MLP stands for Multilayer Perceptron, which is used to extract deep features of functional knowledge. This configuration ensures that the design BOM focuses more on the functional characteristics and design specifications of the product.
[0040] At this time, the BOM node With knowledge graph entities Correlation score Represented as: (5) (2) Manufacturing BOM processing module: This module adopts the following differentiated settings to meet the special needs of the production and manufacturing scenario.
[0041] The hierarchical decay rate is set to ( This accelerates the decay of underlying process features.
[0042] The semantic embedding vector of the BOM node uses the following BOM feature enhancement vector. : (6) Here, proc_tag represents the process feature identifier, and manufacturing knowledge features are extracted through an independent MLP network, making the manufacturing BOM more focused on production knowledge such as processing technology and assembly relationships.
[0043] At this time, the BOM node With knowledge graph entities Correlation score Represented as: (7) This method can use MLP networks to achieve targeted reinforcement of domain knowledge, and through , Configurable parameters allow for flexible adjustment of hierarchical weights.
[0044] When implementing a multi-view BOM differentiation and integration strategy adapted to multiple business scenarios, a configurable parameter management system must first be established to support differentiated processing of different views such as design BOM and manufacturing BOM. During implementation, an independent configuration file needs to be created for each business view, containing specific processing parameters and feature enhancement schemes.
[0045] For the implementation of the BOM processing module, a slower hierarchical decay rate needs to be set. The value should be between 0.8 and 0.9, for example, 0.85. This setting fully preserves the top-level design intent, allowing the semantic connections during the design phase to focus more on the overall product functionality and design specifications. For feature enhancement, a functional feature identification system needs to be predefined, and each BOM node should be labeled with a corresponding functional tag. Then, a dedicated multilayer perceptron model is trained, with the input being the embedded representation of the functional feature identifiers and the output being a functional enhancement feature vector. Finally, by adding the original BOM node vector to the functional enhancement feature vector, a new representation of the enhanced functional characteristics is obtained. This multilayer perceptron typically contains 2 to 3 hidden layers, with a recommended number of neurons per layer of 256 to 512, and the activation function is ReLU.
[0046] For the implementation of the manufacturing BOM processing module, a faster hierarchical decay rate is required, and it is recommended that... The value should be between 0.6 and 0.7, for example, 0.65. This setting accelerates the decay of underlying process features, allowing the semantic associations in the manufacturing stage to focus more on specific processing techniques and assembly relationships. Similarly, a process feature identification system needs to be established, and another independent multilayer perceptron model needs to be trained to extract manufacturing knowledge features. This model architecture is similar to the functional feature extraction model, but its parameters are completely independent, focusing on learning deep representations of process knowledge; by adding the enhanced process features to the original node vectors, the optimized manufacturing view representation can be obtained.
[0047] Step S22: Calculate the attention weights of the dynamic relational attention network based on the association scores between BOM nodes and knowledge graph entities, combined with the hierarchical weights of BOM nodes and the confidence levels of knowledge graph entities.
[0048] This embodiment employs a Dynamic Relational Attention Network (DRAN) mechanism to optimize the semantic association process between the knowledge graph and the BOM structure. This network achieves intelligent attention weight allocation through multi-dimensional feature fusion, enabling semantic association optimization between the knowledge graph and the BOM structure based on the DRAN. The specific implementation process is as follows.
[0049] In this embodiment, a dynamically adjustable attention allocation mechanism is constructed to optimize the corresponding attention weights. This mechanism takes into account the following three key factors.
[0050] (1) Correlation score Refer to the foregoing description, reflecting the BOM node With knowledge graph entities The original match degree.
[0051] (2) Hierarchical weights of BOM nodes The hierarchical weights of BOM nodes are implemented using an exponential decay function. Hierarchical weights Represented as: (8) in, This indicates the preset attenuation factor ( ), Represents BOM node The hierarchy depth in the BOM structure.
[0052] This function ensures that higher-level BOM nodes (such as product assemblies) receive greater weight, while the weight of lower-level BOM nodes (such as parts) gradually decreases. Depending on the specific business scenario, the hierarchical decay rate set in the aforementioned method can be used as the decay factor for the corresponding scenario.
[0053] (3) Confidence of entities in the knowledge graph Knowledge Graph Entities confidence level Represented as: (9) in, Representing entities in a knowledge graph Connectivity in a knowledge graph is a metric used to assess the authority and reliability of entities within the knowledge graph.
[0054] Therefore, BOM node With knowledge graph entities Attention weights Represented as: (10) in, This represents learnable parameters that are automatically optimized during training. The numerator part triple-weights the original association scores: 1) through... 2) By adjusting the overall intensity of attention; 3) Introduce BOM structure information; A knowledge credibility assessment is incorporated. The denominator normalizes all candidate knowledge graph entities to ensure that the sum of their weights is 1.
[0055] Based on this design, through The function enables the network to automatically adapt to the tree-like structure of the BOM, ensuring that the top-level design intent can be effectively passed down; with the help of The indicators suppress interference from low-quality or marginal entities in the knowledge graph; they also utilize learnable parameters. This enables the network to adaptively adjust the contribution ratio of different features.
[0056] Step S23: Based on the attention weights of the calculated dynamic relational attention network, establish a structural semantic association between the knowledge graph and the BOM.
[0057] It should be noted that the attention weights output by the dynamic relational attention network... It itself represents a BOM node. With knowledge graph entities The higher the attention weight, the higher the reliability of the semantic association between the BOM node and the corresponding knowledge graph entity. In the subsequent semantic embedding process, the greater the influence of this association on the final embedded representation. Conversely, the lower the attention weight, the weaker the reliability of the association between the two, and the smaller its contribution to the embedding result.
[0058] Based on the attention weights of each BOM node and each knowledge graph entity, a structural semantic association is established between the knowledge graph and the corresponding BOM node. Different structural semantic association methods can be selected according to different industrial application scenarios.
[0059] Preferably, structural semantic association can be achieved through entity ranking, selection, or feature fusion. Specific details are as follows.
[0060] (1) Entity sorting Entity ranking can be performed using a hard correlation (Top-K selection) approach. Specifically, the attention weights of the current BOM node and different knowledge graph entities are sorted in descending order, and the K entities with the highest attention weights are selected as the direct associated entities of the current BOM node, and an association list is output.
[0061] All directly related entities and their semantic embedding vectors corresponding to the current BOM node are used as the structural semantic association between the knowledge graph and the current BOM node; by combining the structural semantic associations between the knowledge graph and all BOM nodes, the structural semantic association between the knowledge graph and the BOM is established.
[0062] (2) Entity selection Entity selection can employ a threshold-based association method. Specifically, a threshold is set, and entities among all knowledge graph entities whose attention weight to the current BOM node is higher than the set threshold are selected as directly associated entities of the current BOM node.
[0063] (3) Feature fusion Feature fusion can be combined with entity ranking or entity selection. Specifically, the semantic embedding vectors of all directly related entities determined by entity ranking or entity selection corresponding to the current BOM node are weighted and fused based on attention weights, and used as the structural semantic association between the knowledge graph and the current BOM node. By combining the structural semantic associations between the knowledge graph and all BOM nodes, the structural semantic association between the knowledge graph and the BOM is established.
[0064] When implementing the optimization method based on Dynamic Relational Attention Network (DRAN), the process begins with processing the BOM structure information. The system needs to pre-parse the tree-like hierarchical structure of the BOM and record the depth information of each node in the tree. For the decay factor, it is recommended to set it between 0.7 and 0.9, for example, 0.85. This ensures that top-level nodes (such as product assemblies) receive higher weights, while the weights exhibit a reasonable decay trend as the hierarchy deepens, without disappearing too quickly. In specific calculations, for the root node with a depth of 0, its level weight is 1. For each additional level of depth, the weight decays exponentially according to the decay factor.
[0065] Simultaneously, it is necessary to calculate the confidence score of entities in the knowledge graph. In practice, this involves calculating the connectivity score of each entity within the knowledge graph, i.e., the number of relationships directly connected to that entity. Then, the softmax function is used to normalize the connectivity scores of all entities, resulting in higher confidence scores for high-frequency entities and relatively lower scores for marginal entities with lower connectivity. This process helps to suppress the interference of low-quality or isolated entities in the knowledge graph on the matching results.
[0066] After obtaining the three input features mentioned above, the attention weights are calculated. First, a learnable scaling parameter λ needs to be initialized; it is recommended to set its initial value to 1.0 and automatically optimize it through backpropagation during training. During calculation, the original association scores of each BOM node and knowledge graph entity pair are triple-weighted: first, the overall attention intensity is adjusted using the λ parameter; then, it is multiplied by the hierarchical weight of the BOM node; and finally, it is multiplied by the confidence score of the knowledge graph entity. Then, all weighted scores are normalized using the softmax function to ensure that the sum of the attention weights of each BOM node to all knowledge graph entities is 1.
[0067] During the model training phase, this dynamic relational attention network is jointly trained with the preceding semantic association model. Annotated BOM node-knowledge graph entity association data is used as supervision, and all parameters, including the learnable λ parameter, are optimized by minimizing the difference between the predicted attention distribution and the true distribution. Gradient descent is employed during training, with a learning rate recommended between 0.001 and 0.0001, and appropriate regularization techniques are used to prevent overfitting.
[0068] Through this implementation method, the dynamic relational attention network can adaptively learn how to balance the three key factors of semantic matching score, BOM structural information and knowledge credibility, and ultimately produce more accurate and reliable semantic association results.
[0069] Step S3: Perform cross-view knowledge fusion on the multi-view BOM to form a knowledge graph and BOM semantic embedding result.
[0070] Throughout the complete product lifecycle, different BOM views typically correspond to business outputs at different stages, from the design BOM in the design phase to the manufacturing BOM in the manufacturing phase, and then to the subsequent operation and maintenance BOM, etc. Each view revolves around the same product. Different BOM views under the same product are structured descriptions of the same product from different business dimensions. They are not completely independent of each other, and there are clear derivative relationships and information overlaps. BOM nodes are the constituent units within a single BOM view. Each BOM view consists of multiple hierarchical BOM nodes, carrying material information and structural relationships such as parts, components, and assemblies under the corresponding business dimensions. The same material will form corresponding BOM nodes in different BOM views. These nodes carry different business attributes. Through cross-view knowledge fusion, the related knowledge of the same material in different business scenarios can be integrated to realize the connection of knowledge from design to manufacturing.
[0071] Specifically, to achieve knowledge sharing among multiple views, this embodiment also designs a view fusion channel. Let... Indicates the first The characteristics of a BOM view are defined. Through the first The fusion weights are calculated from the relevance matrices of each BOM view. This mechanism is implemented through the following steps: 1) Construct a view relationship diagram, where nodes represent different BOM views; 2) Calculate relevance based on data flow and change history between views; 3) Generate fusion weights using a graph attention network , obtain fusion features : (11) It also establishes cross-view fusion channels to avoid information silos.
[0072] In implementing cross-view knowledge fusion, a view relationship graph needs to be constructed first, where nodes represent different BOM views and edges represent the relationship strength between views. The relationship strength is calculated based on the frequency of change propagation and data flow dependencies in historical data; for example, the relationship weight can be determined by counting the number of synchronizations of node changes in a view. Then, a graph attention network is used to calculate the fusion weight for each view. This network needs to be trained to learn how to dynamically adjust the contribution ratio of each view according to task requirements. Finally, the feature representations of each view are fused into a unified final representation through a weighted summation. It is recommended that the graph attention network use a multi-head attention mechanism with 4 to 8 heads to capture different aspects of the dependencies between views.
[0073] Throughout the implementation process, a unified configuration management interface needs to be established, allowing users to adjust the parameter settings of each view according to specific business scenarios, and providing visualization tools to monitor the processing effects and fusion results of different views. Simultaneously, a corresponding evaluation mechanism needs to be designed to verify the effectiveness of the differentiated strategy in practical applications, ensuring that the unique needs of each business view are fully met.
[0074] It should be noted that cross-view knowledge fusion is an extension and improvement of the aforementioned semantic association method. When there are multiple different BOM views in a business scenario, different views will generate differentiated semantic features and association results based on their own business scenarios. Cross-view knowledge fusion obtains unified features by constructing a view association graph, calculating view relevance, and generating fusion weights. This solves the problem of information silos under multiple views, integrates the local semantic association results completed under a single view into a globally consistent fusion result, and finally achieves a unified and accurate knowledge graph and BOM semantic fusion covering multiple business views, meeting the knowledge sharing needs under different business scenarios.
[0075] Step S4: When changes in the BOM structure and knowledge graph are detected, the dynamic relationship attention network is dynamically updated based on mini-batch training and knowledge propagation.
[0076] This embodiment proposes a dynamic update method to ensure that the dynamic relational attention network can respond in real time to changes in the BOM structure and knowledge graph. This mechanism includes the following two processes: (1) Real-time incremental learning, using a gradient descent-based parameter update strategy: (12) in, This represents an improved loss function that combines cross-entropy loss and L2 regularization to prevent overfitting. The learning rate is dynamically adjusted. Represents BOM node With knowledge graph entities The true association tags.
[0077] This process employs a mini-batch training strategy, updating only the parameters relevant to the changes each time. It achieves the following functions: automatically capturing the association patterns between newly added BOM nodes and knowledge graph entities; continuously optimizing the weight parameters of the DRAN network; and maintaining the model's ability to remember historical knowledge.
[0078] (2) Knowledge propagation algorithm An efficient knowledge propagation mechanism was designed to address changes to BOM nodes: (13) The execution process is as follows: 1) Locate the change node and its two-hop neighborhood Knowledge graph entities within; 2) Recalculate all affected attention weights .
[0079] This process ensures computational efficiency through a local update strategy, balances the update range with computational overhead by employing a two-hop neighborhood design, and maintains the consistency of the knowledge network.
[0080] When implementing a dynamic update method for knowledge networks based on small-batch training and knowledge dissemination, it is necessary to rely on an efficient change monitoring mechanism to monitor the change logs of the BOM data source and knowledge graph in real time; when an addition, deletion or modification operation is detected, the dynamic update process is triggered immediately.
[0081] In implementing real-time incremental learning, an improved loss function needs to be designed, which integrates the standard cross-entropy loss with an L2 regularization term. The weight coefficient of the L2 regularization is recommended to be set between 0.001 and 0.01 to prevent overfitting during incremental learning. A dynamic adjustment strategy is adopted for the learning rate, with an initial value of 0.001 recommended, gradually decreasing with each training step—for example, reducing the learning rate to 0.9 times its original value after every 100 updates. During training, the system only loads small batches of samples relevant to the changed data, with the batch size recommended to be controlled within the range of 16 to 32 samples. These samples include both newly added BOM nodes and knowledge graph entity association pairs, as well as randomly sampled historical samples to maintain the model's memory of historical knowledge. Through backpropagation, only model parameters relevant to the current small batch of data (including weights and biases in the dynamic relational attention network) are updated, while other parameters remain unchanged. This selective update strategy ensures that the model quickly adapts to new data patterns while effectively maintaining consistency with historical knowledge.
[0082] In implementing the knowledge propagation algorithm, an efficient neighborhood query mechanism must first be established in the BOM graph structure. When a BOM node changes, the system uses a graph traversal algorithm to locate all relevant entities within the two-hop neighborhood of that node.
[0083] Specifically, the system first locates the directly connected one-hop neighbors of the changed node, then extends this to the directly connected nodes of these one-hop neighbors, forming a two-hop neighborhood set. For each knowledge graph entity in this neighborhood set, the system recalculates its attention weight with the changed node. This recalculation process fully utilizes the existing semantic association model, combining the latest node and entity features to generate an updated attention distribution. The entire knowledge propagation process is confined to a local scope, avoiding the performance overhead of global recalculation while ensuring a reasonable propagation range of the change's impact.
[0084] To coordinate the incremental learning and knowledge propagation processes, a task scheduler needs to be designed to manage their execution order and frequency. An event-driven model is typically adopted: when a significant change is detected, incremental learning to update model parameters is executed first, followed by triggering the knowledge propagation algorithm to adjust the attention weights of the affected regions. For frequent small-scale changes, a batch processing approach can be used, accumulating a certain number of changes before processing them uniformly to improve system efficiency. Simultaneously, a version management mechanism needs to be established to save critical model snapshots and parameter states for rollback or auditing when necessary. The entire implementation process also requires a monitoring and logging system to track and record the effects and performance metrics of each update, ensuring the stability and reliability of the dynamic update process.
[0085] A specific embodiment of the present invention also provides a knowledge graph and BOM semantic embedding system based on a dynamic relational attention network, the structural diagram of which is shown below. Figure 2 As shown, the system includes: The collection retrieval module is used to retrieve the BOM node set and the knowledge graph entity set; The structural semantic association module is used to perform structural semantic association between the knowledge graph and the BOM based on the BOM node set and its hierarchical weights, the knowledge graph entity set and its confidence, and the dynamic relational attention network. The semantic embedding module is used to perform cross-view knowledge fusion on multi-view BOMs to form a knowledge graph and BOM semantic embedding result.
[0086] The specific implementation process of this invention can be found in the above method embodiments, and will not be repeated here.
[0087] Since this embodiment is based on the same principle as the above method embodiments, this system also has the corresponding technical effects of the above method embodiments.
[0088] This invention provides a computer device (100), such as Figure 3 As shown, it includes a processor (110), a memory (120), and a computer program stored in the memory (120) and executable by the processor (110), wherein when the computer program is executed by the processor (110), it implements the steps in the method embodiment.
[0089] This invention provides a computer-readable storage medium storing a computer program thereon, which, when executed, implements the steps in the method embodiments.
[0090] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware, and the program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.
[0091] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for semantic embedding of knowledge graph and BOM based on dynamic relational attention network, characterized in that, The method includes: Obtain the BOM node set and the knowledge graph entity set; Based on the BOM nodes and their hierarchical weights in the BOM node set, and the knowledge graph entities and their confidence in the knowledge graph entity set, a structural semantic association is performed between the knowledge graph and the BOM using a dynamic relational attention network. Cross-view knowledge fusion is performed on multi-view BOMs to form a knowledge graph and BOM semantic integration result.
2. The knowledge graph and BOM semantic embedding method based on dynamic relational attention network according to claim 1, characterized in that, The method further includes: When changes in the BOM structure and knowledge graph are detected, the dynamic relationship attention network is dynamically updated based on mini-batch training and knowledge propagation.
3. The knowledge graph and BOM semantic embedding method based on dynamic relational attention network according to claim 1 or 2, characterized in that, The structural and semantic association between the knowledge graph and the BOM is performed as follows: Obtain the semantic embedding vectors of each BOM node in the BOM node set and each knowledge graph entity in the knowledge graph entity set; based on the semantic embedding vectors of the BOM nodes and knowledge graph entities, obtain the association scores between the corresponding BOM nodes and knowledge graph entities. Based on the association scores between BOM nodes and knowledge graph entities, and combined with the hierarchical weights of BOM nodes and the confidence of knowledge graph entities, the attention weights of the dynamic relationship attention network are calculated. Based on the attention weights of the calculated dynamic relational attention network, a structural semantic association between the knowledge graph and the BOM is established.
4. The knowledge graph and BOM semantic embedding method based on dynamic relational attention network according to claim 3, characterized in that, BOM Node With knowledge graph entities Attention weights Represented as: (1) in, Represents BOM node With knowledge graph entities The correlation score, Represents the learning parameters, Represents BOM node Hierarchical weights Representing entities in a knowledge graph confidence level This represents the total number of candidate knowledge graph entities.
5. The knowledge graph and BOM semantic embedding method based on dynamic relational attention network according to claim 4, characterized in that, BOM Node Hierarchical weights Represented as: (2) in, This represents the preset attenuation factor. Represents BOM node The hierarchy depth in the BOM structure.
6. The knowledge graph and BOM semantic embedding method based on dynamic relational attention network according to claim 5, characterized in that, Knowledge Graph Entities confidence level Represented as: (3) in, Representing entities in a knowledge graph Connectivity in a knowledge graph.
7. The knowledge graph and BOM semantic embedding method based on dynamic relational attention network according to claim 6, characterized in that, BOM Node With knowledge graph entities Correlation score Represented as: (4) in, , These represent BOM nodes respectively. Knowledge Graph Entities semantic embedding vector, Represents the weight matrix. This indicates the bias term.
8. A knowledge graph and BOM semantic embedding system based on dynamic relational attention network, characterized in that, The system includes: The collection retrieval module is used to retrieve the BOM node set and the knowledge graph entity set; The structural semantic association module is used to perform structural semantic association between the knowledge graph and the BOM based on the BOM node set and its hierarchical weights, the knowledge graph entity set and its confidence, and the dynamic relational attention network. The semantic embedding module is used to perform cross-view knowledge fusion on multi-view BOMs to form a knowledge graph and BOM semantic embedding result.
9. A computer device comprising a processor, a memory, and a computer program stored in the memory and executable by the processor, characterized in that, When the computer program is executed by the processor, it implements the steps of the knowledge graph and BOM semantic embedding method based on dynamic relational attention network as described in any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed, it implements the steps of the knowledge graph and BOM semantic embedding method based on dynamic relational attention network as described in any one of claims 1-7.