Power distribution network project feasibility research report analysis method based on text semantic interpretation
Through an analysis method based on text semantic interpretation, the Bert model is used to extract semantic feature vectors, and automatically identify and associate key information in the feasibility study report of distribution network projects, the problems of inaccurate and poor consistency of information extraction in the existing technology are solved, and the analysis efficiency and rapid decision-making are improved.
Patent Information
- Application Number
- CN202411846322.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-04-25
AI Technical Summary
The feasibility study report analysis methods of existing distribution network projects are easily affected by subjective factors, resulting in inaccurate and poor consistency in information extraction, and it is difficult to quickly establish information correlation, affecting the analysis results and decision-making efficiency.
Analytical methods based on text semantic interpretation are adopted to obtain key information and key terms in historical feasibility study reports, establish a mapping rule set, and use the Bert model to extract semantic feature vectors, automatically identify and associate key information in text, and generate meaning segments and report topics.
It improves the accuracy and consistency of information extraction, enhances information relevance, improves the processing efficiency of a large number of reports, and ensures the reliability of analysis results and the rapidity of decision-making.
Smart Images

Figure CN119886150A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to text data processing, and in particular to a feasibility study report analysis method for a distribution network project based on text semantic interpretation. Background Art
[0002] The feasibility study report of a distribution network project is a document that comprehensively analyzes and evaluates the proposed distribution network project. The purpose of evaluating the document is to demonstrate the necessity, technical feasibility and economic rationality of the project. At present, the analysis of the feasibility study report of a distribution network project mainly relies on the evaluation criteria for manual evaluation, which makes the entire analysis and evaluation easily affected by subjective factors. The difference caused by subjective factors is mainly that the evaluation criteria are usually limited in semantics. When different people may interpret the same report differently, it is difficult to quickly identify and establish the relationship between different information, resulting in large differences in analysis results. Secondly, when a large number of reports need to be evaluated, it is easy to make the interpretation of the report time-consuming and labor-intensive, and even the structure or format of the reports written by different people may be inconsistent, which directly affects the subsequent analysis and decision-making. Even when problems are found during the project process, it is difficult to quickly trace the basis for a conclusion or decision. Therefore, it is necessary to improve the interpretation differences of text semantics to ensure the accuracy and consistency of information extraction and interpretation.
[0003] More importantly, with the diversification of projects, it is usually necessary to learn from the excellent examples of a successful project. Traditional feasibility study report analysis is usually limited to certain dimensions, resulting in the inability to effectively link information from different documents, making it difficult to quickly apply the experience of one project to other similar projects.
[0004] Therefore, it is worth studying how to assist projects in analysis, process texts through computer systems, improve the differentiation of information extraction, and establish information relevance between different files when reporting in large quantities. Summary of the invention
[0005] The purpose of the present invention is to provide a distribution network project feasibility study report analysis method based on text semantic interpretation, hoping to improve the traditional analysis method in terms of accuracy and consistency of information extraction, information correlation analysis, and efficiency of processing a large number of reports.
[0006] To solve the above technical problems, the present invention adopts the following technical solutions: a distribution network project feasibility study report analysis method based on text semantic interpretation, comprising the following steps: S100, obtaining historical feasibility reports of distribution network projects, extracting multiple key information in the historical feasibility study reports, each key information containing at least one key term; compiling all key information, taking any key information as cause information, obtaining key information mapped with the key information as result information, and forming a mapping rule for the cause information and the result information; obtaining several mapping rules to form a mapping rule set; wherein the key information is a meaningful sentence or paragraph that has an important impact on project decision-making and evaluation; wherein the key terms are words that describe or quantify professional terms and technical indicators of key information.
[0007] S200, calling the Bert model as a text processing model, inputting the mapping rule set into the text processing model to obtain the cause information, result information and semantic feature vectors of key terms; generating mapping data corresponding to the mapping rule set through the semantic feature vectors and storing them in a database; wherein the mapping data includes the semantic feature vectors of the key terms, and the semantic feature vector relationship between the cause information and the result information; wherein the semantic feature vectors of the key terms include the indexes of the start and end of the occurrence of the key terms.
[0008] S300, obtain the document to be analyzed; convert the document to be analyzed into a unified text format; clean the irrelevant format and content in the document to be analyzed to obtain a valid text, and perform the following steps on the valid text: S301, traverse each paragraph of the valid text and mark all key terms; mark the paragraphs with key terms identified as sensitive paragraphs; mark the paragraphs without key terms identified as meaning paragraphs. S302, segment the whole sentence involving key terms in the sensitive paragraph, and perform character marking to obtain several character segments. S303, input the character segment into the text processing model and output the string, obtain the mapping data of the database, and identify the key information associated with the semantic feature vector in each string from the mapping data, wherein the string contains the semantic feature vector of the key term. S304, calculate the similarity between the string and the associated key information, determine the key information closest to the string, use the key information as the cause information to match the result information through the mapping rule set and generate the meaning segment.
[0009] S400, obtain the character strings of all sensitive segments, integrate all the character strings into vector feature data; use a clustering algorithm to identify repeated semantic feature vectors in all character strings, and determine the corresponding key information, extract the most key terms in the key information, and determine the topic of the report through the key terms.
[0010] S500, obtain the corresponding report template through the subject, identify the key terms of each directory in the report template, locate the key information of the key terms from the valid text, and use the mapping rules to input the meaning segment corresponding to the key information into the corresponding position of the report template directory.
[0011] Preferably, in S100, key terms in historical feasibility reports are collected, the correlation between key terms is determined, a keyword library is created, and operator instructions are set for the correlated key terms in the keyword library; when key terms in the keyword library are identified, the correlated keywords are adjusted to consistent key terms through operator instructions.
[0012] Preferably, when executing S304, the specific steps of performing similarity test between the character string and the key information are:
[0013] Step 1: Obtain the semantic feature vector of the string.
[0014] Step 2: Obtain the semantic feature vector of key information associated with the string.
[0015] Step 3: Calculate the similarity between the string and any key information. The calculation formula of the similarity S is:
[0016]
[0017] Where V i is the value of the string on the i-th component in the semantic vector; M i is the value of the key information on the i-th component in the semantic vector; is the dot product of the string and the key information, is the Euclidean norm of the string vector, is the Euclidean norm of the key information.
[0018] Step 4: preset a similarity threshold R, and compare the value of the similarity S with the similarity threshold R; when S<R, the character string is incorrectly associated with the corresponding key information; select other key information to repeat step A; when S≥R, the character string is correctly associated with the corresponding key information, record the key information, and execute step E.
[0019] Step 5: Confirm that the character string and the associated key information have completed similarity calculation, and select the key information with the highest value of similarity S as the key information closest to the corresponding character string.
[0020] Preferably, when executing S400, the above clustering algorithm adopts K-Means clustering algorithm, and the clustering algorithm recognizes vector feature data including the following steps: S401, obtain all character strings from valid text; obtain semantic feature vectors corresponding to all character strings; S402, set clustering categories and establish clustering centers corresponding to categories; select the closest clustering center for assigning character strings, and the clustering center outputs the clustering results; S403, identify key information in the clustering results, count the frequency of key terms in each key information, and select the key terms with the largest number of occurrences.
[0021] A further technical solution is to preset a weight coefficient for each category. When the key terms in the key information in the identified clustering results are not unique, each candidate key term is scored based on the preset weight coefficient, and the term with the highest score is selected as the key term from the candidate terms.
[0022] Preferably, when executing step S200, a processing model is established, including the following steps: S201, calling the Bert model for more than 10 feasibility study reports collected, and loading the model input data format and the Bert word segmentation method from the Transformers library; S202, extracting the semantic feature vector of each key term through the Bert model; S203, classifying the semantic feature vector using a pre-defined classification head to determine the category of each key term; recording the starting and ending positions of each key term in the text; S204, integrating the extracted key information and its category and position information into a structured data format.
[0023] As a preferred method, the word segmentation error based on power points is large, which may affect the accuracy of feature extraction, and also includes creating a word block library, adjusting the encoder in the Bert model to divide the word blocks into granularity so that each word block contains one or more words; using the Bert model to encode each word block to generate a semantic feature vector, so that one or more words use the same semantic feature vector.
[0024] Preferably, the analysis method also includes a training model, and the steps are as follows: S701, obtaining the relationship mapping between key information, and creating a mapping rule for the association relationship between cause information and result information; S702, determining the feasibility and accuracy of the semantic feature vector output by the Bert model; S703, selecting the historical feasibility study report that has been annotated as training data, inputting the training data into the model, and allowing the model to identify and extract key terms and key information, and using the semantic features of the annotated historical report as training data; and inputting the training data into the Bert model for training.
[0025] A further technical solution is to further include the following steps: verifying the training model using a cross-validation method, wherein the cross-validation method is a k-fold cross-validation.
[0026] Preferably, before executing S300, the text structure of the historical feasibility study report is extracted, and the feasibility study report is divided into paragraphs according to a set format; the structure of the historical report is extracted, the common components are identified, and a report template is created based on the report theme.
[0027] Compared with the prior art, the beneficial effects of the present invention are at least one of the following:
[0028] The present invention clarifies key information and key terms, identifies key terms in historical texts and extracts related key information to establish mapping rules, automatically identifies the relationship between cause information and result information using mapping rules, extracts semantic features using the Bert model, obtains semantic feature vectors of key terms using the Bert model, and establishes a mapping relationship between the semantic feature vectors and key information. Thus, the professional terms and technical indicators in the text can be converted into computable numerical forms, providing support for subsequent data analysis and processing.
[0029] When processing text, the present invention marks key terms in the text and identifies paragraphs containing key terms as sensitive content for further analysis. By vectorizing and clustering the semantic features in the sensitive paragraphs, the main themes and core contents of the report are identified, thereby helping to focus on the key parts of the report and improve processing efficiency and accuracy.
[0030] The present invention adopts machine learning to gradually optimize the model, adapt to new data and demand changes in real time, and maintain the advancement and adaptability of the system.
[0031] The present invention also uses semantic feature vectors for reverse recognition of text sentences; this method improves the correlation analysis of key terms, improves the understanding and processing capabilities of the model, and enables the model to more accurately identify and classify key terms, thereby ensuring that the relationship between the cause information and the result information is easier to establish general and mapping rules, and can quickly migrate and apply the experience of a project to other projects, thereby improving the efficiency of overall project management and decision-making. By converting text into structured semantic feature quantities, highly sensitive semantic feature quantities in the text are automatically identified, the report theme is reported, and a standardized template is generated. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 It is a schematic diagram of the process of the present invention. DETAILED DESCRIPTION
[0033] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0034] It should be noted that all directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present invention are only used to explain the relative position relationship, movement status, etc. in a certain specific working state. If the specific posture changes, the directional indication will also change accordingly. In the present invention, unless otherwise clearly specified and limited, the term "connection" and the like should be understood in a broad sense. For example, "connection" can be an electrical signal connection or a signal connection; it can also be the internal connection of two elements or the interaction relationship between two elements, unless otherwise clearly defined. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0035] If there are descriptions involving "first", "second", etc. in the embodiments of the present invention, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the meaning of "and / or" appearing in the full text includes three parallel schemes. Taking "A and / or B" as an example, it includes scheme A, or scheme B, or a scheme that satisfies both A and B. In addition, the technical solutions between the various embodiments can be combined with each other, but it must be based on the ability of ordinary technicians in the field to implement. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0036] refer to Figure 1 As shown, one embodiment of the present invention is a method for analyzing a feasibility report of a distribution network project based on text semantic interpretation, comprising the following steps: S100, obtaining a historical feasibility report of a distribution network project, extracting multiple key information in the historical feasibility report, each key information containing at least one key term; by selecting historical data for analysis, a causal basis for the relationship between the key information is formed. Considering that one cause information has multiple result information. Among them, the key information is a meaningful sentence or paragraph that has an important impact on project decision-making and evaluation. Among them, the key terms are words that describe or quantify professional terms and technical indicators of key information.
[0037] All key information is compiled, and any key information is used as the cause information. The key information mapped with the key information is obtained as the result information, and the cause information and the result information are formed into a mapping rule; several mapping rules are obtained to form a mapping rule set. Among them, each mapping rule includes at least one cause information and at least one result information; the causal relationship between the cause information and the result information is used to construct a mapping rule set. By constructing a systematic mapping rule set, a structured basis is provided for report generation, which is convenient for reference and reference in later projects, and the knowledge reuse rate is improved, thereby providing benchmark support for data-driven decision-making.
[0038] S200, calling the Bert model as a text processing model, inputting the mapping rule set into the text processing model to obtain the cause information, result information and semantic feature vectors of key terms; generating mapping data corresponding to the mapping rule set through the semantic feature vector and storing it in the database.
[0039] The Bert model uses a bidirectional Transformer structure. After the text is input into the Bert model, the Bert model converts the text into a semantic feature vector for output. By inputting the mapping rule set into the Bert model, the Bert model outputs the corresponding semantic feature vector in the mapping rule set. By recording the cause information, result information and key terms corresponding to the semantic feature vector, the relationship between the semantic feature vectors can be determined and used for subsequent text processing.
[0040] The mapping data includes the semantic feature vectors of key terms and the semantic feature vector relationship between the cause information and the result information; the semantic feature vectors of the key terms include the indexes of the start and end of the key terms. By building a mapping rule set, the process of extracting information from a large amount of historical data is simplified, and the mapping data corresponding to the mapping rules is used to form structured storage and facilitate subsequent extraction and reuse.
[0041] S300, obtain the document to be analyzed; convert the document to be analyzed into a unified text format; clean the irrelevant formats and contents in the document to be analyzed to obtain a valid text. Among them, cleaning the irrelevant formats and contents in the document to be analyzed mainly involves deleting the document header, footer and other template format contents that have no substantive meaning, so that the cleaned text content is more concise and effective. The cleaned valid text is executed as follows:
[0042] S301, traverse each paragraph of the valid text and mark all key terms; mark the paragraphs where the key terms are identified as sensitive paragraphs; mark the paragraphs where the key terms are not identified as meaningful paragraphs.
[0043] Among them, key terms are marked to quickly identify important information in the text, so as to focus on the document content in the later stage.
[0044] Among them, the key terms are used to distinguish between sensitive segments and meaningful segments, mainly for targeted processing of different types of segments. Specifically, it is mainly because sensitive segments have a large number of key terms that need to be analyzed, while meaningful segments are generally considered to have no key terms or terms used in them, but the terms are not recorded in the database, resulting in meaningful segments, which are usually not directly used for computer analysis. By performing information classification management to determine meaningful segments and sensitive segments, unnecessary resource usage can be reduced in the actual text processing process.
[0045] S302, segment the whole sentence involving the key term in the sensitive segment, and perform character marking to obtain a plurality of character segments. By segmenting the whole sentence in the sensitive segment into smaller character segments and performing detailed character marking on them, a more detailed analysis of the details in the text is obtained, so that more specific and fine-grained information can be extracted, so as to better capture the detailed information.
[0046] For reference, a character segment is a smaller text segment obtained by segmenting the entire sentence in the sensitive segment according to specific rules. Usually, the segmentation of the character segment needs to be based on the boundary of characters or words to ensure that each character segment contains a complete semantic unit. The segmentation design is conducive to the subsequent identification of key terms more convenient and efficient.
[0047] S303, input the character segment into the text processing model and output a character string, wherein the character string is a text segment with specific semantic meaning that is recombined or directly extracted from the character segment after character segment processing. Obtain mapping data from the database, and identify key information associated with the semantic feature vector in each character string from the mapping data. There are usually multiple key information associated with the semantic feature vector in a character string. The character string contains the semantic feature vector of the key term.
[0048] Input through character segments can be more easily recognized and understood by the semantic processing function of the model, and it is also easy to obtain the specific meaning of each character segment and the relevance of the character segment to other character segments or terms; the output string can be a sentence or phrase extracted from the character segment, or a standardized text generated based on the character segment tag. The processing of character segments and strings makes information extraction more accurate and efficient.
[0049] For reference, this method is suitable for the Bert model to perform deep semantic matching based on character segments and strings. Based on the string obtained from the character segment, the semantic feature vector generated in the string is matched with the mapping data, so as to obtain key terms and key information after identifying the corresponding semantic feature vector in the mapping data.
[0050] S304, perform similarity calculation on the character string and the associated key information, determine the key information closest to the character string, use the key information as the cause information, match the result information through the mapping rule set and generate the meaning segment. Through the similarity calculation, ensure that the most matching key information is selected, and the generated meaning segment is mainly used to intuitively represent the causal relationship between key information, so as to realize the structuring of information and provide a basis for filling in the subsequent report template.
[0051] S400, obtain the character strings of all sensitive segments, integrate all the character strings into vector feature data; use a clustering algorithm to identify repeated semantic feature vectors in all character strings, and determine the corresponding key information, extract the most key terms in the key information, and determine the topic of the report through the key terms.
[0052] The character strings of all sensitive segments are integrated to form a large volume of vector feature data, which contains the semantic feature vectors of many character strings. By identifying repeated semantic feature vectors, multiple related key information can be determined, and the key terms of these key information can be extracted to determine the theme of the report.
[0053] S500, obtain the corresponding report template through the subject, identify the key terms of each directory in the report template, locate the key information of the key terms from the valid text, and use the mapping rules to input the meaning segment corresponding to the key information into the corresponding position of the report template directory. Obtain the corresponding report template through the subject, identify the key terms of each directory in the template. Locate the key information of the key terms in the valid text, and use the mapping rules to fill the meaning segment into the corresponding position of the template, thereby reducing manual writing time, improving production efficiency, and automatically generating a standardized feasibility report based on the subject and mapping rules.
[0054] Based on the above embodiments, another embodiment of the present invention is to execute S100, collect key terms in historical feasibility reports, determine the correlation between key terms, create a keyword library, and set operator instructions for the related key terms in the keyword library; when the key terms in the keyword library are identified, adjust the related keywords to consistent key terms through operator instructions.
[0055] For reference, usually the keyword library needs to classify synonyms and related words into a large category. If necessary, the key terms can be replaced by operator instruction coding. Through a unified coding method, it is ensured that key information under different expressions can be accurately identified and processed. Replacing key terms with operator instruction coding facilitates the collection of synonyms and related words of key terms, and effectively identifies the diverse expression differences in the report, reducing the risk of information omission.
[0056] For reference, since key terms are terms that appear frequently and are of great significance in the identification report, each key term is considered to collect its synonyms and related words to ensure that the model can recognize the same concept in different expressions. Therefore, through the operator instruction, the operator instruction is used to form the code to replace the corresponding key terms in the key information; for example, the possible synonyms of "transformer capacity" include "transformer load capacity", "transformer carrying capacity", etc.
[0057] Based on the above embodiment, another embodiment of the present invention is that when executing S304, the specific steps of performing similarity test between the character string and the key information are:
[0058] Step 1: Obtain the semantic feature vector of the string.
[0059] Step 2: Obtain the semantic feature vector of the key information associated with the string. In the aforementioned step S303, at least one key information is obtained from the mapping data in the database. In order to facilitate the similarity comparison, the associated key information needs to be compared with the string separately.
[0060] Step 3: Calculate the similarity between the string and any key information. The calculation formula of the similarity S is:
[0061]
[0062] Where V i is the value of the string on the i-th component in the semantic vector; M i is the value of the key information on the i-th component in the semantic vector; is the dot product of the string and the key information, is the Euclidean norm of the string vector, is the Euclidean norm of the key information.
[0063] Step 4: preset a similarity threshold R, and compare the value of the similarity S with the similarity threshold R; through the comparison, select the key information that may represent the character string.
[0064] When S<R, the character string is incorrectly associated with the corresponding key information; other key information is selected to repeat step 1, and the similarity between the other key information and the character string is reconfirmed until all relevant key information completes the similarity comparison.
[0065] When S≥R, the character string is correctly associated with the corresponding key information, the key information is recorded, and step E is executed.
[0066] Step 5: Confirm that the string and the associated key information have completed the similarity calculation, and select the key information with the highest similarity S as the key information closest to the corresponding string. Select all the key information that may represent the string, and then select the key information with the highest similarity S to the string as the closest key information.
[0067] Based on the above embodiment, another embodiment of the present invention is that when executing S400, multiple character strings are extracted from the document to be analyzed through the previous steps S100 to S303, and a corresponding semantic feature vector is generated for each character string. Since the character string contains key information, such as technical indicators, risk assessment, and cost analysis, the clustering algorithm adopts the K-Means clustering algorithm, and the K-Means clustering algorithm can be used to perform clustering recognition according to the needs. Identifying vector feature data through the clustering algorithm specifically includes the following steps:
[0068] S401, obtain all strings from the valid text; obtain the semantic feature vectors corresponding to all strings. For example, obtain the strings of all sensitive segments, assuming that the following five strings are extracted from the report: String A: The capacity of the substation needs to be increased to meet future demand. String B: In order to reduce power loss, it is recommended to optimize the line layout. String C: The capacity of the substation needs to be increased to meet future demand. String D: The total project cost is expected to be 5 million yuan. String E: In order to reduce power loss, it is recommended to optimize the line layout.
[0069] To facilitate understanding of the semantic feature vector, simplified labels are used for representation as follows, and the semantic feature vectors of the above five strings are obtained as follows: the semantic feature vector of string A is {substation, capacity, increase, future demand}, the semantic feature vector of string B is {reduce, power loss, optimization, line layout}, the semantic feature vector of string C is {substation, capacity, increase, future demand}, the semantic feature vector of string D is {project, cost, 5 million yuan}, and the semantic feature vector of string E is {reduce, power loss, optimization, line layout}.
[0070] S402, set the clustering category and establish the clustering center corresponding to the category; select the closest clustering center for the assigned string, and the clustering center outputs the clustering result. Thus, the clustering algorithm is used to identify repeated semantic feature vectors. By presetting the clustering category, the clustering result can be selectively integrated and output according to the actual demand category.
[0071] For ease of understanding, three categories are set, namely, substation-related, power loss-related, and cost-related. At the same time, three cluster centers are established. Strings A and C are closest to the cluster center related to substation; strings B and E are closest to the cluster center related to power loss; string D is closest to the cluster center related to cost; the above five strings are assigned to the closest cluster center.
[0072] Among them, the cluster center related to substation contains string A and string C; the output result is "substation capacity needs to be increased to meet future demand". Among them, the cluster center related to power loss contains string B and string E; the output result is "in order to reduce power loss, it is recommended to optimize the line layout". Among them, the cluster center related to cost contains string D; the output result is "the total cost of the project is expected to be 5 million yuan".
[0073] S403, identifying key information in the clustering results, counting the frequency of key terms in each key information, and selecting the key terms with the largest number of occurrences. By counting the frequency of key terms in each clustering result, representative key terms are selected for each cluster center to determine the key information associated with it.
[0074] Among them, the key information of the substation-related cluster center is: substation capacity expansion demand. The key terms appear as follows: substation, capacity, increase, and future demand.
[0075] Among them, the key information of the power loss related cluster center is: line optimization suggestions for reducing power loss. The key terms appear as: reduction, power loss, optimization, and line layout.
[0076] Among them, the key information of the cost-related cluster center is: total project cost estimate. The key terms appear as: project, cost, 5 million yuan.
[0077] For reference, the theme of the report can be determined by the number of key terms. Based on the key terms extracted from each cluster, the main theme of the report can be determined. For example, multiple key terms revolve around the increase in substation capacity and future demand, indicating that the theme of the substation-related cluster center is the substation capacity expansion plan. Similarly, key terms involve reducing power losses and optimizing line layout, indicating that the theme of the power loss-related cluster center is line optimization and power loss control. The theme of the cost-related cluster center can be project cost estimation.
[0078] A further technical solution is that, taking into account that all key terms with high frequency in a certain clustering category may be repeated, in order to better determine representative key terms, a weight coefficient is preset for each category. Taking into account the situation that there are multiple key terms with the same frequency of occurrence during clustering, when the key terms in the key information in the clustering results are not unique, the representative key terms cannot be directly determined. Based on the preset weight coefficient, each candidate key term is scored, and the term with the highest score is selected from the candidate terms as the key term.
[0079] For reference, the key terms with high frequency are counted and candidate terms are obtained. A preset weight coefficient is assigned to each candidate key term, and the weight represents the importance or priority of the term in the category to which it belongs;
[0080] For example, the weight coefficient of the substation-related cluster center is preset to be 0.5; the weight coefficient of the power loss-related cluster center is 0.3. The weight coefficient of the cost-related cluster center is 0.2. The key terms with high frequency are counted and it is found that "optimization" and "layout" both appear N times. "Optimization" and "layout" are taken as candidate terms, and the candidate terms appear in the power loss-related cluster center; then the weight coefficients of "optimization" and "layout" are 0.3.
[0081] Each candidate key term is scored, and its score P = frequency x weight coefficient; for each candidate term, its score is calculated; when multiple terms belong to different categories, their scores are calculated separately. Compare the scores of all candidate terms and select the term with the highest score.
[0082] Furthermore, in order to select a representative key term when there are multiple terms with the same score, the TF-IDF value of the key term in the historical document is obtained, and the product of the TF-IDF value and the score is used as the election coefficient to select the key term with the highest election coefficient as the representative key term.
[0083] Specific:
[0084] The steps to obtain the TF-IDF value of a key term are as follows: determine the key term z for calculating the TF-IDF value, obtain N report texts about the key term z from the historical feasibility study reports, and combine the above valid texts and report texts into a document set, where the number of documents in the document set is N+1. Segment the text of the document set to form several independent words, and remove stop words; calculate the word frequency of the key term z in the valid text, and calculate the inverse document frequency of the key term z in the document set; calculate the TF-IDF value of the key term z as the product of IDF(z) and TF(z).
[0085] The formula for calculating the frequency of key term z in the valid text is:
[0086] TF(z)=CS / CL;
[0087] Where CS is the number of times the key term Z appears in the valid text; CL is the total number of words in the valid text.
[0088] Among them, the calculation formula for calculating the inverse document frequency of key term z in the document set is:
[0089]
[0090] In the formula, N+1 is the total number of documents, DF(z) is the number of documents containing the key term z; the denominator in the formula is smoothed by adding 1 to avoid erroneous calculation of the denominator being zero.
[0091] Based on the above embodiment, another embodiment of the present invention is that when executing step S200, a processing model is established, including the following steps:
[0092] S201, call the Bert model with more than 10 feasibility study reports collected, and load the model input data format and Bert word segmentation method from the Transformers library. If necessary, the number of samples can be increased in multiples of 10;
[0093] S202, extracting the semantic feature vector of each key term through the Bert model.
[0094] S203, the semantic feature vector is classified using a predefined classification head to determine the category of each key term; and the start and end positions of each key term in the text are recorded.
[0095] S204, integrating the extracted key information and its category and location information into a structured data format. Since the Bert model is an existing model and the Transformers library is existing data, only the preset steps are described here and no further details are given.
[0096] Based on the above embodiment, another embodiment of the present invention is that the error of word segmentation based on the power point is large, which may affect the accuracy of feature extraction, and also includes creating a word block library, adjusting the encoder in the Bert model to divide the word block into granularity, so that each word block contains one or more words; using the Bert model to encode each word block to generate a semantic feature vector, so that one or more words use the same semantic feature vector
[0097] For reference, frequently appearing terms and phrases are extracted from historical feasibility reports or textbooks, and word blocks are defined according to logical and semantic relationships, so that each word block contains one or more logically or semantically related words; most of the named entities of power projects are not mixed with Chinese / foreign words, which is improved and reduced. Through the design of the word block library, Bert's word segmenter is adaptively adjusted so that it can treat the entire word block as a unit when performing word segmentation. On the one hand, the words in the word block are no longer separated; the integrity of the word block during the encoding process is ensured, and unnecessary splitting within the word block is avoided. On the other hand, the semantic feature vector corresponding to the word block is directly limited to ensure that the semantic vector of the same word block in different instances is highly consistent.
[0098] It should be noted that in order to achieve consistency in the semantic vectors of the same word block, when extracting features from the hidden layer of the Bert model output, the output of the first token can be used as the representative of the entire input sequence for the word block to ensure that the output semantic feature vectors are consistent.
[0099] Based on the above embodiment, another embodiment of the present invention is that the analysis method further includes a training model, and the steps are as follows: S701, obtaining a relationship mapping between key information, creating a mapping rule for the association relationship between cause information and result information. Identify the cause information and result information from the key information extracted from the mapping rule set.
[0100] For example, the first data causes the second data, the causal relationship between the first data and the second data is identified, and a mapping rule between the cause information and the result information is created, that is, the first data is the cause of the second data; multiple causal relationship rules are integrated into a mapping rule set and stored in the database.
[0101] S702, determine the feasibility and accuracy of the semantic feature vector output by the Bert model. Take a part of the annotated historical feasibility study reports as the verification set, generate the semantic feature vectors of these verification set texts through the Bert model, and measure the quality of the vector by reverse reading whether the semantic feature vector can effectively represent the semantic information of the text.
[0102] S703, select the historical feasibility study reports that have been annotated as training data, input the training data into the model, and the model can identify and extract the semantic features of key terms and key information to call the annotated historical reports as training data. This step is to input the annotated report data into the Bert model to fine-tune the model on the premise of confirming the quality of the vector. Specifically, select the annotated data from the historical feasibility study reports, which should contain accurately annotated key terms and key information, convert the annotated data into a training format accepted by the Bert model, and input the training data into the Bert model for training. Fine-tune through supervised learning so that the model can learn to identify and extract the semantic features of key terms and key information.
[0103] Furthermore, the following steps are also included: using a cross-validation method to verify the training model, wherein the cross-validation method is k-fold cross-validation. K-fold cross-validation is an existing algorithm, which specifically includes the following steps: S901, obtaining the text data of the marked historical feasibility report as a sample, ensuring that all samples have completed the annotation of key terms and key information; S902, dividing the text data set into k subsets, ensuring that each subset has key terms and key information and can be used as a verification set, using k-1 subsets as training sets, and reserving 1 subset as a verification set; S903, performing the same text cleaning, word segmentation, and annotation steps on the training set and the verification set; S904, inputting the training set into the Bert model for training; and using the Bert model to predict the verification set; S905, using the existing F1-Score algorithm, the Bert model is scored. In this way, it is verified whether the feasibility of the model in the generalization state meets the requirements.
[0104] Based on the above embodiment, another embodiment of the present invention is, before executing S300, extracting the text structure of the historical feasibility study report, dividing the feasibility study report into paragraphs according to a set format; extracting the structure of the historical report, identifying the common components, and creating a report template based on the report theme.
[0105] The "one embodiment", "another embodiment", "embodiment", "preferred embodiment" and the like mentioned in this specification refer to the specific features, structures or characteristics described in conjunction with the embodiment included in at least one embodiment generally described in this application. The same expression appearing in multiple places in the specification does not necessarily refer to the same embodiment. Further, when a specific feature, structure or characteristic is described in conjunction with any embodiment, it is claimed that the realization of such feature, structure or characteristic in conjunction with other embodiments also falls within the scope of the present invention.
[0106] Although the present invention is described herein with reference to a number of illustrative embodiments of the present invention, it will be appreciated that those skilled in the art may devise many other modifications and implementations that fall within the scope and spirit of the principles disclosed herein. More specifically, within the scope of the present disclosure, drawings, and claims, a variety of variations and modifications may be made to the components and / or layout of the subject combination layout. In addition to the variations and modifications made to the components and / or layout, other uses will also be apparent to those skilled in the art.
Claims
1. A distribution network project feasibility study report analysis method based on text semantic interpretation, characterized in that: The steps include: S100, obtaining a historical feasibility study report of a distribution network project, extracting multiple key information in the historical feasibility study report, each key information containing at least one key term; compiling all key information, taking any key information as cause information, obtaining key information mapped with the key information as result information, and forming a mapping rule with the cause information and the result information; obtaining a plurality of mapping rules to form a mapping rule set; Among them, key information is meaningful sentences or paragraphs that have a significant impact on project decision-making and evaluation; Among them, the key terms are words that describe or quantify professional terms and technical indicators of key information; S200, calling the Bert model as a text processing model, inputting the mapping rule set into the text processing model to obtain cause information, result information and semantic feature vectors of the key terms; generating mapping data corresponding to the mapping rule set through the semantic feature vector and storing it in a database; The mapping data includes the semantic feature vectors of key terms and the semantic feature vector relationships between the cause information and the result information; Wherein, the semantic feature vector of the key term includes the index of the start and end of the key term appearance; S300, obtaining a document to be analyzed; converting the document to be analyzed into a unified text format; cleaning irrelevant formats and contents in the document to be analyzed to obtain a valid text, and executing the following steps on the valid text: S301, traverse each paragraph of the valid text and mark all key terms; mark the paragraphs with key terms identified as sensitive paragraphs; mark the paragraphs without key terms identified as meaningful paragraphs; S302, segmenting the entire sentence involving the key term in the sensitive segment and performing character marking to obtain a plurality of character segments; S303, inputting the character segment into the text processing model and outputting the character string, obtaining mapping data from the database, and identifying key information associated with the semantic feature vector in each character string from the mapping data; Among them, the string contains the semantic feature vector of the key term; S304, calculating the similarity between the character string and the associated key information, determining the key information closest to the character string, using the key information as the cause information to match the result information through a mapping rule set and generate a meaning segment; S400, obtaining the character strings of all sensitive segments, integrating all the character strings into vector feature data; using a clustering algorithm to identify repeated semantic feature vectors in all the character strings, and determining the corresponding key information, extracting the most key terms in the key information, and determining the theme of the report through the key terms; S500, obtain the corresponding report template through the subject, identify the key terms of each directory in the report template, locate the key information of the key terms from the valid text, and use the mapping rules to input the meaning segment corresponding to the key information into the corresponding position of the report template directory.
2. The method for analyzing the feasibility study report of a distribution network project based on text semantic interpretation according to claim 1 is characterized by: In executing S100, key terms in historical feasibility reports are collected, the correlation between key terms is determined, a keyword library is created, and operator instructions are set for the related key terms in the keyword library; when key terms in the keyword library are identified, the related keywords are adjusted to consistent key terms through operator instructions.
3. The method for analyzing a feasibility study report of a distribution network project based on text semantic interpretation according to claim 1 is characterized in that: When executing S304, the specific steps of comparing the character string with the key information are: Step 1: Get the semantic feature vector of the string. Step 2, obtaining a semantic feature vector of key information associated with the character string; Step 3: Calculate the similarity between the string and any key information. The calculation formula of the similarity S is: Where V i is the value of the string on the i-th component in the semantic vector; M i is the value of the key information on the i-th component in the semantic vector; is the dot product of the string and the key information, is the Euclidean norm of the string vector, is the Euclidean norm of the key information; Step 4: preset a similarity threshold R, and compare the value of the similarity S with the similarity threshold R; When S<R, the character string is incorrectly associated with the corresponding key information; select other key information to repeat step A; When S≥R, the character string is correctly associated with the corresponding key information, the key information is recorded, and step E is executed; Step 5: Confirm that the character string and the associated key information have completed similarity calculation, and select the key information with the highest value of similarity S as the key information close to the corresponding character string.
4. The method for analyzing a feasibility study report of a distribution network project based on text semantic interpretation according to claim 1 is characterized in that: When executing S400, the clustering algorithm adopts the K-Means clustering algorithm, and the clustering algorithm recognizes the vector feature data including the following steps: S401, obtaining all character strings from the valid text; obtaining semantic feature vectors corresponding to all character strings; S402, setting the cluster category and establishing the cluster center corresponding to the category; The assigned string is assigned to the closest cluster center, and the cluster center outputs the clustering result; S403, identifying key information in the clustering results, counting the frequency of occurrence of key terms in each key information, and selecting the key term with the largest number of occurrences.
5. The method for analyzing a feasibility study report of a distribution network project based on text semantic interpretation according to claim 4 is characterized in that: A weight coefficient is preset for each category. When the key term in the key information in the identification clustering result is not unique, each candidate key term is scored based on the preset weight coefficient, and the term with the highest score is selected as the key term among the candidate terms.
6. The method for analyzing a feasibility study report of a distribution network project based on text semantic interpretation according to claim 1 is characterized in that: When executing step S200, a processing model is established, including the following steps: S201, call the Bert model with more than 10 feasibility study reports collected, and load the model input data format and the Bert word segmentation method from the Transformers library; S202, extracting a semantic feature vector of each key term through a Bert model; S203, the semantic feature vector is classified using a predefined classification head to determine the category of each key term; the starting and ending positions of each key term in the text are recorded; S204, integrating the extracted key information and its category and location information into a structured data format.
7. The method for analyzing a feasibility study report of a distribution network project based on text semantic interpretation according to claim 1 is characterized in that: It also includes creating a word block library, adjusting the encoder in the Bert model to divide the word blocks into granularity so that each word block contains one or more words; using the Bert model to encode each word block to generate a semantic feature vector so that one or more words use the same semantic feature vector.
8. The method for analyzing a feasibility study report of a distribution network project based on text semantic interpretation according to claim 1 is characterized in that: The analysis method also includes training a model, and the steps are as follows: S701, obtaining a relationship mapping between key information, and creating a mapping rule for the association relationship between cause information and result information; S702, determining the feasibility and accuracy of the semantic feature vector output by the Bert model; S703, selecting a historical feasibility study report that has been annotated as training data, inputting the training data into the model, and having the model identify and extract key terms and key information, and using the semantic features of the annotated historical report as training data; and inputting the training data into the Bert model for training.
9. The method for analyzing a feasibility study report of a distribution network project based on text semantic interpretation according to claim 8 is characterized in that: The method also includes the following steps: using a cross-validation method to verify the training model, wherein the cross-validation method is a k-fold cross-validation.
10. The method for analyzing a feasibility study report of a distribution network project based on text semantic interpretation according to claim 1 is characterized in that: Before executing S300, the text structure of the historical feasibility study report is extracted, and the feasibility study report is divided into paragraphs according to a set format; the structure of the historical report is extracted, the common components are identified, and a report template is created based on the report theme.
Citation Information
Cited By
Project report generation method and device
CN120124614A