Gas hidden danger investigation semantic element extraction method

By combining pre-trained sentence vector models and risk seed words, the problem of low accuracy and efficiency in gas hazard investigation is solved, achieving efficient hazard identification and risk quantification, and improving the accuracy and efficiency of gas hazard investigation.

CN121525686APending Publication Date: 2026-02-13CHINA NAT INST OF STANDARDIZATION
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511448080.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-11
Publication Date
2026-02-13

AI Technical Summary

Technical Problem

Existing methods for identifying gas hazards suffer from low accuracy and efficiency, making it difficult to effectively identify and quantify risks in multi-source heterogeneous knowledge texts, and lacking a risk perspective.

Method used

A pre-trained sentence vector model is used for knowledge text segmentation. Sentence weights and paragraph coherence are calculated. The optimal segmentation scheme is solved by dynamic programming. The risk metric of the semantic metaspace is calculated by combining risk seed words. An incremental optimal selection strategy is used to identify potential semantic elements.

Benefits of technology

It improves the accuracy and efficiency of gas hazard identification, enhances the precision of investigation and the priority of risk handling, and is applicable to knowledge extraction and hazard identification scenarios from multiple text sources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121525686A_ABST
    Figure CN121525686A_ABST
Patent Text Reader

Abstract

The invention discloses a gas hidden danger investigation semantic element extraction method, which comprises the following steps: inputting a gas hidden danger investigation field knowledge text, and carrying out hidden danger knowledge segment segmentation on the knowledge text; constructing a candidate hidden danger semantic element set for the segmented hidden danger knowledge segments; calculating semantic element space risk measurement based on the hidden danger semantic element set to obtain a risk score; and recognizing the hidden danger semantic elements based on the risk scores. According to the method, the accuracy of gas hidden danger recognition can be improved, the troubleshooting accuracy, efficiency and risk disposal priority are remarkably improved, and the method is suitable for knowledge extraction and hidden danger recognition scenes of various multi-source texts.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to the field of semantic extraction, and in particular to a gas hidden danger investigation semantic element extraction method. BACKGROUND

[0002] The existing gas operation hidden danger investigation is based on standard and other normative documents, and adopts manual patrol or man-machine combined mode to investigate hidden danger points in different scenes. In the self-checking process of safety supervision and gas operation units, frequent differences in opinions and doubts about investigation conclusions occur, which leads to low precision and efficiency of hidden danger investigation. The gas hidden danger investigation semantic element is an indivisible atomic event of hidden danger investigation, which converts the scattered knowledge clauses in the multi-source heterogeneous knowledge text related to hidden danger investigation into the smallest and computable semantic element. The multi-source heterogeneous knowledge text related to hidden danger investigation such as standards, investigation reports and patrol forms is expressed in natural language, and has narrative, fuzziness and redundancy. Semantic element extraction can convert unstructured text into structured and computable knowledge units. Through the extraction of semantic elements, unified expression and alignment of cross-source knowledge can be realized. The traditional method is difficult to depict the coherence between sentences within a paragraph. Through the intra-paragraph coherence index, the semantic element can quantify the local consistency. The inter-paragraph difference is introduced, which can effectively identify semantic discontinuity and reduce false positives of single sentence anomalies. The existing method is mostly limited to the semantic similarity level and lacks the risk perspective. The semantic space risk measurement describes the risk size of the hidden danger semantic element in a quantitative way. In view of this, a gas hidden danger investigation semantic element extraction method is provided. SUMMARY

[0003] The purpose of the application is to provide a gas hidden danger investigation semantic element extraction method.

[0004] To achieve the above purpose, the application is implemented according to the following technical scheme: The application comprises the following steps: 1. A gas hidden danger investigation semantic element extraction method, characterized by comprising the following steps: Step 1) inputting the knowledge text in the field of gas hidden danger investigation, and segmenting the hidden danger knowledge paragraph of the knowledge text, comprising: segmenting the knowledge text into a sentence list to obtain a full-text sentence set; adopting a pre-trained sentence vector model as a sentence vector encoder to map each sentence into an original sentence vector, performing unitization processing on all original sentence vectors to obtain unitized sentence vectors, calculating the comprehensive weight of each sentence, calculating the coherence score of the paragraph, calculating the inter-paragraph dissimilarity between two paragraphs, solving the optimal segmentation scheme by using dynamic programming, and completing the paragraph division of the knowledge text based on the optimal segmentation scheme; Step 2) constructing a candidate hidden danger semantic element set for the segmented hidden danger knowledge paragraph, comprising: S21. Calculate the cosine similarity and cosine distance between sentences; S22. Calculate the local density of each sentence; S23. Calculate the basic adversarial score of the candidate point, introduce random disturbance to get the robust score, and then calculate the final adversarial repulsion score. Based on the 85% percentile score threshold, the candidate point is selected as the semantic meta-center; S24. Calculate the soft membership of the sentence pair to the semantic meta-center, including: Step 3) Calculate the risk score based on the semantic meta set to obtain the risk score, including: S31. Introduce risk seed words in the field of gas hazard investigation, obtain the vector representation of the first risk seed word, and calculate the similarity between the first semantic meta-center and the risk seed word; S32. Normalize the risk direction vector after calculation; S33. Calculate the similarity between the semantic meta-center and the risk direction, define the risk base score of the nth semantic meta, and normalize the risk base score to obtain the risk score; Step 4) Identify the hazard semantic meta based on the risk score, including: S41. Define the quality score of the candidate semantic meta, S42. Define the global objective function, S43. Use an incremental optimal selection strategy to calculate the incremental marginal gain of the candidate semantic meta. In each round, select the semantic meta with the maximum incremental marginal gain to join the set, and iterate until the preset constraint condition is met to obtain the gas hazard semantic meta identification result set.

[0005] Further, in step 1, define the sentence weight and robust center. The calculation formula of the sentence weight is:

[0006] wherein is the significance weight, is the position prior, is the length regularization, is the robust weight; Define the global optimization objective

[0007] wherein, represents a set of continuous, non-overlapping, and covering the entire text paragraph segmentation; is the number of paragraphs; is the coherence score in the paragraph; is the penalty weight; control the importance of the difference between paragraphs.

[0008] Further, in step 2, the final confrontation rejection score is calculated

[0009] Then, the soft membership is calculated, for the sentence belongs to the center :

[0010] wherein, is a balance coefficient, and the candidate points are screened as semantic meta centers according to a score threshold (85% quantile), and is the soft membership core bandwidth.

[0011] Further, in step S3, the risk base score is normalized, and the risk score calculation formula is:

[0012] wherein, is the mean of the risk base score, is the standard deviation of the risk base score.

[0013] Further, in step S4, the incremental marginal gain of all candidate semantic meta is calculated in each round of selection:

[0014] The semantic meta with the maximum is selected to join the set , and the process is iterated until a preset quantity constraint or coverage constraint is reached, and the final set is the output result of the hidden danger semantic meta identification.

[0015] Further, in the calculation of the robust weight, a temporary center vector is first calculated, and then the outlier distance of the sentence from the temporary center is calculated, and the outlier threshold is set to 0.38.

[0016] Further, the pre-trained sentence vector model is any one of BERT, Sentence-BERT or RoBERTa.

[0017] In a second aspect, the embodiments of the present application further provide an electronic device, comprising: a processor; and a memory arranged to store computer executable instructions which, when executed, cause the processor to perform the method steps of the first aspect.

[0018] In a third aspect, the embodiments of the present application further provide a computer readable storage medium storing one or more programs, which when executed by an electronic device comprising a plurality of application programs, cause the electronic device to perform the method steps of the first aspect.

[0019] The present application has the following beneficial effects: The present application is a gas hazard investigation semantic element extraction method, which has the following technical effects compared with the prior art: The method proposed in the present application can not only improve the accuracy of gas hazard identification, but also significantly improve the investigation accuracy, efficiency and risk disposal priority, and is suitable for knowledge extraction and hazard identification scenarios of various multi-source texts. BRIEF DESCRIPTION OF DRAWINGS

[0020] Figure 1 The flow chart of the steps of the gas hazard investigation semantic element extraction method of the present application; Figure 2 The structural schematic diagram of an electronic device in the embodiments of the present application. DETAILED DESCRIPTION

[0021] The present application will be further described below through specific embodiments, and the illustrative embodiments of the present application and the description are used to explain the present application, but not as a limitation of the present application.

[0022] As shown in the drawings, the gas hazard investigation semantic element extraction method of the present application comprises the following steps: Figure 1 Step one: hazard knowledge segment segmentation Step one: hazard knowledge segment segmentation

[0023] First, input the gas hazard investigation field knowledge text, which mainly comes from standard and normative documents, also from investigation reports, news reports, professional books, academic papers.

[0024] Next, use regular methods, regular, spaCy, Stanza, etc. to cut the original text into a sentence list.

[0025] Next, take the sentence as a unit, optionally use a pre-trained sentence vector model to map the sentence to a sentence vector. (Use sentence vector encoder, Map each sentence To the vector: . The sentence vector is denoted as , and all sentence vectors are unitized: .

[0026] Wherein, is the encoder parameter; ​is the vector dimension; unitization ensures that cosine equals dot product, facilitating downstream computation. Next, define sentence weight and robust center.

[0027] Sentence weight:

[0028] where each quantity is defined as follows: (1) is the saliency weight, computed as the intra-sentence keyword attention and, in detail, as follows. Using the BERT model, directly take the [CLS] attention distribution over all words:

[0029] where is the attention weight of [CLS] on word (take the last layer or average multiple layers). Also normalized to [0,1], (2) is the position prior, set or learned by autoregression, for example, (Head sentence): The closer to the back, the weight index decays. Here .

[0030] (3) is the length regularization, to prevent long sentences from dominating. Define the sentence length as the number of words , where avg_len is the average sentence length of the entire paragraph; take the inverse as a penalty: .

[0031] (4) is the robust weight, used to suppress outlier sentences: first calculate using the temporary center , then set , to control the strength of outlier suppression.

[0032] Here, set .

[0033] Next, calculate the paragraph center:

[0034] Next, calculate the mean of the center similarity:

[0035] where is the segment center vector, is the cosine similarity. The larger the value, the more the sentence is close to the center of the paragraph theme.

[0036] Next, calculate the direction distribution concentration:

[0037] The closer to 1, the more the sentence vector direction is highly consistent (theme concentration); the closer to 0, the more the direction is scattered.

[0038] Next, calculate the adjacency similarity and pairwise similarity:

[0039]

[0040] Next, calculate the dispersion and outlier penalty:

[0041]

[0042] where StdDev refers to the standard deviation. The outlier threshold is 0.38.

[0043] Next, integrate the coherence score:

[0044] where here, ; is used to punish the starting .

[0045] Next, calculate the dissimilarity matrix of all sentence pairs between two paragraphs

[0046] where, : the dissimilarity between sentence (paragraph ) and sentence (paragraph ), generally 5~50 sentences per paragraph. Here, the first 50 sentences are taken.

[0047] First, for each paragraph and paragraph B, the nearest neighbor dissimilarity (i.e., the distance from the most similar sentence in B) is defined as:

[0048] Define the inter-paragraph dissimilarity as:

[0049] Symmetric merging:

[0050] Next, define the global optimization objective

[0051] where, denotes a set of consecutive, non-overlapping, full-text-covering paragraph splits; is the number of paragraphs.

[0052] is the coherence score within a paragraph. is the penalty weight; controls the importance of the inter-paragraph difference.

[0053] The length penalty term is defined as: .

[0054] where, is the expected paragraph length, is the length penalty coefficient.

[0055] Next, define the candidate paragraph space and pre-compute the scores For each candidate paragraph cache:

[0056] For each pair of adjacent candidate paragraphs cache:

[0057] where, denotes the set of candidate paragraphs, which contains all consecutive segments that satisfy .

[0058]

[0059] For each cache

[0060] For each pair of adjacent candidates (such that ), cache

[0061] where, denotes the set of candidate paragraphs. It contains all possible sentence intervals as long as the interval length is within the allowed paragraph length range, the candidate is included.

[0062] Then, the optimal segmentation is solved by dynamic programming: Define DP states:

[0063] Finally, the optimal segmentation scheme is obtained and the paragraph division is completed accordingly.

[0064] Step two: candidate risk semantic meta set After obtaining the paragraph division, further extract candidate semantic meta from the sentence level.

[0065] First, construct the cosine similarity between sentences: Cosine similarity measures distance:

[0066] For each sentence Construct -neighborhood set .

[0067] Calculate local density:

[0068] To avoid candidate points from being too concentrated, introduce repulsive energy:

[0069] Where is the selected center set of the th round, is the repulsive energy kernel bandwidth.

[0070] Then, the basic adversarial score of the candidate point:

[0071] To improve robustness, introduce random perturbation. Let be a random direction vector, be the perturbation amplitude, be the number of samples, then the robust score is:

[0072] Then, calculate the final adversarial repulsive score

[0073] Where, is the balance coefficient, according to the score threshold (85% quantile), filter the candidate points as semantic meta centers.

[0074] Next, calculate the soft membership, for sentence belongs to the center :

[0075] wherein is the soft home core bandwidth.

[0076] Step three: semantic meta-space risk measurement On the basis of the candidate semantic meta set, introduce the risk seed word vector in the field knowledge .

[0077] First, calculate the similarity between semantic meta and seed words:

[0078] Then, calculate the risk direction. Take the average vector of the three seed words:

[0079] Then normalize:

[0080] Define the similarity between the semantic meta center and the risk direction:

[0081] Based on this, define the risk base score of the first semantic meta:

[0082] wherein is the balance parameter.

[0083] Finally, normalize the risk base score to get the risk score:

[0084] wherein, is the average of the risk base score, is the standard deviation of the risk base score.

[0085] Step four: hazard semantic meta identification After obtaining the candidate semantic meta and the risk score, define the quality score by combining multiple indicators.

[0086] The quality score of the candidate semantic meta is defined as:

[0087] wherein: The first term : risk measurement; The second term : member consistency; The third term : paragraph coherence; The fourth item : redundancy and outlier penalty.

[0088] Further, define the global objective function:

[0089] Where, is the selected semantic meta set, is the redundancy penalty coefficient.

[0090] In the selection process, introduce the incremental marginal gain:

[0091] Each round of selection can bring the maximum gain of the candidate semantic meta, until the quantity and coverage requirements are met. Finally, the hazard semantic meta recognition result set is obtained.

[0092] In the final set of recognized hazard semantic meta, each semantic meta corresponds to a risk metric and a set of member sentences. In order to ensure that the results are representative, diverse and robust, an incremental optimal selection strategy is adopted.

[0093] First, initialize the set .

[0094] In each round of selection, calculate the incremental marginal gain of all candidate semantic meta:

[0095] Select the semantic meta with the maximum to join the set .

[0096] The process is iterated until the preset quantity constraint or coverage constraint is reached. The final set is the output result of hazard semantic meta recognition.

[0097] Constraint conditions: Quantity constraint: Limit the number of semantic meta within a reasonable range:

[0098] Where are the minimum and maximum quantities respectively.

[0099] Coverage constraint: The selected semantic meta set should be able to cover all paragraphs and main semantic areas, that is:

[0100] Ensure that no key sentences and elements are missed.

[0101] Implementation Case Semantic elements of potential hazards in cathodic protection (CP) of gas pipeline networks are extracted as case studies.

[0102] Select a standardized description of a section for urban gas trunk line steel pipe CP: This pipe section uses impressed current cathodic protection, the pipe material is X52 steel, and it is covered with a high-adhesion three-layer PE coating.

[0103] The rectifier is rated at 30 A / 30 V. Monthly inspection records include the operating current, voltage, and steady-state AC input values.

[0104] The pipeline ground protection potential (instantaneous OFF) should be maintained. .

[0105] Deep well anode bed resistance The backfill material contains coke particles with a particle size of 3–10 mm and a moisture content of 10%.

[0106] Insulating flanges and jumper cables should be inspected regularly to prevent crosstalk in the protected section caused by shielding.

[0107] For sections near 110 kV transmission corridors, the risks of AC coupling interference and AC corrosion need to be assessed.

[0108] There is a risk of stray current at the track crossing point, and open / short circuit potential monitoring points should be installed.

[0109] Insulating joints and drainage devices are installed at the station to prevent reverse influence from the grounding system.

[0110] The remote monitoring platform collects the rectifier's electrical parameters and reference electrode potential to achieve alarm linkage.

[0111] Generate monthly reports and annual maintenance plans, and archive test pile data and repair records.

[0112] Unified parameter settings Vector dimension: .

[0113] Sentence length (number of characters / words) and average sentence length : [20, 18, 16, 22, 19].

[0114] Significance weight (attention summary) : .

[0115] Position weight : [1.0000, 0.8869, 0.7866, 0.6977, 0.6188, 0.5488, 0.4868,0.4320, 0.3830, 0.3396].

[0116] Length weight : [1.1111, 1.0000, 0.8889, 1.2222, 1.0556, 0.9444, 1.1667,1.1111, 1.0000, 1.0556].

[0117] Robust weight where , .

[0118] Given [0.91, 0.88, 0.86, 0.84, 0.83, 0.81, 0.80, 0.78, 0.76,0.75], then [0.763, 0.697, 0.658, 0.619, 0.600, 0.566, 0.549, 0.515,0.487, 0.472].

[0119] Intra-segment coherence parameter: .

[0120] Segmentation and length penalty: .

[0121] Candidate / density parameter: Take perturbation to make robust division .

[0122] Soft attribution: .

[0123] Risk measure: and by sample adaptive statistics (see Section 4).

[0124] Identification phase: .

[0125] Step one 2.1 Sentence integrated weight: Substitute the above values, we get

[0126] 2.2 Candidate segmentation schemes and intra-segment indicators Consider two segmentations: Scheme A: .

[0127] Scheme B: .

[0128] Give the intra-segment and center similarity (computed from the weighted center values given above): Scheme A: : = [0.93, 0.89, 0.87, 0.85, 0.84]

[0129] Contiguous similarity ( ): [0.90, 0.88, 0.86, 0.85], mean 0.8725; Outlier proportion .

[0130]

[0131] : = [0.86, 0.84, 0.83, 0.81, 0.80]

[0132] Contiguous similarity [0.87, 0.85, 0.84, 0.83], mean 0.8475; .

[0133]

[0134] Inter-segment dissimilarity (Scheme A): Let the maximum cross-segment nearest-neighbor similarity be (max ): [0.68, 0.66, 0.67, 0.64, 0.63], then:

[0135] Take the inverse (inv ) [0.67, 0.66, 0.65, 0.64, 0.62] to get

[0136] Scheme B: of ,

[0137] Take . Length penalty .

[0138] 2.3 Global objective function comparison

[0139] Scheme A: .

[0140] Scheme B: .

[0141] Select Scheme A ( ) as the optimal split.

[0142] Step two 3.1 Inter-sentence similarity and local density Take the 3 nearest neighbors similarity of each sentence: : with

[0143] : with

[0144] : with

[0145] : with

[0146] : with

[0147] : with

[0148] : with

[0149] : with

[0150] : with

[0151] : with

[0152] Let ,

[0153] Substitute one by one, we get (rounded):

[0154] 3.2 Anti-score and final score First round , no center .

[0155]

[0156] Therefore

[0157] Threshold =85% percentile (10 sentences ≈ take the top 2), select the center sentence:

[0158] 3.3 Soft attribution (to )

[0159] Approximate with inter-sentence similarity: for example and so on, the calculation is (rounded to 3 digits):

[0160] Step three Select CP risk seeds (vector represents) and give the similarity with the center: Seed 1 (insufficient protection: protection potential positive) Seed 2 (overprotection: hydrogen-induced peeling / coating blistering) Seed 3 (AC coupling corrosion risk) Similarity with two centers:

[0161] The aggregation direction is approximated by the mean:

[0162] Risk base score ( ):

[0163]

[0164] Statistics:

[0165] Normalized risk score:

[0166] Step four Quality score ; two-center same category , ; two-center outlier ratio :

[0167]

[0168] Redundancy penalty term (two-center similarity setting :

[0169]

[0170] Incremental criterion (given :

[0171] Under the quantity / coverage constraint , select .

[0172] Result interpretation Semantic element A (center : rectifier inspection) Quality score , risk score (lower), focus on operation maintenance and account consistency; density and member consistency are high, covering a type of text of "inspection - electrical parameters - remote transmission".

[0173] Semantic element B (center : protection potential threshold) Quality score , risk score (higher), corresponding to the core criterion of insufficient protection / over-protection window), and the seed such as AC coupling is closer in direction; should be preferentially included in the alarm and verification.

[0174] The above as in the present application Figure 1The gas hidden trouble investigation semantic element extraction method disclosed by the embodiment can be applied to a processor or implemented by the processor. The processor can be an integrated circuit chip with signal processing capability. In the implementation process, the steps of the above method can be completed by integrated logic circuits or instructions in the form of software in the processor. The processor described above can be a general processor, including a central processing unit (CPU), a network processor (NP), etc.; or a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The disclosed methods, steps and logic block diagrams in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can be any conventional processor. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module can be located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, or other mature storage media in the art. The storage medium is located in the memory, and the processor reads the information in the memory and combines the hardware to complete the steps of the above method.

[0175] The electronic device can further execute Figure 1 a gas hidden trouble investigation semantic element extraction method, and implement Figure 2 the functions of the embodiments described above. The embodiments of the present application will not be repeated here.

[0176] The embodiments of the present application further propose a computer readable storage medium storing one or more programs, the one or more programs including instructions for executing any of the above gas hidden trouble investigation semantic element extraction methods when executed by an electronic device including a plurality of applications.

[0177] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can be in the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can be in the form of a computer program product implemented on one or more computer usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer usable program code.

[0178] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flow or blocks Figure 1 means for functionally implementing the steps listed in the flowchart block or blocks.

[0179] These computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture including instructions which implement the function specified in the flowchart block or blocks. Figure 1 one or more flow or blocks Figure 1 means for functionally implementing the steps listed in the flowchart block or blocks.

[0180] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flow or blocks Figure 1 means for functionally implementing the steps listed in the flowchart block or blocks.

[0181] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0182] The memory can include non-persistent memory and / or volatile memory, such as random access memory (RAM) and / or cache memory, non-volatile memory, such as read-only memory (ROM), EPROM, and / or flash memory, etc. The memory is an example of computer readable media.

[0183] Computer-readable media includes permanent and non-permanent, movable and non-movable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to a computing device. According to the definition herein, computer-readable media does not include transitory media such as modulated data signals and carriers.

[0184] It should also be noted that the terms "comprising", "containing", or any other variant thereof are intended to cover a non-exclusive inclusion, such that a process, method, article or apparatus that comprises a list of elements does not only include those elements, but can also include other elements not expressly listed or inherent to such process, method, article or apparatus. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article or apparatus that includes the element.

[0185] Those skilled in the art will appreciate that embodiments of the present application can be provided as a method, system or computer program product. Accordingly, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, etc.) containing computer usable program code.

[0186] The above description is only the preferred embodiment of the present application, and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for extracting semantic elements in gas hazard investigation, characterized in that, Includes the following steps: Step 1) Input knowledge text in the field of gas hazard investigation, and segment the knowledge text into hazard knowledge segments, including: The knowledge text is segmented into a list of sentences to obtain a set of sentences in the full text. A pre-trained sentence vector model is used as a sentence vector encoder to map each sentence to an original sentence vector. All original sentence vectors are normalized to obtain normalized sentence vectors. The comprehensive weight of each sentence is calculated, the coherence score of the paragraph is calculated, the inter-paragraph dissimilarity between two paragraphs is calculated, and dynamic programming is used to solve the optimal segmentation scheme. Based on the optimal segmentation scheme, the paragraph division of the knowledge text is completed. Step 2) Construct a candidate hazard semantic element set for the segmented hazard knowledge segments, including: S21. Calculate the cosine similarity and cosine distance between sentences; S22. Calculate the local density of each sentence; S23. Calculate the basic adversarial score of the candidate points, introduce random perturbation to obtain the robust score, and then calculate the final adversarial rejection score. Based on the score threshold of the 85th percentile, select candidate points as semantic meta-centers. S24. Calculate the soft membership degree of a sentence to a semantic metacenter, including: Step 3) Calculate the risk score by measuring the semantic metaspace risk based on the aforementioned set of hidden danger semantic elements, including: S31. Introduce risk seed words from the field of gas hazard investigation, obtain the vector representation of the i-th risk seed word, and calculate the similarity between the i-th semantic metacenter and the risk seed word; S32. After calculating the risk direction vector, normalize it; S33. Calculate the similarity between the semantic element center and the risk direction, define the risk basis of the nth semantic element, normalize the risk basis to obtain the risk score; Step 4) Based on the risk score, identify the semantic elements of potential hazards, including: S41. Define the quality score of candidate semantic elements. S42. Define the global objective function. S43. An incremental optimal selection strategy is adopted to calculate the incremental marginal gain of candidate semantic elements. In each round, the semantic element with the largest incremental marginal gain is selected and added to the set. The process is iterated until the preset constraints are met, and the set of semantic element identification results for gas hazard is obtained.

2. The method for extracting semantic elements for investigating gas hazard as described in claim 1, characterized in that, In step 1, sentence weights and robustness centers are defined. The formula for calculating sentence weights is: ; in For significance weight, As a priori location, For length regularization, For robust weights; Define global optimization objective ; in, This indicates a group of continuous, non-overlapping paragraphs that cover the entire text. Number of segments; The score is based on the overall coherence within the segment. For penalty weighting; The importance of controlling inter-segment differences.

3. The method for extracting semantic elements for gas hazard investigation according to claim 1, characterized in that, In step 2, the final resistance rejection score is calculated: ; Next, soft membership is calculated for sentences. Belongs to the center : ; in, It is a balance coefficient, based on the scoring threshold. (85th percentile) Candidate points were selected as semantic metacenters. This refers to the soft-homed core bandwidth.

4. The method for extracting semantic elements for gas hazard investigation according to claim 1, characterized in that, In step S3, the risk base score is normalized, and the risk score calculation formula is obtained as follows: ; in, The mean of the risk baseline is... The standard deviation of the risk basis score.

5. The method for extracting semantic elements for gas hazard investigation according to claim 1, characterized in that, In step S4, at each round of selection, the incremental marginal gain of all candidate semantic elements is calculated: ; Select with the largest Add semantic elements to the set This process iterates continuously until the preset quantity constraint or coverage constraint is met, resulting in the final set. This is the output result of the semantic element recognition of potential hazards.

6. The method for extracting semantic elements for gas hazard investigation according to claim 1, characterized in that, In the calculation of the robust weight, the temporary segment center vector is calculated first, and then the outlier distance between the sentence and the temporary center is calculated, with the outlier threshold set at 0.

38.

7. The method for extracting semantic elements for gas hazard investigation according to claim 2, characterized in that, In step S13, the pre-trained sentence vector model is any one of BERT, Sentence-BERT, or RoBERTa.

8. An electronic device, comprising: processor; as well as A memory configured to store computer-executable instructions, which, when executed, cause the processor to perform the method of any one of claims 1 to 7.

9. A computer-readable storage medium storing one or more programs, which, when executed by an electronic device including a plurality of applications, cause the electronic device to perform the method of any one of claims 1 to 7.