Technical specification database construction method based on context-aware specification parsing algorithm

By using a context-aware specification parsing algorithm based on the Transformer model, railway technical specifications are automatically processed to generate a knowledge graph, which solves the problem of low information utilization efficiency in existing technologies and realizes standardized management and dynamic updating of specification knowledge.

CN122364463APending Publication Date: 2026-07-10INST OF COMPUTING TECH CHINA ACAD OF RAILWAY SCI +2

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
INST OF COMPUTING TECH CHINA ACAD OF RAILWAY SCI
Filing Date
2026-03-02
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Existing technologies cannot effectively process unstructured information in railway technical specification documents, lack deep semantic understanding capabilities, cannot automatically identify and extract key information, and lack dynamic update mechanisms, resulting in low efficiency in knowledge utilization.

Method used

A context-aware specification parsing algorithm is adopted, which uses the Transformer model to extract standardized technical specification documents, generate entity data, and convert it into a knowledge graph, supporting dynamic updates and conflict detection.

Benefits of technology

It has achieved automated parsing of railway technical specifications, improved data consistency and maintainability, accurately understood semantic relationships, supported standardized management and dynamic updating of specification knowledge, and improved the level of intelligence in specification management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122364463A_ABST
    Figure CN122364463A_ABST
Patent Text Reader

Abstract

The application provides a technical specification database construction method based on a context-aware specification parsing algorithm, which comprises the following steps: obtaining a standardized technical specification document; inputting the standardized technical specification document into a Transformer model to enable the model to perform perception extraction processing on the standardized technical specification document based on the context-aware specification parsing algorithm to generate a plurality of entity data corresponding thereto; performing deduplication conversion processing on each entity data, taking each entity data after the deduplication conversion processing as a node, taking a preset core relationship between each entity data as an edge, generating or updating a corresponding knowledge graph, and storing the knowledge graph in a preset technical specification database. The application can realize automatic parsing of specification documents, reduce manual workload, improve data consistency and maintainability, avoid specification execution deviation caused by context understanding errors, and improve the intelligent level of specification management.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of information processing technology, and in particular to a method for constructing a technical specification database based on a context-aware specification parsing algorithm. Background Technology

[0002] With the development of digitalization and intelligentization in railway engineering, the management and utilization of technical specifications have become crucial supports for railway construction. Railway technical specifications exist in natural language and contain a large amount of technical terminology, technical parameters, and construction requirements. This information is essential for guiding construction and ensuring project quality. However, existing data management methods have significant shortcomings in processing this unstructured text data.

[0003] Existing technologies primarily employ traditional document management systems or simple text databases to store technical specification documents. While these methods achieve basic document storage and retrieval functions, they lack deep semantic understanding capabilities. Key information in technical specification documents, such as equipment parameters, construction requirements, and quality standards, is expressed in complex natural language. Traditional methods cannot automatically identify and extract this structured information, resulting in a significant amount of valuable knowledge remaining unutilized. Existing technologies also exhibit significant limitations when processing lengthy technical specification documents. Railway technical specification documents typically contain multiple chapters, appendices, and complex logical structures, resulting in length and high information density. Traditional natural language processing techniques, such as BERT-based methods, are limited by input length constraints (usually 512 tokens) and cannot effectively process complete specification documents, leading to the loss of contextual information and affecting the accuracy and completeness of knowledge extraction. Furthermore, existing technologies lack deeply customized knowledge extraction methods tailored to the specific characteristics of the railway engineering field. Railway technical specifications contain a large number of domain-specific professional terms, numerical constraints, and logical relationships, and these expressions exhibit distinct domain characteristics. For example, statements such as "minimum signal spacing not less than 300 meters," "track bed resistance not less than 2Ω•km," and "allowable deviation of catenary height ±30mm" contain semantic information across multiple dimensions, including equipment entities, parameter types, numerical constraints, and unit information. General natural language processing technologies struggle to accurately understand and extract these complex semantic relationships. Existing technologies cannot effectively handle the dynamic update requirements of technical specifications. Railway technical specifications are revised and updated regularly, and existing methods mostly involve one-time construction, lacking an effective incremental update mechanism. When specifications are updated, the entire database needs to be rebuilt, which is inefficient and costly, failing to meet the timeliness requirements of practical engineering applications. Summary of the Invention

[0004] In view of this, embodiments of this application provide a method for constructing a technical specification database based on a context-aware specification parsing algorithm, in order to eliminate or improve one or more defects existing in the prior art.

[0005] One aspect of this application provides a method for constructing a technical specification database based on a context-aware specification parsing algorithm, the method comprising the following steps: Obtain standardized technical specification documents; wherein, the standardized technical specification documents are generated in advance after preprocessing the obtained technical specification documents in the data preprocessing module; The standardized technical specification document is input into the Transformer model, so that the Transformer model performs perceptual extraction processing on the standardized technical specification document based on the context-aware specification parsing algorithm to generate multiple corresponding entity data. Each entity data is deduplicated, and the deduplicated entity data is used as a node, and the preset core relationship between the entity data is used as an edge to generate or update the corresponding knowledge graph, which is then stored in a preset technical specification database.

[0006] In some embodiments of this application, prior to obtaining the standardized technical specification document, the method further includes: Obtain the aforementioned technical specification document; The acquired technical specification documents in different formats are identified and parsed to obtain structured text; The structured text is cleaned to obtain the corresponding cleaned structured text; The cleaned structural text is then subjected to standardized recognition to generate corresponding standardized technical specification documents.

[0007] In some embodiments of this application, the step of cleaning the structured text to obtain the corresponding cleaned structured text includes: The received structured text is cleaned by removing headers, footers, table borders, and redundant whitespace characters to obtain the cleaned structured text.

[0008] In some embodiments of this application, the step of standardizing and recognizing the cleaned structural text to generate a corresponding standardized technical specification document includes: The units and numerical expressions in the cleaned structural text are standardized, and a sentence segmentation algorithm based on a combination of rules and machine learning is used to identify semantically complete sentences and clause structures in the cleaned structural text, generating the corresponding standardized technical specification document.

[0009] In some embodiments of this application, the entity data includes entity information data and entity relationship data; Correspondingly, the step of inputting the standardized technical specification document into the Transformer model, so that the Transformer model performs perceptual extraction processing on the standardized technical specification document based on a context-aware specification parsing algorithm to generate multiple corresponding entity data, includes: The standardized technical specification document is input into the Transformer model, so that the Transformer model performs semantic parsing and feature extraction on the received standardized technical specification document based on the context-aware specification parsing algorithm to obtain the corresponding feature vector; Domain entity recognition is performed on the feature vector to obtain multiple entity information data; Relationship identification and extraction are performed on the feature vector and multiple entity information data to obtain the entity relationship data corresponding to each entity information data.

[0010] In some embodiments of this application, the context-aware specification parsing algorithm includes using a sliding window mechanism to segment long text in the standardized technical specification document; and using a sparse attention mechanism to perform semantic parsing and feature extraction on the received technical specification document to generate the feature vector.

[0011] In some embodiments of this application, the sparse attention mechanism includes: calculating local window attention, calculating random attention, and calculating step-size attention.

[0012] In some embodiments of this application, the step of performing deduplication transformation on each of the entity data, using the deduplicated entity data as nodes, and using the preset core relationships between the entity data as edges, to generate or update the corresponding knowledge graph and store it in a preset technical specification database includes: Alignment and deduplication processing is performed on each of the entity information data and the entity relationship data corresponding to each of the entity information data to obtain multiple standardized entity relationship data; Each entity information data is used as a node, and each standardized entity relationship data is used as an edge to generate or update the corresponding knowledge graph, and store it in a preset technical specification database.

[0013] In some embodiments of this application, the method further includes: When a new version of the standardized technical specification document is obtained, the new version of the standardized technical specification document is semantically compared with the corresponding original version of the standardized technical specification document to obtain the corresponding change content data; Entity identification and relationship extraction are performed on the changed content data to obtain the corresponding incremental knowledge set; The incremental knowledge set is compared with the current knowledge graph, and numerical conflict, logical conflict and temporal conflict are detected based on predefined conflict rules and similarity algorithms to obtain the corresponding conflict detection results. Based on the conflict detection results, the current knowledge graph is updated to obtain the updated knowledge graph, which is then stored in a preset technical specification database.

[0014] In some embodiments of this application, the method further includes: The knowledge graph is quality-assessed using a manually labeled test set. The quality assessment includes accuracy assessment, completeness check, and consistency verification. The accuracy assessment uses precision, recall, and F1 score to evaluate the performance of the entity recognition and relation extraction model. The completeness check calculates the coverage of knowledge extraction to the key content of the standard document, with a coverage target not lower than a preset coverage value. The consistency verification checks the numerical, logical, and temporal consistency within the knowledge graph based on predefined logical rules.

[0015] Another aspect of this application provides an electronic device disposed on a bidirectional intelligent metasurface of a movable element, comprising a processor and a memory; the processor, when executing a running program stored in the memory, implements the aforementioned method for constructing a technical specification database based on a context-aware specification parsing algorithm.

[0016] A third aspect of this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the aforementioned method for constructing a technical specification database based on a context-aware specification parsing algorithm.

[0017] A fourth aspect of this application provides a computer program product, including a computer program that, when executed by a processor, implements the aforementioned method for constructing a technical specification database based on a context-aware specification parsing algorithm.

[0018] This application discloses a method for constructing a technical specification database based on a context-aware specification parsing algorithm. The method includes the following steps: acquiring standardized technical specification documents; wherein the standardized technical specification documents are pre-processed in a data preprocessing module before being generated; inputting the standardized technical specification documents into a Transformer model, so that the Transformer model, based on a context-aware specification parsing algorithm, performs perceptual extraction processing on the standardized technical specification documents to generate multiple corresponding entity data; performing deduplication transformation processing on each entity data, using each deduplicated entity data as a node and a preset core relationship between each entity data as an edge, generating or updating a corresponding knowledge graph, and storing it in a preset technical specification database. This method enables automated parsing of specification documents, significantly reducing manual workload; improves data consistency and maintainability; accurately understands the semantic relationships in the specification documents, effectively identifies specification constraints, and avoids specification execution deviations caused by contextual misunderstandings; achieves standardized management and dynamic updating of specification knowledge; and realizes specification conflict detection and resolution, improving the intelligent level of specification management.

[0019] Additional advantages, objectives, and features of this application will be set forth in part in the description which follows, and will in part become apparent to those skilled in the art upon review of the following description, or may be learned by practice of the application. The objectives and other advantages of this application can be realized and obtained by means of the structures specifically pointed out in the specification and drawings.

[0020] Those skilled in the art will understand that the purposes and advantages that can be achieved with this application are not limited to those specifically described above, and that the above and other purposes that this application can achieve will be more clearly understood from the following detailed description. Attached Figure Description

[0021] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, do not constitute a limitation thereof. The components in the drawings are not drawn to scale but are merely for illustrating the principles of this application. For ease of illustration and description of certain parts of this application, corresponding portions in the drawings may be enlarged, i.e., may appear larger relative to other components in an exemplary device actually manufactured according to this application. In the drawings: Figure 1 This is a schematic diagram of the first process of a technical specification database construction method based on a context-aware specification parsing algorithm in one embodiment of this application.

[0022] Figure 2 This is a schematic diagram of the second process of a technical specification database construction method based on a context-aware specification parsing algorithm in one embodiment of this application.

[0023] Figure 3 This is a schematic diagram of the third process of the technical specification database construction method based on the context-aware specification parsing algorithm in one embodiment of this application.

[0024] Figure 4 This is a schematic diagram of the fourth process of the technical specification database construction method based on the context-aware specification parsing algorithm in one embodiment of this application.

[0025] Figure 5 This is a schematic diagram of the fifth process of the technical specification database construction method based on the context-aware specification parsing algorithm in one embodiment of this application.

[0026] Figure 6 This is a schematic diagram illustrating the overall process of constructing a technical specification database based on a context-aware specification parsing algorithm, as shown in an application example of this application.

[0027] Figure 7 This is a diagram showing the core algorithm structure of the technical specification database construction method based on the context-aware specification parsing algorithm in an application example of this application. Detailed Implementation

[0028] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the embodiments and accompanying drawings. Here, the illustrative embodiments and their descriptions are used to explain this application, but are not intended to limit it.

[0029] It should also be noted that, in order to avoid obscuring this application with unnecessary details, only the structures and / or processing steps closely related to the solution according to this application are shown in the accompanying drawings, while other details that are not closely related to this application are omitted.

[0030] It should be emphasized that the term "including / comprises" as used herein refers to the presence of a feature, element, step, or component, but does not exclude the presence or addition of one or more other features, elements, steps, or components.

[0031] It should also be noted that, unless otherwise specified, the term "connection" in this article can refer not only to a direct connection, but also to an indirect connection involving an intermediary.

[0032] In the following description, embodiments of the present application will be illustrated with reference to the accompanying drawings. In the drawings, the same reference numerals represent the same or similar parts, or the same or similar steps.

[0033] It should be noted that while some researchers have attempted to use general Named Entity Recognition (NER) and Relation Extraction (RE) techniques to process technical documents, these methods face significant technical bottlenecks when dealing with technical specifications in the railway engineering field. First, existing technologies struggle to handle the highly structured and semantically sparsity characteristics of specification documents. Railway technical specifications typically contain complex hierarchical chapter numbering, cross-chapter references, and implicit parameter constraints. General NLP models often treat documents as flat text sequences, ignoring the semantic scope limitations imposed by chapter hierarchy, resulting in an inability to accurately resolve complex situations where "even the same term has different parameter thresholds in different chapters." Second, existing rule-based or simple segmentation models cannot solve long-distance semantic dependencies. In railway specifications, the definition of a technical indicator often relies on environmental presuppositions hundreds or even several pages prior (such as design speed, geological conditions, etc.). Existing technologies employ mechanical segmentation or fixed-window truncation methods, severing the logical connection between conditional clauses and core indicators. This leads to the extraction of knowledge points that lose crucial "applicable scenario" constraints, resulting in numerous erroneous nodes in the generated knowledge graph due to misinterpretation. Furthermore, existing technologies typically divide knowledge extraction into two independent stages: NER and RE. This pipelined approach not only suffers from error propagation problems but also fails to address the highly coupled nature of entities and relationships in railway specifications (e.g., some values ​​are both entity attributes and constraints). Moreover, existing technologies lack an incremental update mechanism for dynamic changes in specification documents. When railway standards are revised or abolished, they cannot automatically locate affected knowledge nodes and perform conflict detection, making it difficult to meet the stringent requirements of data timeliness and consistency for automated engineering compliance reviews. Based on this, the inventors of this application first conceived of using a context-aware specification parsing algorithm to achieve automated batch processing of specification documents. This algorithm is based on the sequence-to-sequence learning principle in natural language processing and supports the automatic recognition and conversion of documents in various formats. By transforming unstructured specification documents into structured knowledge graphs, a unified specification information storage format and query interface are established based on graph theory and knowledge representation learning principles. This method utilizes an entity-relationship-attribute triple model to achieve standardized management and dynamic updates of specification information. Semantic understanding is achieved through a multi-layer attention mechanism, accurately identifying entity relationships and constraints in the specifications based on the scientific principles of self-attention and cross-attention mechanisms. This technology leverages the transfer learning capabilities of pre-trained language models to support semantic association and reasoning across paragraphs. By establishing a systematic method for constructing a normative knowledge base, based on knowledge engineering and ontology principles, it supports the integration and conflict resolution of multi-source normative documents. This method utilizes knowledge fusion algorithms and conflict resolution strategies to achieve automated maintenance and updating of normative knowledge. Through a knowledge fusion module, it achieves the unification of different standard norms, establishing a consistency mapping and conflict detection mechanism for normative information based on the scientific principles of semantic matching and entity alignment.This method utilizes graph neural networks and similarity calculation algorithms to support dynamic management and updates of the standard version.

[0034] The following examples will provide a detailed description.

[0035] This application provides a method for constructing a technical specification database based on a context-aware specification parsing algorithm. See also... Figure 1 The method includes the following steps: Step 100: Obtain standardized technical specification documents; wherein, the standardized technical specification documents are generated in advance after preprocessing the obtained technical specification documents in the data preprocessing module; Step 200: Input the standardized technical specification document into the Transformer model, so that the Transformer model performs perceptual extraction processing on the standardized technical specification document based on the context-aware specification parsing algorithm to generate multiple corresponding entity data. In step 200, the entity data can be key business objects and their attribute information within the railway engineering field, specifically including equipment entities (such as turnouts and overhead contact lines), parameter entities (such as design speed and radius of curvature), spatial location entities, and constraint entities. To achieve accurate extraction of the above data, the standardized technical specification document is input into the Transformer model, enabling the Transformer model to process ultra-long documents using a sliding window mechanism based on a context-aware specification parsing algorithm. This context-aware specification parsing algorithm employs a sliding window attention pattern, dividing the long document into multiple overlapping windows for processing. Each window has a length of W = 512 tokens, and the overlap length is O = 128 tokens. The working principle of the sliding window attention pattern is to divide the long sequence into fixed-length windows, calculate complete attention within each window, and maintain the transmission of contextual information between windows through overlapping areas. In specific implementation, the algorithm first divides the input sequence according to the window size W, with adjacent windows overlapping by O tokens to ensure that important information is not lost at the window boundaries. For each window, the algorithm calculates the attention weights among all token pairs within it, while maintaining the relative positional information between windows through positional and relative positional encoding mechanisms. For redundant predictions generated within overlapping regions, a maximum confidence voting mechanism is used for merging and deduplication to ensure the uniqueness of entity recognition results. This approach ensures both the processing capacity for long sequences and the computational accuracy of local attention, making it particularly suitable for handling the hierarchical structure of clauses, terms, and sub-clauses in railway specification documents.

[0036] Attention weights can be calculated as follows: in, i This indicates the index of the i-th position in the query sequence Q. j This represents the index of the j-th position in the key sequence K. Aij This represents the normalized attention weight value of position i to position j. For query vector, For key vectors, The dimension of the key vector. This is a mask matrix used to control the attention range.

[0037] Furthermore, custom feature extraction is possible, such as optimization specifically for the semantic characteristics of railway engineering, mapping railway terminology to a high-dimensional vector space; identifying clause structures, list items, conditional statements, etc.; and a semantic relation encoding layer to capture the logical relationships between entities. Entity data identified by the context-aware specification parsing algorithm can be converted into a standard triple format (head entity, relation, tail entity). Fifteen core relation types are defined, including spatial relations (located, connected, spanning), temporal relations (occurring, continuing, sequential), functional relations (controlling, monitoring, influencing), and constraint relations (requiring, prohibiting, restricting). A quality assessment mechanism for triples is also included, as shown in the formula below: in, Q (·) represents the overall quality assessment value of the triplet t. t This represents the target knowledge triple to be evaluated. α , β , γ This represents the preset weight coefficients corresponding to each evaluation dimension. A (·) represents the accuracy score, calculated based on the prediction confidence of the model output; C (·) indicates the completeness score, calculated based on the missing rate of the required fields in the triple; R (·) represents the consistency score, which is obtained by logical verification based on the existing ontology constraints in the knowledge graph.

[0038] Step 300: Perform deduplication transformation on each of the entity data, take each entity data after deduplication transformation as a node, and take the preset core relationship between each entity data as an edge, generate or update the corresponding knowledge graph, and store it in the preset technical specification database.

[0039] In step 300, the entity data is deduplicated, conflict detected, and checked for consistency. Deduplication employs an entity similarity-based clustering algorithm, an improved hierarchical clustering method specifically designed for deduplicating entities in knowledge graphs. This algorithm first calculates the similarity between all entity pairs, considering name similarity, attribute similarity, and contextual similarity. Then, a single-link clustering algorithm is used to group entities with similarity exceeding a threshold (which can be set to 0.85) into the same cluster. Within each cluster, the entity with the highest confidence score is selected as the representative entity, and the others are designated as aliases. This clustering algorithm has the advantage of handling variations, abbreviations, and synonyms of entity names, improving the accuracy of deduplication. Conflict detection is performed using predefined logical rules and constraints; consistency checks ensure that the knowledge graph meets the consistency requirements of the domain ontology. The processed entity data is stored in the Neo4j graph database, leveraging its efficient graph traversal and query capabilities. The storage structure includes node attributes (entity type, attribute value, confidence score) and relation attributes (relation type, weight, source).

[0040] As described above, the context-aware specification parsing algorithm enables automated parsing of specification documents, supports batch processing of large numbers of specification documents, and significantly reduces manual workload; it transforms unstructured specification documents into structured knowledge graphs, facilitating automatic computer processing and querying; it establishes a unified specification information storage format, improving data consistency and maintainability; it accurately understands the semantic relationships in specification documents, effectively identifies specification constraints, and avoids specification execution deviations caused by contextual misunderstandings; it establishes a systematic knowledge base of technical specifications for railway lines adjacent to operating lines, supporting multi-dimensional queries and verification; it achieves standardized management and dynamic updating of specification knowledge; it supports the unified integration of specification documents from different standards and versions, establishing a consistent mapping of specification information; and it enables specification conflict detection and resolution, improving the level of intelligent specification management.

[0041] To further facilitate automated computer processing and querying, a method for constructing a technical specification database based on a context-aware specification parsing algorithm is provided in this application embodiment. (See also...) Figure 2 Before obtaining the standardized technical specification document, the process also includes: Step 400: Obtain the aforementioned technical specification document; Step 500: Identify and parse the acquired technical specification documents in different formats to obtain structured text; Step 600: Clean the structured text to obtain the corresponding cleaned structured text; Step 700: Perform standardized recognition on the cleaned structural text to generate corresponding standardized technical specification documents.

[0042] In one or more embodiments of this application, railway technical specification documents are cleaned, segmented, and formatted to remove noise and ensure text quality.

[0043] To further enhance the ability of proactive channel shaping and resource coordination in dynamic environments, this application provides a method for constructing a technical specification database based on a context-aware specification parsing algorithm, see [link to relevant documentation]. Figure 3 Step 600 includes: Step 610: Clean the received structured text by removing headers, footers, table borders, and redundant whitespace characters to obtain the cleaned structured text.

[0044] In one or more embodiments of this application, regular expressions are used to remove formatting information such as headers, footers, and table borders; a sentence segmentation algorithm based on punctuation and semantic rules is used to divide long paragraphs into semantically complete sentences; and special symbols, units, and numerical values ​​are standardized.

[0045] To further improve data consistency and maintainability, this application provides a method for constructing a technical specification database based on a context-aware specification parsing algorithm, see [link to relevant documentation]. Figure 4 Step 700 includes: Step 710: Standardize the units and numerical expressions in the cleaned structured text, and use a sentence segmentation algorithm based on a combination of rules and machine learning to identify semantically complete sentences and clause structures in the cleaned structured text, and generate the corresponding standardized technical specification document.

[0046] In one or more embodiments of this application, the railway technical specification document is first identified by format recognition, detecting document types such as Word, PDF, Excel, etc., and the corresponding document parsing engine is called to convert the document into structured XML format, preserving the hierarchical structure information of the document. Subsequently, the parsed text undergoes multi-level cleaning processing, using regular expressions to remove redundant whitespace characters and HTML tag residues, identifying and removing header and footer information, while retaining the main text content, unifying various units into standard formats such as "meter" to "m", "millimeter" to "mm", "volt" to "V", etc., and standardizing numerical expressions such as "3.5 meters" to "3.5m" and "220 volts" to "220V", etc. Finally, a sentence segmentation algorithm combining rule-based and machine learning methods is adopted. This algorithm first uses period, question mark, and exclamation mark as basic sentence segmentation symbols through rule-based methods, combined with railway engineering punctuation such as ":" and ";" for preliminary sentence segmentation. Then, a semantic rule-based sentence segmentation algorithm is used to identify the semantically complete sentence boundaries. This algorithm determines whether a sentence is semantically complete by analyzing its grammatical structure, semantic completeness, and contextual dependencies, avoiding sentence segmentation at semantically incomplete locations. At the same time, it identifies the text structure based on indentation, blank lines, and numbering patterns, providing standardized technical specifications for subsequent semantic analysis.

[0047] To further improve data consistency and maintainability, in a technical specification database construction method based on a context-aware specification parsing algorithm provided in this application embodiment, the entity data includes entity information data and entity relationship data; correspondingly, see... Figure 5 Step 200 includes: Step 210: Input the standardized technical specification document into the Transformer model, so that the Transformer model can perform semantic parsing and feature extraction on the received standardized technical specification document based on the context-aware specification parsing algorithm to obtain the corresponding feature vector; In step 210, the standardized technical specification document is segmented using a sliding window. The window size is set to 512 tokens, and the overlap length is 128 tokens, generating multiple overlapping windows to ensure the continuity of contextual information. A sparse attention mechanism is applied to each window, calculating three attention modes: local window attention, random attention, and step-size attention, to improve the performance of traditional... The complexity is reduced to or This approach effectively handles long sequences, making it particularly suitable for processing long documents with high structure and strong local relevance, such as railway technical specifications. Based on the attention output of each window, a three-layer feature extraction process is performed: a domain-specific vocabulary embedding layer maps railway terminology to a high-dimensional vector space; a grammatical structure analysis layer identifies structural information such as clause numbers, conditional statements, and list items; and a semantic relation encoding layer captures relational semantics such as control, connection, and requirements.

[0048] Step 220: Perform domain entity recognition on the feature vector to obtain multiple entity information data; In step 220, a domain-adaptive sequence labeling algorithm is used to identify five core entities based on the BILOU labeling system. The BILOU labeling system is an improved sequence labeling method that marks each token as one of five states: B (Begin, entity start), I (Inside, entity interior), L (Last, entity end), O (Outside, non-entity), and U (Unit, single-character entity). This labeling system can accurately represent the boundary information of entities, avoiding the problem of ambiguous entity boundaries in traditional BIO labeling systems. In the field of railway engineering, the BILOU labeling system is particularly suitable for handling complex technical terms, such as "reinforced concrete beam" and "contact wire support," accurately identifying the start and end positions of entities. Five core entity categories and their BILOU annotation rules are defined, including equipment entities such as signals, turnouts, and track circuits; parameter entities such as distance, voltage, and time; time entities such as construction time and maintenance cycle; location entities such as tunnel interiors, sections, and stations; and specification entities such as TB standards and GB standards. A domain-adaptive sequence labeling algorithm is used to train an entity recognition model to perform entity recognition on specification documents, identifying various equipment, parameter, time, location, and specification entities. Fifteen core relationship types are defined, including spatial relationships such as located, connected, spanned, and adjacent; temporal relationships such as occurred, continuous, sequential, and simultaneous; functional relationships such as control, monitoring, influence, and protection; and constraint relationships such as requirement, prohibition, restriction, and recommendation. A pointer network architecture is used to achieve end-to-end relationship extraction. An encoder-decoder structure simultaneously identifies entity boundaries and relationship types, recognizing the relationships between various entities. The entity recognition formula is expressed as follows: in, This represents the global conditional probability of generating a target labeled sequence y given an input sequence x. This indicates the index of the currently processed token in the sequence. Indicates the total length of the sequence. The symbol represents the product of probabilities at all positions in a sequence, where x is the input sequence and y is the labeled sequence. This represents the conditional probability.

[0049] Step 230: Perform relationship identification and extraction on the feature vector and multiple entity information data to obtain the entity relationship data corresponding to each entity information data.

[0050] In step 230, an end-to-end relation extraction algorithm is used to identify complex relationships between entities. This method transforms relation extraction into a sequence-to-sequence generation task, using a multi-head attention mechanism to capture long-distance dependencies between entities. It simultaneously identifies entity boundaries and relation types based on a pointer network architecture. The end-to-end relation extraction algorithm is a method that unifies entity recognition and relation extraction by using an encoder-decoder structure to jointly extract entities and relations. Specifically, the encoder uses a bidirectional LSTM to encode the input sequence, obtaining a contextual representation for each position; the decoder uses a pointer network mechanism, with two pointers pointing to the start and end positions of the entity, simultaneously predicting the entity type and relation type. The advantage of this method is that it can fully utilize the interdependencies between entity recognition and relation extraction, improving the overall extraction effect. In the field of railway engineering, the end-to-end relation extraction algorithm can effectively handle complex engineering relationships, such as "signal control of turnouts" and "tunnel connecting bridges."

[0051] The relation extraction formula is expressed as follows: in, For entity pairs, s represents the sentence context. For the corresponding vector representation, A weight matrix is ​​used to classify relationships. The algorithm classifies and verifies relationships using predefined relationship patterns (such as RELATION_PATTERNS), accurately identifying various relationship types, including numerical constraint relationships (such as "minimum spacing" and "maximum voltage"), spatial relationships (such as "located in" and "nearby"), and functional relationships (such as "control" and "connection"). This method is particularly suitable for handling complex numerical constraints and logical relationships in railway technical specifications.

[0052] To further avoid deviations in specification execution caused by errors in context understanding, this application provides a method for constructing a technical specification database based on a context-aware specification parsing algorithm. The context-aware specification parsing algorithm includes using a sliding window mechanism to segment long text in the standardized technical specification document; and using a sparse attention mechanism to perform semantic parsing and feature extraction on the received technical specification document to generate the feature vector.

[0053] In one or more embodiments of this application, a sliding window mechanism is used to process extremely long documents. The algorithm first divides the document into segments according to a window size W. For each window, the algorithm calculates the attention weights between tokens within it, while also considering cross-window contextual information. Sparse attention is an optimized attention computation method whose core idea is to calculate the attention weights only between a subset of token pairs, rather than calculating the attention weights for all token pairs.

[0054] To further avoid deviations in specification execution caused by errors in context understanding, in a method for constructing a technical specification database based on a context-aware specification parsing algorithm provided in this application embodiment, the sparse attention mechanism includes: calculating local window attention, calculating random attention, and calculating step-size attention.

[0055] In one or more embodiments of this application, the sparse attention mechanism limits the scope of attention computation through predefined attention patterns (such as local window attention, random attention, step-size attention, etc.), thus reducing the traditional... The complexity is reduced to or This allows for the processing of longer sequences. This mechanism is particularly well-suited for handling long documents with high levels of structure and strong local dependencies, such as railway technical specifications.

[0056] To further establish a systematic knowledge base of technical specifications for railway lines adjacent to operational lines, support multi-dimensional queries and verification, realize specification conflict detection and resolution, and improve the intelligence level of specification management, a method for constructing a technical specification database based on a context-aware specification parsing algorithm provided in this application embodiment includes step 300: Step 310: Align and deduplicate each entity information data and the corresponding entity relationship data to obtain multiple standardized entity relationship data; In step 310, to address potential duplication and redundancy issues in knowledge extracted from different sources, an entity dictionary based on railway technical specification data is first constructed, establishing a standardized entity name mapping table that includes standard names, aliases, abbreviations, and other variant forms of entities. Subsequently, a cosine similarity algorithm is used for entity matching, calculating the similarity across multiple dimensions such as entity name, attributes, and context. A similarity threshold is set to determine whether entities belong to the same object. Entities with similarity exceeding the threshold are merged using an entity alignment algorithm, updating the entity information in the knowledge graph and systematically removing identified duplicate or highly similar entities, thereby improving the overall quality, accuracy, and consistency of the knowledge graph. Simultaneously, numerical standardization is implemented, unifying numerical values ​​from different formats into a standard format; entity aliasing is implemented, establishing a mapping relationship between entity aliases and standard names; and relation standardization is implemented, unifying relations expressed in different ways into a standard relation type, ensuring the uniformity and accuracy of extracted knowledge.

[0057] Step 320: Use each entity information data as a node and each standardized entity relationship data as an edge to generate or update the corresponding knowledge graph and store it in the preset technical specification database.

[0058] In step 320, the extracted and fused knowledge is converted into a structured and standardized format suitable for a knowledge graph. A bidirectional collaborative approach is used to construct the knowledge graph. The top-down approach is used to build the schema layer, defining abstract element concepts, relation types, and constraints, and establishing a domain ontology model. The bottom-up approach is used to build the data layer, acquiring and populating standardized knowledge units, and instantiating the identified entities and relations into the knowledge graph. Finally, the knowledge from railway technical specifications is stored in the Neo4j database in the form of triples. The stored knowledge mainly covers key information such as equipment parameters, construction requirements, quality standards, and technical specifications in various professional fields of railway engineering, as well as the complex interrelationships between these elements, providing a structured knowledge foundation for subsequent compliance verification.

[0059] To further achieve standardized management and dynamic updating of specification knowledge, in a method for constructing a technical specification database based on a context-aware specification parsing algorithm provided in this application embodiment, the method further includes: Step 401: When a new version of the standardized technical specification document is obtained, the new version of the standardized technical specification document is semantically compared with the corresponding original version of the standardized technical specification document to obtain the corresponding change content data; In step 401, when a new technical specification document is released, newly added, modified, and deleted content is automatically identified. The new document undergoes preprocessing and feature extraction to obtain its semantic representation. A document similarity calculation algorithm compares the semantic representations of the old and new documents to identify changed areas. The document similarity calculation employs a hybrid algorithm based on TF-IDF and cosine similarity, combined with semantic similarity calculation, to ensure the accuracy of change detection. The change detection formula is expressed as follows: in, This represents the overall semantic similarity metric between the old and new document versions (used to assess the degree of change). This represents the preset importance weight coefficient corresponding to the i-th semantic segment. Semantic fragments between old and new documents. This is a semantic similarity function.

[0060] Step 402: Perform entity recognition and relation extraction on the changed content data to obtain the corresponding incremental knowledge set; In step 402, entity identification and relationship extraction are performed on the changed area to generate incremental knowledge.

[0061] Step 403: Compare the incremental knowledge set with the current knowledge graph, and perform numerical conflict, logical conflict and temporal conflict detection based on predefined conflict rules and similarity algorithms to obtain the corresponding conflict detection results; In step 403, conflicts between new knowledge and the existing knowledge graph are detected using predefined rules and a similarity algorithm. The specific implementation of conflict detection includes four steps: First, the system defines conflict detection rules, including numerical conflict rules (such as different values ​​of the same parameter), logical conflict rules (such as contradictory conditions), and temporal conflict rules (such as inconsistent time order). Then, the newly extracted knowledge is matched against these rules to identify potential conflicts. Next, the severity of the conflict is calculated using a similarity algorithm. Finally, a conflict report is generated, including the conflict type, conflicting entities, conflict causes, and resolution suggestions.

[0062] Step 404: Based on the conflict detection results, update the current knowledge graph to obtain the updated knowledge graph, and store it in the preset technical specification database.

[0063] In step 404, the knowledge graph is automatically updated based on the conflict detection results to maintain its timeliness and accuracy. The specific implementation of knowledge evolution includes three steps: First, the system determines the update strategy based on the conflict detection results, including adding, modifying, deleting, and merging; then, the corresponding update operation is executed, while maintaining the integrity constraints of the knowledge graph; finally, the metadata of the knowledge graph is updated, including version information, update time, and update source.

[0064] In one or more embodiments of this application, when a new technical specification document is released or an existing specification is updated, the system automatically performs incremental update processing. First, a document version comparison algorithm is used to identify newly added, modified, and deleted content, calculate the semantic differences between the old and new documents, and identify changed areas. Then, entity recognition and relation extraction are performed on the changed areas to generate incremental knowledge. Conflicts between the new knowledge and the existing knowledge graph are detected using predefined rules and similarity algorithms, including numerical conflicts, logical conflicts, and temporal conflicts. Based on the conflict detection results, the system automatically updates the knowledge graph, employing strategies such as adding, modifying, deleting, and merging to handle knowledge changes. Simultaneously, the system maintains the integrity constraints of the knowledge graph, updating its metadata, including version information, update time, and update source, to ensure the timeliness and accuracy of the knowledge graph, achieving dynamic evolution and continuous optimization of the knowledge graph.

[0065] To further achieve standardized management and dynamic updating of specification knowledge, in a method for constructing a technical specification database based on a context-aware specification parsing algorithm provided in this application embodiment, the method further includes: Step 800: The knowledge graph is quality-assessed using a manually labeled test set. The quality assessment includes accuracy assessment, completeness check, and consistency verification. The accuracy assessment uses precision, recall, and F1 score to evaluate the performance of the entity recognition and relation extraction model. The completeness check calculates the coverage of knowledge extraction to the key content of the standardized document, with a coverage target not lower than a preset coverage value. The consistency verification checks the numerical, logical, and temporal consistency within the knowledge graph based on predefined logical rules.

[0066] In step 800, the accuracy, recall, and F1 score of entity recognition and relation extraction are evaluated using a manually labeled test set. The extracted knowledge is ensured to cover the main content of the technical specification document, evaluated using a coverage metric. The integrity check is implemented in three steps: First, the system analyzes the structure of the technical specification document, identifying key content areas such as clauses, articles, charts, and tables; then, the knowledge extraction coverage rate for each area is calculated, defined as the ratio of extracted knowledge to total knowledge; finally, the overall coverage rate is calculated, with a target coverage rate ≥ 85%. Logical conflicts and contradictions within the knowledge graph are checked to ensure the consistency and reliability of the knowledge. The consistency verification is implemented in four steps: First, the system defines consistency check rules, including logical consistency rules, numerical consistency rules, and temporal consistency rules; then, the knowledge graph is matched against these rules to identify inconsistent knowledge; next, the reasons for inconsistency are analyzed, including data errors, rule conflicts, and model errors; finally, a consistency report is generated, including inconsistent knowledge, reasons for inconsistency, and remediation suggestions.

[0067] Understandably, a comprehensive quality assessment of the constructed knowledge graph is necessary, including accuracy evaluation, completeness checks, and consistency verification. Accuracy evaluation verifies the accuracy, recall, and F1 score of entity recognition and relation extraction using manually annotated test sets, ensuring the model performance meets expected goals. Completeness checks analyze the structure of the specification document and calculate the knowledge extraction coverage of key content areas, ensuring the extracted knowledge covers the main content of the technical specification document. Consistency verification checks for logical conflicts and contradictions within the knowledge graph using predefined logical rules, including numerical consistency, logical consistency, and temporal consistency, ensuring the consistency and reliability of knowledge and providing quality assurance for subsequent applications of the knowledge graph.

[0068] In a specific application example of a technical specification database construction method based on a context-aware specification parsing algorithm, see [link to relevant documentation]. Figure 6 and Figure 7 The method includes: First, the railway technical specification documents undergo format recognition, detecting document types such as Word, PDF, and Excel. The corresponding document parsing engine is then used to convert the documents into structured XML format, preserving the document's hierarchical structure information. Subsequently, the parsed text undergoes multi-level cleaning processing, using regular expressions to remove redundant whitespace characters and residual HTML tags, identifying and removing header and footer information while retaining the main text content. Various units are standardized to standard formats, such as "meter" to "m", "millimeter" to "mm", and "volt" to "V". Numerical expressions are also standardized, such as converting "3.5 meters" to "3.5m" and "220 volts" to "220V". Finally, a sentence segmentation algorithm combining rule-based and machine learning methods is adopted. This algorithm first uses period, question mark, and exclamation mark as basic sentence segmentation symbols through rule-based methods, combined with railway engineering punctuation such as ":" and ";" for preliminary sentence segmentation. Then, a semantic rule-based sentence segmentation algorithm is used to identify the semantically complete sentence boundaries. This algorithm determines whether the sentence is semantically complete by analyzing the sentence's grammatical structure, semantic completeness, and contextual dependencies, avoiding sentence segmentation at semantically incomplete positions. At the same time, it identifies the text structure based on indentation, blank lines, and numbering patterns, providing a standardized input format for subsequent semantic analysis.

[0069] The preprocessed document is segmented using sliding windows, with a window size of 512 tokens and an overlap length of 128 tokens, generating multiple overlapping windows to ensure the continuity of contextual information. A sparse attention mechanism is applied to each window, employing three attention modes—local window attention, random attention, and step-size attention—to reduce the complexity of traditional methods, thus effectively handling long sequences. This is particularly suitable for long documents with high structure and strong local relevance, such as railway technical specifications. Based on the attention output of each window, a three-layer feature extraction process is performed: a domain vocabulary embedding layer maps railway terminology to a high-dimensional vector space; a syntactic structure analysis layer identifies structural information such as clause numbers, conditional statements, and list items; and a semantic relation encoding layer captures relational semantics such as control, connection, and requirement relationships.

[0070] Five core entity categories and their BILOU annotation rules are defined, including equipment entities such as signals, turnouts, and track circuits; parameter entities such as distance, voltage, and time; time entities such as construction time and maintenance cycle; location entities such as tunnel interiors, sections, and stations; and specification entities such as TB standards and GB standards. A domain-adaptive sequence labeling algorithm is used to train an entity recognition model to perform entity recognition on specification documents, identifying various equipment, parameter, time, location, and specification entities. Fifteen core relationship types are defined, including spatial relationships such as located, connected, spanned, and adjacent; temporal relationships such as occurred, continuous, sequential, and simultaneous; functional relationships such as control, monitoring, influence, and protection; and constraint relationships such as requirement, prohibition, restriction, and recommendation. A pointer network architecture is used to achieve end-to-end relationship extraction. An encoder-decoder structure simultaneously identifies entity boundaries and relationship types, recognizing the relationships between various entities.

[0071] This paper proposes an end-to-end relation extraction algorithm to identify complex relationships between entities. The method transforms relation extraction into a sequence-to-sequence generation task, employing a multi-head attention mechanism to capture long-distance dependencies between entities. The algorithm classifies and verifies relationships using predefined relation patterns (such as RELATION_PATTERNS), accurately identifying various relation types including numerical constraints (such as "minimum spacing" and "maximum voltage"), spatial relationships (such as "located in" and "nearby"), and functional relationships (such as "control" and "connection"). This method is particularly suitable for handling complex numerical constraints and logical relationships in railway technical specifications.

[0072] To address potential duplication and redundancy in knowledge extracted from different sources, an entity dictionary based on railway technical specifications data was first constructed, establishing a standardized entity name mapping table that includes standard names, aliases, abbreviations, and other variant forms of entities. Subsequently, a cosine similarity algorithm was used for entity matching, calculating similarity across multiple dimensions such as entity name, attributes, and context. A similarity threshold was set to determine whether entities belong to the same object. Entities with similarity exceeding the threshold were merged using an entity alignment algorithm, updating the entity information in the knowledge graph. This systematically removed identified duplicate or highly similar entities, thereby improving the overall quality, accuracy, and consistency of the knowledge graph. Simultaneously, numerical standardization was implemented, unifying numerical values ​​from different formats to a standard format. Entity aliasing was implemented, establishing a mapping relationship between entity aliases and standard names. Relationship standardization was also implemented, unifying relationships expressed in different ways into a standard relationship type, ensuring the consistency and accuracy of extracted knowledge.

[0073] The extracted and fused knowledge is transformed into a structured and standardized format suitable for knowledge graphs. A bidirectional collaborative approach is used to construct the knowledge graph. A top-down approach is used to build the schema layer, defining abstract element concepts, relation types, and constraints, and establishing a domain ontology model. A bottom-up approach is used to build the data layer, acquiring and populating standardized knowledge units, and instantiating identified entities and relations into the knowledge graph. Finally, the knowledge from railway technical specifications is stored in the Neo4j database as triples. The stored knowledge mainly covers key information such as equipment parameters, construction requirements, quality standards, and technical specifications from various professional fields of railway engineering, as well as the complex interrelationships between these elements, providing a structured knowledge foundation for subsequent compliance verification.

[0074] When new technical specifications are released or existing specifications are updated, the system automatically performs incremental updates. First, it uses a document version comparison algorithm to identify added, modified, and deleted content, calculates the semantic differences between the old and new documents, and identifies the changed areas. Then, it performs entity recognition and relation extraction on the changed areas to generate incremental knowledge. It uses predefined rules and similarity algorithms to detect conflicts between the new knowledge and the existing knowledge graph, including numerical conflicts, logical conflicts, and temporal conflicts. Based on the conflict detection results, the system automatically updates the knowledge graph, using strategies such as adding, modifying, deleting, and merging to handle knowledge changes. Simultaneously, it maintains the integrity constraints of the knowledge graph, updating its metadata, including version information, update time, and update source, to ensure the timeliness and accuracy of the knowledge graph and achieve dynamic evolution and continuous optimization.

[0075] A comprehensive quality assessment of the constructed knowledge graph is conducted, including accuracy evaluation, completeness checks, and consistency verification. Accuracy evaluation verifies the accuracy, recall, and F1 score of entity recognition and relation extraction using manually annotated test sets, ensuring the model performance meets expected goals. Completeness checks analyze the structure of the specification document and calculate the knowledge extraction coverage of key content areas, ensuring that the extracted knowledge covers the main content of the technical specification document. Consistency verification checks for logical conflicts and contradictions within the knowledge graph using predefined logical rules, including numerical consistency, logical consistency, and temporal consistency, ensuring the consistency and reliability of knowledge and providing quality assurance for the subsequent applications of the knowledge graph.

[0076] This application also provides an electronic device disposed on a bidirectional smart metasurface of a movable element. The electronic device may include a processor, a memory, a receiver, and a transmitter. The processor is used to execute the technical specification database construction method based on the context-aware specification parsing algorithm mentioned in the above embodiments. The processor and memory can be connected via a bus or other means, taking a bus connection as an example. The receiver can be connected to the processor and memory via wired or wireless means.

[0077] The processor can be a central processing unit (CPU). The processor can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or combinations of the above types of chips.

[0078] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as the program instructions / modules corresponding to the technical specification database construction method based on the context-aware specification parsing algorithm in the embodiments of this application. The processor executes various functional applications and data processing by running the non-transitory software programs, instructions, and modules stored in the memory, thereby implementing the technical specification database construction method based on the context-aware specification parsing algorithm in the above method embodiments.

[0079] The memory may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created by the processor, etc. Furthermore, the memory may include high-speed random access memory and non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory may optionally include memory remotely located relative to the processor, which can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0080] The one or more modules are stored in the memory, and when executed by the processor, the technical specification database construction method based on the context-aware specification parsing algorithm in the embodiment is executed.

[0081] In some embodiments of this application, the user equipment may include a processor, a memory, and a transceiver unit. The transceiver unit may include a receiver and a transmitter. The processor, memory, receiver, and transmitter may be connected via a bus system. The memory is used to store computer instructions, and the processor is used to execute the computer instructions stored in the memory to control the transceiver unit to send and receive signals.

[0082] As one implementation method, the functions of the receiver and transmitter in this application can be implemented by transceiver circuits or dedicated transceiver chips, and the processor can be implemented by dedicated processing chips, processing circuits or general-purpose chips.

[0083] As another implementation approach, the server provided in this application embodiment can be implemented using a general-purpose computer. That is, the program code implementing the processor, receiver, and transmitter functions is stored in memory, and the general-purpose processor implements the processor, receiver, and transmitter functions by executing the code in memory.

[0084] This application also provides a computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements the steps of the aforementioned method for constructing a technical specification database based on a context-aware specification parsing algorithm. The computer-readable storage medium can be a tangible storage medium, such as random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, floppy disks, hard disks, removable storage disks, CD-ROMs, or any other form of storage medium known in the art.

[0085] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the aforementioned method for constructing a technical specification database based on a context-aware specification parsing algorithm.

[0086] Those skilled in the art will understand that the exemplary components, systems, and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software, or a combination of both. Whether implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application. When implemented in hardware, it can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. The programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave.

[0087] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.

[0088] In this application, features described and / or illustrated for one embodiment may be used in the same or similar manner in one or more other embodiments, and / or combined with or in place of features of other embodiments.

[0089] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to the embodiments of this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A method for constructing a technical specification database based on a context-aware specification parsing algorithm, characterized in that, The method includes: Obtain standardized technical specification documents; wherein, the standardized technical specification documents are generated in advance after preprocessing the obtained technical specification documents in the data preprocessing module; The standardized technical specification document is input into the Transformer model, so that the Transformer model performs perceptual extraction processing on the standardized technical specification document based on the context-aware specification parsing algorithm to generate multiple corresponding entity data. Each entity data is deduplicated, and the deduplicated entity data is used as a node, and the preset core relationship between the entity data is used as an edge to generate or update the corresponding knowledge graph, which is then stored in a preset technical specification database.

2. The method according to claim 1, characterized in that, Before obtaining the standardized technical specification document, the following is also included: Obtain the aforementioned technical specification document; The acquired technical specification documents in different formats are identified and parsed to obtain structured text; The structured text is cleaned to obtain the corresponding cleaned structured text; The cleaned structural text is then subjected to standardized recognition to generate corresponding standardized technical specification documents.

3. The method according to claim 2, characterized in that, The step of cleaning the structured text to obtain the corresponding cleaned structured text includes: The received structured text is cleaned by removing headers, footers, table borders, and redundant whitespace characters to obtain the cleaned structured text.

4. The method according to claim 2, characterized in that, The step of standardizing and recognizing the cleaned structural text to generate a corresponding standardized technical specification document includes: The units and numerical expressions in the cleaned structural text are standardized, and a sentence segmentation algorithm based on a combination of rules and machine learning is used to identify semantically complete sentences and clause structures in the cleaned structural text, generating the corresponding standardized technical specification document.

5. The method according to claim 1, characterized in that, The entity data includes entity information data and entity relationship data; Correspondingly, the step of inputting the standardized technical specification document into the Transformer model, so that the Transformer model performs perceptual extraction processing on the standardized technical specification document based on a context-aware specification parsing algorithm to generate multiple corresponding entity data, includes: The standardized technical specification document is input into the Transformer model, so that the Transformer model performs semantic parsing and feature extraction on the received standardized technical specification document based on the context-aware specification parsing algorithm to obtain the corresponding feature vector; Domain entity recognition is performed on the feature vector to obtain multiple entity information data; Relationship identification and extraction are performed on the feature vector and multiple entity information data to obtain the entity relationship data corresponding to each entity information data.

6. The method according to claim 1, characterized in that, The context-aware specification parsing algorithm includes using a sliding window mechanism to segment long text in the standardized technical specification document; and using a sparse attention mechanism to perform semantic parsing and feature extraction on the received technical specification document to generate the feature vector.

7. The method according to claim 6, characterized in that, The sparse attention mechanism includes: calculating local window attention, calculating random attention, and calculating step-size attention.

8. The method according to claim 5, characterized in that, The process of deduplicating each entity data point, using the deduplicated entity data points as nodes, and using the preset core relationships between the entity data points as edges, generates or updates the corresponding knowledge graph and stores it in a preset technical specification database, including: Alignment and deduplication processing is performed on each of the entity information data and the entity relationship data corresponding to each of the entity information data to obtain multiple standardized entity relationship data; Each entity information data is used as a node, and each standardized entity relationship data is used as an edge to generate or update the corresponding knowledge graph, and store it in a preset technical specification database.

9. The method according to claim 1, characterized in that, The method further includes: When a new version of the standardized technical specification document is obtained, the new version of the standardized technical specification document is semantically compared with the corresponding original version of the standardized technical specification document to obtain the corresponding change content data; Entity identification and relationship extraction are performed on the changed content data to obtain the corresponding incremental knowledge set; The incremental knowledge set is compared with the current knowledge graph, and numerical conflict, logical conflict and temporal conflict are detected based on predefined conflict rules and similarity algorithms to obtain the corresponding conflict detection results. Based on the conflict detection results, the current knowledge graph is updated to obtain the updated knowledge graph, which is then stored in a preset technical specification database.

10. The method according to claim 9, characterized in that, The method further includes: The knowledge graph is quality-assessed using a manually labeled test set. The quality assessment includes accuracy assessment, completeness check, and consistency verification. The accuracy assessment uses precision, recall, and F1 score to evaluate the performance of the entity recognition and relation extraction model. The completeness check calculates the coverage of knowledge extraction to the key content of the standard document, with a coverage target not lower than a preset coverage value. The consistency verification checks the numerical, logical, and temporal consistency within the knowledge graph based on predefined logical rules.