Mechanical maintenance text joint extraction method based on decision collaborative optimization mechanism

CN122633835BActive Publication Date: 2026-09-22CHENGDU UNIV OF INFORMATION TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611132117.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-07-29
Publication Date
2026-09-22
Estimated Expiration
2046-07-29

AI Technical Summary

Technical Problem

[0007]针对现有技术中的上述不足,本发明提供的基于表示决策协同优化机制的机械维护文本联合抽取方法解决了现有技术但缺乏实体表示与关系表示之间的持续协同优化机制,无法从根本上解决实体边界识别错误、实体关系错配、难以适配不同文本样本的语义复杂度以及不同关系类别的预测分布差异的问题

Benefits of technology

1、通过任务特定表示初始化机制,对编码后的文本特征进行差异化映射,分别构建实体识别、关系头预测及关系尾预测的任务特征空间。由于不同子任务在语义关注点上存在显著差异,该差异化映射能够使各子任务获得符合自身语义需求的专属表示,从而缓解共享表示带来的特征竞争问题。基于此,本发明在表示学习阶段能够有效缓解实体与关系之间的语义耦合,为后续的协同交互提供稳定的初始语义基础,从而提高实体边界识别的准确性以及关系表示的判别性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122633835B_ABST
    Figure CN122633835B_ABST
Patent Text Reader

Abstract

The application discloses a mechanical maintenance text joint extraction method based on a representation decision collaborative optimization mechanism and relates to the technical field of natural language processing. The method comprises the following steps: uniformly encoding a mechanical maintenance text sequence to capture a global context representation vector; constructing three independent and collaborative interactive task subspaces to obtain structured semantic element features; performing entity-relation collaborative optimization to generate collaborative enhanced features; generating entity span scores and relation alignment score matrices; generating dynamic decision thresholds; screening effective entity spans and effective relation pairs; and establishing a four-fold joint constraint criterion. When the screened effective entity spans and effective relation pairs satisfy the four-fold joint constraint criterion, effective triples are output, and a final extraction result set is obtained. The application realizes the collaborative evolution of entity representation and relation representation and the adaptive generation of a dynamic decision boundary, significantly improving the accuracy and stability of mechanical maintenance text relation triple extraction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of natural language processing technology, and in particular to a method for joint extraction of mechanical maintenance text based on a representation-decision collaborative optimization mechanism. Background Technology

[0002] Extracting entity relation triples from unstructured text related to mechanical maintenance is a key technology for constructing industrial operation and maintenance knowledge graphs and achieving intelligent analysis of equipment faults. Currently, mainstream joint entity relation extraction methods rely on pre-trained language models. The typical implementation process is as follows: First, the maintenance text is fed into a pre-trained encoder to obtain unified shared context features. Then, based on these shared features, entity recognition branches and relation alignment prediction branches are built to complete entity boundary recognition and confidence scoring of entity pairing relationships. Finally, a globally fixed confidence threshold is used to filter valid triples, completing the joint extraction task.

[0003] While the aforementioned methods perform well in general domains, they reveal structural technical obstacles in mechanical maintenance text scenarios that are difficult to overcome using conventional methods. Existing joint extraction methods in mechanical maintenance text processing generally suffer from the problem of mutual influence and constraint between entity recognition and relation extraction tasks. This invention summarizes this problem as a two-layer semantic coupling problem between entities and relations. This core problem is specifically manifested in the following three aspects: (1) Shared representation leads to structural obstacles to entity-relation semantic coupling: Existing methods use a unified shared feature to supply both entity recognition and relation alignment subtasks. However, the semantic information that the two tasks focus on differs significantly. Entity recognition focuses more on boundaries and types, while relation extraction focuses more on semantic associations between entities. The unified feature is difficult to take into account the feature preferences of different tasks, and entity boundary recognition and relation semantic reasoning are inherently highly dependent. Since existing methods rely solely on the encoder to achieve implicit information interaction and lack a bidirectional explicit constraint mechanism between entities and relations, problems such as entity boundary misjudgment and entity relation mismatch frequently occur.

[0004] (2) Semantic interference barriers caused by amplified noise in cross-task information interaction: Existing cross-task feature interaction methods mostly adopt one-way transmission or direct splicing, lacking a filtering mechanism for redundant and invalid semantics. In scenarios where mechanical maintenance texts are dense with technical terms, have many long-distance semantic dependencies, and complex causal chains, a large number of background terms and non-critical descriptions are easily mistakenly introduced into the relational reasoning process, leading to amplified noise semantics and further exacerbating the feature coupling problem between entities and relations. This problem is a systemic obstacle caused by the unique semantic structure of mechanical maintenance texts and cannot be solved by simple parameter tuning or conventional attention mechanisms.

[0005] (3) Fixed or single-dimensional dynamic thresholds cannot adapt to the decision-making barrier of heterogeneous relation distribution: Many existing methods still use fixed thresholds, or although they use dynamic thresholds, the dynamic thresholds are usually generated only based on the overall representation of the sample and do not take into account the significant differences in the predicted distribution between different relation categories. Fixed or single-dimensional dynamic thresholds cannot adapt to the heterogeneous distribution of different sample semantic complexity and different relation categories, which makes it impossible for the decision-making layer to effectively alleviate the entity-relation semantic coupling problem, ultimately resulting in low extraction accuracy.

[0006] In summary, existing methods primarily focus on local optimization around the representation learning or decoding modules, lacking a holistic collaborative optimization mechanism from the representation learning stage to the decision-making and decoding stage. Particularly in mechanical maintenance texts, there is a large interweaving of technical terms, equipment components, fault phenomena, and causal descriptions. The same entity often simultaneously assumes multiple semantic roles, such as relation subject, relation object, and causal chain node, making entity recognition and relation extraction more interdependent and further exacerbating the entity-relation semantic coupling problem. These structural, semantic, and decision-making level technical obstacles collectively constitute a bottleneck that existing technologies struggle to overcome. Summary of the Invention

[0007] To address the aforementioned shortcomings in existing technologies, the mechanical maintenance text joint extraction method based on representation decision collaborative optimization mechanism provided by this invention solves the problems of existing technologies lacking a continuous collaborative optimization mechanism between entity representation and relation representation, and thus cannot fundamentally solve the problems of entity boundary recognition errors, entity relation mismatches, difficulty in adapting to the semantic complexity of different text samples, and differences in the predicted distribution of different relation categories.

[0008] To achieve the aforementioned objectives, the technical solution adopted by this invention is: a joint extraction method for mechanical maintenance text based on a representation-decision collaborative optimization mechanism, comprising: A pre-trained semantic encoder is used to uniformly encode mechanical maintenance text sequences, capturing a global contextual representation vector that covers syntax, semantics, and dynamic contextual relationships; Based on the global context representation vector, a three-way task subspace that is independent and can interact collaboratively is constructed to obtain structured semantic element features; Entity-relationship collaborative optimization is performed based on structured semantic element features to generate collaboratively enhanced features; Generate entity span score and relation alignment score matrices based on collaborative enhancement features; Dynamic decision thresholds are generated based on collaborative enhancement features; Based on entity span score, relationship alignment score matrix and dynamic decision threshold, effective entity span and effective relationship pairs are selected; Establish a four-fold joint constraint criterion. When the selected valid entity spans and valid relations satisfy the four-fold joint constraint criterion, output a valid triple. Traverse the mechanical maintenance text sequence, repeat the above extraction process, collect all valid triples, and obtain the final extraction result set.

[0009] Furthermore, the structured semantic element features include entity features, relation header features, relation tail features, and unified relation features; based on the global context representation vector, a three-way task subspace that is independent and can interact collaboratively is constructed to obtain the structured semantic element features, including: Based on the semantic requirements of different sub-tasks, we construct mutually independent task representation spaces, specifically expressed as follows:

[0010]

[0011]

[0012] In the formula, All are learnable weight matrices; All are bias vectors; For entity features; This refers to the header features of the relationship; This refers to the tail features of the relationship; This is the global context representation vector; By combining the header and footer features, a unified relational feature is constructed, the expression of which is:

[0013] In the formula, Indicates the characteristics of a unified relationship; This represents a feedforward neural network; This is a dimension splicing operation.

[0014] Furthermore, collaborative enhancement features include entity enhancement features and relation enhancement features; based on structured semantic element features, entity-relation collaborative optimization is performed to generate collaborative enhancement features, including: Based on entity features and unified relation features, information interaction between entity representation and relation representation is established through bidirectional multi-head attention, and relation-aware entity features and entity-aware relation features are obtained respectively, with the following expressions:

[0015]

[0016] In the formula, To perceive entity features for relationships; For entity perception relationship features; This indicates bidirectional, multi-headed attention; Represents the query vector; Represents the key vector; Represents the value; The word-level gating matrix is ​​obtained based on relation-aware entity features and entity-aware relation features, and its expression is as follows:

[0017]

[0018] In the formula, Gating weights corresponding to relation-aware entity features; The gating weights corresponding to entity perception relationship features; Use the Sigmoid activation function; Represents the entity-side gating weight matrix; Represents the relational gating weight matrix; Represents the entity-side gating bias vector; Represents the relational gating bias vector; The expression for obtaining collaborative enhancement features based on the word-level gating matrix is ​​as follows:

[0019]

[0020] In the formula, Enhance features for entities; For layer normalization; For regularization processing; It represents the Hadamardi (or Hadama) stack; Enhance features for relationships.

[0021] Furthermore, entity span score and relation alignment score matrices are generated based on collaborative enhancement features, including: The relation enhancement features are decoupled into head enhancement features and tail enhancement features, and their expressions are as follows:

[0022] In the formula; Head enhancement features; Tail enhancement features; Entity augmentation features, head augmentation features, and tail augmentation features are input into the multi-task prediction classification head to generate entity span score and relation head-tail alignment score matrices, respectively. Their expressions are as follows: , ,

[0023] In the formula, Characterizes entity span score, This represents the head enhancement feature alignment score matrix; This represents the tail enhancement feature alignment score matrix; This represents a multi-task prediction classification head.

[0024] Furthermore, dynamic decision thresholds are generated based on collaborative enhancement features, including: The expression for calculating instance-level context vectors based on collaboratively enhanced features is as follows:

[0025] In the formula, Represents an instance-level context vector; Indicates the length of the word sequence in the mechanical maintenance text sample; Indicates the position index of the lexical unit; Indicates the first each word element The effectiveness; Indicates the first Entity enhancement features corresponding to each word element; The entity recognition threshold is constructed based on instance-level context vectors, and its expression is as follows:

[0026] In the formula, The threshold for entity recognition; This is the scaling factor; It is the hyperbolic tangent function; It is a multilayer perceptron; Introducing relation embedding vectors By fusing relation embedding vectors and instance-level context, joint context features are obtained. ; The head-alignment adaptive threshold and tail-alignment adaptive threshold are generated based on joint contextual features, and their expressions are as follows: ,

[0027] In the formula, An adaptive threshold for head alignment; An adaptive threshold for tail alignment.

[0028] Furthermore, based on entity span scores, relation head-to-tail alignment score matrices, and dynamic decision thresholds, effective entity spans and effective relation pairs are selected, specifically as follows: , , ,

[0029] In the formula, Represents the set of valid subject entity spans; For a specific candidate entity span, it represents the span starting from the first in the mechanical maintenance text. Word element, ending at the first A continuous interval of 1 word element; Indicates the span of candidate entities Entity span score; Represents the set of valid object entities spanning the range; Indicates the span of candidate entities Entity span score; Indicates the first Valid candidate set for header alignment under class relationship; Indicates the first Under class relationships, the starting position of the main entity relative to the starting position of the object entity Head alignment score between them; Indicates the first A set of valid tail alignment candidates under class relationships; Indicates the first Under class relationships, the ending position of the main entity End position of the object entity The score is based on the alignment of the tails between them.

[0030] Furthermore, the four-fold joint constraint criterion is specifically as follows:

[0031] In the formula, It represents the logical operator "AND".

[0032] The present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of a joint extraction method for mechanical maintenance text based on a representation-decision collaborative optimization mechanism.

[0033] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of a joint extraction method for mechanical maintenance text based on a representation-decision collaborative optimization mechanism.

[0034] The beneficial effects of this invention are as follows: 1. By employing a task-specific representation initialization mechanism, the encoded text features are differentially mapped to construct task feature spaces for entity recognition, relation head prediction, and relation tail prediction, respectively. Since different subtasks have significant differences in semantic focus, this differential mapping enables each subtask to obtain a unique representation that meets its own semantic needs, thereby alleviating the feature competition problem caused by shared representations. Based on this, this invention can effectively alleviate the semantic coupling between entities and relations during the representation learning stage, providing a stable initial semantic foundation for subsequent collaborative interactions, thereby improving the accuracy of entity boundary recognition and the discriminative power of relation representations.

[0035] 2. By designing and adopting entity-relation collaborative interaction, explicit bidirectional information exchange between entity representations and relation representations is achieved through a bidirectional cross-attention mechanism and a lexical-level gating mechanism. Since bidirectional interaction enables entity boundary information to participate in relational semantic modeling, allowing relational semantics to inversely constrain entity representation learning, and lexical-level gating to dynamically suppress redundant background semantics, this invention can effectively filter noisy semantics during cross-task interaction, avoiding the erroneous propagation of long-distance dependencies and non-critical descriptions in mechanically maintained text. Through the above mechanisms, this invention can reduce the probability of entity boundary offsets and inconsistencies in entity relation pairings during joint extraction, thereby improving the effectiveness of cross-task collaborative modeling.

[0036] 3. By employing sample- and relation-adaptive threshold decoding, and combining the semantic complexity of text instances with the specific characteristics of relation categories, heterogeneous decision thresholds are dynamically generated for different samples and relations. Since relation categories in mechanical maintenance texts exhibit significant differences in semantic strength, frequency of occurrence, and predicted distribution, the dual-dimensional dynamic threshold of this invention can simultaneously adapt to sample-level semantic complexity and relation-level discriminative characteristics, thereby effectively mitigating the common problems of false positives for high-frequency relations and false negatives for low-frequency fault-related relations in fixed-threshold methods. Therefore, this invention improves the stability of relation triple extraction at the decision level, enabling the model to exhibit better adaptability and robustness in complex mechanical maintenance scenarios. Attached Figure Description

[0037] Figure 1 This is a flowchart illustrating a joint extraction method for mechanical maintenance text based on a representation-decision collaborative optimization mechanism. Figure 2 A schematic diagram of the collaborative optimization mechanism provided for the embodiment. Detailed Implementation

[0038] The specific embodiments of the present invention are described below to enable those skilled in the art to understand the present invention. However, it should be understood that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, various changes are obvious as long as they are within the spirit and scope of the present invention as defined and determined by the appended claims. All inventions utilizing the concept of the present invention are protected.

[0039] like Figure 1 As shown, in one embodiment of the present invention, the joint extraction method for mechanical maintenance text based on a representation-decision collaborative optimization mechanism includes the following steps: In this embodiment, a typical unstructured fault report text from the field of mechanical maintenance is selected as input: "The spindle bearing of the XH-3000 high-speed CNC machine tool experienced an abnormal temperature rise during operation. Vibration analyzer testing revealed fretting wear on the bearing raceway, and the wear debris further clogged the lubrication system filter element." To illustrate the sophisticated modeling and adaptive decoding capabilities of this invention for complex multi-task, multi-entity, and heterogeneous relationships in mechanical maintenance scenarios, predefined entity categories include: [equipment component], [model identifier], [fault phenomenon], [detection method], and [fault cause]. Predefined relationship categories... This includes: Relation 1 [Performance Fault], Relation 2 [Detection Tool], Relation 3 [Composition], and Relation 4 [Component Fault]. The hidden layer dimensions of the pre-trained encoder are set. .

[0040] S1. A pre-trained semantic encoder is used to uniformly encode the mechanical maintenance text sequence, capturing a global context representation vector that covers syntax, semantics, and dynamic contextual relationships.

[0041] Specifically, the input text sequence is defined as Global context features are obtained through the encoder:

[0042] in Features hidden for the entire text For batch size, For sequence length, To hide dimensions, This step represents the encoder. It obtains unified contextual semantic features, providing the basic input for subsequent multi-task feature projection.

[0043] In this embodiment, the input text is first segmented into words, converting the words into a sequence of tokens. The example text contains key entity tokens such as "high-speed CNC machine tool," "spindle bearing," "abnormal temperature rise," "vibration analyzer," "fretting wear," and "filter blockage." The segmented token sequence is then fed into a pre-trained language model encoder, which uses a multi-layer self-attention mechanism to acquire global contextual semantic information and outputs a context representation matrix. .

[0044] S2. Construct a three-way task subspace that is independent and can interact collaboratively based on the global context representation vector to obtain structured semantic element features.

[0045] Since entity recognition tasks focus more on entity boundaries and entity type information, while relation extraction tasks focus more on semantic associations between entities, in order to avoid feature competition between entity recognition and relation extraction tasks caused by the shared representation used in traditional joint extraction models, an independent parameter space is used to initialize the mapping for different tasks.

[0046] Specifically, through three sets of independent linear transformation matrices And their corresponding bias terms, respectively construct the entity feature space, relation head feature space, and relation tail feature space:

[0047]

[0048]

[0049] in, Represent entity characteristics; Indicates the header features of the relationship; Indicates the tail characteristics of the relationship; All are bias vectors.

[0050] Furthermore, a feedforward network (FFN) is used to perform non-linear fusion and dimensional alignment of relation head and tail features to generate unified relation end representation features:

[0051] In the formula, Indicates the characteristics of a unified relationship; This represents a feedforward neural network; This is a dimension splicing operation.

[0052] Through the above process, the initial feature decoupling between the entity end and the relation end is achieved, alleviating the problem of conflict between shared features of multiple tasks, and providing an initial state for establishing a collaborative optimization information flow for the representation layer collaborative optimization mechanism.

[0053] S3. Perform entity-relationship collaborative optimization based on structured semantic element features to generate collaborative enhancement features.

[0054] The system optimization mechanism of this invention is as follows: Figure 2 As shown, it specifically includes: Based on entity features and unified relation features, information interaction between entity representation and relation representation is established through bidirectional multi-head attention, and relation-aware entity features and entity-aware relation features are obtained respectively, with the following expressions: Relationship-aware entity interaction (entity-to-relationship direction):

[0055] Obtain entity features after relation enhancement, and use relation priors to narrow the search boundary of entities.

[0056] Entity-aware relationship interaction (related to entity orientation):

[0057] Obtain the enhanced relational features of entities and use entity boundary information to calibrate the relational semantic space.

[0058] In the above formula, To perceive entity features for relationships; For entity perception relationship features; This indicates bidirectional, multi-headed attention; Represents the query vector; Represents the key vector; Represents the value; To reduce the interference of background description information on the semantics of key faults in mechanical maintenance texts, a word-level dynamic gating fusion mechanism is introduced. A word-level gating matrix is ​​obtained based on relation-aware entity features and entity-aware relation features, and its expression is:

[0059]

[0060] In the formula, Gating weights corresponding to relation-aware entity features; The gating weights corresponding to entity perception relationship features; Use the Sigmoid activation function; Represents the entity-side gating weight matrix; Represents the relational gating weight matrix; Represents the entity-side gating bias vector; Represents the relational gating bias vector; In this embodiment, for non-critical background terms such as "during operation" and "discovered," the gating weights are dynamically suppressed, greatly weakening their feature information after residual connection, thus achieving active filtering of local background noise. For fault core term segments such as "spindle bearing," "abnormal temperature rise," "fretting wear," and "filter blockage," the gating weights are significantly enhanced, strengthening the core fault semantic features. The gating weights are used to filter interaction features, and combined with residual connection and layer normalization, enhanced entity representations and enhanced relation representations are obtained.

[0061]

[0062] In the formula, Enhance features for entities; For layer normalization; For regularization processing; It represents the Hadamardi (or Hadama) stack; Enhance features for relationships.

[0063] By establishing a bidirectional collaborative optimization information flow between entity representations and relation representations, entity boundary information participates in relation semantic modeling, while relation semantic information conversely constrains entity representation learning, thus forming a representation layer collaborative optimization mechanism that effectively dissolves the semantic coupling between entities and relations. The collaboratively optimized entity and relation representations not only serve as inputs for relation prediction but also as a unified representation basis for subsequent dynamic decision boundary generation.

[0064] S4. Generate entity span score and relationship alignment score matrix based on collaborative enhancement features.

[0065] Specifically, it includes: The relation enhancement features are decoupled into head enhancement features and tail enhancement features, and their expressions are as follows:

[0066] In the formula; Head enhancement features; Tail enhancement features; In the specific implementation process, based on unified relationship characteristics The steps for obtaining head and tail augmentation features are performed by the Entity-Relationship Interaction Module (CIM).

[0067] Entity augmentation features, head augmentation features, and tail augmentation features are input into the multi-task prediction and classification head (i.e., Figure 1 In the multi-task prediction head, entity span score and relation head-tail alignment score matrices are generated respectively, and their expressions are as follows: , ,

[0068] In the formula, Characterizes entity span score, This represents the head enhancement feature alignment score matrix; This represents the tail enhancement feature alignment score matrix; This represents the multi-task prediction classification head, which is used as the entity prediction head, relation head prediction head, and relation tail prediction head to generate the score matrix.

[0069] In this embodiment, taking the triple (spindle bearing, component failure, fretting wear) as an example: the predicted score of the entity "spindle bearing" as the subject is higher than the entity threshold, and the predicted score of "fretting wear" as the object is also higher than the entity threshold. The head alignment score and tail alignment score of this entity pair under the relation [component failure] are both higher than the corresponding relation threshold, indicating that this candidate triple has high credibility. The determination method for other candidate results is the same.

[0070] S5. Generate dynamic decision thresholds based on collaborative enhancement features.

[0071] To overcome the problem that traditional fixed-threshold decoding methods cannot adapt to different sample and relational distribution characteristics, a dynamic decision threshold is set, specifically including: The expression for calculating instance-level context vectors based on collaboratively enhanced features is as follows:

[0072] In the formula, Represents an instance-level context vector; Indicates the length of the word sequence in the mechanical maintenance text sample; Indicates the position index of the lexical unit; Indicates the first each word element The effectiveness; Indicates the first Entity enhancement features corresponding to each word element; The entity recognition threshold is constructed based on instance-level context vectors, and its expression is as follows:

[0073] In the formula, The threshold for entity recognition; This is the scaling factor; It is the hyperbolic tangent function; It is a multilayer perceptron; Introducing relation embedding vectors By fusing relation embedding vectors and instance-level context, joint context features are obtained. .

[0074] The relation embedding vector It is a learnable vector representation built for each preset relation category. The system pre-builds a relation embedding table based on the set of relation types in the task, with each relation category corresponding to a vector in the table. When processing the r-th type of relation, the corresponding relation embedding is obtained by looking up the table using the relation number r. This embedding vector is automatically updated through backpropagation along with other network parameters during the language model training process; it is not manually set or generated by fixed rules.

[0075] The head-alignment adaptive threshold and tail-alignment adaptive threshold are generated based on joint contextual features, and their expressions are as follows: ,

[0076] In the formula, An adaptive threshold for head alignment; An adaptive threshold for tail alignment.

[0077] In the specific implementation process, the specific operation steps of step S5 are executed by the sample and relation adaptive threshold module (ADM).

[0078] In this embodiment, the dynamic thresholds generated for different relationship categories are differentiated. The threshold for the [component failure] relationship, which involves the causal transmission of faults, is relatively high to ensure the accuracy of fault attribution. The [composition] relationship, being a structural descriptive relationship, has a relatively low threshold. The thresholds for the [detection tool] and [performance failure] relationships fall between the two. This step achieves a two-dimensional dynamic decision boundary of "sample adaptation + relationship adaptation," replacing the traditional fixed threshold, enabling the decision layer to adapt to the heterogeneous distribution characteristics of different samples and different relationships.

[0079] S6. Based on entity span score, relationship alignment score matrix and dynamic decision threshold, filter effective entity span and effective relationship pairs.

[0080] Specifically: , , ,

[0081] In the formula, Represents the set of valid subject entity spans; For a specific candidate entity span, it represents the span starting from the first in the mechanical maintenance text. The word element, ending at the first A continuous interval of 1 word element; Indicates the span of candidate entities Entity span score; Represents the set of valid object entities spanning the range; Indicates the span of candidate entities Entity span score; Indicates the first Valid candidate set for header alignment under class relationship; Indicates the first Under class relationships, the starting position of the main entity relative to the starting position of the object entity Head alignment score between them; Indicates the first A set of valid tail alignment candidates under class relationships; Indicates the first Under class relationships, the ending position of the main entity End position of the object entity The score is based on the alignment of the tails between them.

[0082] S7. Establish a four-fold joint constraint criterion. When the selected valid entity span and valid relation pair satisfy the four-fold joint constraint criterion, output a valid triplet.

[0083] The specific criteria for the four-fold joint constraint are as follows:

[0084] In the formula, It represents the logical operator "AND".

[0085] The final decoding stage is only allowed if the candidate result simultaneously meets all four of the following constraints: the main entity is... The score must be higher than the entity recognition threshold. ;Object entity in The score must be higher than the entity recognition threshold. Head and tail entities in a specific relationship The head alignment score is higher than the corresponding relationship threshold, and the tail alignment score is also higher than the corresponding relationship threshold.

[0086] The above four conditions together constitute a quadruple joint constraint criterion, requiring that the legality of entity boundaries and the confidence level of relationship alignment both meet the criteria; none can be omitted. This mechanism can effectively alleviate the problems of entity mismatch and relationship misjudgment caused by loose judgments based solely on a single confidence level in traditional methods.

[0087] S8. Traverse the mechanical maintenance text sequence and repeat the extraction process of steps S1-S7 above to collect all valid triples and obtain the final extraction result set.

[0088] To further verify the overall effectiveness of the present invention on a large-scale corpus, this embodiment conducts an ablation experiment on a dataset in the field of mechanical maintenance.

[0089] To verify the effectiveness of each core step of this invention, the following comparative model variants were set up: GPLinker (baseline), GPLinker+CI (introducing the CIM module), GPLinker+AD (introducing the ADM module), CADNet w / o Gate (removing gating), CADNet w / o Attn (removing cross-attention), CADNet fixed threshold (fixed threshold replacing adaptive threshold), and the modular structure (CADNet) corresponding to the steps of this invention. All experiments used the same pre-trained encoder, batch size, learning rate, and training epochs. The ablation experiment results are shown in Table 1.

[0090] Table 1

[0091] Experimental results show that when only CIM (a module that performs entity-relationship collaborative optimization based on structured semantic feature features to generate corresponding collaboratively enhanced features) is introduced, the model's F1 score improves by 0.17% compared to the baseline. When only ADM (a module that generates dynamic decision thresholds based on collaboratively enhanced features) is introduced, the model's F1 score improves by 0.37% compared to the baseline, indicating that both mechanisms, when applied individually, can improve model performance, but the improvement is relatively limited. When the representation layer collaborative optimization mechanism and the decision layer collaborative optimization mechanism work together, the F1 score of the method in this invention reaches 78.50%, an improvement of 1.72% compared to the baseline, and its performance improvement is significantly higher than that obtained when each module is introduced individually. This result shows that the collaborative representation generated by the representation layer collaborative optimization mechanism not only improves the feature representation of entities and relations, but also provides a more accurate semantic basis for the generation of dynamic thresholds in the decision layer. The decision layer collaborative optimization mechanism further utilizes the collaborative representation to generate a two-dimensional dynamic decision boundary between samples and relations, enabling the advantages formed in the representation learning stage to be continuously transferred to the final joint decoding process. Since the collaborative representation output by the representation layer collaborative optimization mechanism serves as the input for the dynamic threshold generation of the decision layer collaborative optimization mechanism, the subsequent dynamic decision boundary depends on the aforementioned representation optimization results for generation. There is a data flow dependency between the two, rather than they are executed independently.

[0092] Unlike existing technologies that sequentially connect multiple functional modules according to the processing flow, the representation layer collaborative optimization mechanism and the decision layer collaborative optimization mechanism in this invention are not independent of each other, but rather have continuous data and functional dependencies. Specifically, the representation layer collaborative optimization mechanism generates a collaborative representation through task-differentiated representation learning and entity-relationship collaborative interaction. This collaborative representation is not only used for relation prediction but also serves as the sole representation basis for the decision layer collaborative optimization mechanism to generate dynamic decision boundaries. The sample-relationship two-dimensional adaptive threshold used by the decision layer collaborative optimization mechanism directly depends on the collaborative representation to complete threshold calculation and joint decoding. If the representation layer collaborative optimization mechanism is canceled, the decision layer collaborative optimization mechanism cannot obtain a representation basis containing entity-relationship collaborative semantics, and its dynamic threshold degenerates into a threshold generation method based on ordinary shared representation. If the decision layer collaborative optimization mechanism is canceled, the collaborative representation generated by the representation layer cannot further participate in dynamic decision boundary generation and joint decoding, and its collaborative optimization effect cannot be passed on to the final triplet prediction result.

[0093] Therefore, an inseparable collaborative optimization information flow is formed between the two collaborative optimization mechanisms, enabling the entity-relationship collaborative representation formed in the representation learning stage to continuously participate in the subsequent dynamic decision boundary generation and joint decoding process. This overcomes the technical obstacle of the entity-relationship semantic coupling that cannot be continuously optimized due to the separation of representation learning and decision decoding in the existing technology.

[0094] In summary, this invention overcomes the aforementioned technical obstacles by constructing a representation-decision layer collaborative optimization mechanism and establishing a continuous collaborative optimization information flow between the two mechanisms. This allows representation learning results to continuously participate in relation prediction, dynamic decision-making, and joint decoding processes, thereby achieving the collaborative evolution of entity representation and relation representation, as well as the adaptive generation of dynamic decision boundaries. This significantly improves the accuracy and stability of mechanically maintaining text relation triple extraction.

Claims

1. A joint extraction method for mechanical maintenance text based on a representation-decision collaborative optimization mechanism, characterized in that, include: A pre-trained semantic encoder is used to uniformly encode mechanical maintenance text sequences, capturing a global contextual representation vector that covers syntax, semantics, and dynamic contextual relationships; Based on the global context representation vector, a three-way task subspace that is independent and can interact collaboratively is constructed to obtain structured semantic element features; Entity-relationship collaborative optimization is performed based on structured semantic element features to generate collaboratively enhanced features; Generate entity span score and relation alignment score matrices based on collaborative enhancement features; Dynamic decision thresholds are generated based on collaborative enhancement features; Based on entity span score, relationship alignment score matrix and dynamic decision threshold, effective entity span and effective relationship pairs are selected; Establish a four-fold joint constraint criterion. When the selected valid entity spans and valid relations satisfy the four-fold joint constraint criterion, output a valid triple. Traverse the mechanical maintenance text sequence, repeat the above extraction process, collect all valid triples, and obtain the final extraction result set; The structured semantic element features include entity features, relation header features, relation tail features, and unified relation features; based on the global context representation vector, a three-way task subspace that is independent and can interact collaboratively is constructed to obtain the structured semantic element features, including: Based on the semantic requirements of different sub-tasks, we construct mutually independent task representation spaces, specifically expressed as follows: In the formula, All are learnable weight matrices; All are bias vectors; For entity features; This refers to the header features of the relationship; This refers to the tail features of the relationship; This is the global context representation vector; By combining the header and footer features, a unified relational feature is constructed, the expression of which is: In the formula, Indicates the characteristics of a unified relationship; This represents a feedforward neural network; This is a dimension splicing operation; The collaborative enhancement features include entity enhancement features and relation enhancement features; based on structured semantic element features, entity-relation collaborative optimization is performed to generate collaborative enhancement features, including: Based on entity features and unified relation features, information interaction between entity representation and relation representation is established through bidirectional multi-head attention, and relation-aware entity features and entity-aware relation features are obtained respectively, with the following expressions: In the formula, To perceive entity features for relationships; For entity perception relationship features; This indicates bidirectional, multi-headed attention; Represents the query vector; Represents the key vector; Represents the value; The word-level gating matrix is ​​obtained based on relation-aware entity features and entity-aware relation features, and its expression is as follows: In the formula, Gating weights corresponding to relation-aware entity features; The gating weights corresponding to entity perception relationship features; Use the Sigmoid activation function; Represents the entity-side gating weight matrix; Represents the relational gating weight matrix; Represents the entity-side gating bias vector; Represents the relational gating bias vector; The expression for obtaining collaborative enhancement features based on the word-level gating matrix is ​​as follows: In the formula, Enhance features for entities; For layer normalization; For regularization processing; It represents the Hadamardi (or Hadama) stack; Enhance features for relationships; The generation of dynamic decision thresholds based on collaborative enhancement features includes: The expression for calculating instance-level context vectors based on collaboratively enhanced features is as follows: In the formula, Represents an instance-level context vector; Indicates the length of the word sequence in the mechanical maintenance text sample; Indicates the position index of the lexical unit; Indicates the first each word element Validity; Indicates the first Entity enhancement features corresponding to each word element; The entity recognition threshold is constructed based on instance-level context vectors, and its expression is as follows: In the formula, The threshold for entity recognition; This is the scaling factor; It is the hyperbolic tangent function; It is a multilayer perceptron; Introducing relation embedding vectors By fusing relation embedding vectors and instance-level context, joint context features are obtained. ; The head-alignment adaptive threshold and tail-alignment adaptive threshold are generated based on joint contextual features, and their expressions are as follows: , In the formula, An adaptive threshold for head alignment; An adaptive threshold for tail alignment.

2. The method according to claim 1, characterized in that, Entity span score and relation alignment score matrices are generated based on collaborative enhancement features, including: The relation enhancement features are decoupled into head enhancement features and tail enhancement features, and their expressions are as follows: In the formula; Head enhancement features; Tail enhancement features; Entity augmentation features, head augmentation features, and tail augmentation features are input into the multi-task prediction classification head to generate entity span score and relation head-tail alignment score matrices, respectively. Their expressions are as follows: , , In the formula, Characterizes entity span score, This represents the head enhancement feature alignment score matrix; This represents the tail enhancement feature alignment score matrix; This represents a multi-task prediction classification head.

3. The method according to claim 2, characterized in that, Based on entity span score, relation head-to-tail alignment score matrix, and dynamic decision threshold, effective entity span and effective relation pairs are selected, specifically as follows: In the formula, Represents the set of valid subject entity spans; For a specific candidate entity span, it represents the span starting from the first in the mechanical maintenance text. The word element, ending at the first A continuous interval of 1 word element; Indicates the span of candidate entities Entity span score; Represents the set of valid object entities spanning the range; Indicates the span of candidate entities Entity span score; Indicates the first Valid candidate set for header alignment under class relationship; Indicates the first Under class relationships, the starting position of the main entity relative to the starting position of the object entity The head alignment score between them; Indicates the first A set of valid tail alignment candidates under class relationships; Indicates the first Under class relationships, the ending position of the main entity End position of the object entity The score is based on the alignment of the tails between them.

4. The method according to claim 3, characterized in that, The specific criteria for the four-fold joint constraint are as follows: In the formula, It represents the logical operator "AND".

5. A computer device, characterized in that, It includes a memory and a processor, the memory storing a computer program, which, when executed by the processor, causes the processor to perform the steps of the method according to any one of claims 1 to 4.

6. A computer-readable storage medium, characterized in that, The device stores a computer program, which, when executed by a processor, causes the processor to perform the steps of the method described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Mask fusion triple extraction method for semantic association in data penetration

    CN122433740A

  • Network threat intelligence relational triple combined extraction method based on deep learning

    US12248876B1