A power grid risk text word segmentation method and device

CN117371438BActive Publication Date: 2026-10-30GUANGDONG POWER GRID CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311592374.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-24
Publication Date
2026-10-30
Estimated Expiration
2043-11-24

AI Technical Summary

Technical Problem

[0004]然而现有电网风险文本分词没有统一标准,对于歧义词等的切分效果不好,无法得到良好的分词结果

Benefits of technology

[0049]综上,本发明提供了一种电网风险文本分词方法和装置,包括获取电网风险中文文本词汇数据;对电网风险中文文本词汇数据进行多次预处理,以提升后续分词处理的效果;对预处理后的词汇数据,使用正向模板匹配进行初步分词;根据初步分词后的特征词量,使用THULAC中文分词工具,进行二次分词,得到二次分词后特征词量;对一二次分词后的电网风险文本词量,使用深度学习BiLSTM+CRF的方法,大规模训练电网风险文本序列分词模型并构建双阶段电网风险文本序列分词模型;使用训练后的模型进行最终分词处理,得到分词结果;对电网风险文本分词后,进行分词效果统计,并进行统计分析,检测分词效果。本发明通过上述方法,可以提高电网风险文本分词效率和准确度,并得到良好的文本分词结果。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117371438B_ABST
    Figure CN117371438B_ABST
Patent Text Reader

Abstract

The application provides a power grid risk text word segmentation method and device, including obtaining power grid risk Chinese text vocabulary data; multiple preprocessing is conducted on the power grid risk Chinese text vocabulary data; forward template matching is used for preliminary word segmentation on the preprocessed vocabulary data; secondary word segmentation is conducted on the preliminary word segmentation features using THULAC Chinese word segmentation tool; the power grid risk text word quantity after the first and second word segmentation is used to train a power grid risk text sequence word segmentation model in a large scale and construct a two-stage power grid risk text sequence word segmentation model using a deep learning BiLSTM+CRF method; the trained model is used for final word segmentation processing to obtain a word segmentation result; after the power grid risk text is segmented, word segmentation effect statistics are conducted, and statistical analysis is conducted to detect the word segmentation effect. Through the above method, the power grid risk text word segmentation efficiency and accuracy can be improved, and a good text word segmentation result can be obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of power grid technology, specifically relating to a method and apparatus for word segmentation of power grid risk text. Background Technology

[0002] Power grid risk outage and restoration information in the power sector is crucial for timely line operation and maintenance. Extracting key information is a critical step in achieving intelligent operation and maintenance of transmission lines. Extracting key word segmentation information requires text segmentation, but since Chinese texts in the power sector typically contain a large number of specialized terms, word segmentation is often ineffective.

[0003] Chinese texts in the power sector have unique professional characteristics, thus requiring large-scale training of specialized power sector vocabulary to make them more suitable for power grid risk text segmentation in this field. Unstructured data such as power grid risk text contains a wealth of operational experience; analyzing it can provide fundamental data support for power grid operation decisions and also provide foundational data for subsequent power sector natural language processing tasks such as power text mining, knowledge graph construction, and word-level corpus analysis.

[0004] However, there is no unified standard for word segmentation of existing power grid risk texts, and the segmentation effect is not good for ambiguous words, etc., and good word segmentation results cannot be obtained. Summary of the Invention

[0005] In view of this, the present invention aims to provide a method and apparatus for word segmentation of power grid risk text, for performing word segmentation processing on power grid risk outage and power supply information to obtain accurate word segmentation results.

[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution:

[0007] In a first aspect, the present invention provides a method for word segmentation of power grid risk text, comprising the following steps:

[0008] Obtain Chinese textual vocabulary data on power grid risks;

[0009] Multiple preprocessing steps are performed on the Chinese vocabulary data of power grid risks to improve the effect of subsequent word segmentation.

[0010] For the preprocessed vocabulary data, positive template matching is used for preliminary word segmentation;

[0011] Based on the feature word count after the initial word segmentation, the THULAC Chinese word segmentation tool is used to perform secondary word segmentation to obtain the feature word count after secondary word segmentation.

[0012] Based on the number of words in the power grid risk text after primary and secondary word segmentation, an RNN recurrent neural network text recognition model is constructed.

[0013] A method for building a deep neural network BiLSTM+CRF based on an RNN recurrent neural network text recognition model to train a large-scale power grid risk text sequence word segmentation model;

[0014] A pre-trained bounding box model is added before each neural network structure layer in the trained power grid risk text sequence word segmentation model, and corresponding feature weights are assigned to construct a two-stage power grid risk text sequence word segmentation model.

[0015] The power grid risk text sample training dataset was used to train a knowledge distillation network for a two-stage power grid risk text sequence word segmentation model.

[0016] The trained two-stage power grid risk text sequence word segmentation model is used for further word segmentation to obtain the word segmentation results.

[0017] After segmenting the text on power grid risks, the segmentation effect is statistically analyzed to detect the effectiveness of the segmentation.

[0018] Output the final word segmentation result.

[0019] Furthermore, the Chinese text vocabulary data on power grid risks undergoes multiple preprocessing steps, specifically including:

[0020] The obtained Chinese text vocabulary data on power grid risks is preprocessed to increase the diversity of training data for power grid risk information.

[0021] The vocabulary data that has undergone the first preprocessing is subjected to a second preprocessing to remove meaningless words and simplify the vocabulary data in order to retain the effective vocabulary data.

[0022] The vocabulary data that has undergone the second preprocessing is then subjected to a third preprocessing, which involves part-of-speech tagging.

[0023] Furthermore, in part-of-speech tagging, pronouns are tagged as r, coordinating conjunctions as c, auxiliary words as u, modal particles as y, numerals as m, and quantifiers as q.

[0024] Furthermore, in the deep learning BiLSTM+CRF method, BiLSTM is a model consisting of two inverted LSTM components. The update and output formulas of this model are as follows:

[0025] LSTM update formula from beginning to end:

[0026]

[0027] The LSTM update formula from back to front is:

[0028]

[0029] The formula for the output layer after stacking two LSTM layers is:

[0030]

[0031] Among them, y n This is the output of a BiLSTM at n time intervals, where w is the weight, h is the bias, and H is the number of hidden units. 1 To update the output cell value in the forward pass, h 2 This is the backward update output unit, where b is the error value and x is the error value. n For input values.

[0032] Furthermore, we performed statistical analysis on the word segmentation results, specifically as follows:

[0033] After segmenting the text on power grid risks, the segmentation effect is statistically analyzed, and positive matching is performed with the set segmentation template. Statistical analysis is then conducted to detect the segmentation effect.

[0034] The segmentation template is set to be generated using the Seq2Seq model, which utilizes two RNN networks, one as the encoding part and the other as the decoding part.

[0035] Furthermore, when assigning weights in the two-stage power grid risk text sequence word segmentation model, the specific method is as follows:

[0036]

[0037] Where b is a constant value, X i W is a sample text data on power grid risks. i For the corresponding two-stage network model features, r(X) represents the weights. i y represents the probability that the predicted sample data belongs to the category with a label of 1 in the corresponding word segment. i =1 indicates that the text sample data X i The probability that the object actually belongs to category label 1, y i =0 indicates that the text sample data X i The probability value that actually belongs to category label 0, where α is the modulation coefficient.

[0038] Secondly, the present invention provides a power grid risk text segmentation device, comprising:

[0039] The preprocessing module is used to acquire Chinese vocabulary data of power grid risks and to perform multiple preprocessing steps on the Chinese vocabulary data of power grid risks to improve the effect of subsequent word segmentation.

[0040] The word segmentation module is used to perform preliminary word segmentation on the preprocessed vocabulary data using positive template matching; it is also used to perform secondary word segmentation using the THULAC Chinese word segmentation tool based on the feature word count after the preliminary word segmentation, so as to obtain the feature word count after secondary word segmentation.

[0041] The model building module is used to construct an RNN recurrent neural network text recognition model based on the word count of power grid risk text after primary and secondary word segmentation; it is also used to build a deep neural network BiLSTM+CRF method based on the RNN recurrent neural network text recognition model to train the power grid risk text sequence word segmentation model on a large scale; and it is also used to add a pre-trained bounding box model before each neural network structure layer in the trained power grid risk text sequence word segmentation model and assign corresponding feature weights to construct a two-stage power grid risk text sequence word segmentation model.

[0042] The model training module is used to train the knowledge distillation network of the two-stage power grid risk text sequence word segmentation model using the power grid risk text sample training dataset;

[0043] The word segmentation module is used to perform final word segmentation processing using a trained two-stage power grid risk text sequence word segmentation model to obtain the word segmentation results; it is also used to perform word segmentation effect statistics and statistical analysis after word segmentation of power grid risk text to detect the word segmentation effect; and it is also used to output the final word segmentation results.

[0044] Furthermore, in the model building module, the weight allocation for the two-stage power grid risk text sequence word segmentation model is performed according to the following formula:

[0045]

[0046] Where b is a constant value, X i W is a sample text data on power grid risks. i For the corresponding two-stage network model features, r(X) represents the weights. i y represents the probability that the predicted sample data belongs to the category with a label of 1 in the corresponding word segment. i =1 indicates that the text sample data X i The probability that the object actually belongs to category label 1, y i =0 indicates that the text sample data X i The probability value that actually belongs to category label 0, where α is the modulation coefficient.

[0047] Thirdly, the present invention provides a computer device, including: a memory and a processor, and a computer program stored in the memory, which, when executed on the processor, implements the power grid risk text segmentation method of the first aspect.

[0048] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when run by a processor, implements the power grid risk text segmentation method as described in the first aspect.

[0049] In summary, this invention provides a method and apparatus for word segmentation of power grid risk text, including: acquiring Chinese vocabulary data of power grid risk text; performing multiple preprocessing steps on the vocabulary data to improve the effect of subsequent word segmentation; performing preliminary word segmentation using positive template matching on the preprocessed vocabulary data; performing secondary word segmentation using the THULAC Chinese word segmentation tool based on the feature word count after the preliminary segmentation to obtain the feature word count after secondary segmentation; training a large-scale power grid risk text sequence word segmentation model and constructing a two-stage power grid risk text sequence word segmentation model using the deep learning BiLSTM+CRF method on the power grid risk text word count after the first and second segmentation; performing final word segmentation using the trained model to obtain the word segmentation result; and statistically analyzing the word segmentation effect after segmentation to detect the word segmentation effect. This invention, through the above method, can improve the efficiency and accuracy of power grid risk text word segmentation and obtain good text word segmentation results.

[0050] Attached Figure

[0051] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the 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.

[0052] Figure 1 A flowchart of a method for segmenting text related to power grid risks provided in an embodiment of the present invention;

[0053] Figure 2 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present invention. Detailed Implementation

[0054] To make the objectives, features, and advantages of this invention more apparent and understandable, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0055] Please see Figure 1 This invention provides a method for word segmentation of power grid risk text, comprising the following steps:

[0056] S1: Obtain Chinese text vocabulary data of power grid risks.

[0057] Teams and departments collect power grid equipment risk information, perform classification and summary, screen out important and non-important power on-off information, and simultaneously collect power transmission grid power on-off risk information summarized by the dispatch department.

[0058] S2: Perform multiple preprocessing operations on the Chinese text vocabulary data of power grid risks to improve the effect of subsequent word segmentation processing.

[0059] It should be noted that first preprocessing is performed on the obtained Chinese text dataset in the electric power field. By increasing the diversity of power grid risk information training data, such as synonym replacement, random insertion, random deletion, random swap, random perturbation, etc., overfitting of the model to the training data is avoided, and the generalization ability and robustness of the model are improved.

[0060] Second preprocessing is performed on the Chinese text data of power grid risks after the first preprocessing, including manual deduplication, stop word removal, and alignment. Meaningless words such as conjunctions, function words, modal particles that play a connecting role, for example, "de", "ba", "danshi" (but), etc., are removed.

[0061] Third preprocessing is performed on the data after the second preprocessing, using part-of-speech tagging to tag r-pronouns, c-coordinating conjunctions, u-auxiliary words, y-modal particles, m-numerals, and q-classifiers.

[0062] S3: Perform preliminary word segmentation on the preprocessed vocabulary data using forward template matching.

[0063] Forward maximum matching segmentation is usually referred to as the MM method for short. Its basic idea is: assuming that the longest word in the word segmentation dictionary has i Chinese characters, take the first i characters in the current character string of the processed document as the matching field, and look up the dictionary. If such an i-character word exists in the dictionary, the matching is successful, and the matching field is segmented out as a word. If such an i-character word cannot be found in the dictionary, the matching fails, the last character in the matching field is removed, and the remaining character string is re-matched... This process continues until the matching is successful, that is, a word is segmented out or the length of the remaining character string is zero. In this way, one round of matching is completed, then the next i-character string is taken for matching processing until the entire document is scanned.

[0064] Therefore, when performing preliminary word segmentation using forward template matching, m characters of the Chinese language to be segmented are taken from left to right as the matching field, where m is the maximum entry length in the dictionary that needs to be set.

[0065] S4: Based on the feature word count after the initial word segmentation, use the THULAC Chinese word segmentation tool to perform secondary word segmentation and obtain the feature word count after secondary word segmentation.

[0066] THULAC (THU Lexical Analyzer for Chinese) is a Chinese lexical analysis toolkit with Chinese word segmentation and part-of-speech tagging functions.

[0067] After obtaining the feature word count from the secondary word segmentation, further processing is performed on the standard vocabulary chain to accurately extract relatively complete words.

[0068] S5: Construct an RNN recurrent neural network text recognition model based on the number of words in the power grid risk text after primary and secondary word segmentation.

[0069] A recurrent neural network (RNN) is a type of recursive neural network that takes sequence data as input, recurses in the direction of sequence evolution, and connects all nodes (recurrent units) in a chain-like manner.

[0070] x is the input, h is the hidden layer unit, o is the output, L is the loss function, and y is the label of the training set. The performance of the hidden layer unit h at time t is determined not only by the input at that moment but also by the time steps before time t. V, W, and U are the weights.

[0071] For time t: h (t) =Φ(Ux (t) +Wh (t-1) +b), where Φ() is the activation function, chosen as the tanh function, and b is the bias. The output at time t is o. (t) =Vh (t) +c. The final model prediction output is:

[0072] S6: A method for building a deep neural network BiLSTM+CRF based on an RNN recurrent neural network text recognition model, for large-scale training of a power grid risk text sequence word segmentation model.

[0073] BiLSTM consists of two inverted LSTM components, outputting the joint decision state from the two LSTMs. Bidirectional Long Short-Term Memory (BiLSTM) neural networks combine the concepts of forward LSTM and backward LSTM.

[0074] The update and output formulas for this model are as follows:

[0075] LSTM update formula from beginning to end:

[0076]

[0077] The LSTM update formula from back to front is:

[0078]

[0079] The formula for the output layer after stacking two LSTM layers is:

[0080]

[0081] Among them, y n It is the output of BiLSTM at n time intervals, where W is the weight, h is the bias, and H is the number of hidden units.

[0082] Conditional random fields (CRFs) combine maximum entropy models and hidden Markov models. They are undirected graphical models that are often used to label or analyze sequential data.

[0083] The BiLSTM+CRF model structure proposed in this embodiment is arranged from bottom to top. The bottom layer is the input (character or word vector). Since it is a sequence model, the input for each time step is a single character / word vector (usually pre-trained). For each word, the corresponding output is the score for each label.

[0084] S7: Add the pre-trained model to each neural network structure layer of the trained power grid risk text sequence word segmentation model and assign corresponding feature weights to construct a two-stage power grid risk text sequence word segmentation model.

[0085] The two-stage power grid risk text sequence word segmentation model is named FoveaModel, and its weight calculation is as follows:

[0086]

[0087] Where b is a constant value, X i W is a sample text data on power grid risks. i For the corresponding two-stage network model features, r(X) represents the weights. i y represents the probability that the predicted sample data belongs to the category with a label of 1 in the corresponding word segment. i =1 indicates that the text sample data X i The probability that the object actually belongs to category label 1, y i =0 indicates that the text sample data X i The probability value that actually belongs to category label 0, where α is the modulation coefficient.

[0088] S8: Use the power grid risk text sample training dataset to train the knowledge distillation network of the two-stage power grid risk text sequence word segmentation model.

[0089] S9: Use the trained two-stage power grid risk text sequence word segmentation model to perform the final word segmentation process and obtain the word segmentation results.

[0090] S10: After segmenting the power grid risk text, perform statistical analysis on the segmentation effect to detect the segmentation effect.

[0091] When performing word segmentation effect statistics, the segmentation is positively matched with the set segmentation template, and statistical analysis is performed to detect the word segmentation effect.

[0092] The segmentation model is set to use an attention mechanism (Seq2Seq model to generate) and then the template is manually corrected.

[0093] The Seq2Seq model utilizes two RNN networks: one as the Encoder and the other as the Decoder. Encoding means transforming the input sequence into a fixed-length vector, and Decoding means decoding the fixed-length input vector into an output sequence.

[0094] The Seq2Seq model generates an output sequence Y based on an input sequence X. In an RNN, the hidden state at the current time step is determined by the state at the previous time step and the input x at the current time step, as shown in equation (1):

[0095] h t =f(h t-1 ,x t (1)

[0096] During the encoding process, the Encoder learns to encode the input sequence into a fixed-size state vector C. That is, at the encoding stage, one character / word (actually a vector of the character / word) is input; after the input sentence is completed, an intermediate semantic vector C is generated.

[0097]

[0098] Where hi refers to the latent vector encoded by the encoder, t refers to the current time step, and T x This refers to the final moment, where f and q are nonlinear functions.

[0099] S11: Output the final word segmentation result.

[0100] This invention provides a method for word segmentation of power grid risk text, including: acquiring Chinese vocabulary data of power grid risk text; performing multiple preprocessing steps on the vocabulary data to improve the effect of subsequent word segmentation; performing preliminary word segmentation using positive template matching on the preprocessed vocabulary data; performing secondary word segmentation using the THULAC Chinese word segmentation tool based on the feature word count after the preliminary segmentation to obtain the feature word count after secondary segmentation; training a large-scale power grid risk text sequence word segmentation model using the deep learning BiLSTM+CRF method to construct a two-stage power grid risk text sequence word segmentation model based on the word count after the primary and secondary segmentation; performing final word segmentation using the trained model to obtain the word segmentation result; and statistically analyzing the word segmentation effect after segmentation to detect the word segmentation performance. This invention, through the above method, can obtain good word segmentation results for power grid risk text.

[0101] The above is a detailed description of an embodiment of a power grid risk text segmentation method of the present invention. The following will provide a detailed description of an embodiment of a power grid risk text segmentation device of the present invention.

[0102] This embodiment provides a power grid risk text segmentation device, including:

[0103] The preprocessing module is used to acquire Chinese vocabulary data of power grid risks and to perform multiple preprocessing steps on the Chinese vocabulary data of power grid risks to improve the effect of subsequent word segmentation.

[0104] The word segmentation module is used to perform preliminary word segmentation on the preprocessed vocabulary data using positive template matching; it is also used to perform secondary word segmentation using the THULAC Chinese word segmentation tool based on the feature word count after the preliminary word segmentation, so as to obtain the feature word count after secondary word segmentation.

[0105] The model building module is used to construct an RNN recurrent neural network text recognition model based on the word count of power grid risk text after primary and secondary word segmentation; it is also used to build a deep neural network BiLSTM+CRF method based on the RNN recurrent neural network text recognition model to train the power grid risk text sequence word segmentation model on a large scale; and it is also used to add a pre-trained bounding box model before each neural network structure layer in the trained power grid risk text sequence word segmentation model and assign corresponding feature weights to construct a two-stage power grid risk text sequence word segmentation model.

[0106] The model training module is used to train the knowledge distillation network of the two-stage power grid risk text sequence word segmentation model using the power grid risk text sample training dataset;

[0107] The word segmentation module is used to perform final word segmentation processing using a trained two-stage power grid risk text sequence word segmentation model to obtain the word segmentation results; it is also used to perform word segmentation effect statistics and statistical analysis after word segmentation of power grid risk text to detect the word segmentation effect; and it is also used to output the final word segmentation results.

[0108] Furthermore, in the model building module, the weight allocation for the two-stage power grid risk text sequence word segmentation model is performed according to the following formula:

[0109]

[0110] Where b is a constant value, X i W is a sample text data on power grid risks. i For the corresponding two-stage network model features, r(X) represents the weights. i y represents the probability that the predicted sample data belongs to the category with a label of 1 in the corresponding word segment. i =1 indicates that the text sample data X i The probability that the object actually belongs to category label 1, y i =0 indicates that the text sample data X i The probability value that actually belongs to category label 0, where α is the modulation coefficient.

[0111] It should be noted that the information interaction and execution process between the above-mentioned devices are based on the same concept as the method embodiments of the present invention. For details on their specific functions and technical effects, please refer to the method embodiments section, which will not be repeated here.

[0112] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the system can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above device can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0113] This invention also provides a computer device, including: a memory and a processor, and a computer program stored in the memory, wherein when the computer program is executed on the processor, it implements the power grid risk text segmentation method as described in any of the above methods.

[0114] The computer device may be a desktop computer, laptop, handheld computer, or cloud server, etc. This computer device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that... Figure 2 The examples of computer devices are merely examples and do not constitute a limitation on computer devices. They may include more or fewer components than shown in the illustration, or combinations of certain components, or different components. For example, they may also include input / output devices, network access devices, etc.

[0115] The processor referred to can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.

[0116] In some embodiments, the memory may be an internal storage unit of the computer device, such as a hard drive or RAM. In other embodiments, the memory may be an external storage device of the computer device, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card. Furthermore, the memory may include both internal and external storage units of the computer device. The memory is used to store the operating system, applications, bootloader, data, and other programs, such as the program code of the computer program. The memory can also be used to temporarily store data that has been output or will be output.

[0117] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the power grid risk text segmentation method as described in any of the above methods.

[0118] In this embodiment, if the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying computer program code to a photographing device / terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.

[0119] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0120] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0121] In the embodiments disclosed in this application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling or direct coupling or communication connection may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0122] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0123] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for word segmentation of power grid risk text, characterized in that, Includes the following steps: Obtain Chinese textual vocabulary data on power grid risks; The Chinese text vocabulary data on power grid risks is preprocessed multiple times; For the preprocessed vocabulary data, positive template matching is used for preliminary word segmentation; Based on the feature word count after the initial word segmentation, the THULAC Chinese word segmentation tool is used to perform secondary word segmentation to obtain the feature word count after secondary word segmentation. Based on the word count of power grid risk texts after initial and secondary word segmentation, an RNN recurrent neural network text recognition model is constructed. A method for building a deep neural network BiLSTM+CRF based on the RNN recurrent neural network text recognition model was used to train a large-scale power grid risk text sequence word segmentation model. A pre-trained bounding box model is added before each neural network structure layer in the trained power grid risk text sequence word segmentation model, and corresponding feature weights are assigned to construct a two-stage power grid risk text sequence word segmentation model. The power grid risk text sample training dataset is used to train the two-stage power grid risk text sequence word segmentation model using a knowledge distillation network. The trained two-stage power grid risk text sequence word segmentation model is used for further word segmentation to obtain the word segmentation results; After segmenting the text on power grid risks, the segmentation effect is statistically analyzed to detect the effectiveness of the segmentation. Output the final word segmentation result; When assigning weights to the two-stage power grid risk text sequence word segmentation model, the specific method is as follows: in, It is a constant value. This is sample text data on power grid risks. The weights of the features in the corresponding two-stage network model. To predict the probability that the sample data belongs to the category with a category label of 1 in the word segmentation, Represents text sample data The probability that it actually belongs to category label 1. Represents text sample data The probability value that actually belongs to category label 0. is the modulation coefficient.

2. The method for segmenting power grid risk text according to claim 1, characterized in that, The Chinese text vocabulary data on power grid risks undergoes multiple preprocessing steps, specifically including: The obtained Chinese text vocabulary data on power grid risks undergoes a first preprocessing step. The vocabulary data that has undergone the first preprocessing is then subjected to a second preprocessing to remove meaningless words from the vocabulary data. The vocabulary data that has undergone the second preprocessing is then subjected to a third preprocessing, which involves part-of-speech tagging of the vocabulary data.

3. The method for segmenting power grid risk text according to claim 2, characterized in that, In part-of-speech tagging, pronouns are tagged as r, coordinating conjunctions as c, auxiliary words as u, modal particles as y, numerals as m, and quantifiers as q.

4. The method for segmenting power grid risk text according to claim 1, characterized in that, In the deep learning BiLSTM+CRF method, BiLSTM is a model consisting of two inverted LSTM components. The update and output formulas of this model are as follows: LSTM update formula from beginning to end: The LSTM update formula from back to front is: The formula for the output layer after stacking two LSTM layers is: in, yes The output of the BiLSTM at each time step. As weight, For bias, To hide the number of units, h 1 To update the output cell value, h 2 This is the backward update output unit, where b is the error value and x is the error value. n For input values.

5. The method for segmenting power grid risk text according to claim 1, characterized in that, The word segmentation effect was statistically analyzed, specifically as follows: After segmenting the text on power grid risks, the segmentation effect is statistically analyzed, positively matched with the set segmentation template, and statistical analysis is performed to detect the segmentation effect. The specified segmentation template is generated using a Seq2Seq model, which utilizes two RNN networks, one for encoding and the other for decoding.

6. A power grid risk text segmentation device, characterized in that, include: The preprocessing module is used to acquire Chinese text vocabulary data on power grid risks; The Chinese text vocabulary data on power grid risks is preprocessed multiple times. The word segmentation module is used to perform preliminary word segmentation on the preprocessed vocabulary data using positive template matching; it is also used to perform secondary word segmentation using the THULAC Chinese word segmentation tool based on the feature word count after the preliminary word segmentation, so as to obtain the feature word count after secondary word segmentation. The model building module is used to construct an RNN recurrent neural network text recognition model based on the word count of the power grid risk text after initial and secondary word segmentation; it is also used to build a deep neural network BiLSTM+CRF method based on the RNN recurrent neural network text recognition model to train the power grid risk text sequence word segmentation model on a large scale; it is also used to add a pre-trained box model before each neural network structure layer in the trained power grid risk text sequence word segmentation model and assign corresponding feature weights to construct a two-stage power grid risk text sequence word segmentation model. The model training module is used to train the two-stage power grid risk text sequence word segmentation model using the power grid risk text sample training dataset as a knowledge distillation network. The word segmentation module is used to perform final word segmentation processing using the trained two-stage power grid risk text sequence word segmentation model to obtain the word segmentation result. It is also used to perform word segmentation effect statistics and statistical analysis on power grid risk text, and to detect the word segmentation effect; it is also used to output the final word segmentation result; When assigning weights to the two-stage power grid risk text sequence word segmentation model, the specific method is as follows: in, It is a constant value. This is sample text data on power grid risks. The weights of the features in the corresponding two-stage network model. To predict the probability that the sample data belongs to the category with a category label of 1 in the word segmentation, Represents text sample data The probability that it actually belongs to category label 1. Represents text sample data The probability value that actually belongs to category label 0. is the modulation coefficient.

7. A computer device, characterized in that, include: The memory and processor, and the computer program stored in the memory, when the computer program is executed on the processor, implement the power grid risk text segmentation method as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, It stores a computer program, which, when executed by a processor, implements the power grid risk text segmentation method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Intelligence relation extraction method based on neural network and attention mechanism

    CN107239446A

  • Generation device and method for text classification model and a computer readable memory medium

    CN108804512A