Railway standard specification digital processing method based on large model and knowledge graph
Through the method of combining large models and knowledge graphs, the problem of converting railway standards and specifications from PDF to structured output is solved, efficient and accurate digital processing is achieved, and automation level and machine readability are improved.
Patent Information
- Application Number
- CN202510529496.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2025-08-08
AI Technical Summary
The prior art is difficult to efficiently convert railway standard specifications from PDF formats to machine-readable structured forms, and lacks accurate semantic understanding capabilities, resulting in inefficient digital processing.
Using a method of combining large models and knowledge graphs, the conversion from PDF to structured output is realized through railway standard specification preprocessing, term knowledge graph construction, semantic splitting and combination and structured output. The big model is used to extract keywords and expand the collection of synonyms and conjunctions through knowledge graphs.
It improves the digital processing efficiency and accuracy of railway standards and specifications, realizes machine-readable structured output, reduces manual intervention, and improves the level of automation.
Smart Images

Figure CN120448556A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of railway engineering management, and in particular to a method for digitally processing railway standards and specifications based on a large model and a knowledge graph. Background Art
[0002] Standards and specifications are an important basis for railway survey and design, construction, operation and maintenance. The digitization of railway standards and specifications is an important part of building digital railways.
[0003] The digitization of railway standards and specifications refers to the process of converting traditional paper-based standards and specifications into electronic formats and managing, applying, and disseminating them through information technology. The digitization of standards and specifications is divided into Stage 0, represented by traditional text formats (such as TXT), Stage 1, represented by open digital formats (such as PDF), Stage 2, represented by machine-readable files (such as XML), Stage 3, represented by machine-understandable content (such as knowledge semanticization), and Stage 4, represented by machine-interactive content (such as automatic content generation).
[0004] Currently, existing railway industry and national standards primarily cover equipment technology, engineering construction (including construction costs), and transportation services. Due to the long time spans over which standards are released and their storage format (PDF, including both readable PDFs converted from Word and unreadable PDFs converted from scanned images), digitizing railway standards into machine-readable formats is a massive undertaking. Furthermore, structural processing and keyword extraction rely on the subjective judgment of human interpreters, making full implementation difficult.
[0005] With the development of technology, large models have been widely used. Large models refer to deep learning models with a large number of parameters and a large model size. They can learn rich feature representations and knowledge in natural language and are widely used in semantic understanding, content organization, document generation, etc. However, because they are trained on general corpora and lack vertical domain knowledge, they cannot accurately identify the terms in railway standards and specifications, resulting in errors in the semantic understanding of railway standards and specifications. Summary of the Invention
[0006] In order to improve the efficiency of digital processing of railway standards and specifications, the present invention provides a digital processing method for railway standards and specifications based on a large model and a knowledge graph. The digital processing method for railway standards and specifications of the present invention converts railway standards and specifications documents in PDF format into structured output results (xml files), thereby realizing efficient digital processing of railway standards and specifications.
[0007] To this end, the present invention adopts the following technical solutions:
[0008] A method for digital processing of railway standards and specifications based on a large model and knowledge graph includes the following steps:
[0009] S1, railway standard specification preprocessing: extract all identification blocks of N railway standard specification documents in PDF format, filter and extract paragraphs to obtain a paragraph set, and then obtain an output result set;
[0010] S2, constructing the railway standard and specification terminology knowledge graph: extracting terms, defining entity classes and relationship classes in the railway standard and specification terminology knowledge graph, creating sets of standard class entities and terminology class entities, establishing inclusion relationships, related relationships, and related relationships, and obtaining the railway standard and specification terminology knowledge graph;
[0011] S3, using the railway standard specification terminology knowledge graph to perform semantic splitting, combination, and semantic extraction on the paragraph set in the output result set, to obtain a standardized output of N railway standard specification documents;
[0012] S4, structured output of railway standard specifications: structure the specification output of the railway standard specification document so that it can be automatically recognized by a machine to obtain a structured output result.
[0013] In the above method, step S1 includes the following sub-steps:
[0014] S1-1, obtaining recognition blocks: using the open source PDF-Extract-Kit tool, extract all recognition blocks from a railway standard specification document in PDF format to obtain multiple recognition block sets corresponding to the railway standard specification document, with each page of the document corresponding to one recognition block set;
[0015] S1-2, data cleaning: Filter and obtain recognition blocks with the type attribute of title and plain text from multiple recognition block sets of the railway standard specification document to obtain recognition block set A; traverse recognition block set A and extract paragraphs from each recognition block to obtain paragraph set B;
[0016] S1-3, the file name of the railway standard specification document is used as filename, and filename and paragraph set B are used as output results;
[0017] S1-4, repeatedly executing S1-1 to S1-3 until an output result set corresponding to N railway standard specification documents in PDF format is obtained.
[0018] In the above method, the method for extracting paragraphs in the identified block in step S1-2 is:
[0019] According to the position attribute of the recognition block, obtain the content-type recognition blocks contained in the page position of the recognition block in the recognition block set corresponding to the page where the recognition block is located; if the number of content-type recognition blocks contained in the page position where the recognition block is located is 1, use the text content of the text attribute or latex attribute of the content-type recognition block as a paragraph; if the number of content-type recognition blocks contained in the page position where the recognition block is located in the recognition block is greater than 1, splice the text contents in the text attributes or latex attributes of the obtained content-type recognition blocks in order from top to bottom and from left to right, and use the spliced text content as a paragraph.
[0020] In the above method, step S2 includes the following sub-steps:
[0021] S2-1, term extraction: extract the term name, English, and definition of the term in each paragraph of a paragraph set B of an output result according to the term clause composition rules to obtain multiple term clause paragraphs. Manually check all term clause paragraphs and manually modify any errors or omissions. Make all the term clause paragraphs after manual inspection form a term clause paragraph set. Combine the filename of the output result and the term clause paragraph set to form a term clause output result. Repeat the above steps to form a set F of term clause output results corresponding to each output result in the output result set. Set F includes N term clause output results, that is, each railway standard specification document corresponds to one term clause output result.
[0022] S2-2, define the entity class and relationship class in the railway standard specification terminology knowledge graph; create a standard class entity based on the set F; traverse each term clause paragraph in the output result of a term clause in the set F, extract the term name in each term clause paragraph and create a term class entity to obtain the term class entity set; establish the standard class entity S i The inclusion relationship between each term-class entity in the term-class entity set; traverse the set F and repeat the above steps to obtain the standard class entity set C, each standard class entity S i The corresponding terminology entity set and each standard entity S i The inclusion relationship between each term-type entity in its corresponding term-type entity set; establishing the correlation relationship between term-type entities;
[0023] S2-3, establish similarity relationships between terminology entities: calculate the vectors of all terminology entities; calculate the cosine value between the vectors of any two terminology entities among all terminology entities as the similarity between the two terminology entities; create a similarity relationship for two terminology entities whose similarity between the terminology entities among all terminology entities is greater than the similarity threshold, and use the similarity between the two terminology entities as the correlation coefficient to obtain the railway standard specification terminology knowledge graph corresponding to N railway standard specification documents.
[0024] Wherein, step S2-2 includes:
[0025] S2-2-1, define the entity classes and relationship classes in the railway standard specification terminology knowledge graph:
[0026] Define entity classes, including standard entities (Standard) and term entities (Term);
[0027] Add attributes to standard class entities, including name and embedding.
[0028] Add attributes to the term entity: name, English, explain, and embedding;
[0029] Define relationship classes, including include, relate to, and similar to. Include is a directed association, from a standard entity to a term entity; relate to is a directed association, from a term entity to a term entity; similar to is an undirected association, from a term entity to a term entity. Similarity has a rate attribute, which is used to describe the similarity between two connected term entities.
[0030] S2-2-2, obtain the filename of a term clause output result in the set F of S2-1, and create a standard class entity, and set the "name" attribute value of the standard class entity to filename, and record the standard class entity as S i , i = 1…N, N is the total number of railway standards and specifications;
[0031] S2-2-3, traverse each terminology paragraph {term name, English, definition} in the terminology output result, extract the term name in each terminology paragraph and create a terminology entity, and obtain a terminology entity set corresponding to the terminology output result;
[0032] S2-2-4, establish standard class entity S iThe include relationship with each term-class entity in the term-class entity set;
[0033] S2-2-5, traverse the set F, repeat S2-2-2 to S2-2-4, and obtain the standard class entity set C = {S1, S2, ..., S N}, each standard entity in the standard entity set C corresponds one-to-one with each terminology output result in the set F, thereby obtaining the terminology entity set corresponding to each terminology output result in the set F;
[0034] S2-2-6, add the “name” attribute values of all term-type entities in all term-type entity sets to the dictionary of the Jieba tool;
[0035] S2-2-7, establish the related (relateto) relationship between term-type entities: use Jieba tool to semantically decompose the "explain" attribute of a term-type entity in all term-type entity sets to obtain a word list; traverse each word in the word list to determine whether the word is equal to the "name" attribute value of each term-type entity in all term-type entity sets. If they are equal, establish the related (relateto) relationship between the term-type entity and the term-type entity set; repeat the above operation for all term-type entities.
[0036] The method for obtaining the term entity set in step S2-2-3 includes:
[0037] (1) Create an empty term class entity set;
[0038] (2) Extract the term name in the jth term paragraph in the term article output result, and record it as termname;
[0039] (3) Determine whether a term-class entity with a "name" attribute value of termname already exists in the term-class entity set. If not, create a term-class entity and set the "name" attribute value of the term-class entity to termname. The term-class entity is recorded as T j , j = 1, 2, ... M, M is the number of terminology paragraphs in the terminology output result, read the English and definition in the terminology paragraph {term name, English, definition}, and set the terminology entity T j The "english" attribute value is read as "English", and the term class entity T is set j The "explain" attribute value is read as "explanation", and the term class entity T jAdd to the term entity set; if it exists, then set the "english" attribute value of the term entity with the "name" attribute value termname in the term entity set to the English in the j-th term clause paragraph, and set the "explain" attribute value of the term entity with the "name" attribute value termname in the term entity set to the explanation in the j-th term clause paragraph.
[0040] In the above method, step S3 includes the following sub-steps:
[0041] S3-1, using the large model prompt word engineering, traverse the paragraphs in the paragraph set B of an output result in the output result set of S1-4, and use the large model prompt word engineering to extract the second-level clauses in each paragraph to obtain a second-level clause set; based on the second-level clause set, re-split the paragraphs in the paragraph set B to obtain multiple {second-level clauses, newparagraph}; using the large model prompt word engineering, extract the third-level clause numbers in each newparagraph in the multiple {second-level clauses, newparagraph} to obtain a third-level clause number set; based on the third-level clause number set, re-split each newparagraph to obtain a set D, and finally each newparagraph obtains a set D; traverse the output result set, perform the above operation on each output result, and obtain multiple sets D corresponding to each output result, so that all sets D of N output results form a set E;
[0042] S3-2, extract the keywords of a para in the set E to obtain the keyword set; calculate the similarity between each keyword in the keyword set and each term-class entity in the term-class entity set of S2, select the term-class entities in the term-class entity set whose similarity is greater than the threshold, and use the "name" attribute value of the selected term-class entity to update the keyword set to obtain the updated keyword set; traverse the updated keyword set, extract the term-class entities in the term-class entity set that have a correlation and similarity relationship with the keyword, and obtain the synonym set and associated word set of the para; traverse the set E, perform the above steps on all paras, and obtain the standard output of N railway standard specification documents.
[0043] Step S3-1 specifically includes:
[0044] S3-1-1, using the large model prompt word project, extract the secondary clauses of each paragraph in the paragraph set B of an output result in the output result set of S1-4, and obtain the secondary clause set corresponding to the output result;
[0045] S3-1-2, based on the secondary clause set, re-split the paragraphs in the paragraph set B to obtain multiple {secondary clauses, newparagraph}:
[0046] Traverse each paragraph in paragraph set B. If there is a second-level clause in the current paragraph, the paragraph number, second-level clause and its line number in paragraph set B are combined to form the extraction result of the paragraph {second-level clause, paragraph number, line number}. If there is no second-level clause in the paragraph, perform the above operation on the next paragraph in paragraph set B until all paragraphs in paragraph set B are processed, so that the multiple extraction results corresponding to paragraph set B form an extraction result set in the order of extraction; traverse the extraction result set, if the paragraph number and line number between two adjacent extraction results differ by 1, merge the text from the line number of the extraction result with the smaller paragraph number to the line number of the extraction result with the larger paragraph number in all paragraphs of paragraph set B to obtain {second-level clause, newparagraph}, and then obtain multiple {second-level clauses, newparagraph} corresponding to paragraph set B;
[0047] S3-1-3, using the large model prompt word project, extract the third-level article number in each new paragraph in multiple {second-level articles, new paragraph} to obtain a set of third-level article numbers;
[0048] S3-1-4, in all newparagraphs of multiple {secondary articles, newparagraph}, traverse the set of third-level article numbers, concatenate the text from the first third-level article number to the second third-level article number in two adjacent third-level article numbers in the set of third-level article numbers, and output a set D. Finally, each {secondary article, newparagraph} obtains a set D;
[0049] S3-1-5, traverse and extract the output result set of S1-4, execute S3-1-1 to S3-1-5 for each output result, obtain multiple sets D corresponding to each output result, and make all sets D of N output results form set E.
[0050] The structured output results in step S4 include: file name, second-level articles, third-level articles, a keyword set of the third-level articles, a synonym set of the third-level articles, and a related word set of the third-level articles.
[0051] Compared with the prior art, the present invention has the following beneficial effects:
[0052] 1. This invention takes big model technology as its core, integrates the natural language semantic understanding capability of big models and the structured knowledge management capability of knowledge graphs, and realizes efficient digital processing of railway standards and specifications.
[0053] 2. The present invention establishes a railway standard specification terminology knowledge graph through intelligent extraction of standard terms, semantic decomposition of term interpretations, and intelligent calculation of term similarity, replacing the steps of establishing dictionaries and synonym lists in the traditional railway standard specification digital processing, and improving the automation level of digital processing.
[0054] 3. The present invention semantically decomposes the interpretation of each term, extracts a term set from the interpretation, establishes an association between the current term and the extracted term set, and based on this establishes a subgraph containing the terms and their associations, realizing intelligent calculation of term similarity based on the subgraph.
[0055] 4. The present invention intelligently identifies text in PDF documents and performs data cleaning on them to form machine-readable, structured recognition blocks. Based on the layout characteristics of railway standards and specifications, the second-level and third-level article numbers in the recognition blocks are extracted hierarchically based on a large model, realizing intelligent semantic splitting and combination from disordered recognition blocks to hierarchical specification articles.
[0056] 5. Based on the large model, the present invention extracts the keywords of each third-level specification article to form an initial keyword set, calculates the keyword similarity with the term entities in the railway standard specification terminology knowledge graph, expands the initial keyword set with term entities with high similarity, and automatically constructs synonyms and related word sets by querying the association of the added term entities in the knowledge graph, saving a lot of semantic alignment and semantic expansion work.
[0057] 6. Based on the knowledge graph, the present invention makes up for the lack of semantic understanding ability of large models in professional fields. By introducing a small amount of knowledge, the semantic understanding ability of large models is improved, thereby improving the accuracy of digital processing of railway standards and specifications, and providing essential data support for subsequent standard specification query and analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 is a flow chart of the railway standard specification digital processing method of the present invention;
[0059] Figure 2 This is a schematic diagram of the PDF intelligent recognition result of the railway standard specification digital processing method of the present invention;
[0060] Figure 3 Schematic diagram of railway standard specification term vector embedding of the railway standard specification digital processing method of the present invention;
[0061] Figure 4The railway standard specification terminology knowledge graph of the railway standard specification digital processing method of the present invention;
[0062] Figure 5 It is a schematic diagram of semantic index similarity calculation of the railway standard specification digital processing method of the present invention. DETAILED DESCRIPTION
[0063] The technical solution of the present invention is described in detail below with reference to the accompanying drawings and embodiments.
[0064] Example
[0065] like Figure 1 As shown in the figure, the digital processing method of railway standards and specifications based on the large model and knowledge graph includes the following steps:
[0066] S1, railway standard specification preprocessing: Extract multiple recognition block sets from a railway standard specification document in PDF format; filter and obtain recognition blocks with the title type attribute and plain text recognition blocks from the multiple recognition block sets to obtain recognition block set A; traverse recognition block set A and extract paragraphs from each recognition block to obtain a paragraph set; use the file name of the railway standard specification document as filename, and use filename and paragraph set B as the output result; repeat the above steps to obtain the output result set corresponding to N railway standard specification documents in PDF format. Specifically, it includes the following sub-steps:
[0067] S1-1, obtain identification blocks: Use the open source PDF-Extract-Kit tool to extract all identification blocks from a railway standard specification document in PDF format, and obtain multiple identification block sets corresponding to the railway standard specification document, with one identification block set corresponding to each page of the document; wherein the identification block sets are in markdown format.
[0068] Among them, in the identification block set of each page of the document, the identification blocks include layout identification blocks and content identification blocks;
[0069] The attributes of layout recognition blocks include: type (category_type), position (poly), and confidence (score). The type attributes of layout recognition blocks include: title (title), plain text (text block), abandon (header, footer, page number, comment), table (table), table caption (table title), figure (picture), isolate formula (formula);
[0070] Content-type identification blocks include: text identification blocks and inline identification blocks. The attributes of text identification blocks include: type (category_type), position (poly), confidence (score), and text. The attributes of inline identification blocks include: type (category_type), position (poly), confidence (score), and latex. The type attribute of text identification blocks is text, and the type attribute of (inline) identification blocks is inline.
[0071] The position attribute (poly) of each recognition block includes the upper left x-coordinate, upper left y-coordinate, upper right x-coordinate, upper right y-coordinate, lower right x-coordinate, lower right y-coordinate, lower left x-coordinate, and lower left y-coordinate of the recognition block in each page of the document, with the left-to-right x-axis and the upper-to-lower y-axis. The confidence attribute (score) of each recognition block is the accuracy of the recognition block being identified as the current type attribute. The text attribute of each text recognition block is the text content of the text recognition block, and the latex attribute of each inline recognition block is the text content of the inline recognition block.
[0072] The set of identification blocks (layout_dets) for each page of the document is represented as:
[0073] {"layout_dets":
[0074] [{"category_type","poly","score",...},{"category_type","poly","score",...}...]};
[0075] like Figure 2 Shown are all the identification blocks for any page of a railway standards specification document in PDF format.
[0076] S1-2, data cleaning: Filter the recognition blocks with the type attribute of title and plain text from the multiple recognition block sets (layout_dets) of the railway standard specification document to obtain recognition block set A; traverse recognition block set A and extract paragraphs from each recognition block to obtain paragraph set B = {paragraph, paragraph, ...}.
[0077] Among them, the method for extracting paragraphs from a recognition block is:
[0078] According to the position attribute of the recognition block, obtain the content-type recognition blocks contained in the page position of the recognition block in the recognition block set corresponding to the page where the recognition block is located; if the number of content-type recognition blocks contained in the page position where the recognition block is located is 1, use the text content of the text attribute or latex attribute of the content-type recognition block as a paragraph; if the number of content-type recognition blocks contained in the page position where the recognition block is located in the recognition block is greater than 1, splice the text contents in the text attributes or latex attributes of the obtained content-type recognition blocks in order from top to bottom and from left to right, and use the spliced text content as a paragraph.
[0079] S1-3, the file name of the railway standard specification document is used as filename, and the filename and paragraph set B are used as the output result {filename, {paragraph, paragraph, ...}}.
[0080] S1-4, repeat S1-1 to S1-3 until an output result set {{filename,{paragraph,paragraph,...}},{filename,{paragraph,paragraph,...}}…} corresponding to N copies of railway standard specification documents in PDF format is obtained.
[0081] S2, perform term extraction; define the entity class and relationship class in the railway standard specification terminology knowledge graph, create standard class entity and term class entity set, establish standard class entity S i The include relationship between the terminology entity set and the terminology entity set is established; the relate-to relationship between the terminology entities is established; the relate-to relationship between the terminology entities is established to obtain the railway standard specification terminology knowledge graph, which specifically includes the following steps:
[0082] S2-1, term extraction: extract the term name, English, and definition of the term in each paragraph of the paragraph set B of an output result obtained by S1 according to the term article composition rules, and obtain multiple term article paragraphs. Manually check all term article paragraphs, and manually modify the incorrect and missing parts, so that all term article paragraphs after manual inspection constitute the term article paragraph set {{term name, English, definition}, {term name, English, definition}…{term name, English, definition}}, and combine the filename of the output result and the term article paragraph set into the term article output result {filename, {term name, English, definition}, {term name, English, definition}…{term name, English, definition}}; repeat the above steps to make the term article output results corresponding to each output result in the output result set constitute a set F, and the set F includes N term article output results, that is, each railway standard specification document corresponds to one term article output result.
[0083] Among them, the rules for the composition of terminology clauses are: a terminology clause consists of four parts, namely: "Chapter Number", "Term Name", "English", and "Definition", and there must be one or more spaces between two adjacent parts in the terminology clause.
[0084] The method for extracting the "term name", "English" and "definition" of a term in a paragraph includes the following steps:
[0085] Step 1: Split the paragraph into several units based on the "space";
[0086] Step 2: According to the terminology composition rules, several units are judged in sequence to obtain the judgment results. The specific steps are as follows:
[0087] (1) Chapter number judgment: whether the unit consists of numbers and the symbol ".", if not, execute (1) for the next unit; if so, set the flag of the unit to 1 and execute (2) for the next unit;
[0088] (2) Term name judgment: whether the unit contains Chinese or Chinese and English. If not, execute (1) for the next unit; if so, set the flag of the unit to 2 and execute (3) for the next unit;
[0089] (3) English judgment: whether the unit starts with English and is entirely in English. If not, execute (1) for the next unit; if so, set the flag of the unit to 3 and execute (4) for the next unit;
[0090] (4) Interpretation judgment: whether the unit contains Chinese or Chinese plus English. If not, execute (1) for the next unit; if so, set the unit identifier to 4, and end the judgment, outputting four consecutive units with identifiers 1, 2, 3 and 4 in the units as the judgment result.
[0091] Step three: extract the units marked as 2, 3, and 4 in the judgment results to obtain the terminology paragraph {term name, English, definition}.
[0092] Among them, the inspection rules for manual inspection include: whether there are non-compliant characters in the term name, English, and definition; whether there are any missed texts; whether there are any incorrectly recognized texts; and whether there are any layout recognition interruptions due to cross-page spreads.
[0093] S2-2, define the entity class and relationship class in the railway standard specification terminology knowledge graph; create a standard class entity based on the set F; traverse each term clause paragraph in the output result of a term clause in the set F, extract the term name in each term clause paragraph and create a term class entity to obtain the term class entity set; establish the standard class entity S i The include relationship between each term-class entity in the term-class entity set; traverse the set F and repeat the above steps to obtain the standard class entity set C = {S1, S2, ..., S N}、Each standard class entity S i The corresponding terminology entity set and each standard entity S i The include relationship between each term-class entity and its corresponding term-class entity set; the relate-to relationship between term-class entities is established. The specific steps are as follows:
[0094] S2-2-1, define the entity classes and relationship classes in the railway standard specification terminology knowledge graph:
[0095] Entity classes are defined, including standard entities and term entities. Attributes are added to the standard entities: name and embedding. Attributes are added to the term entities: name, English, explain, and embedding.
[0096] The defined relationship classes include: include relationship, relate to relationship and similar to relationship. Among them, the include relationship is a directed association, which points from the standard class entity to the term class entity, that is, Standard→Term; the relate to relationship is a directed association, which points from the term class entity to the term class entity, that is, Term→Term; the similar to relationship is an undirected association, which connects the term class entity to the term class entity, that is, Term-Term. The similarity relationship has an association coefficient (rate) attribute, which is used to describe the similarity between two connected term class entities.
[0097] S2-2-2, obtain the filename of a term clause output result in the set F of S2-1, and create a standard class entity, and set the "name" attribute value of the standard class entity to filename, and record the standard class entity as S i , i = 1…N, N is the total number of railway standards and specifications;
[0098] S2-2-3, traverse each term article paragraph {term name, English, definition} in the term article output result, extract the term name in each term article paragraph and create a term class entity, and obtain the term class entity set corresponding to the term article output result.
[0099] The method for obtaining a term entity set includes the following steps:
[0100] (1) Create an empty term class entity set;
[0101] (2) Extract the term name in the jth term paragraph in the term article output result, and record it as termname;
[0102] (3) Determine whether a term-class entity with a "name" attribute value of termname already exists in the term-class entity set: If not, create a term-class entity and set the "name" attribute value of the term-class entity to termname. The term-class entity is recorded as T j , j = 1, 2, ... M, M is the number of terminology paragraphs in the terminology output result, read the English and definition in the terminology paragraph {term name, English, definition}, and set the terminology entity T j The "english" attribute value is read as "English", and the term class entity T is set j The "explain" attribute value is read as "explanation", and the term class entity T jAdd to the term entity set; if it exists, then set the "english" attribute value of the term entity with the "name" attribute value of termname in the term entity set to the English in the j-th term clause paragraph, and set the "explain" attribute value of the term entity with the "name" attribute value of termname in the term entity set to the explanation in the j-th term clause paragraph;
[0103] S2-2-4, establish standard class entity S i The include relationship between each term-class entity in the term-class entity set is represented by S i Pointing to T j ;
[0104] S2-2-5, traverse the set F, repeat S2-2-2 to S2-2-4, and obtain the standard class entity set C = {S1, S2, ..., S N}, each standard entity in the standard entity set C corresponds one-to-one with each terminology output result in the set F, and then the terminology entity set corresponding to each terminology output result in the set F is obtained, that is, each standard entity corresponds to a terminology entity set;
[0105] In this embodiment, N=40, the standard entity set C={S1, S2, ..., S 40}, the 40 term-type entity sets include a total of 7557 term-type entities.
[0106] S2-2-6, adding the “name” attribute values of all term-type entities in all term-type entity sets to the dictionary of the Jieba tool;
[0107] S2-2-7, establish the related (relateto) relationship between term-type entities: use Jieba tool to semantically decompose the "explain" attribute of a term-type entity in all term-type entity sets to obtain a word list; traverse each word in the word list to determine whether the word is equal to the "name" attribute value of each term-type entity in all term-type entity sets. If they are equal, establish the related (relateto) relationship between the term-type entity and the term-type entity set; repeat the above operation for all term-type entities.
[0108] Taking the term entity whose "name" attribute value is "railway" as an example, the specific steps are as follows:
[0109] The term-like entity with the "name" attribute value of "railway" is abbreviated as the railway term-like entity, and the "explain" attribute value of the railway term-like entity is "a transportation route that uses a locomotive to pull or a train equipped with a power unit to travel on the track"; the precise mode of the Jieba tool is used to segment the "explain" attribute value to obtain the segmentation list seg_list {using; locomotive to pull; or; using; equipped; power unit; of; train; traveling; on; track; of; transportation; route}; traverse each segmentation segt in the segmentation list seg_list, and query whether the term-like entity with the "name" attribute value of segt already exists in all the term-like entity sets. If so, a related (relateto) relationship is established between the term-like entity and the railway term-like entity; if not, there is no related (relateto) relationship between the railway term-like entity and all the term-like entity sets.
[0110] In this embodiment, the related relationships of railway terminology entities include: train→railway, track→railway, and line→railway.
[0111] S2-3, establish similarity relationships between terminology entities: Based on the graph database Neo4jDesktop 5.20.0, use the Node2Vec algorithm to calculate the vectors of all terminology entities; calculate the cosine value between the vectors of any two terminology entities among all terminology entities as the similarity between the two terminology entities; create a similarity relationship for two terminology entities whose similarity between the terminology entities among all terminology entities is greater than the similarity threshold, and use the similarity between the two terminology entities as the correlation coefficient (rate), and obtain the railway standard specification terminology knowledge graph corresponding to N railway standard specification documents, among which some railway standard specification terminology knowledge graphs are as follows: Figure 3 shown.
[0112] The method for calculating the vector of each term-type entity includes the following steps:
[0113] Based on Neo4j's gds.graph.project library, we create a single-label subgraph based on similarity relationships with all term-type entities. The subgraph is named "myGraph1". We use the Node2Vec algorithm to calculate the vector "embedding" value of each term-type entity on the subgraph "myGraph1". The vector dimension is 4. The calculation results of the vectors of some term-type entities are as follows: Figure 4 As shown;
[0114] S3, using the large model prompt word project, extract the second-level clauses, third-level clause numbers, and third-level clauses (para) in each paragraph of an output result paragraph set B, and re-split each paragraph to obtain multiple sets D, and then obtain sets E corresponding to N output results; extract the keywords of a para (third-level clause) in set E to obtain a keyword set, calculate the similarity between each keyword and each term-class entity, select term-class entities with similarity greater than a threshold, use the selected term-class entities to update the keyword set to obtain an updated keyword set, traverse the updated keyword set, extract term-class entities with correlation and similarity relationships with the keywords, obtain a synonym set and a related word set for the para (third-level clause), traverse set E, perform the above steps for all paras, and obtain the standard output of N railway standard specification documents;
[0115] The specific steps are as follows:
[0116] S3-1, using the large model prompt word engineering, traverse the paragraphs in the paragraph set B of an output result in the output result set of S1-4, and use the large model prompt word engineering to extract the second-level clauses in each paragraph to obtain a second-level clause set; based on the second-level clause set, re-split the paragraphs in the paragraph set B to obtain multiple {second-level clauses, newparagraph}; using the large model prompt word engineering, extract the third-level clause numbers in each newparagraph in the multiple {second-level clauses, newparagraph} to obtain a third-level clause number set; based on the third-level clause number set, re-split each newparagraph to obtain a set D{second-level clause, {third-level clause number, para}, {third-level clause number, para}, ...}, and finally each newparagraph obtains a set D; traverse the output result set, perform the above operation on each output result, and obtain multiple sets D corresponding to each output result, so that all sets D of N output results form a set E, wherein the specific steps are:
[0117] S3-1-1, using the large model prompt word project, extract the secondary clauses of each paragraph in the paragraph set B of an output result in the output result set of S1-4, and obtain the secondary clause set corresponding to the output result. Among them, when using prompt words to extract secondary clauses, replace the "information" in the prompt words with the text of the paragraph to be processed and input it into the large model. The large model outputs the secondary clauses of the paragraph.
[0118] In this embodiment, the large model is specifically: a locally deployed Qwen2.5:32B large model with a model size of 19GB, and the operating environment is an artificial intelligence computing workstation with 4 RTX4090 24G graphics cards.
[0119] The prompt words used in the large model prompt word project are as follows:
[0120] -------------
[0121] #Background You are a text analysis expert. Please extract the subheadings contained in the sentence from the input sentence.
[0122] #Require
[0123] 1. The subtitle should be a complete sentence starting with a single letter or number or a string of characters like xx;
[0124] 2. Subheadings are usually placed on a separate line;
[0125] 3. There is no period after the subheading;
[0126] 4. Only the complete subtitle needs to be output, no other content is required.
[0127] #example
[0128] 1. Example 1
[0129] Input: "12.3 Ventilation and smoke exhaust systems
[0130] 12.3.1 Class I, II and III tunnels used by motor vehicles should be equipped with smoke exhaust facilities.
[0131] 12.3.2 The installation of mechanical smoke exhaust systems in tunnels shall comply with the following provisions:
[0132] Output: 12.3 Ventilation and smoke exhaust system
[0133] 2. Example 2
[0134] Input: "12.3.6 At least one set of jet fans used for smoke exhaust in tunnels during fires should be kept in reserve.
[0135] 12.4 Automatic Fire Alarm System
[0136] 12.4.1 An alarm signal device should be installed 100m to 150m outside the tunnel entrance to warn vehicles not to enter the tunnel in the event of a fire.
[0137] Output: 12.4 Automatic fire alarm system
[0138] When the input is "information", what should your output be?
[0139] -------------
[0140] S3-1-2, based on the secondary clause set, re-split the paragraphs in the paragraph set B to obtain multiple {secondary clauses, newparagraph}:
[0141] Traverse each paragraph in paragraph set B. If there is a second-level clause in the current paragraph, the paragraph number, second-level clause and its line number in paragraph set B are combined to form the extraction result of the paragraph {second-level clause, paragraph number, line number}. If there is no second-level clause in the paragraph, perform the above operation on the next paragraph in paragraph set B until all paragraphs in paragraph set B are processed, so that the multiple extraction results corresponding to paragraph set B form an extraction result set in the order of extraction; traverse the extraction result set, if the paragraph number and line number between two adjacent extraction results differ by 1, merge the text from the line number of the extraction result with the smaller paragraph number to the line number of the extraction result with the larger paragraph number in all paragraphs of paragraph set B to obtain {second-level clause, newparagraph}, and then obtain multiple {second-level clauses, newparagraph} corresponding to paragraph set B;
[0142] Among them, suppose two adjacent extraction results are {secondary article 1, paragraph number 1, line number 1} and {secondary article 2, paragraph number 2, line number 2}, then all the text from {paragraph number 1, line number 1} to {paragraph number 2, line number 2} is merged into a new paragraph, recorded as {secondary article, new paragraph};
[0143] S3-1-3, using the large model prompt word project, extract the third-level article number in each newparagraph in multiple {second-level articles, newparagraph} to obtain a set of third-level article numbers. Among them, when using prompt words to extract the third-level article numbers, replace the "information" in the prompt word with the text of the newparagraph to be processed and input it into the large model. The output of the large model is the third-level article number of the newparagraph.
[0144] The prompt words used in the large model prompt word project are as follows:
[0145] -------------
[0146] #Background You are a text analysis expert. Please extract the article numbers contained in the sentence from the input sentence.
[0147] #Require
[0148] 1. The article number must be a string of the form xxx;
[0149] 2. Article numbers appear at the beginning of sentences;
[0150] 3. Please enter the entire string representing the article number. No other content is required.
[0151] #example
[0152] 1. Example 1
[0153] Input: "3.1.3 The fire hazard of stored items should be classified into Classes A, B, C, D, and E based on factors such as the nature of the items and the amount of combustible materials in them. The classification should comply with the requirements of Table 3.1.2."
[0154] Output: 3.1.3
[0155] 2. Example 2
[0156] Input: "The fire resistance rating of oil-immersed transformer rooms and high-voltage distribution equipment rooms should be no less than Class II. Other fire protection designs should comply with the current national standard "Code for Fire Protection Design of Thermal Power Plants and Substations" GB 50229 and other standards.
[0157] 3.2.7 The fire resistance rating of elevated warehouses, high-rise warehouses, Class A warehouses, multi-story Class B warehouses, and multi-story Class C warehouses storing flammable liquids shall not be lower than Class II.
[0158] Output: 3.2.7
[0159] So, when the input is "information", what should your output be?
[0160] -------------
[0161] S3-1-4, in all newparagraphs of multiple {secondary articles, newparagraph}, traverse the set of third-level article numbers, concatenate the text from the first third-level article number to the second third-level article number in two adjacent third-level article numbers in the set of third-level article numbers, and output the set D{secondary article,{third-level article number,para},{third-level article number,para},...}. Finally, each {secondary article, newparagraph} obtains a set D.
[0162] S3-1-5, traverse and extract the output result sets of S1-4, execute S3-1-1 to S3-1-5 for each output result, obtain multiple sets D corresponding to each output result, and make all sets D of N output results form set E;
[0163] S3-2, extract keywords of a para (third-level article) in set E to obtain a keyword set; calculate the similarity between each keyword in the keyword set and each term-type entity in the term-type entity set of S2, select term-type entities with similarity greater than a threshold in the term-type entity set, and update the keyword set using the "name" attribute value of the selected term-type entity to obtain an updated keyword set; traverse the updated keyword set, extract term-type entities in the term-type entity set that have a correlation and similarity relationship with the keyword, and obtain a synonym set and a related word set of the para (third-level article); traverse set E, perform the above steps for all paras, and obtain the standard output of N railway standard specification documents. The specific steps are as follows:
[0164] S3-2-1: Using the large model prompt words, preliminarily extract the keywords of a para in set E to obtain a keyword set. When using the prompt words for keyword extraction, replace "information" in the prompt words with the text of the para to be processed and input it into the large model. The large model outputs the keyword set of the para.
[0165] The prompt words used in the large model prompt word project are as follows:
[0166] ---------------
[0167] You are now a word segmentation expert for railway standards and specifications. Requirements: 1. Your answer must only include word segmentation results. 2. The extracted words must be engineering objects, materials, or attributes. 3. Please extract as many words as possible from the given text that meet the requirements. Word segmentation results will be output in the format [word 1, word 2, word 3, ...]. Below are several examples of word segmentation. Please refer to them for your own word segmentation:
[0168] Example 1:
[0169] Input: 12.3.4 Smoke exhaust fans and auxiliary equipment such as dampers, mufflers, and flexible joints through which smoke flows should be able to withstand the designed tunnel fire smoke exhaust temperature and should be able to operate continuously and normally at 250°C for not less than 1.0 hour. The fire resistance limit of the smoke exhaust duct should not be less than 1.00 hour.
[0170] Output: [smoke exhaust fan, smoke flow path, air damper, muffler, flexible joint, auxiliary equipment, tunnel fire smoke emission temperature, smoke exhaust duct, fire resistance limit].
[0171] Example 2:
[0172] Input: 12.1.4 The fire resistance level of underground equipment rooms, ventilation shafts and fire rescue entrances and exits in the tunnel should be level one, and the fire resistance level of important equipment rooms, operation management centers and other ground ancillary rooms should not be lower than level two.
[0173] Output: [tunnel, underground equipment room, ventilation shaft, fire rescue entrance and exit, fire resistance level, ground, equipment room, operation management center, ground ancillary rooms].
[0174] Example 3:
[0175] Input: 12.2.1 When planning and designing urban transportation, a fire water supply system should be designed at the same time. Class IV tunnels and Class III tunnels for pedestrians or non-motorized vehicles do not need to be equipped with a fire water supply system.
[0176] Output: [urban transportation, planning, design, fire water supply system, four types of tunnels, pedestrians, non-motorized vehicles, three types of tunnels].
[0177] So, when the input is "information", what should your output be? Please strictly follow the array format of [word1, word2, word3,...] and output it in one line. Just output the result;
[0178] ---------------
[0179] S3-2-2: Calculate the similarity between each keyword in the keyword set and each term-type entity in the term-type entity set of S2, select the term-type entities in the term-type entity set whose similarity is greater than the threshold, and use the "name" attribute value of the selected term-type entities to update the keyword set to obtain the updated keyword set. The specific steps are as follows:
[0180] In the terminology entity set of the railway standard and specification terminology knowledge graph, a semantic index is established on the "name" attribute of each terminology entity; the keywords of the keyword set are traversed, and each keyword is used as input to calculate the current keyword similarity on the semantic index, and the terminology entities are arranged in descending order according to the similarity. The terminology entities with similarity greater than the threshold in the terminology entity set are selected, and the "name" attribute value of the selected terminology entity is added to the keyword set to obtain the updated keyword set.
[0181] In this embodiment, the current input keyword is "traction substation", and the calculation result is as follows: Figure 5 As shown in the figure, score is the similarity between the term entity and the keyword, the threshold is 3.0, and the "name" attribute value of the selected term entity: "traction substation integrated automation system", "railway substation", "box-type substation", "traction network" is added to the keyword set.
[0182] S3-2-3: Traverse the updated keyword set, extract the term-type entities that have a correlation and similarity relationship with the keyword in the term-type entity set, and obtain the synonym set and associated word set of the para (third-level article). The specific steps are as follows:
[0183] Traverse the updated keyword set and record the current keyword as Tm; extract term-type entities that have a similar relationship with Tm in the railway standard terminology knowledge graph to obtain a similar term entity set, and add the "name" attribute value of each term-type entity in the similar term entity set to the synonym set; extract term-type entities that have a related relationship with Tm in the railway standard terminology knowledge graph to obtain a related term entity set, and add the "name" attribute value of each term-type entity in the related term entity set to the associated word set;
[0184] S3-2-4, traverse the set E, execute S3-2-1 to S3-2-3 for all para, and obtain the standard output of N railway standard specification documents, wherein the standard output of one railway standard specification document is {filename, {secondary article, {third-level article number, third-level article content (para), {keywords, keywords, ...}, {synonyms, synonyms, ...}, {association words, association words, ...}}, {third-level article number, third-level article content, {keywords, keywords, ...}, {synonyms, synonyms, ...}, {association words, association words, ...}}, ...}, {secondary article, {third-level article number, third-level article content, {keywords, keywords, ...}, {synonyms, synonyms, ...}, {association words, association words, ...}}, ...}...};
[0185] S4, structured output of railway standards and specifications:
[0186] The standard output of the railway standard specification document is structured so that it can be automatically recognized by the machine to obtain a structured output result, wherein the structured output result includes: file name (filename), second-level clauses, third-level clauses, keyword set of third-level clauses, synonym set of third-level clauses, and associated word set of third-level clauses.
[0187] In this embodiment, Python's lxml library is used. Taking the "Code for Fire Protection Design of Railway Engineering TB10063-2016" as an example, the XML file format of the structured output result is as follows:
[0188]
[0189]
[0190] in, <name>< / name> The file name of the railway standard specification is inside. <title>< / title> Inside is the second level article, inside is the third level article content, <keywords> <keywords>The content is the keyword set of the current third-level article. <similarwords> <similarwords>The inside is a set of synonyms for the current third-level article. <relatewords> <relatewords>It is the set of associated words for the current third-level article.
[0191] The structured output result (xml file) is the final standard specification after digital processing. The xml file can be automatically recognized by the machine and can be used for subsequent retrieval and analysis of railway standard specifications.< / relatewords> < / relatewords> < / similarwords> < / similarwords> < / keywords> < / keywords>
Claims
1. A method for digital processing of railway standards and specifications based on a large model and knowledge graph, characterized by: include: S1, railway standard specification preprocessing: extract all identification blocks of N railway standard specification documents in PDF format, filter and extract paragraphs to obtain a paragraph set, and then obtain an output result set; S2, constructing the railway standard and specification terminology knowledge graph: extracting terms, defining entity classes and relationship classes in the railway standard and specification terminology knowledge graph, creating sets of standard class entities and terminology class entities, establishing inclusion relationships, related relationships, and related relationships, and obtaining the railway standard and specification terminology knowledge graph; S3, using the railway standard specification terminology knowledge graph to perform semantic splitting, combination, and semantic extraction on the paragraph set in the output result set, to obtain a standardized output of N railway standard specification documents; S4, structured output of railway standard specifications: structure the specification output of the railway standard specification document so that it can be automatically recognized by a machine to obtain a structured output result.
2. The railway standard specification digital processing method according to claim 1, characterized in that: Step S1 includes: S1-1, obtaining recognition blocks: using the open source PDF-Extract-Kit tool, extract all recognition blocks from a railway standard specification document in PDF format to obtain multiple recognition block sets corresponding to the railway standard specification document, with each page of the document corresponding to one recognition block set; S1-2, data cleaning: Filter and obtain recognition blocks with the type attribute of title and plain text from multiple recognition block sets of the railway standard specification document to obtain recognition block set A; traverse recognition block set A and extract paragraphs from each recognition block to obtain paragraph set B; S1-3, the file name of the railway standard specification document is used as filename, and filename and paragraph set B are used as output results; S1-4, repeatedly executing S1-1 to S1-3 until an output result set corresponding to N railway standard specification documents in PDF format is obtained.
3. The railway standard specification digital processing method according to claim 2, characterized in that: The method for extracting paragraphs from the recognition block in step S1-2 is: according to the position attribute of the recognition block, obtain the content-type recognition block contained in the page position where the recognition block is located in the recognition block set corresponding to the page where the recognition block is located; if the number of content-type recognition blocks contained in the page position where the recognition block is located is 1, then the text content of the text attribute or latex attribute of the content-type recognition block is used as a paragraph; if the number of content-type recognition blocks contained in the page position where the recognition block is located in the recognition block is greater than 1, then the text contents in the text attributes or latex attributes of the obtained content-type recognition blocks are spliced in order from top to bottom and from left to right, and the spliced text content is used as a paragraph.
4. The method for digital processing of railway standards and specifications according to claim 1, characterized in that: Step S2 includes: S2-1, term extraction: extract the term name, English, and definition of the term in each paragraph of a paragraph set B of an output result according to the term clause composition rules to obtain multiple term clause paragraphs. Manually check all term clause paragraphs and manually modify any errors or omissions. Make all the term clause paragraphs after manual inspection form a term clause paragraph set. Combine the filename of the output result and the term clause paragraph set to form a term clause output result. Repeat the above steps to form a set F of term clause output results corresponding to each output result in the output result set. Set F includes N term clause output results, that is, each railway standard specification document corresponds to one term clause output result. S2-2, define the entity class and relationship class in the railway standard specification terminology knowledge graph; create a standard class entity based on the set F; traverse each term clause paragraph in the output result of a term clause in the set F, extract the term name in each term clause paragraph and create a term class entity to obtain the term class entity set; establish the standard class entity S i The inclusion relationship between each term-class entity in the term-class entity set; traverse the set F and repeat the above steps to obtain the standard class entity set C, each standard class entity S i The corresponding terminology entity set and each standard entity S i The inclusion relationship between each term-type entity in its corresponding term-type entity set; establishing the correlation relationship between term-type entities; S2-3, establish similarity relationships between terminology entities: calculate the vectors of all terminology entities; calculate the cosine value between the vectors of any two terminology entities among all terminology entities as the similarity between the two terminology entities; create a similarity relationship for two terminology entities whose similarity between the terminology entities among all terminology entities is greater than the similarity threshold, and use the similarity between the two terminology entities as the correlation coefficient to obtain the railway standard specification terminology knowledge graph corresponding to N railway standard specification documents.
5. The method for digital processing of railway standards and specifications according to claim 4, characterized in that: Step S2-2 includes: S2-2-1, define the entity classes and relationship classes in the railway standard specification terminology knowledge graph: Define entity classes, including standard entities (Standard) and term entities (Term); Add attributes to standard class entities, including name and embedding. Add attributes to the term entity: name, English, explain, and embedding; Define relationship classes, including include, relate to, and similar to. Include is a directed association, from a standard entity to a term entity; relate to is a directed association, from a term entity to a term entity; similar to is an undirected association, from a term entity to a term entity. Similarity has a rate attribute, which is used to describe the similarity between two connected term entities. S2-2-2, obtain the filename of the output result of a term clause in the set F of S2-1, and create a standard class entity, and set the "name" attribute value of the standard class entity to filename, and record the standard class entity as S i , i = 1…N, N is the total number of railway standards and specifications; S2-2-3, traverse each terminology paragraph {term name, English, definition} in the terminology output result, extract the term name in each terminology paragraph and create a terminology entity, and obtain a terminology entity set corresponding to the terminology output result; S2-2-4, establish standard class entity S i The include relationship with each term-class entity in the term-class entity set; S2-2-5, traverse the set F, repeat S2-2-2 to S2-2-4, and obtain the standard class entity set C = {S1, S2, ..., S N }, each standard entity in the standard entity set C corresponds one-to-one with each terminology output result in the set F, thereby obtaining the terminology entity set corresponding to each terminology output result in the set F; S2-2-6, add the "name" attribute values of all term-type entities in all term-type entity sets to the dictionary of the Jieba tool; S2-2-7, establish the related (relateto) relationship between term-type entities: use Jieba tool to semantically decompose the "explain" attribute of a term-type entity in all term-type entity sets to obtain a word list; traverse each word in the word list to determine whether the word is equal to the "name" attribute value of each term-type entity in all term-type entity sets. If they are equal, establish the related (relateto) relationship between the term-type entity and the term-type entity set; repeat the above operation for all term-type entities.
6. The method for digital processing of railway standards and specifications according to claim 5, characterized in that: The method for obtaining a term entity set in step S2-2-3 includes the following steps: (1) Create an empty term class entity set; (2) Extract the term name in the jth term paragraph in the term article output result, and record it as termname; (3) Determine whether a term-class entity with a "name" attribute value of termname already exists in the term-class entity set. If not, create a term-class entity and set the "name" attribute value of the term-class entity to termname. The term-class entity is recorded as T j , j = 1, 2, ... M, M is the number of terminology paragraphs in the terminology output result, read the English and definition in the terminology paragraph {term name, English, definition}, and set the terminology entity T j The "english" attribute value is read as "English", and the term class entity T is set j The "explain" attribute value is read as "explanation", and the term class entity T j Add to the term entity set; if it exists, then set the "english" attribute value of the term entity with the "name" attribute value termname in the term entity set to the English in the j-th term clause paragraph, and set the "explain" attribute value of the term entity with the "name" attribute value termname in the term entity set to the explanation in the j-th term clause paragraph.
7. The railway standard specification digital processing method according to claim 1, characterized in that: Step S3 includes: S3-1, using the large model prompt word engineering, traverse the paragraphs in the paragraph set B of an output result in the output result set of S1-4, and use the large model prompt word engineering to extract the second-level clauses in each paragraph to obtain a second-level clause set; based on the second-level clause set, re-split the paragraphs in the paragraph set B to obtain multiple {second-level clauses, newparagraph}; using the large model prompt word engineering, extract the third-level clause numbers in each newparagraph in the multiple {second-level clauses, newparagraph} to obtain a third-level clause number set; based on the third-level clause number set, re-split each newparagraph to obtain a set D, and finally each newparagraph obtains a set D; traverse the output result set, perform the above operation on each output result, and obtain multiple sets D corresponding to each output result, so that all sets D of N output results form a set E; S3-2 extracts the keywords of a para from set E to obtain a keyword set; calculates the similarity between each keyword in the keyword set and each term-type entity in the term-type entity set of S2, selects term-type entities in the term-type entity set whose similarity is greater than a threshold, and updates the keyword set using the "name" attribute value of the selected term-type entity to obtain an updated keyword set; traverses the updated keyword set, extracts term-type entities in the term-type entity set that have a correlation and similarity relationship with the keyword, and obtains a synonym set and a related word set for the para; traverses set E, executes the above steps for all paras, and obtains the standard output of N railway standard specification documents.
8. The railway standard specification digital processing method according to claim 1, characterized in that: Step S3-1 is specifically as follows: S3-1-1, using the large model prompt word project, extract the secondary clauses of each paragraph in the paragraph set B of an output result in the output result set of S1-4, and obtain the secondary clause set corresponding to the output result; S3-1-2, based on the secondary clause set, re-split the paragraphs in the paragraph set B to obtain multiple {secondary clauses, newparagraph}: Traverse each paragraph in paragraph set B. If there is a second-level clause in the current paragraph, the paragraph number, second-level clause and its line number in paragraph set B are combined to form the extraction result of the paragraph {second-level clause, paragraph number, line number}. If there is no second-level clause in the paragraph, perform the above operation on the next paragraph in paragraph set B until all paragraphs in paragraph set B are processed, so that the multiple extraction results corresponding to paragraph set B form an extraction result set in the order of extraction; traverse the extraction result set, if the paragraph number and line number between two adjacent extraction results differ by 1, merge the text from the line number of the extraction result with the smaller paragraph number to the line number of the extraction result with the larger paragraph number in all paragraphs of paragraph set B to obtain {second-level clause, newparagraph}, and then obtain multiple {second-level clauses, newparagraph} corresponding to paragraph set B; S3-1-3, using the large model prompt word project, extract the third-level article number in each new paragraph in multiple {second-level articles, new paragraph} to obtain a set of third-level article numbers; S3-1-4, in all newparagraphs of multiple {secondary articles, newparagraph}, traverse the set of third-level article numbers, concatenate the text from the first third-level article number to the second third-level article number in two adjacent third-level article numbers in the set of third-level article numbers, and output a set D. Finally, each {secondary article, newparagraph} obtains a set D; S3-1-5, traverse and extract the output result set of S1-4, execute S3-1-1 to S3-1-5 for each output result, obtain multiple sets D corresponding to each output result, and make all sets D of N output results form set E.
9. The railway standard specification digital processing method according to claim 1, characterized in that: The structured output results in step S4 include: file name, second-level articles, third-level articles, a keyword set of the third-level articles, a synonym set of the third-level articles, and a related word set of the third-level articles.