A power grid work order information analysis method, system, device and medium
Patent Information
- Application Number
- CN202610892725.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-20
- Publication Date
- 2026-10-20
AI Technical Summary
[0018]本发明的有益效果:通过在注意力计算中引入与关键模式相关联的偏置项,并结合不同尺寸卷积核并行提取的多粒度局部特征,使解析网络在对工单文本进行处理时能够准确捕获设备、规格与数量之间的局部对应关系,降低长序列文本中关键参数被忽略或误判的概率。
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This invention relates to the field of natural language processing technology, specifically to a method, system, device, and medium for parsing power grid work order information. Background Technology
[0002] Currently, deep learning-based pre-trained language models are widely used in text information extraction tasks. These models, pre-trained on general corpora, possess strong contextual semantic modeling capabilities. However, power grid work order texts contain a large number of industry-specific terms, equipment models, and specification codes, which are non-standardized expressions. These expressions appear infrequently in general corpora, and general pre-trained language models, lacking targeted embeddings of power sector knowledge, struggle to accurately identify the semantics corresponding to these specialized expressions.
[0003] In power grid work orders, there are often strict local correspondences between equipment, specifications, and quantities. However, when processing long text sequences, the attention mechanism of general language models tends to capture global semantic relationships, which has limited ability to capture such local parameter constraints. This can easily lead to omissions in the identification of key entities or misjudgments of relationships.
[0004] Existing information extraction schemes typically rely solely on the model's own predictions as the final output, lacking a mechanism for cross-validation with external domain knowledge. This makes it difficult to assess the confidence level of the extraction results. Furthermore, when conflicts arise between the model's predictions and actual engineering logic, they are difficult to detect and correct in a timely manner, thus limiting the application of the parsed results in downstream engineering quantity estimation, automated work order dispatching, and other scenarios. Summary of the Invention
[0005] In view of the above-mentioned problems, the present invention provides a method, system, equipment and medium for parsing power grid work order information.
[0006] Therefore, the technical problem solved by this invention is: how to enable the model to accurately capture the semantics of professional terms and local parameter constraints in the text during the information parsing of power grid work order text, and to perform reliable confidence verification on the parsing results, thereby improving the accuracy of structured parsing of work order information.
[0007] To solve the above-mentioned technical problems, the present invention provides the following technical solution: a method for parsing power grid work order information, comprising, Knowledge extraction is performed based on historical standardized text sequences to construct a knowledge index library containing entity attributes and relational constraint information; A parsing network is constructed by combining key patterns and local features of different granularities from the knowledge index. The parsing network is trained based on historical standardized text sequences to obtain the trained parsing network; The trained parsing network processes the currently received text sequence to obtain preliminary parsing results. The preliminary analysis results are verified based on the knowledge index database to obtain the structured chemical order information.
[0008] As a preferred embodiment of the power grid work order information parsing method described in this invention, the step of constructing a knowledge index library containing entity attributes and relational constraint information based on historical standardized text sequences for knowledge extraction processing includes: Semantic parsing is performed on historical standardized text sequences to determine entity attributes and syntactic association information between entity pairs. Based on the syntactic association information and the vector representation of entity pairs, relation triples are determined. Determine relation constraint information based on relation triples; Store entity attributes, relation triples, and relation constraint information in a graph database; Store the semantic vectors corresponding to the historical standardized text sequences into a vector database; A knowledge index library is obtained based on graph databases and vector databases.
[0009] As a preferred embodiment of the power grid work order information parsing method described in this invention, the step of constructing the parsing network by combining key patterns and local features of different granularities includes: Identify key patterns based on entity attributes in the knowledge index; Based on the key patterns, configure the attention layer, and configure the convolutional layer using convolutional kernels of different sizes; A parsing network is constructed by combining attention layers and convolutional layers.
[0010] As a preferred embodiment of the power grid work order information parsing method of the present invention, the step of training the parsing network based on historical standardized text sequences to obtain the trained parsing network includes: Synonym replacement and homophone replacement are performed on the historical standardized text sequence to obtain semantically similar enhanced text sequences and enhanced text sequences containing input error features; The parsing network is trained based on the enhanced text sequence to obtain the trained parsing network.
[0011] As a preferred embodiment of the power grid work order information parsing method of the present invention, the step of processing the currently received text sequence through a trained parsing network to obtain preliminary parsing results includes: When a word in the currently received text sequence matches a key pattern, the attention bias value of the word is positive. Through the attention layer, attention scores between words are determined based on the attention bias values of the words; Convolutional layers are used to process the attention score features to obtain local features of different granularities. These features are then concatenated to obtain fused features, and the output yields preliminary analytical results.
[0012] As a preferred embodiment of the power grid work order information parsing method described in this invention, the step of verifying the preliminary parsing results based on a knowledge index database to obtain structured work order information includes: The relation triples in the preliminary analysis results are compared with the relation constraint information in the knowledge index to determine the confidence score corresponding to the preliminary analysis results; Semantic similarity retrieval is performed on the entity attributes in the preliminary analysis results to determine the corrected entity attributes; Based on the confidence score and the corrected entity attributes, the structural chemical order information is obtained.
[0013] As a preferred embodiment of the power grid work order information parsing method of the present invention, the step of performing semantic similarity retrieval on the entity attributes in the preliminary parsing results to determine the corrected entity attributes includes: Determine the semantic vectors corresponding to the entity attributes in the preliminary analysis results, and calculate the similarity between the semantic vectors and the semantic vectors in the vector database to obtain a similarity score; Based on the similarity score, the target semantic vector is determined from the vector database; The entity attributes corresponding to the target semantic vector are determined as the corrected entity attributes.
[0014] This invention provides a power grid work order information parsing system.
[0015] To solve the above-mentioned technical problems, the present invention provides the following technical solution: a power grid work order information parsing system, comprising: a knowledge index database construction module, a network construction module, a training module, a processing module, and an output module; The knowledge index library construction module is used to perform knowledge extraction processing based on historical standardized text sequences and construct a knowledge index library containing entity attributes and relational constraint information. The network construction module is used to construct a parsing network by combining key patterns of the knowledge index base and local features of different granularities. The training module is used to train the parsing network based on historical standardized text sequences to obtain the trained parsing network; The processing module is used to process the currently received text sequence through the trained parsing network to obtain preliminary parsing results; The output module is used to verify the preliminary analysis results based on the knowledge index library to obtain the structured chemical order information.
[0016] The present invention provides a computer device, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the power grid work order information parsing method.
[0017] The present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the power grid work order information parsing method described above.
[0018] The beneficial effects of this invention are as follows: By introducing a bias term associated with key patterns in attention calculation and combining multi-granularity local features extracted in parallel by convolutional kernels of different sizes, the parsing network can accurately capture the local correspondence between equipment, specifications and quantity when processing work order text, thereby reducing the probability of key parameters being ignored or misjudged in long sequence text.
[0019] By performing data augmentation training based on historical work order corpora using synonym and homophone substitution, the parsing network is made capable of adapting to diverse expressions of professional terminology and input errors. By comparing the parsed relation triples with relation constraint information in the knowledge index and performing semantic similarity verification on entity attributes, the final output structured work order information undergoes domain knowledge-based consistency verification before delivery, thereby improving the confidence of the parsing results. Attached Figure Description
[0020] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 The above is a flowchart of a power grid work order information parsing method provided in one embodiment of the present invention.
[0022] Figure 2 This is a flowchart illustrating the validity determination of relational triplets in a power grid work order information parsing method according to an embodiment of the present invention.
[0023] Figure 3 This is a flowchart of entity attribute semantic correction for a power grid work order information parsing method provided in one embodiment of the present invention. Detailed Implementation
[0024] To make the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.
[0025] Example 1, referring to Figure 1 This is one embodiment of the present invention, which provides a method for parsing power grid work order information, including: This invention extracts knowledge from historical standardized text sequences to construct a knowledge index containing entity attributes and relational constraints. A parsing network is then built by combining key pattern information and local features of different granularities from this knowledge index. This allows the parsing network to accurately capture key parameters and local correspondences of technical terms when processing work order text. After training the parsing network based on historical standardized text sequences, the trained network processes the currently received text sequence to obtain preliminary parsing results. These preliminary results are further validated based on the knowledge index, thereby improving the confidence level of the final output structured work order information. The specific steps are as follows: Step S1: Extract knowledge based on historical standardized text sequences and build a knowledge index library containing entity attributes and relational constraint information.
[0026] S2. Construct a parsing network by combining key patterns and local features of different granularities from the knowledge index.
[0027] S3. Train the parsing network based on historical standardized text sequences to obtain the trained parsing network.
[0028] S4. The currently received text sequence is processed by the trained parsing network to obtain preliminary parsing results.
[0029] S5. Verify the preliminary analysis results based on the knowledge index to obtain the structured chemical order information.
[0030] Example 2, refer to Figures 2-3 As an embodiment of the present invention, a method for parsing power grid work order information is provided based on the previous embodiment, including: Step S1: Based on historical standardized text sequences, perform knowledge extraction processing to construct a knowledge index library containing entity attributes and relational constraint information, including the following steps S11~S13: S11. Perform semantic parsing on the historical standardized text sequence to determine the entity attributes of entities and the syntactic association information between entity pairs, and determine the relation triples based on the syntactic association information and the vector representation of entity pairs.
[0031] Specifically, refer to Figure 2 The core entity types in the power grid work order scenario are predefined, including physical entities, entity operations, and parameter specification entities.
[0032] Physical entities include trees, tree stumps, transformers, transformer substations, power towers, and power lines.
[0033] The physical operations include clearing the passageway, replacing guy wires, and repairing equipment.
[0034] The parameter specifications include tree diameter and guy wire specifications.
[0035] Semantic role labeling identifies semantic components such as agent, patient, and instrument corresponding to actions in sentences, and dependency parsing identifies grammatical dependency relationships such as modification and domination between words to obtain grammatical association information.
[0036] For example, for the text "120 eucalyptus trees were felled, with a diameter of 20-30cm" in a historical standardized text sequence, dependency parsing identifies the core predicate "fell", the object "eucalyptus trees", and the quantity "120 trees". Combined with the patient relationship obtained by semantic role labeling, the relation triples are determined to include: (fell, target object, eucalyptus trees), (fell, quantity, 120 trees), (fell, tree diameter parameter, 20-30cm). Among them, the relation triple (fell, tree diameter parameter, 20-30cm) represents that the entity attribute corresponding to the entity "eucalyptus trees" is tree diameter 20-30cm.
[0037] To accurately identify relationships between entities, a dual affine attention mechanism is used to calculate the scores of head and tail entities in the text under a preset relationship r. The calculation formula is as follows: in, These are the hidden layer vector representations of the head and tail entities after context encoding, i.e., the vector representations of the entity pairs. Let r be the biaffine weight matrix corresponding to relation r, used to capture the bilinear interaction features between the two entity vector representations. Let r be the bias weight vector corresponding to relation r. This is the scalar bias term corresponding to relation r.
[0038] Calculate the score of candidate entity pairs under each preset relation, and determine the relation of entity pairs whose scores are higher than the attention mechanism threshold as valid relation triples.
[0039] Furthermore, the attention mechanism threshold is determined by extracting a validation set from the work order relationship, aiming to maximize the F1 score, and conducting a grid search experiment within the interval [0.60, 0.90] with a step size of 0.05 to finally determine the attention mechanism threshold θ.
[0040] Furthermore, differentiated threshold settings are adopted for different relationship types: for the tower-manifold relationship, the attention mechanism threshold is set to 0.72; for the operation-equipment demand relationship, the threshold is set to 0.75; and for the parameter attribute relationship, the attention mechanism threshold is set to 0.68.
[0041] Experiments show that when the attention mechanism threshold θ ∈ [0.70, 0.75], the model achieves the optimal F1 score on the work order relationship extraction task, and the precision and recall reach the best balance.
[0042] For example, taking the guy wire replacement scenario as an example, the entity types are predefined as tower, guy wire, guy plate, and operation. Among them, the entity attributes corresponding to the tower include tower type, voltage level, and nominal height; the entity attributes corresponding to the guy wire include specifications, material, and design life; and the entity attributes corresponding to the guy plate include model, burial depth standard, and concrete grade. For the text "#45 tension tower needs to replace 4 GJ-50 guy wires, guy plate burial depth 1.8m" in the historical standardized text sequence, the relationship triplet is determined to include: (#45 tower, type, tension tower), (GJ-50 guy wire, specifications, GJ-50), (#45 tower, voltage level, 220kV), (guer wire replacement, required, guy plate burial), (guer plate burial, burial depth parameter, 1.8m).
[0043] S12. Determine the relation constraint information based on the relation triples.
[0044] Specifically, statistical analysis is performed on the relation triples corresponding to multiple historical standardized text sequences to determine the relation types between different entity types whose frequency of occurrence meets preset conditions. The allowed relation types between entity types are then defined as relation constraint information. Relation constraint information is used to characterize the fit between entity types and relation types.
[0045] For example, based on the repeated occurrence of the "have" relationship between pole / tower entities and guy wire entities in multiple relation triples, the relation constraint information is determined to include the existence of an "have" relationship between pole / tower entities and guy wire entities; based on the repeated occurrence of the "need" relationship between operation entities and guy wire entities in multiple relation triples, the relation constraint information is determined to include the existence of a "need" relationship between guy wire replacement operation and guy wire installation.
[0046] S13. Store entity attributes, relation triples, and relation constraint information into a graph database, and store the semantic vectors corresponding to historical standardized text sequences into a vector database to obtain a knowledge index library.
[0047] Specifically, the extracted structured data is stored in a graph database, utilizing the graph database's native graph storage capabilities to store and query the topological relationships between entities in the form of nodes and edges. Simultaneously, the text corresponding to knowledge fragments is converted into high-dimensional semantic vectors and stored in a vector database to support semantic retrieval based on cosine similarity. For example, the graph database may include Neo4j or Nebula Graph; the vector database may include Milvus or Pinecone.
[0048] In the vector database, for the input query text vector q and the knowledge fragment vector k in the knowledge base, cosine similarity is used for matching: Where D is the dimension of the semantic vector. These are the values of the query vector and the knowledge base vector in the d-th dimension, respectively. This similarity calculation can quickly recall historical knowledge fragments that are most similar to the semantics of the current work order context.
[0049] S2. Combining the key patterns of the knowledge index base and local features at different granularities, construct a parsing network, including the following steps S21~S23: S21. Determine the key schema based on the entity attributes in the knowledge index.
[0050] Specifically, based on the value format corresponding to the entity attributes recorded in the knowledge index, a regular expression rule for identifying the corresponding word element is determined, and the regular expression rule is identified as the key pattern.
[0051] Specifically, multiple values corresponding to the same type of entity attribute in the knowledge index are aligned according to character position, and the character type of each value at the corresponding character position is compared character by character.
[0052] If multiple values at the same character position have the same character type, then that character position is determined as the common character position corresponding to that character type.
[0053] If multiple characters with the same value at the same character position are exactly the same, then that character position is determined as a fixed character position.
[0054] Based on the common or fixed character positions corresponding to each character position, generate the corresponding regular expression rules and determine the regular expression rules as key patterns.
[0055] For example, the specification attribute values corresponding to the string-type entity in the knowledge index include "GJ-50" and "GJ-35". After aligning the characters, the first and second characters are both uppercase letters, which are determined as the general character positions for the corresponding uppercase letter type; the third character is the connector "-", which is determined as the fixed character position; the fourth and fifth characters are both numbers, which are determined as the general character positions for the corresponding number type; based on the above character positions, the regular expression rule is determined as "[AZ]{2}-\d{2}", and this regular expression rule is determined as the key pattern.
[0056] The number attribute values corresponding to pole and tower entities in the knowledge index include "#45" and "#12". After aligning the characters, the first character is always the symbol "#", which is determined as a fixed character position. The second and third characters are both numbers, which are determined as general character positions for the corresponding number type. Based on the above character positions, the regular expression rule is determined as "#\d{1,2}", and this regular expression rule is determined as the key pattern.
[0057] S22. Configure attention layers according to key patterns, and configure convolutional layers using convolutional kernels of different sizes.
[0058] Specifically, the attention layer is used to perform attention calculation on the input lexical embedding sequence. Based on the standard Transformer attention calculation, a bias term related to relative position and a mask term related to key patterns are introduced to obtain a position-aware attention score, calculated as follows: in, Let i be the query vector and key vector for word i and word j, respectively. , , are the rotation matrices corresponding to the rotation position encoding, used to convert the absolute position information of the tokens into relative position information and inject them into the query vector and key vector; d is the dimension of the attention head. The learnable relative position bias depends on the relative distance between lexicon i and lexicon j. For the pattern-guided mask item, if lexical i or lexical j matches the key pattern, the value is a learnable positive bias value; otherwise, it is zero.
[0059] Through this calculation method, the attention layer can give higher attention weights to lexical units that match the key pattern when calculating attention scores.
[0060] The convolutional layer is used to perform multi-scale convolution processing on the feature matrix output by the attention layer, obtaining multiple local features of different granularities and fusing them. The calculation formula is as follows: Where X is the feature matrix output by the attention layer. These correspond to the convolutional kernel sizes used to capture local entity-level, sentence-level, and clause-level information, respectively. These are the feature maps obtained after processing with the GELU activation function at the corresponding convolutional kernel size. This is for splicing operations along the feature channel dimension. These are the weights and biases of the fused linear mapping.
[0061] It should be further explained that local features of different granularities refer to the features extracted by the convolutional layer for local word combinations of different length ranges in the work order text. The smaller the range of local word combinations, the finer the corresponding feature granularity; the larger the range of local word combinations, the coarser the corresponding feature granularity.
[0062] For example, for the text "#45 tension tower needs to replace 4 GJ-50 guy wires", when the convolution kernel size is 3, the extracted local features correspond to local phrases like "GJ-50 guy wires", which are closely combined with equipment and specifications; when the convolution kernel size is 5, the extracted local features correspond to short sentences like "replace 4 GJ-50 guy wires", which contain operational actions and their objects; when the convolution kernel size is 7, the extracted local features correspond to complete clauses like "#45 tension tower needs to replace 4 GJ-50 guy wires", which contain a subject, action, and object. By splicing and fusing the local features corresponding to different ranges, the fused features simultaneously possess the representational ability of micro-level local correspondences and macro-level sentence structure.
[0063] Furthermore, a kernel size of 3 is used to capture features corresponding to closely related local phrases such as equipment, specifications, and quantity; a kernel size of 5 is used to capture features at the sentence level; and a kernel size of 7 is used to capture features at the clause level.
[0064] S23. Combine attention layers and convolutional layers to construct a parsing network.
[0065] Specifically, the output of the attention layer is fed into the convolutional layer after residual connection and layer normalization. The feature representation obtained by processing the output of the convolutional layer after residual connection and layer normalization is used as the hidden layer output of the parsing network, thereby obtaining the parsing network.
[0066] S3. Train the parsing network based on historical standardized text sequences to obtain the trained parsing network, including the following steps S31~S32: S31. Perform synonym replacement and homophone replacement on the historical standardized text sequence to obtain semantically similar enhanced text sequences and enhanced text sequences containing input error features.
[0067] Specifically, a synonym dictionary for the electric power field is constructed, and based on the synonym dictionary, synonym replacement processing is performed on the words in the historical standardized text sequence to generate enhanced text sequences with similar semantics but different expressions; at the same time, by simulating homophone miswriting that may occur in actual scenarios, homophone replacement processing is performed on the words in the historical standardized text sequence to generate an enhanced text sequence containing input error features.
[0068] Exemplarily, for "cable replacement" in the historical standardized text sequence, it is replaced with "cable exchange" based on the synonym dictionary to obtain an enhanced text sequence with similar semantics; for "cable" in the historical standardized text sequence, it is replaced with the homophone-formed "cable (homophone miswriting)" to obtain an enhanced text sequence containing input error features.
[0069] S32. Train the parsing network based on the enhanced text sequence to obtain a trained parsing network.
[0070] Specifically, on the basis of the general pre-trained language model, continuous pre-training is performed on the parsing network based on the enhanced text sequence with similar semantics and the enhanced text sequence containing input error features, so as to obtain the trained parsing network.
[0071] Exemplarily, the pre-training task adopted for continuous pre-training is a masked language model, and the masking strategy adopts whole word masking, that is, a complete word is used as a masking unit instead of masking a single character; the masking ratio is set to 15%, of which 80% of the masked positions are replaced with mask tokens, 10% are randomly replaced with other words, and 10% retain the original words; the learning rate is set to 2e-5; the batch size is set to 32; the training steps are set to 50000 to 100000 steps; the optimizer adopts AdamW; the warm-up ratio is set to 10%.
[0072] The comparison of training results shows that the unimproved original model corresponds to an accuracy of 0.936, a recall of 0.912, an F1 value of 0.877, and a training time of 268.6 seconds; after training the parsing network in combination with the enhanced text sequence by adopting the method described in this embodiment, the obtained trained parsing network has an accuracy up to 0.952, a recall up to 0.935, an F1 value up to 0.915, and a training time of about 300 seconds.
[0073] S4. Process the currently received text sequence through the trained parsing network to obtain a preliminary parsing result, which includes the following steps S41 to S43: S41. When the token of the currently received text sequence matches the key pattern, the attention bias value of the token is a positive value.
[0074] Specifically, the currently received text sequence is pattern-labeled according to the key pattern to identify target words that match the key pattern; for each target word, its corresponding attention bias value is determined to be a preset positive bias value; for words that do not match the key pattern, their corresponding attention bias value is determined to be zero.
[0075] For example, for the currently received text sequence "220kV Fengqing Line #45 tension tower needs to replace 4 GJ-50 guy wires, the geology is ordinary soil", the target words that match the key pattern are identified as "#45" and "GJ-50", the attention bias value corresponding to the target word is determined to be a preset positive bias value, and the attention bias value corresponding to the other words in the text sequence is determined to be zero.
[0076] S42. Through the attention layer, determine the attention score between lexical units based on the attention bias value of the lexical unit.
[0077] Specifically, according to the position-aware attention score calculation formula described in step S22 above, the attention bias value is used as the value of the pattern guidance mask term, and combined with the query vector, key vector and relative position bias term corresponding to the word, the attention score between words in the currently received text sequence is calculated.
[0078] S43. Use convolutional layers to process the features of attention scores to obtain local features of different granularities. By concatenating these features, a fused feature is obtained, and the output yields the preliminary analysis results.
[0079] Specifically, the feature matrix output by the attention layer based on the attention score is input into the convolutional layer. According to the multi-scale convolution calculation formula described in step S22 above, the feature matrix is convolved with convolution kernels of sizes 3, 5, and 7 respectively to obtain local features of different granularities. The local features of different granularities are then concatenated along the feature channel dimension to obtain fused features. The fused features are then processed by linear mapping and determined as the preliminary analysis result.
[0080] For example, for the aforementioned text sequence example, the preliminary parsing results include the identified voltage level "220kV", line name "Fengqing Line", tower "#45 tension tower", operation "replacement", specification "GJ-50", equipment "guer wire", quantity "4", and geology "ordinary soil", as well as the relationships between the identification results, such as the relationship between "#45 tension tower" and "GJ-50 guy wire".
[0081] S5. Verify the preliminary parsing results based on the knowledge index to obtain the structured chemical order information, including the following steps S51~S53: S51. Compare the relation triples in the preliminary analysis results with the relation constraint information in the knowledge index to determine the confidence score corresponding to the preliminary analysis results.
[0082] Specifically, refer to Figure 2 The correspondence between entity types and relation types represented by relation triples identified in the preliminary analysis results is compared with the relation constraint information stored in the knowledge index. If the correspondence represented by the relation triple matches the fit represented by the relation constraint information, the confidence score of the relation triple is increased. If the correspondence represented by the relation triple conflicts with the relation constraint information, the confidence score of the relation triple is decreased, and the relation triple is corrected.
[0083] For example, for the relation triple "#45 tension tower has GJ-50 guy wire" in the preliminary analysis result, the relation constraint information in the knowledge index is compared to determine that there is a relationship between the tower type entity and the guy wire type entity. This relation triple conforms to the fitting relationship represented by the relation constraint information, and the confidence score corresponding to this relation triple is increased. If the relation triple "trees have GJ-50 guy wire" exists in the preliminary analysis result, the relation constraint information in the knowledge index is compared to determine that there is no relationship between the tree type entity and the guy wire type entity in the physical entity. This relation triple conflicts with the relation constraint information, and the confidence score corresponding to this relation triple is reduced. The relation triple is then corrected.
[0084] S52. Perform semantic similarity retrieval on the entity attributes in the preliminary analysis results to determine the corrected entity attributes.
[0085] Specifically, the semantic vectors corresponding to the entity attributes in the preliminary analysis results are determined. The cosine similarity of these semantic vectors with the semantic vectors stored in the vector database is calculated. The entity attribute corresponding to the semantic vector with the highest similarity is determined and identified as the corrected entity attribute to correct any possible recognition bias in the preliminary analysis results.
[0086] For example, for the specification attribute "GJ-5O" identified in the preliminary analysis results (where the number "0" was misidentified as the letter "O"), the entity attribute with the highest semantic vector similarity to the specification attribute in the vector database is determined to be "GJ-50" through semantic similarity retrieval, and "GJ-50" is determined as the corrected entity attribute.
[0087] S53. Based on the confidence score and the corrected entity attributes, obtain the structural chemical order information.
[0088] For example, the structured work order information includes: metadata, which includes work order identifier, source type, and processing time; multi-level classification information, which includes a primary classification and a secondary classification, such as a primary classification of "guer wire replacement" and a secondary classification of "guer wire body replacement"; entity attributes, including voltage level "220kV", line name "Fengqing Line", tower "#45 tension tower", specification "GJ-50", equipment "guer wire" and quantity "4", each entity attribute corresponding to the confidence score; and verified relational triples, such as the relationship between "#45 tension tower" and "GJ-50 guy wire", corresponding to the confidence score.
[0089] Example 3 is an embodiment of the present invention, which provides a power grid work order information parsing system, including: a knowledge index base construction module, a network construction module, a training module, a processing module, and an output module; The knowledge index library construction module is used to perform knowledge extraction processing based on historical standardized text sequences and construct a knowledge index library containing entity attributes and relational constraint information. The network construction module is used to construct a parsing network by combining key patterns of the knowledge index base and local features of different granularities. The training module is used to train the parsing network based on historical standardized text sequences to obtain the trained parsing network; The processing module is used to process the currently received text sequence through the trained parsing network to obtain preliminary parsing results; The output module is used to verify the preliminary analysis results based on the knowledge index library to obtain the structured chemical order information.
[0090] This embodiment also provides an electronic device applicable to a power grid work order information parsing method, comprising: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the power grid work order information parsing method proposed in the above embodiment.
[0091] This embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, it implements a power grid work order information parsing method as proposed in the above embodiment.
[0092] The storage medium proposed in this embodiment belongs to the same inventive concept as the method for parsing power grid work order information proposed in the above embodiments. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.
[0093] Based on the above description of the implementation methods, those skilled in the art can clearly understand that the present invention can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.
[0094] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A method for parsing power grid work order information, characterized in that, include: Knowledge extraction is performed based on historical standardized text sequences to construct a knowledge index library containing entity attributes and relational constraint information; A parsing network is constructed by combining key patterns and local features of different granularities from the knowledge index. The parsing network is trained based on historical standardized text sequences to obtain the trained parsing network; The trained parsing network processes the currently received text sequence to obtain preliminary parsing results. The preliminary analysis results are verified based on the knowledge index database to obtain the structured chemical order information.
2. The method for parsing power grid work order information as described in claim 1, characterized in that, The knowledge extraction process based on historical standardized text sequences, and the construction of a knowledge index library containing entity attributes and relational constraint information, includes: Semantic parsing is performed on historical standardized text sequences to determine entity attributes and syntactic association information between entity pairs. Based on the syntactic association information and the vector representation of entity pairs, relation triples are determined. Determine relation constraint information based on relation triples; Store entity attributes, relation triples, and relation constraint information in a graph database; Store the semantic vectors corresponding to the historical standardized text sequences into a vector database; A knowledge index library is obtained based on graph databases and vector databases.
3. The method for parsing power grid work order information as described in claim 2, characterized in that, The construction of the analytical network by combining key patterns and local features at different granularities includes: Identify key patterns based on entity attributes in the knowledge index; Based on the key patterns, configure attention layers and convolutional layers with different sizes of convolutional kernels to extract local features at different granularities. A parsing network is constructed by combining attention layers and convolutional layers.
4. The method for parsing power grid work order information as described in claim 3, characterized in that, The parsing network is trained based on historical standardized text sequences, resulting in a trained parsing network including: Synonym replacement and homophone replacement are performed on the historical standardized text sequence to obtain semantically similar enhanced text sequences and enhanced text sequences containing input error features; The parsing network is trained based on the enhanced text sequence to obtain the trained parsing network.
5. The power grid work order information parsing method as described in claim 4, characterized in that, The preliminary parsing results obtained by processing the currently received text sequence through the trained parsing network include: When a word in the currently received text sequence matches a key pattern, the attention bias value of the word is positive. Through the attention layer, attention scores between words are determined based on the attention bias values of the words; Convolutional layers are used to process the attention score features to obtain local features of different granularities. These features are then concatenated to obtain fused features, and the output yields preliminary analytical results.
6. The method for parsing power grid work order information as described in claim 5, characterized in that, The verification process based on the knowledge index base yields the following structural chemical order information: The relation triples in the preliminary analysis results are compared with the relation constraint information in the knowledge index to determine the confidence score corresponding to the preliminary analysis results; Semantic similarity retrieval is performed on the entity attributes in the preliminary analysis results to determine the corrected entity attributes; Based on the confidence score and the corrected entity attributes, the structural chemical order information is obtained.
7. The method for parsing power grid work order information as described in claim 6, characterized in that, The step of performing semantic similarity retrieval on the entity attributes in the preliminary analysis results to determine the corrected entity attributes includes: Determine the semantic vectors corresponding to the entity attributes in the preliminary analysis results, and calculate the similarity between the semantic vectors and the semantic vectors in the vector database to obtain a similarity score; Based on the similarity score, the target semantic vector is determined from the vector database; The entity attributes corresponding to the target semantic vector are determined as the corrected entity attributes.
8. A power grid work order information parsing system, employing a power grid work order information parsing method as described in any one of claims 1 to 7, characterized in that, include: The system includes modules for building a knowledge index base, building a network, training, processing, and output. The knowledge index library construction module is used to perform knowledge extraction processing based on historical standardized text sequences and construct a knowledge index library containing entity attributes and relational constraint information. The network construction module is used to construct a parsing network by combining key patterns of the knowledge index base and local features of different granularities. The training module is used to train the parsing network based on historical standardized text sequences to obtain the trained parsing network; The processing module is used to process the currently received text sequence through the trained parsing network to obtain preliminary parsing results; The output module is used to verify the preliminary analysis results based on the knowledge index library to obtain the structured chemical order information.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the power grid work order information parsing method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the power grid work order information parsing method according to any one of claims 1 to 7.