A method and system for generating knowledge graph of spatial environmental assessment of ecological environment region

Through level-by-level entity recognition and merged redundancy optimization, the environmental impact assessment knowledge graph is constructed, which solves the accuracy and efficiency problems of traditional methods in processing complex environmental data and achieves high efficiency and accuracy of environmental impact assessment results.

CN118503456BActive Publication Date: 2024-10-11HOLLY TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410971946.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-19
Publication Date
2024-10-11
Estimated Expiration
2044-07-19

AI Technical Summary

Technical Problem

Traditional manual analysis methods are difficult to process complex environmental data efficiently and accurately, resulting in inaccurate or missing environmental assessment results. Existing technologies have limitations in identifying multi-level and multi-type environmental entities.

Method used

Provides a method for generating an ecological environment regional spatial environmental impact assessment knowledge graph. Through level-by-level entity recognition, merged redundancy optimization and entity type identification, an environmental impact assessment knowledge graph is constructed, and natural language processing and machine learning technology are used to extract and identify key points from environmental quality reports. Entities and relationships.

Benefits of technology

It improves the entity identification accuracy and data processing efficiency of environmental assessment reports, ensures the accuracy and completeness of environmental assessment results, and improves the efficiency and accuracy of environmental assessment work.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118503456B_ABST
    Figure CN118503456B_ABST
Patent Text Reader

Abstract

The present application provides a method and system for generating a knowledge graph of spatial environmental assessment of an ecological environment region, which performs step-by-step entity recognition operations on an environmental quality report to be analyzed, wherein a first entity recognition operation roughly recognizes the first entity in the environmental quality report to be analyzed, and a second entity recognition operation is used to recognize the first entity in the second text paragraph of the environmental quality report to be analyzed, thereby further recognizing the first entity in the environmental quality report to be analyzed, and improving the accuracy of entity recognition in the report; for each first entity, the number of characters of the first entity is less than the number of characters of the second entity, and based on simultaneously recognizing the first entity and the second entity, the first entity is recognized in the text paragraph where the second entity is located alone, and then the two recognition results are merged and optimized for redundancy, thereby obtaining the text paragraph where each first entity in the environmental quality report to be analyzed is located, and the recognition accuracy of entities with shorter characters can be higher.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to but is not limited to the field of knowledge graph technology, and in particular to a method and system for generating a knowledge graph for spatial environmental assessment of an ecological environment region. Background Art

[0002] In the current field of ecological environment protection and regional spatial planning, environmental impact assessment (EIA) is a vital task. The EIA process involves the analysis and evaluation of a large number of environmental quality reports to identify potential environmental risks and propose corresponding protection measures. However, with the increasing amount and complexity of environmental data, traditional manual analysis methods have been unable to meet the needs of efficient and accurate processing. Therefore, how to use automation technology, especially artificial intelligence and machine learning technology, to improve the efficiency and accuracy of EIA work has become an urgent problem to be solved. In the existing technology, the analysis of environmental quality reports mostly relies on simple methods such as keyword matching and regular expressions, which have obvious limitations in processing complex texts and identifying variable entities. In particular, for multi-level and multi-type entities in the report, such as pollutant names, ecological regions, environmental indicators, etc., traditional identification methods are often difficult to accurately distinguish and locate, resulting in inaccurate or missing EIA results. Summary of the invention

[0003] In view of this, this application provides a method and system for generating a knowledge graph of spatial environmental assessment of ecological environment regions. The technical solution of this application is implemented as follows:

[0004] In the first aspect, the present application provides a method for generating an ecological environment regional spatial environmental assessment knowledge graph, the method comprising: obtaining an environmental quality report to be analyzed for the target ecological environment regional space, the environmental quality report to be analyzed including one or more first entities to be extracted; performing a first entity recognition operation on the environmental quality report to be analyzed, and obtaining one or more first text paragraphs and one or more second text paragraphs in the environmental quality report to be analyzed; wherein the first text paragraph includes a first entity, the second text paragraph includes a second entity, and the first entity is contained in the second entity; performing a second entity recognition operation on each of the second text paragraphs, respectively, to obtain a third text paragraph in each of the second text paragraphs, the third text paragraph including one of the first entity; merging and redundancy optimization of the third text paragraph in each of the second text paragraphs and the one or more first text paragraphs to obtain one or more target text paragraphs, the target text paragraph including one of the first entity; and constructing an environmental assessment knowledge graph based on the identified entities.

[0005] In some embodiments, the merging redundancy optimization of the third text paragraph in each of the second text paragraphs and the one or more first text paragraphs to obtain one or more target text paragraphs includes: determining the alternative text paragraphs corresponding to each of the first entities in the third text paragraph in each of the second text paragraphs and the one or more first text paragraphs, and determining one or more third entities corresponding to multiple alternative text paragraphs in the one or more first entities; for each of the third entities, determining the first alternative text paragraph that meets the paragraph requirements as the target text paragraph among the multiple alternative text paragraphs corresponding to the third entity, and determining the alternative text paragraphs other than the first alternative text paragraph among the multiple alternative text paragraphs as the second alternative text paragraphs corresponding to the third entity; and removing the second alternative text paragraphs corresponding to each of the third entities in the third text paragraph in each of the second text paragraphs and the one or more first text paragraphs to obtain one or more target text paragraphs.

[0006] In some embodiments, determining, among the multiple alternative text paragraphs corresponding to the third entity, a first alternative text paragraph that meets the paragraph requirements is determined as the target text paragraph, including: obtaining a support probability for each of the alternative text paragraphs, the support probability indicating the possibility of including the third entity in the alternative text paragraph; determining, among the multiple alternative text paragraphs corresponding to the third entity, an alternative text paragraph with the highest support probability is determined as the first alternative text paragraph, and determining the first alternative text paragraph as the target text paragraph.

[0007] In some embodiments, determining the first candidate text paragraph that meets the paragraph requirements as the target text paragraph among the multiple candidate text paragraphs corresponding to the third entity includes: obtaining the support probability of each of the candidate text paragraphs, the support probability indicating the possibility of including the third entity in the candidate text paragraph; determining the candidate text paragraph with the highest support probability as the third candidate text paragraph among the multiple candidate text paragraphs, and determining the candidate text paragraphs other than the third candidate text paragraph among the multiple candidate text paragraphs as the fourth candidate text paragraph; obtaining the paragraph overlap rate between each of the fourth candidate text paragraphs and the third candidate text paragraph; removing the fourth candidate text paragraph whose paragraph overlap rate is not less than the reference paragraph overlap rate among the multiple candidate text paragraphs, and determining the remaining candidate text paragraphs after the removal as the first candidate text paragraph, and determining the first candidate text paragraph as the target text paragraph.

[0008] In some embodiments, the obtaining of the paragraph overlap rate between each of the fourth alternative text paragraphs and the third alternative text paragraph includes: for each of the fourth alternative text paragraphs, completing the following steps: determining the overlapping text paragraphs of the fourth alternative text paragraph and the third alternative text paragraph, and determining the first character number of the overlapping text paragraphs; determining the fused text paragraph of the fourth alternative text paragraph and the third alternative text paragraph, and determining the second character number of the fused text paragraph; dividing the first character number by the second character number to obtain a division ratio, and determining the division ratio as the paragraph overlap rate between the fourth alternative text paragraph and the third alternative text paragraph.

[0009] In some embodiments, when the one or more first entities to be extracted are of the target entity type, after the third text paragraphs in each of the second text paragraphs and the one or more first text paragraphs are merged for redundancy optimization to obtain one or more target text paragraphs, the method further includes: for each of the target text paragraphs in the environmental quality report to be analyzed, completing the following steps to obtain the entity extraction result of the environmental quality report to be analyzed: based on the entity type recognition network, performing entity type recognition on the target text paragraph to obtain the entity type corresponding to the first entity included in the target text paragraph; if the entity type is the target entity type, extracting the text entity corresponding to the target entity type for the target text paragraph.

[0010] In some embodiments, before the entity type recognition network is used to perform entity type recognition on the target text paragraph, the method further includes: obtaining a text paragraph training sample containing a priori tags, wherein the text paragraph training sample includes an entity training sample; performing entity type recognition on the text paragraph training sample based on the entity type recognition network to obtain an estimated entity type corresponding to the entity training sample in the text paragraph training sample; determining a network training cost of the entity type recognition network based on an error between the estimated entity type and the priori tag; and adjusting network parameters of the entity type recognition network based on the network training cost of the entity type recognition network until a preset first training stop condition is met to obtain a trained entity type recognition network.

[0011] In some embodiments, when the one or more first entities to be extracted are of the target entity type, the second entity recognition operation is performed on each of the second text paragraphs to obtain the third text paragraph in each of the second text paragraphs, including: for each of the second text paragraphs, the following steps are performed: based on a second entity recognition network, entity recognition of one or more entity types of entities is performed on the second text paragraph to obtain a recognition result; the one or more entity types include the target entity type, and the recognition result includes one or more recognition annotations, and the alternative entity type corresponding to the alternative entity in each of the recognition annotations, and the recognition annotation is used to mark the position of the alternative entity in the second text paragraph; based on the recognition result, the first alternative entity whose alternative entity type is the target entity type is determined to be the first entity, and the text paragraph corresponding to the recognition annotation where the first alternative entity is located is determined to be the third text paragraph in the second text paragraph; the entity recognition of one or more entity types of entities of the second text paragraph is performed based on the second entity recognition network Before obtaining the recognition result, the method further includes: obtaining a text paragraph training sample containing a priori tags, wherein the a priori tags include the actual recognition annotations of the entity training sample in the text paragraph training sample and the actual category corresponding to the entity training sample; performing entity recognition on the text paragraph training sample based on the second entity recognition network to obtain an estimated result, wherein the estimated result includes the estimated recognition annotations of the entity training sample in the text paragraph training sample and the estimated entity type corresponding to the entity training sample; obtaining a first error between the estimated recognition annotation and the actual recognition annotation, and determining a first network training cost of the second entity recognition network based on the first error; obtaining a second error between the estimated entity type and the actual category, and determining a second network training cost of the second entity recognition network based on the second error; adjusting the network parameters of the second entity recognition network based on the first network training cost and the second network training cost until a preset second training stop condition is met to obtain a trained second entity recognition network.

[0012] In some embodiments, when the one or more first entities to be extracted are the target entity type, and the target entity type includes multiple subordinate entity types, the second entity recognition operation is performed on each of the second text paragraphs to obtain the third text paragraph in each of the second text paragraphs, including: for each of the second text paragraphs, the following steps are completed: for each of the subordinate entity types, the entity recognition of the first entity of the subordinate entity type is performed on the second text paragraph to obtain a subordinate third text paragraph in the second text paragraph, and the subordinate third text paragraph includes a first entity of the subordinate entity type; the subordinate third text paragraph corresponding to each of the subordinate entity types in the second text paragraph is determined as the third text paragraph in the second text paragraph; when the one or more first entities to be extracted are the first target entity type, and the second entity is the second target entity type, the first entity recognition operation is performed on the environmental quality report to be analyzed to obtain the environmental quality report to be analyzed. One or more first text paragraphs and one or more second text paragraphs in the environmental quality report to be analyzed, including: based on the first entity recognition network, entity recognition of several entity types of entities in the environmental quality report to be analyzed is performed to obtain a recognition result; the several entity types include the first target entity type and the second target entity type, and the recognition result includes one or more recognition annotations, and the alternative entity type corresponding to the alternative entity in each of the recognition annotations, and the recognition annotation is used to mark the position of the alternative entity in the environmental quality report to be analyzed; based on the recognition result, determine that the first alternative entity whose alternative entity type is the first target entity type is the first entity, and determine that the text paragraph corresponding to the recognition annotation where the first alternative entity is located is the first text paragraph; based on the recognition result, determine that the second alternative entity whose alternative entity type is the second target entity type is the second entity, and determine that the text paragraph corresponding to the recognition annotation where the second alternative entity is located is the second text paragraph.

[0013] In a second aspect, the present application provides a computer system, comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, and the processor implements the steps in the method when executing the program.

[0014] The beneficial effects of the present application include at least: the method and system for generating the knowledge graph of the spatial environmental assessment of the ecological environment region provided by the embodiment of the present application, first, the entity recognition operation is performed step by step for the environmental quality report to be analyzed, including the first entity recognition operation and the second entity recognition operation. Among them, the first entity recognition operation is used to identify the first entity and the second entity in the environmental quality report to be analyzed, and complete the approximate recognition of the first entity in the environmental quality report to be analyzed, and the second entity recognition operation is used to identify the first entity in the second text paragraph (including the second entity) of the environmental quality report to be analyzed, and complete the further recognition of the first entity in the environmental quality report to be analyzed, and the accuracy of entity recognition in the report is improved; in addition, because the first entity is a part of the second entity, that is, for each first entity in the environmental quality report to be analyzed, the number of characters of the first entity is less than the number of characters of the second entity where the first entity is located, then, based on the simultaneous recognition of the first entity and the second entity, the first entity is recognized in the text paragraph where the second entity is located alone, and then the two recognition results are merged and redundantly optimized to obtain the text paragraph where each first entity in the environmental quality report to be analyzed is located, which can accurately recognize entities with shorter characters with higher accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 A schematic diagram of the implementation process of a method for generating a knowledge graph for spatial environmental assessment of an ecological environment region provided in an embodiment of the present application.

[0016] Figure 2 A hardware entity diagram of a computer system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0017] The embodiment of the present application provides a method for generating a knowledge graph of an ecological environment regional spatial environmental assessment, which can be executed by a processor of a computer system, wherein the computer system can refer to a device with data processing capabilities such as a server, a laptop, a tablet computer, and a desktop computer.

[0018] Figure 1 A schematic diagram of the implementation process of a method for generating a knowledge graph of ecological environment regional spatial environmental assessment provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the method includes:

[0019] Step S10: Obtain an environmental quality report to be analyzed of the target ecological environment regional space, where the environmental quality report to be analyzed includes one or more first entities to be extracted.

[0020] In an embodiment of the present application, step S10 obtains the intended analysis environmental quality report of the target ecological environment regional space from the relevant data source. This report is the basis for entity recognition, relationship extraction and knowledge graph construction. Specifically, the target ecological environment regional space can be a specific river basin, nature reserve, urban area or industrial area, etc. After determining the target area, the environmental quality report related to the area can be retrieved and downloaded from the environmental protection department, research institution, online database or internal enterprise system through a preset data interface or crawler technology within the scope of authority. These environmental quality reports usually contain rich environmental monitoring data, assessment results, problem descriptions and recommended measures, etc. They exist in the form of documents, which may be PDF, Word, Excel or plain text format. In the report, various types of entities are clearly marked or implied, and step S10 pays special attention to those key information points that are pre-defined as "first entities".

[0021] The first entity is the object that needs to be extracted and identified first when building the environmental assessment knowledge graph. They are crucial to understanding the environmental conditions of the target area. Taking a river basin as an example, the first entity may include specific pollutant names (such as "heavy metal lead" and "ammonia nitrogen"), ecological community types (such as "wetland vegetation" and "fish population"), pollution sources (such as "chemical plant discharge port" and "agricultural non-point source pollution"), and environmental quality standards (such as "surface water Class III standard").

[0022] In order to extract this information from the report more effectively, the computer system can predefine a list or pattern library of first entities. These lists or pattern libraries are built based on domain knowledge and contain expected entity names and their variants. In actual operation, the computer system uses technical means such as text matching, regular expressions, or named entity recognition (NER) models based on machine learning to search and mark all qualified first entities in the report text. For example, if the report text mentions that "recent monitoring has found that the ammonia nitrogen concentration in the basin exceeds the standard", the computer system will use the NER model to identify the first entity "ammonia nitrogen" and use it as an important object for subsequent processing. In this way, step S10 ensures that the starting data of the environmental impact assessment knowledge graph construction process is both comprehensive and accurate, laying a solid foundation for the smooth execution of subsequent steps.

[0023] Step S20: Perform a first entity recognition operation on the environmental quality report to be analyzed to obtain one or more first text paragraphs and one or more second text paragraphs in the environmental quality report to be analyzed; wherein the first text paragraph includes a first entity, the second text paragraph includes a second entity, and the first entity is contained in the second entity.

[0024] In step S20 of the embodiment of the present application, the computer system conducts an in-depth analysis of the environmental quality report to be analyzed obtained in step S10, and performs a first entity recognition operation, aiming to distinguish and extract text paragraphs containing specific information from the report, and provide an accurate data basis for the subsequent construction of the knowledge graph. Specifically, the computer system uses natural language processing (NLP) technology and pre-trained machine learning models, such as the named entity recognition (NER) model based on BERT (Bidirectional Encoder Representations from Transformers), to scan the full text of the report. These models are trained with a large amount of text data and can identify entity information in the text, including names of people, places, institutions, and proper nouns in specific fields.

[0025] In the embodiments of the present application, the first entity refers to specific items or concepts that are crucial to the construction of the environmental impact assessment knowledge graph, such as pollutant names, ecological region types, environmental indicators, etc. The second entity is a broader concept or entity, which usually contains the first entity as its sub-part or feature. For example, if "heavy metal lead" is the first entity, then "heavy metal pollutants in water bodies" may be the second entity that contains it. When performing the first entity recognition operation, the computer system pays special attention to those text paragraphs that contain both the first entity and the second entity. Through model prediction and rule matching, the computer system can distinguish between two different types of text paragraphs:

[0026] First text paragraph: These paragraphs focus directly on the first entity. Each paragraph explicitly contains one or more first entities, and these entities are often the core of the paragraph discussion. For example, a sentence like "According to monitoring data, the heavy metal lead content in this area has exceeded the safety standard." constitutes a typical first text paragraph.

[0027] Second text paragraphs: These paragraphs provide a broader context. They not only contain the first entity, but also cover more information related to the first entity, forming the second entity. For example, "Water pollution is becoming increasingly serious, especially heavy metal pollutants in water bodies, such as lead and mercury, which have had a serious impact on the ecosystem." Although this sentence also mentions "heavy metal lead", it is more about discussing a broader topic - "heavy metal pollutants in water bodies", so it belongs to the second text paragraph.

[0028] Step S30: performing a second entity recognition operation on each second text paragraph respectively to obtain a third text paragraph in each second text paragraph, wherein the third text paragraph includes a first entity.

[0029] In step S30 of the embodiment of the present application, the computer system focuses on accurately extracting the text part containing the first entity from each second text paragraph, that is, the third text paragraph, to ensure the accuracy and completeness of the subsequent knowledge graph construction. Specifically, the computer system applies a more refined entity recognition technology to each second text paragraph. Here, in addition to the possible continued use of the BERT-based NER model mentioned in step S20, more professional domain models or custom rules may be introduced to adapt to the entity recognition needs unique to the ecological environment field. For example, for the identification of water pollutants, a special water quality monitoring data NER model can be trained, which can more accurately identify the names of various water pollutants including heavy metals and organic pollutants. When performing the second entity recognition operation, the computer system performs a deep analysis of the second text paragraph, identifies all possible entities in the paragraph, and filters them according to the entity type. In this scenario, the first entity is an object of special concern to the system, and they may appear in the second text paragraph in different forms, such as full name, abbreviation, synonyms, etc. Therefore, the computer system needs to have a certain generalization ability to identify these variants.

[0030] Take a specific second text paragraph as an example: "Recent water quality monitoring results of the XX River Basin show that heavy metal pollutants in the water, especially the content of lead and cadmium, have exceeded the prescribed standards." In this paragraph, "heavy metal pollutants" is a second entity, which contains multiple first entities, such as "lead" and "cadmium." Through the second entity recognition operation, the computer system identifies all the first entities mentioned in the paragraph and extracts the text part where they are located as a third text paragraph. In this example, the part "especially the content of lead and cadmium" may be identified as a third text paragraph because it directly contains two first entities "lead" and "cadmium." In actual operation, a second text paragraph may contain multiple third text paragraphs, each of which revolves around one or a group of first entities.

[0031] Step S40: performing merging redundancy optimization on the third text paragraphs in each second text paragraph and one or more first text paragraphs to obtain one or more target text paragraphs, wherein the target text paragraph includes a first entity.

[0032] In step S40 of the embodiment of the present application, the computer system performs comprehensive processing on the third text paragraph extracted in step S30 and the first text paragraph directly identified in step S20, and finally generates one or more refined target text paragraphs by merging and removing redundant information, each of which focuses on a first entity. Specifically, the computer system collects all relevant text paragraphs, including those first text paragraphs that directly contain the first entity, and the third text paragraph extracted from the second text paragraph after the second entity is identified. Although these text paragraphs are all centered around the first entity, there may be overlaps in content or differences in expression. In order to optimize these data, the computer system can use a series of algorithms and techniques to merge redundant information and remove unnecessary parts. This process may not involve explicit machine learning models, but rely on natural language processing technologies such as text similarity calculation, keyword matching, and semantic analysis. For example, the computer system can use an algorithm based on TF-IDF (term frequency-inverse document frequency) or cosine similarity to calculate the similarity between text paragraphs and identify paragraphs with highly overlapping content.

[0033] In one implementation, the computer system may perform merge redundancy optimization according to the following steps:

[0034] Text paragraph comparison: The system compares all collected text paragraphs and identifies those that are highly similar or duplicated in content. This similarity can be assessed by comparing keywords, phrases, or sentence structures in the paragraphs.

[0035] Redundant information removal: For the redundant paragraphs identified, the computer system further analyzes the differences between them and selects the paragraphs containing the most comprehensive and accurate information as representatives, while removing or ignoring other paragraphs that are duplicated or contain less information. This selection process may be based on a variety of factors such as text length, information density, and source reliability.

[0036] Merge optimization: In some cases, the computer system can merge multiple related but not completely duplicate text paragraphs into a more complete target text paragraph. This merging operation requires careful handling of the connection and logical relationship between paragraphs to ensure that the merged text paragraphs remain clear, coherent and accurate. The target text paragraphs finally generated will become the basic data for the subsequent knowledge graph construction. They not only contain key information about the first entity, but also have been optimized to ensure the quality and accuracy of the data. This process is crucial to building an accurate and reliable knowledge graph of ecological and environmental regional spatial environmental assessment.

[0037] Step S50: Construct an environmental impact assessment knowledge graph based on the identified entities.

[0038] In an embodiment of the present application, the computer system uses the entities and their relationships identified in the previous steps (S10 to S40) to comprehensively construct a comprehensive and structured knowledge graph. This step is a key process for integrating scattered entity information into a meaningful knowledge network, which is of great value to fields such as environmental management, decision support, and scientific research. Specifically, the computer system organizes and summarizes all identified first entities and their related attribute information. These entities may include specific pollutants (such as heavy metal lead, ammonia nitrogen), ecological regions (such as wetlands, forests), environmental indicators (such as water quality grades, air quality indexes), etc., and their attributes may involve concentrations, distribution ranges, impact levels, and other aspects.

[0039] Next, the computer system constructs edges in the knowledge graph based on the relationships between entities. These relationships may be based on direct descriptions in the text (such as the pollutants and the places where the pollution exceeds the standard mentioned in the same sentence), implicit logical connections (such as the relationship between the pollution source and the pollutant inferred by the causal relationship), or prior knowledge in the field (such as the known impact of a certain pollutant on a specific ecological region). For example, the computer system can identify that there is a "pollution" relationship between "heavy metal lead" and "XX River Basin", indicating that there is a heavy metal lead pollution problem in the basin; at the same time, "heavy metal lead pollution" may be further associated with results such as "water quality degradation" and "damaged ecosystem". In the process of building a knowledge graph, the computer system can use a graph database (such as Neo4j) to store and manage entities and their relationships. Graph databases are particularly suitable for processing complex knowledge graph data with their efficient data query and update capabilities. When storing, each entity is assigned a unique identifier (such as UUID), and the relationship between entities is stored in the form of edges, with the type and direction of the relationship marked.

[0040] In order to further improve the practicality and usability of the knowledge graph, the computer system can also use machine learning models to infer and predict the data in the graph. For example, by training an inference model based on a graph neural network, the computer system can predict the diffusion trend of a certain pollutant under different environmental conditions; or by analyzing historical data, the computer system can evaluate the effect of different governance measures on improving environmental quality. The environmental impact assessment knowledge graph finally constructed is not only a static data set, but also a dynamic knowledge platform. It supports complex data query, visualization and intelligent analysis, and provides a powerful decision-making support tool for environmental management departments. At the same time, with the continuous addition of new data and the continuous optimization of the model, the knowledge graph itself will continue to evolve and more accurately reflect the actual situation of the ecological environment regional space.

[0041] As an implementation manner, step S40, merging and redundancy optimization is performed on the third text paragraphs in each second text paragraph and one or more first text paragraphs to obtain one or more target text paragraphs, which may specifically include:

[0042] Step S41: determining alternative text paragraphs corresponding to each first entity in the third text paragraphs in each second text paragraph and one or more first text paragraphs, and determining one or more third entities corresponding to multiple alternative text paragraphs in one or more first entities.

[0043] Specifically, the computer system traverses all the third text paragraphs in the second text paragraphs obtained by processing in step S30, and these paragraphs have been refined entity recognition to ensure that each paragraph contains at least one first entity. At the same time, the computer system reviews the first text paragraph containing the first entity directly identified in step S20. These text paragraphs together constitute the original data set for subsequent analysis. Next, the computer system examines each first entity one by one, with the aim of finding all text paragraphs containing the entity. These text paragraphs are marked as alternative text paragraphs corresponding to the first entity. The determination process of the alternative text paragraphs is based on an accurate text matching algorithm to ensure that no relevant information is missed. For example, suppose that in the environmental quality report, the first entity includes pollutant names such as "heavy metal lead" and "ammonia nitrogen". Through text matching, the system finds all paragraphs that mention "heavy metal lead" in the third text paragraph and the first text paragraph, such as "recent monitoring shows that the heavy metal lead content in the XX river exceeds the standard" and "lead pollution has become one of the main environmental problems in the region". These paragraphs are determined as alternative text paragraphs for "heavy metal lead". After determining the alternative text paragraphs for all first entities, the computer system further analyzes these alternative text paragraphs to identify those first entities that correspond to multiple alternative text paragraphs. These entities are mentioned multiple times in the report and may involve different contexts or information points, so they are specially marked as third entities. In the above example, "heavy metal lead" is identified as a third entity because it appears in multiple text paragraphs. Some other first entities, such as "specific microbial species A", may only be mentioned in a single text paragraph and therefore will not be marked as a third entity.

[0044] Through the execution of step S41, the computer system successfully collects candidate text paragraphs for each first entity and specially marks those third entities that need further screening. This process lays a solid foundation for determining the target text paragraphs and removing redundant information in the subsequent steps, ensuring the accuracy and refinement of the data in the process of building the environmental assessment knowledge graph.

[0045] Step S42: For each third entity, among the multiple alternative text paragraphs corresponding to the third entity, determine the first alternative text paragraph that meets the paragraph requirements as the target text paragraph, and determine the alternative text paragraphs other than the first alternative text paragraph among the multiple alternative text paragraphs as the second alternative text paragraph corresponding to the third entity.

[0046] Step S42 selects the paragraph that best meets the requirements from multiple candidate text paragraphs as the target text paragraph, and determines the remaining paragraphs as the second candidate text paragraphs. First, the computer system examines all the corresponding candidate text paragraphs for each third entity (i.e., the key entity mentioned in multiple text paragraphs). Although these candidate text paragraphs all contain the third entity, there may be differences in content, length, information density, context relevance, etc. In order to determine which candidate text paragraph is most suitable as the target text paragraph, the computer system evaluates it according to a series of preset paragraph requirements. These requirements may include but are not limited to: the rationality of text length, the completeness of information content, the relevance of context, the clarity of language expression, etc. The system can adopt a rule-based evaluation method, such as setting a threshold for text length, checking the presence or absence of key information, etc.; it may also introduce a machine learning model, such as a text classifier or a regression model, to more intelligently evaluate the quality of text paragraphs.

[0047] When evaluating these alternative text paragraphs, the computer system can score them according to preset paragraph requirements (such as information completeness and data detail). Paragraph A may get the highest score because it provides detailed monitoring data and exceeding standards, so it is determined to be the first alternative text paragraph for "heavy metal lead", that is, the target text paragraph. Although paragraphs B and C also contain valuable information, either the information is incomplete (paragraph B) or the context is too broad (paragraph C), so they are determined to be the second alternative text paragraphs. Once the target text paragraph is determined, the computer system uses it to construct an environmental impact assessment knowledge graph in subsequent steps. At the same time, for the second alternative text paragraph, the computer system can perform further analysis or storage for future reference when needed. However, in the current merge redundancy optimization process, these second alternative text paragraphs will be treated as redundant information and cleared to ensure that the final generated knowledge graph is both accurate and refined.

[0048] Step S43: In the third text paragraphs in each second text paragraph and one or more first text paragraphs, the second candidate text paragraphs corresponding to each third entity are removed to obtain one or more target text paragraphs.

[0049] In step S43, the computer system will, for each third entity, remove those entries that are determined to be second alternative text paragraphs from the corresponding multiple alternative text paragraphs, and only retain the first alternative text paragraph as the target text paragraph. In the previous steps, the computer system has completed the identification and evaluation of the alternative text paragraphs of each third entity, and determined which paragraphs are the first alternative text paragraphs (i.e., the target text paragraphs) containing the most comprehensive and accurate information, and which paragraphs are the second alternative text paragraphs with repeated information or lower importance. Now, the computer system needs to perform the actual cleaning operation. When executing step S43, the computer system traverses all third entities and their corresponding alternative text paragraph lists. For each third entity, the computer system identifies which text paragraphs are marked as second alternative text paragraphs based on the results of the previous steps. Subsequently, the computer system removes these second alternative text paragraphs from the original text paragraph set, and only retains the target text paragraph.

[0050] As an implementation manner, step S42, determining, among multiple candidate text paragraphs corresponding to the third entity, the first candidate text paragraph that meets the paragraph requirement as the target text paragraph, may specifically include:

[0051] Step S421: Obtain the support probability of each candidate text paragraph, where the support probability indicates the possibility that the candidate text paragraph includes the third entity.

[0052] In step S421, the computer system evaluates the possibility of each candidate text paragraph containing the third entity, and the evaluation result is reflected by the quantitative indicator of support probability. The level of support probability directly reflects the strength of association between the text paragraph and the third entity, and provides an important basis for the subsequent determination of the target text paragraph. For each third entity, the computer system traverses all the candidate text paragraphs corresponding to it. These text paragraphs may come from different parts of the environmental quality report, covering various descriptions and contexts of the third entity. In order to accurately evaluate the support probability of each text paragraph, the computer system needs to use advanced natural language processing (NLP) technology and machine learning models. A common method is to use a named entity recognition (NER) model based on deep learning. This type of model is trained with a large amount of annotated data, can identify entities in the text, and give a confidence score for each entity recognition. In step S421, the computer system can use this confidence score as a direct source of support probability. Specifically, the computer system inputs the candidate text paragraph into the trained NER model, and the model outputs the recognition result of each entity (including the third entity) and its corresponding confidence score. This confidence score represents the possibility of the entity being included in the text paragraph, that is, the support probability. However, it should be noted that a simple NER model may not be able to fully capture the complex relationship between the text paragraph and the third entity. Therefore, in practical applications, computer systems can combine other NLP technologies, such as semantic role labeling and relationship extraction, to further enrich the semantic representation of the text paragraph and calculate a more accurate support probability based on this.

[0053] For example, suppose that in the process of constructing a knowledge graph of spatial environmental assessment of the ecological environment of a river basin, "heavy metal pollution" is identified as a key third entity. The system finds multiple alternative text paragraphs containing "heavy metal pollution", among which paragraph A describes in detail the sources, impacts and control measures of heavy metal pollution in the river, while paragraph B only briefly mentions heavy metal pollution when listing a variety of environmental problems.

[0054] In step S421, the computer system inputs these alternative text paragraphs into the trained NER model. The model identifies the "heavy metal pollution" entity in paragraphs A and B, and gives confidence scores respectively, such as the confidence score of paragraph A is 0.95, and the confidence score of paragraph B is 0.60. These confidence scores are regarded as the support probability of the text paragraph for the "heavy metal pollution" entity. Since paragraph A has a higher support probability, it is more likely to contain the "heavy metal pollution" entity, and therefore it is more likely to be selected as the target text paragraph in subsequent steps.

[0055] Step S422: among the multiple candidate text paragraphs corresponding to the third entity, determine the candidate text paragraph with the highest support probability as the first candidate text paragraph, and determine the first candidate text paragraph as the target text paragraph.

[0056] In step S422, the computer system selects the most satisfactory paragraph from the multiple candidate text paragraphs corresponding to the third entity according to the support probability calculated in step S421. Specifically, the computer system compares the support probabilities of these candidate text paragraphs, selects the paragraph with the highest support probability as the first candidate text paragraph, and determines it as the target text paragraph in the subsequent knowledge graph construction process. When executing step S422, the computer system reviews the support probability values ​​of each candidate text paragraph calculated in step S421. These support probability values ​​reflect the possibility and importance of the third entity contained in the text paragraph, and are an important basis for the system to make a selection. Next, the computer system sorts these support probability values ​​and finds the maximum value. The candidate text paragraph corresponding to the maximum value is identified as having the highest support probability, and therefore is most likely to fully and accurately describe the relevant information of the third entity. This paragraph is then marked as the first candidate text paragraph and used as the target text paragraph in subsequent steps.

[0057] It should be noted that although step S422 mainly relies on the support probability value for screening, in actual applications, the computer system may also consider other factors, such as text length, information density, context relevance, etc., to further ensure the accuracy and representativeness of the selected target text paragraph. However, in most cases, the support probability value is still the decisive factor because it directly reflects the possibility and importance of containing a specific entity in a text paragraph.

[0058] As another implementation, step S42, determining, among multiple candidate text paragraphs corresponding to the third entity, a first candidate text paragraph that meets the paragraph requirement as the target text paragraph, includes:

[0059] Step S421 ′: obtaining the support probability of each candidate text paragraph, where the support probability indicates the possibility that the candidate text paragraph includes the third entity.

[0060] Step S421' may refer to the aforementioned step 421, and will not be described in detail here.

[0061] Step S422': among the multiple candidate text paragraphs, determine the candidate text paragraph with the highest support probability as the third candidate text paragraph, and determine the candidate text paragraphs other than the third candidate text paragraph among the multiple candidate text paragraphs as the fourth candidate text paragraph.

[0062] In step S422', the computer system continues to deepen the processing of the candidate text paragraphs in order to further select the target text paragraph that best meets the requirements. Specifically, the computer system performs two key operations in this step: first, the paragraph with the highest support probability is identified from multiple candidate text paragraphs, and it is marked as the third candidate text paragraph; second, all the remaining candidate text paragraphs are classified as the fourth candidate text paragraph.

[0063] In order to determine the alternative text paragraph with the highest support probability, the computer system first reviews the support probability value of each alternative text paragraph calculated in step S421'. These support probability values ​​are calculated using advanced natural language processing technology and machine learning models (such as named entity recognition NER models), and they directly reflect the possibility that a text paragraph contains a specific third entity. The system sorts these support probability values ​​and finds the maximum value. The alternative text paragraph corresponding to the maximum value is identified as having the highest support probability, and therefore is most likely to fully and accurately describe the relevant information of the third entity. This paragraph is then marked as the third alternative text paragraph as a key consideration in subsequent steps.

[0064] After determining the third candidate text paragraph, the computer system classifies all remaining candidate text paragraphs as fourth candidate text paragraphs. Although these paragraphs also contain relevant information about the third entity, their support probability is lower than that of the third candidate text paragraph, so they are slightly less important. However, this does not mean that these paragraphs will be completely ignored, because the system will further analyze their relationship with the third candidate text paragraph (such as paragraph overlap rate) in subsequent steps to decide whether some of them need to be retained.

[0065] Assume that in the process of constructing a knowledge graph of spatial environmental assessment of the ecological environment of a river basin, the computer system identifies "water eutrophication" as an important third entity. Through the calculation of step S421', the computer system obtains multiple alternative text paragraphs containing the description of "water eutrophication" and their corresponding support probability values. In step S422', the computer system sorts these support probability values ​​and finds that paragraph X has the highest support probability (for example, 0.90). Therefore, paragraph X is determined to be the third alternative text paragraph. At the same time, all other alternative text paragraphs (such as paragraph Y, paragraph Z, etc.) are classified as the fourth alternative text paragraphs due to their low support probabilities (for example, 0.75 and 0.60, respectively).

[0066] In the next step, the computer system will further analyze the relationship between these fourth candidate text paragraphs and the third candidate text paragraph X, especially the paragraph overlap rate between them. This will help the system to more accurately screen out those text paragraphs that contain valuable information and are not redundant with the third candidate text paragraph, thereby building a more accurate and refined environmental assessment knowledge graph.

[0067] Step S423 ′: obtaining the paragraph overlap ratio between each fourth candidate text paragraph and the third candidate text paragraph.

[0068] In step S423', the computer system further refines the analysis of the candidate text paragraphs, especially focusing on the relationship between the fourth candidate text paragraph (i.e., those paragraphs with a support probability lower than that of the third candidate text paragraph) and the third candidate text paragraph. In order to evaluate this relationship, the computer system calculates the paragraph overlap rate between each fourth candidate text paragraph and the third candidate text paragraph. The paragraph overlap rate is a quantitative index used to measure the similarity or overlap degree of the content of two text paragraphs. It can be achieved by comparing keywords, phrases, sentences or more complex semantic units in the text paragraphs. In one implementation, the computer system can use a text similarity algorithm (such as cosine similarity, Jaccard similarity, etc.) to calculate the paragraph overlap rate, which can effectively capture similar features between texts and give corresponding similarity scores. Or it can be implemented based on the subsequent implementation of this application. Different text paragraphs may contain different descriptions of the same environmental problem, some of which may be more detailed, while others may be more concise or focus on different aspects. By calculating the paragraph overlap rate, the computer system can identify those fourth alternative text paragraphs that are similar but not identical to the third alternative text paragraph (usually the most comprehensive and accurate description), thereby facilitating redundancy removal and information integration in subsequent steps.

[0069] In step S423', the computer system calculates the paragraph overlap rates between paragraph B, paragraph C, etc. and paragraph A respectively. This calculation process may involve pre-processing steps such as word segmentation, stop word removal, stem extraction, etc. for the text paragraphs, and then compares the processed text vectors or feature matrices using a text similarity algorithm. Finally, the computer system obtains a series of paragraph overlap rate values, which reflect the content similarity between the fourth candidate text paragraph and the third candidate text paragraph.

[0070] Through the calculation of step S423', the computer system provides an important basis for redundancy removal and information integration in subsequent steps, which helps to build a more accurate and refined ecological environment regional spatial environmental assessment knowledge map.

[0071] Step S424': among the multiple candidate text paragraphs, remove the fourth candidate text paragraph whose paragraph overlap ratio is not less than the reference paragraph overlap ratio, and determine the remaining candidate text paragraph after removal as the first candidate text paragraph, and determine the first candidate text paragraph as the target text paragraph.

[0072] In step S424', the computer system selects the final target text paragraph from multiple candidate text paragraphs to ensure the accuracy and refinement of the knowledge graph construction. This step is based on the paragraph overlap rate calculated in the previous step S423' and a preset reference paragraph overlap rate threshold.

[0073] Specifically, the computer system traverses all fourth candidate text paragraphs (i.e., those text paragraphs whose support probability is lower than that of the third candidate text paragraphs) and checks the paragraph overlap rate between them and the third candidate text paragraphs. For each fourth candidate text paragraph, if its paragraph overlap rate is not less than the preset reference paragraph overlap rate, it means that there is a high degree of content duplication between the paragraph and the third candidate text paragraph, and therefore it may be redundant in the construction of the knowledge graph. Based on this judgment, the computer system removes all fourth candidate text paragraphs whose paragraph overlap rate is not less than the reference paragraph overlap rate. This clearing operation ensures that the final selected text paragraph set does not contain too much duplicate information, thereby improving the quality and availability of the knowledge graph.

[0074] After the cleaning operation is completed, the remaining candidate text paragraphs (mainly the third candidate text paragraphs, and those fourth candidate text paragraphs with low content overlap with the third candidate text paragraphs) are determined as the first candidate text paragraphs. Since these paragraphs contain key information of the third entity and there is not much redundancy between them, they are selected as target text paragraphs for the subsequent knowledge graph construction process.

[0075] For example, suppose that when constructing an environmental assessment knowledge graph about the ecological environment protection of a forest area, the third candidate text paragraph (referred to as paragraph A) describes in detail the phenomenon, consequences and protection measures of "illegal logging" in the forest. The system also identifies several fourth candidate text paragraphs (such as paragraph B, paragraph C, etc.), which also involve the topic of "illegal logging", but the description angles or details are different.

[0076] In step S423', the computer system calculates the paragraph overlap rates between paragraphs B, C, etc. and paragraph A. Assume that the content of paragraphs B is highly similar to that of paragraph A, and their paragraph overlap rate exceeds the preset reference paragraph overlap rate threshold; while paragraph C also mentions "illegal logging", it discusses it more from a legal perspective, and the content overlap with paragraph A is relatively low.

[0077] In step S424', the computer system removes paragraph B (because it has too much content overlap with paragraph A) based on the paragraph overlap rate, and retains paragraph A and paragraph C. At this time, paragraph A, as the third candidate text paragraph, and paragraph C, as the fourth candidate text paragraph that does not overlap with the third candidate text paragraph, are jointly determined as the first candidate text paragraph, that is, the final target text paragraph. These text paragraphs will be used in the subsequent knowledge graph construction process to represent and associate other entities and attributes related to "illegal logging".

[0078] As an implementation manner, step S423', obtaining the paragraph overlap ratio between each fourth candidate text paragraph and the third candidate text paragraph, may specifically include:

[0079] For each fourth alternative text paragraph, complete the following steps:

[0080] Step S4231: Determine the overlapping text paragraphs of the fourth candidate text paragraph and the third candidate text paragraph, and determine the number of first characters of the overlapping text paragraphs.

[0081] In step S4231, the computer system deeply analyzes the relationship between the fourth candidate text paragraph and the third candidate text paragraph, especially the overlapping content between them. First, the computer system compares the content of the fourth candidate text paragraph with the third candidate text paragraph to find common elements between them. These common elements may include the same sentences, phrases, keywords, etc., which constitute the overlapping text paragraphs of the two text paragraphs, that is, the intersection of the two sets. In the scenario of constructing the knowledge graph of ecological environment regional spatial environmental assessment, the overlapping text paragraphs may involve the description of the same environmental problem, the mention of the same pollutant, the discussion of the same governance measures, etc. In order to accurately determine the overlapping text paragraphs, the computer system can use a text similarity algorithm or a string matching technology. For example, the computer system can first perform word segmentation on the two text paragraphs to split the text into a series of vocabulary units. Then, the computer system compares these vocabulary units to find out the vocabulary or vocabulary combinations that appear in both text paragraphs. These common vocabulary or vocabulary combinations constitute the basis of the overlapping text paragraphs. However, it is not enough to just find the common vocabulary, because the overlapping text paragraphs should be continuous text fragments, not isolated vocabulary. Therefore, the computer system needs to further analyze the position relationship of these common words in the text paragraphs to determine whether they constitute meaningful overlapping text paragraphs. This may require the system to use natural language processing (NLP) technology to understand the semantic structure of the text, or simply use string matching to find continuous text segments that appear in both text paragraphs.

[0082] Once the overlapping text paragraphs are identified, the computer system calculates their first character counts. Character count is a quantitative indicator used to indicate the total number of characters in a text paragraph. In this context, first character count refers specifically to the total number of characters in the overlapping text paragraphs. This includes all text elements such as letters, numbers, punctuation marks, but does not include spaces (unless spaces are also considered part of the characters). By calculating the first character count, the computer system is able to quantitatively assess the degree of overlap between the two text paragraphs.

[0083] For example, suppose that when constructing an environmental impact assessment knowledge graph about the eutrophication of a certain lake, the third alternative text paragraph (paragraph A) describes that "in recent years, the eutrophication problem of XX Lake has become increasingly serious, mainly manifested in the massive reproduction of algae", while a fourth alternative text paragraph (paragraph B) mentions that "the eutrophication of XX Lake has led to algae outbreaks, which has had a serious impact on water quality."

[0084] In step S4231, the computer system compares the contents of paragraph A and paragraph B and finds that "XX Lake Eutrophication" and "Algae" are key elements mentioned in both text paragraphs. By further analyzing the positional relationship of these elements in the text paragraphs, the computer system determines that the overlapping text paragraphs are "XX Lake Eutrophication" and "Algae" (although in actual applications, the overlapping text paragraphs may be longer, and they are truncated here for the sake of simplicity). Then, the computer system calculates the number of the first characters of the overlapping text paragraphs, that is, the total number of characters, for subsequent calculation of the paragraph overlap rate.

[0085] Step S4232: Determine a fused text paragraph of the fourth candidate text paragraph and the third candidate text paragraph, and determine the second character quantity of the fused text paragraph.

[0086] In step S4232, for the fourth candidate text paragraph and the third candidate text paragraph, by calculating their fused text paragraph (i.e., union) and the number of their second characters, key data is provided for the subsequent paragraph overlap rate calculation. The computer system determines the fused text paragraph of the two text paragraphs. The fused text paragraph contains all the non-repeating content in the fourth candidate text paragraph and the third candidate text paragraph, which is equivalent to the result of merging the two text paragraphs and removing the repeated parts. This process is similar to the union operation in set theory, but the object processed is text rather than a simple element set.

[0087] In order to obtain the fused text paragraph, the text merging and deduplication technology can be used. Specifically, the computer system can simply splice the two text paragraphs together to form a preliminary fused text. Then, the computer system performs deduplication processing on the fused text to remove repeated sentences, phrases or keywords to ensure that the content in the fused text paragraph is unique.

[0088] Deduplication may involve complex text comparison and editing operations, as simple string matching may not accurately identify semantic duplications. To achieve more precise deduplication, computer systems can use natural language processing (NLP) technology to understand the semantic structure of text, or use more advanced text similarity algorithms to evaluate the similarity between text fragments.

[0089] Once the fused text paragraph is determined, the computer system will calculate its second character quantity. Similar to the calculation of the first character quantity of the overlapping text paragraph in step S4231, the second character quantity is also a quantitative indicator used to represent the total number of characters in the fused text paragraph. It includes all letters, numbers, punctuation marks and other text elements in the fused text paragraph, but does not include spaces (unless spaces are also considered part of the characters). By calculating the second character quantity, the computer system can quantitatively evaluate the amount of information after the two text paragraphs are merged. This quantity will be used as a denominator in the subsequent paragraph overlap rate calculation, and together with the first character quantity of the overlapping text paragraphs, it determines the value of the paragraph overlap rate.

[0090] For example, suppose that when constructing an environmental impact assessment knowledge graph for the air quality evaluation of a certain city, the third alternative text paragraph (paragraph A) describes that "in recent years, the PM2.5 concentration in XX city has continued to rise, and the air pollution problem is serious", while a fourth alternative text paragraph (paragraph B) mentions that "the air quality in XX city is worrying, especially the frequent occurrence of smog weather in winter."

[0091] In step S4232, the computer system merges paragraph A with paragraph B and removes duplicate content therebetween (in this example, there are no obvious directly repeated sentences between the two paragraphs, but this may exist in actual applications). Assume that the merged and deduplicated fused text paragraph is "In recent years, the PM2.5 concentration in XX city has continued to rise, and the air pollution problem is severe, especially the frequent occurrence of smog in winter." The computer system then calculates the number of second characters in this fused text paragraph, that is, the total number of all characters in the paragraph, for subsequent calculation of the paragraph overlap rate. It should be noted that the example here omits the specific process of deduplication for the sake of simplicity. In actual applications, deduplication operations may be necessary and more complicated.

[0092] Step S4233: Divide the first character quantity by the second character quantity to obtain a division ratio, and determine the division ratio as the paragraph overlap ratio between the fourth candidate text paragraph and the third candidate text paragraph.

[0093] In step S4233, the computer system determines the paragraph overlap rate between the fourth candidate text paragraph and the third candidate text paragraph by calculating the ratio of two key values, namely, the ratio of the first character number of the overlapped text paragraph to the second character number of the merged text paragraph. This step is an important part of evaluating the content similarity of two text paragraphs, and has guiding significance for the subsequent knowledge graph construction process.

[0094] First, the computer system reviews the first character number and the second character number calculated in steps S4231 and S4232. The first character number represents the total number of characters in the overlapping text portion between the fourth candidate text paragraph and the third candidate text paragraph, which reflects the direct similarity in the content of the two text paragraphs. The second character number represents the total number of characters after the two text paragraphs are merged and the duplicate content is removed, which represents the total amount of information in the merged text paragraph.

[0095] Next, the computer system divides the number of the first characters by the number of the second characters to obtain a division ratio. This ratio is the paragraph overlap rate, which is a value between 0 and 1, used to quantitatively represent the content similarity between the fourth candidate text paragraph and the third candidate text paragraph. When the paragraph overlap rate is close to 1, it means that the contents of the two text paragraphs are highly similar and there is a large amount of repeated information; when the paragraph overlap rate is close to 0, it means that the contents of the two text paragraphs are quite different and there is almost no repeated information.

[0096] In practical applications, the calculation of paragraph overlap rate can help computer systems identify and remove redundant text paragraphs, thereby ensuring that the constructed knowledge graph is both comprehensive and concise. For example, in the scenario of constructing an ecological environment regional spatial environmental assessment knowledge graph, if multiple text paragraphs describe the same aspects of the same environmental problem, then the paragraph overlap rate between these paragraphs can be high. By calculating the paragraph overlap rate, the computer system can intelligently select one of the most representative text paragraphs as the target text paragraph, while excluding other redundant text paragraphs.

[0097] For example, suppose that when constructing an environmental assessment knowledge graph about the ecological protection of a river basin, the third alternative text paragraph (paragraph A) describes that "in recent years, the water quality of the XX river basin has deteriorated, mainly due to industrial wastewater discharge", while a fourth alternative text paragraph (paragraph B) mentions that "the water quality problem of the XX river is becoming increasingly prominent, and industrial pollution is its main source". After calculations in steps S4231 and S4232, the computer system obtains that the first number of characters of the overlapping text paragraphs is N1 (assuming that it is the total number of characters of keywords and phrases shared by the two paragraphs), and the second number of characters of the merged text paragraph is N2 (assuming that it is the total number of characters after merging the two paragraphs and removing duplicates).

[0098] In step S4233, the computer system calculates the paragraph overlap rate as R = N1 / N2. If the value of R is high (for example, close to 0.7), it indicates that there is a large overlap in content between paragraph B and paragraph A, and it may need to be removed or merged during the subsequent knowledge graph construction process. On the contrary, if the value of R is low, it means that although paragraph B also involves the same environmental problem, it provides different information or perspectives from paragraph A, so it should be retained in the knowledge graph.

[0099] As an implementation, when one or more first entities to be extracted are of the target entity type, after performing merge redundancy optimization on the third text paragraphs in each second text paragraph and one or more first text paragraphs to obtain one or more target text paragraphs, the method further includes:

[0100] Step S40A: For each target text paragraph in the environmental quality report to be analyzed, perform the operations of the following steps to obtain the entity extraction result of the environmental quality report to be analyzed.

[0101] In step S40A, the computer system performs a series of operations on each target text paragraph obtained through merge redundancy optimization to obtain the entity extraction result. These operations are usually based on advanced natural language processing (NLP) technologies and machine learning models, and can automatically identify entities and their types from the text. First, the computer system traverses all target text paragraphs and processes each paragraph one by one. For each target text paragraph, the computer system starts the entity extraction process, which may include multiple steps such as text preprocessing, entity recognition, and entity type classification.

[0102] In the text preprocessing stage, the computer system can perform operations such as word segmentation, stop word removal, and stemming on the target text paragraph to simplify the text structure and improve the accuracy of subsequent entity recognition. For example, in the scenario of spatial environmental impact assessment in ecological environment regions, the computer system can segment "heavy metal pollution" into "heavy metal" and "pollution", and remove meaningless stop words such as "de" (的) and "le" (了).

[0103] Next, the computer system uses the entity recognition model to scan the preprocessed text and identify the entities in it. The entity recognition model may be a deep learning-based sequence labeling model, such as BiLSTM-CRF (Bidirectional Long Short-Term Memory Network combined with Conditional Random Field), which can label the entity boundaries according to the context information of the text. During the recognition process, various factors such as the semantic features of vocabulary, context relationships, and domain knowledge are considered to ensure the accuracy of recognition.

[0104] Once the entities are identified, the computer system also needs to determine the types of these entities. This is usually achieved through an entity type classification model, which may be a multi-classifier that can predict the entity type based on the text representation of the entity (such as a word embedding vector). In the scenario of ecological and environmental regional spatial environmental assessment, entity types may include "pollutant name", "ecological region", "environmental indicator", etc. The system will match each identified entity with the preset entity type to determine its entity type.

[0105] Finally, the computer system aggregates the entities and their type information in all target text paragraphs to form the entity extraction results of the environmental quality report to be analyzed. These results will serve as the basic data for building the knowledge graph to support subsequent entity relationship extraction, knowledge representation, and reasoning analysis.

[0106] Through the execution of step S40A, the computer system can efficiently extract valuable entity information from a large amount of text data, providing strong support for the construction of the ecological environment regional spatial environmental assessment knowledge graph.

[0107] Step S40B: Based on the entity type recognition network, entity type recognition is performed on the target text paragraph to obtain the entity type corresponding to the first entity included in the target text paragraph.

[0108] In step S40B, a pre-trained entity type recognition network is called. This network is a machine learning-based model that can automatically learn and recognize different types of entities from text data. In the context of ecological and environmental regional spatial environmental assessment, entity types may include but are not limited to "pollutant name", "ecological region", "environmental indicator", etc.

[0109] The specific implementation of the entity type recognition network may vary, but usually involves deep learning techniques such as convolutional neural networks (CNNs), recurrent neural networks (RNNs), or Transformer models. These models are trained with a large amount of labeled data, and can learn the complex relationship between entities and contexts, and use this to identify entity types for new text data. Taking the Transformer model as an example, it uses a self-attention mechanism to process text sequences, which can capture long-distance dependencies in text and is particularly effective for entity type recognition tasks. During the training process, the model receives a large amount of labeled text data as input, which contains the boundary information and type labels of the entity. By minimizing the error between the predicted label and the true label, the model continuously optimizes its parameters until satisfactory recognition performance is achieved.

[0110] During the execution of step S40B, the computer system passes the target text paragraph as input to the entity type recognition network. The network performs pre-processing operations such as word segmentation and word embedding on the text, and then sends the processed text sequence into the model for calculation. The model outputs the probability distribution of each word or phrase belonging to a certain entity type based on the input text sequence. Next, the computer system determines the entities contained in the target text paragraph and their corresponding types based on the output results of the model. Specifically, the computer system sets a threshold (such as 0.5). When the probability that a word or phrase belongs to a certain entity type exceeds this threshold, the word or phrase is considered to be an entity of this type. At the same time, the computer system also uses some post-processing techniques (such as entity merging, type correction, etc.) to further improve the accuracy of entity type recognition.

[0111] Through the execution of step S40B, the computer system can accurately identify entities and their corresponding types from the target text paragraph, providing key information for the subsequent knowledge graph construction step.

[0112] Step S40C: If the entity type is the target entity type, extract the text entity corresponding to the target entity type from the target text paragraph.

[0113] In step S40C, the computer system determines whether each identified entity belongs to the preset target entity type based on the output result of step S40B. The target entity type is set according to the specific needs of the knowledge graph construction, and may include key information points such as "pollutant name", "ecological region", and "key indicators". Once the computer system determines that an entity belongs to the target entity type, it will perform an extraction operation to extract the entity and its related information from the target text paragraph. The relevant information here may include the text representation of the entity (that is, the specific form of the entity in the text), the location information of the entity (such as the start and end positions of the entity in the text), and any additional attributes or metadata associated with the entity.

[0114] The extraction process can be based on simple text matching and rule extraction. The computer system formulates a set of extraction rules based on the definition of entity types and context, and then applies these rules to accurately locate and extract target entities.

[0115] Through the execution of step S40C, the computer system can efficiently extract text entities corresponding to the target entity type from the target text paragraph, providing an accurate and structured data foundation for subsequent entity relationship extraction and knowledge graph construction steps.

[0116] As an implementation manner, in step S40B, before performing entity type recognition on the target text paragraph based on the entity type recognition network, the method further includes:

[0117] Step S40B1: Obtain a text paragraph training sample containing a priori tags, where the text paragraph training sample includes an entity training sample.

[0118] In step S40B1, the computer system obtains a set of text paragraph training examples containing prior labels. These training examples are carefully selected and prepared. They not only contain rich knowledge in the field of ecological environment, but also undergo manual or automatic annotation processing to ensure that each entity is accurately labeled with its corresponding type. Specifically, these text paragraph training examples may come from multiple channels, such as public environmental quality reports, academic papers, news reports, etc. In order to build a comprehensive training data set, the computer system can collect relevant text paragraphs from multiple data sources and integrate and screen them.

[0119] After collecting enough text paragraphs, the next step is to label them. The labeling process is usually completed by domain experts or trained labelers, who will identify and label the entities in each text paragraph based on the knowledge and rules in the field of ecological environment. For example, in a text paragraph describing water pollution in a river basin, "heavy metal lead" may be labeled as a "pollutant name" type, "river basin" may be labeled as a "geographical area" type, and "exceeding the standard" may not be considered an independent entity, but as a word to describe the degree of pollution.

[0120] In addition to the labeling of entity types, the annotation work may also include the recording of other metadata, such as the location information of the entity (the starting and ending positions in the text), the confidence score of the entity (indicating the degree of confidence of the annotator in the entity recognition), etc. These metadata are helpful for evaluating and optimizing the performance of the entity type recognition network in subsequent steps.

[0121] Finally, the annotated text paragraph training examples are organized into a structured format for computer systems to read and use. These examples contain prior labeled entity information and are an indispensable and valuable resource for training entity type recognition networks.

[0122] Step S40B2: Based on the entity type recognition network, entity type recognition is performed on the text paragraph training samples to obtain the estimated entity type corresponding to the entity training samples in the text paragraph training samples.

[0123] In step S40B2, the text paragraph training sample containing the prior mark obtained in step S40B1 is input into the initialized or preliminarily trained entity type recognition network. This network may be a complex deep learning model, such as a convolutional neural network (CNN), a recurrent neural network (RNN) combined with a long short-term memory network (LSTM) or a more advanced Transformer model. These models can automatically learn high-level feature representations in text data through multiple layers of nonlinear transformations, thereby achieving accurate recognition of entity types. When the text paragraph training sample is input into the entity type recognition network, the network will first perform a series of preprocessing operations on it, such as word segmentation, word embedding (converting vocabulary into high-dimensional vector representation), etc. These preprocessing steps help convert the original text data into a form that the model can process.

[0124] Next, the model processes the preprocessed text data according to its internally defined computational flow. In the CNN model, this may involve extracting local features in the text through multiple convolutional layers and pooling layers; in the RNN or LSTM model, it may be possible to capture the temporal dependencies in the text through recurrent units; and in the Transformer model, it may be possible to model the global dependencies between words in the text through self-attention mechanisms. Regardless of the model architecture used, the ultimate goal is to output the estimated entity type corresponding to the entity training example in each text paragraph. This estimation process is based on the feature representations and parameter weights learned by the model, which reflects the model's understanding of the current input data.

[0125] Step S40B3: Determine the network training cost of the entity type recognition network based on the error between the estimated entity type and the prior label.

[0126] In step S40B3, the computer system compares the estimated entity type obtained by the entity type recognition network after performing entity type recognition on the text paragraph training sample with the prior mark in the sample. The prior mark is the entity type determined in advance by a manual or automatic annotation tool, which represents the knowledge or rules in the real world. The estimated entity type is the prediction result given by the network after processing the input text according to the current learning state and parameter settings. In order to quantify the difference between the estimated entity type and the prior mark, the computer system needs to adopt one or more error calculation methods. These methods are usually based on the principles of statistics or information theory and can objectively evaluate the accuracy of model predictions. In the scenario of entity type recognition, commonly used error calculation methods include cross-entropy loss, accuracy, recall, F1 score, etc.

[0127] Take cross entropy loss as an example. It is a method to measure the difference between two probability distributions. It is often used to evaluate the inconsistency between the probability distribution predicted by the model and the true label in classification problems. In the scenario of entity type recognition, the computer system converts the estimated entity type into a probability distribution (even if the model itself does not directly output the probability, it can be converted into a probability through the softmax function, etc.), and then calculates the cross entropy loss with the probability distribution corresponding to the prior label (usually a one-hot encoded vector). The smaller the loss value, the closer the estimated entity type is to the prior label, and the better the prediction performance of the model.

[0128] In addition to cross-entropy loss, computer systems can also calculate indicators such as accuracy, recall, and F1 score to comprehensively evaluate the performance of the model. Accuracy refers to the ratio of the number of correctly predicted entity types to the total number of predictions; recall refers to the ratio of the number of correctly predicted entity types to the number of actual entity types; and the F1 score is the harmonic mean of accuracy and recall, which is used to comprehensively evaluate the predictive ability of the model.

[0129] After determining the error between the estimated entity type and the prior label, the computer system can calculate the network training cost of the entity type recognition network. This cost is a numerical indicator used to guide the subsequent training process. The size of the training cost reflects the gap between the current model and the ideal model, and is an important basis for model tuning and optimization.

[0130] Step S40B4: According to the network training cost of the entity type recognition network, the network parameters of the entity type recognition network are adjusted until a preset first training stop condition is met to obtain a trained entity type recognition network.

[0131] In step S40B4, the computer system evaluates the performance of the current entity type recognition network according to the network training cost calculated in step S40B3. The training cost is a quantitative indicator that reflects the degree of difference between the network prediction result and the actual prior label. The higher the training cost, the worse the network performance is, and further tuning is required; conversely, the lower the training cost, the better the network performance is, and the expected goal is approached or achieved. In order to reduce the training cost and improve the network performance, the computer system adjusts the network parameters of the entity type recognition network. These network parameters include but are not limited to weights, biases, etc. They are key parameters in the network learning process and determine the network's processing method for input data and the accuracy of the output results. The process of adjusting the network parameters is usually implemented by backpropagation algorithm and gradient descent method. The backpropagation algorithm is used to calculate the gradient of the network training cost with respect to each network parameter, that is, the partial derivative of the cost function with respect to the network parameter. The gradient descent rule uses this gradient information to update the value of the network parameter so that the training cost gradually decreases along the direction of gradient descent.

[0132] In the process of adjusting network parameters, the computer system repeatedly performs forward propagation (calculating network output) and back propagation (calculating gradients and updating parameters) until the preset first training stop condition is met. These stop conditions may include the number of training iterations reaching the upper limit, the training time exceeding the preset threshold, the training cost falling below a certain level, and the performance of the validation set no longer improving.

[0133] When the first training stop condition is met, the computer system believes that the entity type recognition network has been fully trained and its performance has reached the expected goal. At this time, the parameter values ​​in the network are fixed and no longer updated, thereby obtaining a trained entity type recognition network.

[0134] As an implementation manner, when one or more first entities to be extracted are target entity types, step S30, performing a second entity recognition operation on each second text paragraph respectively to obtain a third text paragraph in each second text paragraph, may specifically include:

[0135] For each second text paragraph, complete the following steps:

[0136] Step S31: Based on the second entity recognition network, entity recognition of one or more entity types is performed on the second text paragraph to obtain a recognition result; the one or more entity types include a target entity type, and the recognition result includes one or more recognition annotations, and alternative entity types corresponding to the alternative entities in each recognition annotation, and the recognition annotation is used to mark the position of the alternative entity in the second text paragraph.

[0137] In step S31, the computer system, as the execution subject, calls the pre-trained second entity recognition network. This network is a complex model based on machine learning, which can automatically learn and recognize different types of entities from text data. In the scenario of ecological and environmental regional spatial environmental assessment, these entity types may include but are not limited to "pollutant name", "ecological region", "environmental indicators", etc., where the target entity type is a type of entity that is of special concern based on the current task requirements.

[0138] The specific implementation of the second entity recognition network may rely on a variety of advanced deep learning algorithms or neural network structures, such as convolutional neural network (CNN), recurrent neural network (RNN) and its variants (such as LSTM, GRU), or more efficient Transformer models, etc. These models can automatically extract high-level feature representations in text through multi-layer nonlinear transformations, thereby achieving accurate recognition of entity types.

[0139] When the second text paragraph is input into the second entity recognition network, the network will first perform a series of preprocessing operations on it, such as word segmentation, stop word removal, word embedding (converting vocabulary into high-dimensional vector representation), etc. These preprocessing steps help convert the original text data into a form that the model can process and improve the accuracy of subsequent entity recognition.

[0140] Next, the model processes the preprocessed text data according to its internally defined computational process. During the processing, the model uses the feature representations and parameter weights learned during the training phase to predict the entity type of each word or phrase in the text. This prediction process is based on text context information, and the model comprehensively considers the context of the current word or phrase to determine its entity type.

[0141] Finally, the second entity recognition network will output the recognition result. This result includes one or more recognition annotations, each of which corresponds to an entity in the text and its location information (such as the start and end positions). At the same time, the annotation will also contain the candidate entity type corresponding to the candidate entity, which is the possible entity type predicted by the model based on the current text context. It should be noted that due to the complexity and diversity of text data, the model may sometimes not be able to completely accurately determine the type of entity, so multiple candidate types will be given for reference in subsequent processing steps.

[0142] Step S32: According to the recognition result, determine that the first candidate entity whose candidate entity type is the target entity type is the first entity, and determine that the text paragraph corresponding to the recognition mark where the first candidate entity is located is the third text paragraph in the second text paragraph.

[0143] In step S32, the computer system reviews the recognition results obtained in step S31. These results include all the recognized entities in the second text paragraph and their corresponding candidate entity types, as well as the location information of the entities in the text (given by identification annotations). These identification annotations not only mark the specific location of the entity, but also imply the relationship between the entity and the context, providing key information for the subsequent knowledge graph construction. Next, the computer system screens the candidate entity types in the recognition results according to the requirements of the current task, especially the definition of the target entity type. The target entity type is set according to the specific scenarios and requirements of the knowledge graph construction, and it represents a type of entity that is of particular concern to the current task. In the scenario of ecological environmental regional spatial environmental assessment, the target entity types may include "pollutant name", "ecological region", "key environmental indicators", etc.

[0144] For each candidate entity type in the recognition annotation, the computer system checks whether they match the target entity type. If the match is successful, that is, the candidate entity type is exactly the target entity type, then the candidate entity is determined as the first candidate entity, that is, the first entity of final focus. At the same time, the computer system will also record the text paragraph corresponding to the recognition annotation where the first candidate entity is located, and this part of the text paragraph is regarded as the third text paragraph in the second text paragraph.

[0145] For example, suppose that when constructing an environmental assessment knowledge graph about the air quality of a city, the target entity type is set to "pollutant name". In step S31, the second entity recognition network has performed entity recognition on a second text paragraph and output the recognition result. These results may include multiple entities and their alternative entity types, such as "PM2.5" (alternative entity types may include "air pollutants", "particulate matter", etc.) and "nitrogen dioxide" (alternative entity types may be directly "pollutant name" or a broader "harmful gas", etc.).

[0146] In step S32, the computer system checks whether the candidate entity type of each entity matches the target entity type "pollutant name". In this example, the candidate entity type of "nitrogen dioxide" is directly "pollutant name", so it will be determined as the first candidate entity, that is, the first entity of concern. At the same time, the computer system will also find the text paragraph corresponding to the identification mark of "nitrogen dioxide", and this part of the text paragraph will be regarded as the third text paragraph in the second text paragraph, which will be used in the subsequent knowledge graph construction step.

[0147] By executing step S32, the computer system can filter out the first entity and its corresponding text paragraph that meet the target entity type requirements from the complex recognition results output by the second entity recognition network, providing an accurate and structured data foundation for subsequent knowledge graph construction.

[0148] As an implementation manner, in step S31, entity recognition of entities of one or more entity types is performed on the second text paragraph based on the second entity recognition network. Before obtaining the recognition result, the method may further include:

[0149] Step S31a: Acquire text paragraph training samples containing priori labels, where the priori labels include actual recognition annotations of entity training samples in the text paragraph training samples and actual categories corresponding to the entity training samples.

[0150] In step S31a, the computer system collects text paragraphs related to the spatial environmental impact assessment of the ecological environment region from multiple data sources. These data sources may include public environmental quality reports, academic papers, news reports, etc. In order to ensure the diversity and representativeness of the training examples, the computer system selects text paragraphs covering different environmental issues, different geographical regions, and different time periods.

[0151] After the text paragraphs are collected, the computer system needs to further annotate them to generate training examples containing prior labels. The annotation work is usually completed by domain experts or trained annotators, who will identify and classify the entities in the text paragraphs based on the knowledge and rules in the field of ecological and environmental regional spatial environmental assessment. For each entity training example, the annotator will annotate its actual identification annotation and actual category. The actual identification annotation refers to the specific location information of the entity in the text paragraph, which is usually given in the form of one or more text boxes, which accurately frame the starting and ending positions of the entity in the text. The actual category refers to the actual type of the entity, such as "pollutant name", "ecological region", "environmental indicator", etc. These categories are pre-defined based on the knowledge system in the field of ecological and environmental regional spatial environmental assessment.

[0152] For example, suppose that when constructing an environmental assessment knowledge graph about water pollution in a river basin, the computer system collects a text paragraph describing the pollution status of the river: "Recent monitoring found that the content of heavy metal lead and organic pollutants in the river basin exceeded the standard, causing serious impact on water quality." In this text paragraph, "heavy metal lead" and "organic pollutants" are entities that need to be identified. The annotator will annotate these two entities, and the actual identification annotation of "heavy metal lead" may be a text box from "in the river basin" to "lead", and the actual category is "pollutant name"; the annotation of "organic pollutants" is similar, and the actual category is also "pollutant name".

[0153] Step S31b: Perform entity recognition on the text paragraph training samples based on the second entity recognition network to obtain an estimated result, which includes the estimated recognition annotation of the entity training samples in the text paragraph training samples and the estimated entity type corresponding to the entity training samples.

[0154] In step S31b, the computer system calls the initialized or preliminarily trained second entity recognition network. This network may be a complex model based on deep learning, such as a recurrent neural network (RNN), a long short-term memory network (LSTM), a Transformer, etc., which can automatically learn and extract high-level features from text data, thereby achieving accurate recognition of entities.

[0155] When the text paragraph training examples are input into the second entity recognition network, the network will process the text data according to the calculation process defined internally. This process usually includes multiple steps such as text preprocessing (such as word segmentation, stop word removal, word embedding, etc.), feature extraction, and sequence modeling. In the feature extraction stage, the network will automatically learn the representations of words, phrases, and even sentences in the text. These representations are encoded as high-dimensional vectors for subsequent sequence modeling and entity recognition. In the sequence modeling stage, the network will use the parameters and rules learned during the training process to process the text sequence step by step and predict the entity type at each position. This prediction process is based on text context information. The network will comprehensively consider the words, phrases, and even sentence content before and after the current position to make the most accurate prediction.

[0156] Finally, the second entity recognition network will output an estimated result. This result includes two parts: one is the estimated recognition annotation of the entity training example, that is, the specific location of the entity in the text that the network believes; the other is the estimated entity type corresponding to the entity training example, that is, the entity category predicted by the network. The estimated recognition annotation is usually given in the form of a text box, indicating the starting and ending positions of the entity in the text; the estimated entity type is a label or classification result, which indicates the true category of the entity.

[0157] For example, suppose that when constructing an environmental impact assessment knowledge graph about the air quality of a certain city, the computer system has collected and annotated a set of text paragraph training examples. In step S31b, when these examples are input into the second entity recognition network, the network will perform entity recognition on each example. For example, for a text paragraph containing "PM2.5 concentration exceeds the standard", the network can output an estimated identification annotation that frames the position of the "PM2.5 concentration" entity in the text; at the same time, the network will also output an estimated entity type, namely "pollutant name", indicating that it believes that "PM2.5 concentration" belongs to this category.

[0158] Step S31c: Obtain a first error between the estimated recognition annotation and the actual recognition annotation, and determine a first network training cost of the second entity recognition network based on the first error.

[0159] In step S31c, the computer system compares the estimated recognition annotation output by the second entity recognition network with the manual annotation (i.e., actual recognition annotation) in the text paragraph training sample. The estimated recognition annotation is the model's prediction result of the entity's position in the text, while the actual recognition annotation is the accurate annotation of the entity's position by a domain expert or annotator based on professional knowledge. The comparison between the two can intuitively reflect the accuracy of the model in entity position recognition. In order to quantify this difference, the computer system needs to adopt one or more error calculation methods. These methods are usually based on the principles of statistics or information theory and can objectively evaluate the inconsistency between the predicted results and the actual results. In the entity recognition task, commonly used error calculation methods include boundary offset, overlap, IoU (intersection over union), etc. Taking IoU as an example, it is a commonly used indicator for evaluating entity recognition performance. When calculating IoU, the computer system first calculates the intersection area and union area between the estimated recognition annotation and the actual recognition annotation, and then divides the area (or number of characters) of the intersection area by the area (or number of characters) of the union area, and the result is the IoU value. The closer the IoU value is to 1, the higher the overlap between the estimated recognition annotation and the actual recognition annotation, and the better the performance of the model; conversely, the smaller the IoU value is, the worse the performance of the model.

[0160] In addition to IoU, the computer system can also select other error calculation methods according to actual needs, such as directly calculating the absolute value of the boundary offset, evaluating whether the annotation box completely contains or completely excludes the actual entity, etc. Regardless of which method is used, the purpose is to accurately quantify the difference between the estimated recognition annotation and the actual recognition annotation.

[0161] After obtaining the error value, the computer system determines the first network training cost of the second entity recognition network according to the error value. The training cost is a quantitative indicator used to evaluate the performance level of the model in the current training state. It is usually proportional to the error value, that is, the larger the error value, the higher the training cost; the smaller the error value, the lower the training cost.

[0162] Step S31d: Obtain a second error between the estimated entity type and the actual category, and determine a second network training cost of the second entity recognition network based on the second error.

[0163] In step S31d, the computer system compares the estimated entity type output by the second entity recognition network with the actual category in the text paragraph training sample. The estimated entity type is the classification prediction made by the model based on the text context, while the actual category is the real classification assigned to the entity by the domain experts or annotators based on their professional knowledge. The comparison between the two can reveal the accuracy of the model in entity type recognition.

[0164] In order to quantify this accuracy, the computer system needs to use one or more classification performance evaluation indicators to calculate the second error. These indicators usually include accuracy, precision, recall, F1 score, etc., which evaluate the performance of the classification model from different perspectives. Take accuracy as an example. It is one of the most intuitive and commonly used evaluation indicators in classification problems. Accuracy refers to the ratio of the number of correctly classified entities to the total number of entities. When calculating, the computer will count the number of entities whose estimated entity types are consistent with the actual categories, and then divide it by the total number of entities. The result is the accuracy. The higher the accuracy, the better the model's performance in entity type recognition.

[0165] However, in entity recognition tasks, since the number of entities in different categories may be extremely unbalanced, relying solely on accuracy may not fully reflect the performance of the model. Therefore, the computer system can also combine other indicators for comprehensive evaluation, such as precision (measures the proportion of samples predicted by the model as positive that are truly positive), recall (measures the proportion of all positive samples that are correctly predicted), and F1 score (the harmonic mean of precision and recall, used to comprehensively evaluate the performance of the model).

[0166] After obtaining the second error, the computer system determines the second network training cost of the second entity recognition network according to the error value. Similar to the first network training cost, the second network training cost is also a quantitative indicator used to evaluate the performance level of the model in entity type recognition. It is usually inversely proportional to the second error, that is, the smaller the error value, the lower the training cost; the larger the error value, the higher the training cost.

[0167] The implementation of step S31d is crucial to ensure that the second entity recognition network can accurately identify different types of entities. By calculating the error between the estimated entity type and the actual category and determining the training cost accordingly, the computer system can optimize the classification performance of the model in a targeted manner, thereby improving the accuracy and reliability of the knowledge graph construction.

[0168] Step S31e: According to the first network training cost and the second network training cost, the network parameters of the second entity recognition network are adjusted until a preset second training stop condition is met to obtain a trained second entity recognition network.

[0169] In step S31e, the computer system comprehensively considers the first network training cost and the second network training cost. The first network training cost mainly reflects the accuracy of the model in entity location recognition, while the second network training cost mainly reflects the accuracy of the model in entity type recognition. The two together constitute a comprehensive indicator for evaluating the overall performance of the model.

[0170] In order to optimize the performance of the model, the computer system uses one or more optimization algorithms to adjust the parameters of the second entity recognition network. These parameters include but are not limited to the weights and biases of the network, which are key factors in determining the output results of the model. Commonly used optimization algorithms include Gradient Descent, Stochastic Gradient Descent (SGD), Adam optimizer, etc. These algorithms calculate the gradient of the loss function with respect to the parameter and update the value of the parameter in the opposite direction of the gradient, thereby gradually reducing the training cost and improving the performance of the model.

[0171] In the process of adjusting the parameters, the computer system repeatedly performs the following steps: first, forward propagation is performed on the text paragraph training examples using the current parameter values ​​to obtain the estimated results; then, the error between the estimated results and the actual annotations is calculated, and the training costs of the first and second networks are calculated accordingly; then, the gradient is calculated based on the training costs, and the parameter values ​​are updated using the optimization algorithm; finally, it is checked whether the preset second training stop condition is met, such as the number of training iterations reaches the upper limit, the training cost is reduced to below a certain threshold, the performance of the validation set is no longer improved, etc. If the stop condition is not met, the next round of training process will continue; if the stop condition is met, the training will stop and a trained second entity recognition network will be obtained.

[0172] It should be noted that the preset second training stop condition may be consistent with or inconsistent with the first training stop condition, depending on the specific training needs and scenarios. In the scenario of building a knowledge graph for ecological and environmental regional spatial environmental assessment, in order to ensure the accuracy and generalization ability of the model, more stringent training stop conditions are usually set, such as requiring the performance of the model on the validation set to reach a certain level and the performance no longer significantly improved in multiple consecutive iteration cycles.

[0173] Through the execution of step S31e, the computer system can train a second entity recognition network with excellent performance, which can accurately identify entities and their types in texts related to ecological environment regional spatial environmental assessment, and provide strong support for subsequent knowledge graph construction.

[0174] As another implementation, when one or more first entities to be extracted are target entity types, and the target entity type includes multiple subordinate entity types, step S30, respectively performing a second entity recognition operation on each second text paragraph to obtain a third text paragraph in each second text paragraph, may specifically include:

[0175] For each second text paragraph, complete the following steps:

[0176] Step S301: for each subordinate entity type, entity recognition of the first entity of the subordinate entity type is performed on the second text paragraph to obtain a subordinate third text paragraph in the second text paragraph, wherein the subordinate third text paragraph includes a first entity of the subordinate entity type.

[0177] In step S301, the computer system uses advanced natural language processing technology and machine learning models to conduct an in-depth analysis of the second text paragraph to identify the first entities belonging to each subordinate entity type, and generate a subordinate third text paragraph accordingly.

[0178] The target entity type often contains multiple subordinate entity types, which represent more specific and refined entity categories. For example, when evaluating the water pollution of a river basin, "pollutants" may be a target entity type, while "heavy metal pollutants", "organic pollutants", etc. are its subordinate entity types. In order to build an accurate and comprehensive knowledge graph, it is necessary to ensure that these subordinate entity types can also be accurately identified.

[0179] In step S301, the computer system traverses all predefined subordinate entity types and performs independent entity recognition tasks for each type. To achieve this, the computer system can use a named entity recognition (NER) model based on deep learning. These models are trained with a large amount of annotated data and can automatically learn the feature representation of entities in texts and predict the type and boundary of entities based on these features.

[0180] Specifically, for each second text paragraph and each subordinate entity type, the computer system inputs the paragraph into the corresponding NER model. The model encodes the text and converts it into a series of high-dimensional vector representations that capture the semantic and grammatical information in the text. The model then uses these vectors to calculate the probability that each position is a specific entity type. By setting a threshold, the computer system can mark positions with a probability higher than the threshold as entities and generate corresponding recognition results. The recognition results include the specific position of the first entity of the subordinate entity type in the text (such as the start and end positions) and the entity text itself. Based on this information, the computer system extracts text fragments containing these entities from the second text paragraph, namely the subordinate third text paragraph. Each subordinate third text paragraph corresponds to a specific subordinate entity type and contains one or more first entity instances of that type.

[0181] Step S302: Determine the subordinate third text paragraphs corresponding to each subordinate entity type in the second text paragraph as the third text paragraph in the second text paragraph.

[0182] In step S302, the computer system aggregates the subordinate third text paragraphs corresponding to the subordinate entity types identified in the previous step S301 to form the third text paragraph in the second text paragraph.

[0183] In step S301, the computer system has performed entity recognition operations on each second text paragraph and each subordinate entity type, and generated corresponding subordinate third text paragraphs. These subordinate third text paragraphs each contain the first entity of a specific subordinate entity type and its contextual information, which are refinements and concretizations of the relevant information in the original text. However, in order to build a comprehensive knowledge graph, it is necessary to integrate these scattered subordinate third text paragraphs to form a third text paragraph containing all relevant entity information. When executing step S302, the computer system traverses all second text paragraphs and summarizes the subordinate third text paragraphs identified in each paragraph. The summarization method may include simple splicing, deduplication processing, or sorting according to entity type, etc., depending on the needs and scenarios of knowledge graph construction.

[0184] For example, suppose that in a second text paragraph, two subordinate entity types, "heavy metal pollutants" and "organic pollutants", are identified, and subordinate third text paragraphs containing "heavy metal lead" and "phenol" are generated respectively. In step S302, the computer system integrates these two subordinate third text paragraphs to form a new third text paragraph. This third text paragraph may directly contain the original subordinate third text paragraph content, or it may undergo some optimization processing during the integration process, such as removing duplicate information, adjusting the text order, etc. In any case, the integrated third text paragraph will fully reflect the information about the target entity type "pollutants" in the original second text paragraph, including the specific instances of its subordinate entity types "heavy metal pollutants" and "organic pollutants", "heavy metal lead" and "phenol".

[0185] Through such integration steps, the computer system can ensure that the key entity information in each second text paragraph is completely and accurately extracted, and provide strong support for the subsequent knowledge graph construction. At the same time, this integration method also helps to improve the accuracy and usability of the knowledge graph, so that it can better serve the actual needs of ecological and environmental regional spatial environmental assessment.

[0186] As an implementation mode, when one or more first entities to be extracted are of the first target entity type, and the second entity is of the second target entity type, step S20, performing a first entity recognition operation on the environmental quality report to be analyzed, and obtaining one or more first text paragraphs and one or more second text paragraphs in the environmental quality report to be analyzed, may specifically include:

[0187] Step S21: Based on the first entity recognition network, entity recognition of entities of several entity types is performed on the environmental quality report to be analyzed to obtain recognition results; the several entity types include a first target entity type and a second target entity type, and the recognition results include one or more identification labels, and alternative entity types corresponding to the alternative entities in each identification label, and the identification labels are used to mark the positions of the alternative entities in the environmental quality report to be analyzed.

[0188] In step S21, the computer system calls the pre-trained first entity recognition network. This network is a complex machine learning model that can automatically learn and identify entities belonging to different entity types from text data. In the scenario of ecological and environmental regional spatial environmental assessment, these entity types may include but are not limited to "pollutant name", "ecological region", "environmental indicators", "governance measures", etc., where "first target entity type" and "second target entity type" are entity types that are of special concern according to the current task requirements. The specific implementation of the first entity recognition network may rely on a variety of advanced deep learning algorithms or neural network structures, such as convolutional neural networks (CNN), recurrent neural networks (RNN) and their variants (such as LSTM, GRU), or more efficient Transformer models. These models can automatically extract high-level feature representations in text through multi-layer nonlinear transformations, thereby realizing accurate recognition of different entity types. When the environmental quality report to be analyzed is input into the first entity recognition network, the network will process the text data according to its internally defined calculation process. This processing process usually includes multiple steps such as text preprocessing (such as word segmentation, stop word removal, word embedding, etc.), feature extraction, and sequence modeling. In the feature extraction stage, the network automatically learns the representations of words, phrases and even sentences in the text, which are encoded into high-dimensional vectors to facilitate subsequent sequence modeling and entity recognition.

[0189] In the sequence modeling phase, the network will use the parameters and rules learned during the training process to gradually process the text sequence and predict the entity type at each position. This prediction process is based on the text context information. The network will comprehensively consider the words, phrases and even sentence content before and after the current position to make the most accurate prediction.

[0190] Finally, the first entity recognition network will output the recognition result. This result includes one or more recognition annotations, each of which corresponds to an entity in the text and its location information (such as the start and end positions). At the same time, the annotation also contains the candidate entity type corresponding to the candidate entity, which is the possible entity type predicted by the model based on the current text context. It should be noted that due to the complexity and diversity of text data, the model may sometimes not be able to completely accurately determine the type of entity, so multiple candidate types will be given for reference in subsequent processing steps.

[0191] For example, suppose that when constructing an environmental impact assessment knowledge graph about water pollution in a river basin, the first target entity type is "pollutant name" and the second target entity type is "water quality grade". The computer system performs entity recognition on a report containing water quality monitoring data for a river basin. The recognition results may include multiple identification annotations, one of which frames the entity "heavy metal lead" and predicts its alternative entity type as "pollutant name"; another annotation may frame the entity "poor V class" and predict its alternative entity type as "water quality grade". These identification annotations and alternative entity type information will provide an important basis for determining the first text paragraph and the second text paragraph in subsequent steps.

[0192] Step S22: According to the recognition result, determine that the first candidate entity whose candidate entity type is the first target entity type is the first entity, and determine that the text paragraph corresponding to the recognition mark where the first candidate entity is located is the first text paragraph.

[0193] In step S22, the computer system reviews the recognition results obtained in step S21. These results include all the identified entities in the environmental quality report to be analyzed and their corresponding candidate entity types, as well as the location information of the entity in the text (given by identification annotations). The identification annotations not only mark the specific location of the entity, but also imply the relationship between the entity and the context, providing key information for the subsequent construction of the knowledge graph. Next, the computer system screens the candidate entity types in the recognition results according to the requirements of the current task, especially the definition of the first target entity type. The first target entity type is set according to the specific scenarios and requirements of the knowledge graph construction, and it represents a type of entity that is of particular concern to the current task. In the scenario of spatial environmental impact assessment of ecological environment regions, the first target entity type may include "pollutant name", "key ecological area", etc.

[0194] For each candidate entity type in the recognition annotation, the computer system checks whether they match the first target entity type one by one. If the match is successful, that is, the candidate entity type happens to be the first target entity type, then the candidate entity is determined to be the first candidate entity, that is, the first entity of final focus. At the same time, the computer system also records the text paragraph corresponding to the recognition annotation where the first candidate entity is located, and this part of the text paragraph is regarded as the first text paragraph.

[0195] For example, suppose that when constructing an environmental assessment knowledge graph about the air quality of a city, the first target entity type is set to "pollutant name". In step S21, the first entity recognition network has performed entity recognition on the environmental quality report to be analyzed and output the recognition results. These results may include multiple entities and their alternative entity types, such as "PM2.5" (alternative entity types may include "air pollutants", "particulate matter", etc.), "carbon dioxide" (alternative entity types may be directly "gas" or a broader "atmospheric composition", etc.).

[0196] In step S22, the computer system checks whether the candidate entity type of each entity matches the first target entity type "pollutant name". In this example, the candidate entity type of "PM2.5" includes "air pollutants", which matches the first target entity type, so "PM2.5" is determined to be the first candidate entity, that is, the first entity of concern. At the same time, the computer system will also find the text paragraph corresponding to the identification mark where "PM2.5" is located. This part of the text paragraph is regarded as the first text paragraph for the subsequent knowledge graph construction step.

[0197] By executing step S22, the computer system can filter out the first entity and its corresponding text paragraph that meet the requirements of the first target entity type from the complex recognition results, providing an accurate and structured data foundation for subsequent knowledge graph construction work.

[0198] Step S23: According to the recognition result, determine that the second candidate entity whose candidate entity type is the second target entity type is the second entity, and determine that the text paragraph corresponding to the recognition mark where the second candidate entity is located is the second text paragraph.

[0199] In step S23, the computer system continues to process the recognition results obtained in step S21. These results not only contain the first entity information of the first target entity type, but also cover the information of other entity types, including the second target entity type. The second target entity type is another type of entity of interest specially set according to the current task requirements. It may be related to the first target entity type, but has different characteristics or attributes. In order to determine the second entity, the computer system traverses all the alternative entity types in the recognition results to find an entity that matches the second target entity type. This matching process is based on string comparison or more complex semantic analysis, and aims to ensure that the selected second entity does belong to the second target entity type.

[0200] Once a matching candidate entity type is found, the computer system will determine the corresponding candidate entity as the second entity. At the same time, the computer system will also record the text paragraph corresponding to the identification mark of the second entity, and this part of the text paragraph will be regarded as the second text paragraph. The second text paragraph not only contains the second entity itself, but also provides the context of the second entity, which is crucial for the subsequent knowledge graph construction and understanding of the relationship between the second entity and other entities.

[0201] For example, suppose that when constructing an environmental assessment knowledge graph for the ecological environment protection of a river basin, the first target entity type is "pollutant name" and the second target entity type is "ecological restoration measures". The recognition result of step S21 may include multiple entities and their alternative entity types, including entities related to ecological restoration measures.

[0202] In step S23, the computer system checks whether the candidate entity type of each entity matches the second target entity type "ecological restoration measures". For example, if the recognition result contains an entity "afforestation", and its candidate entity type contains "ecological restoration means" or similar expressions, then "afforestation" will be determined as the second entity. At the same time, the computer system will also find the text paragraph corresponding to the identification mark of "afforestation", and this part of the text paragraph constitutes the second text paragraph, which describes the specific content or background information of the ecological restoration measure "afforestation". Through step S23, the computer system can accurately filter out the second entity and its corresponding text paragraph that meet the requirements of the second target entity type from the recognition results. This provides important data support for further analyzing the relationship between the first entity and the second entity and building a complete knowledge graph in subsequent steps.

[0203] An embodiment of the present application provides a computer system, including a memory and a processor, wherein the memory stores a computer program that can be executed on the processor, and when the processor executes the program, some or all of the steps in the above method are implemented.

[0204] The embodiment of the present application provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, some or all of the steps in the above method are implemented. The computer-readable storage medium can be transient or non-transient.

[0205] An embodiment of the present application provides a computer program, including a computer-readable code. When the computer-readable code is run in a computer device, a processor in the computer device executes some or all of the steps for implementing the above method.

[0206] Figure 2A hardware entity diagram of a computer system provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the hardware entity of the computer system 1000 includes: a processor 1001 and a memory 1002, wherein the memory 1002 stores a computer program that can be run on the processor 1001, and the processor 1001 implements the steps in the method of any of the above embodiments when executing the program.

[0207] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.

Claims

1. A method for generating a knowledge graph of ecological environment regional spatial environmental assessment, characterized in that: The method comprises: Obtaining a proposed analysis environmental quality report of the target ecological environment regional space, wherein the proposed analysis environmental quality report includes one or more first entities to be extracted; Performing a first entity recognition operation on the environmental quality report to be analyzed to obtain one or more first text paragraphs and one or more second text paragraphs in the environmental quality report to be analyzed; wherein the first text paragraph includes one first entity, the second text paragraph includes one second entity, and the first entity is contained in the second entity; Performing a second entity recognition operation on each of the second text paragraphs to obtain a third text paragraph in each of the second text paragraphs, wherein the third text paragraph includes one of the first entities; Performing merging redundancy optimization on the third text paragraphs in each of the second text paragraphs and the one or more first text paragraphs to obtain one or more target text paragraphs, wherein the target text paragraph includes one of the first entities; Based on the identified entities, an environmental assessment knowledge graph is constructed; The step of merging and redundancy optimizing the third text paragraphs in each of the second text paragraphs and the one or more first text paragraphs to obtain one or more target text paragraphs includes: Determine, in a third text paragraph in each of the second text paragraphs and the one or more first text paragraphs, an alternative text paragraph corresponding to each of the first entities, and, in the one or more first entities, determine one or more third entities corresponding to a plurality of alternative text paragraphs; For each of the third entities, among the multiple candidate text paragraphs corresponding to the third entity, a first candidate text paragraph that meets the paragraph requirement is determined as the target text paragraph, and the candidate text paragraphs other than the first candidate text paragraph among the multiple candidate text paragraphs are determined as the second candidate text paragraph corresponding to the third entity; In each third text paragraph in the second text paragraph and the one or more first text paragraphs, the second candidate text paragraphs corresponding to each third entity are removed to obtain one or more target text paragraphs.

2. The method according to claim 1, characterized in that: The step of determining, among the multiple candidate text paragraphs corresponding to the third entity, a first candidate text paragraph that meets the paragraph requirement as the target text paragraph comprises: Acquire a support probability of each candidate text paragraph, where the support probability indicates a possibility that the candidate text paragraph includes the third entity; Among the multiple candidate text paragraphs corresponding to the third entity, determine the candidate text paragraph with the highest support probability as the first candidate text paragraph, and determine the first candidate text paragraph as the target text paragraph.

3. The method according to claim 1, characterized in that The step of determining, among the multiple candidate text paragraphs corresponding to the third entity, a first candidate text paragraph that meets the paragraph requirement as the target text paragraph comprises: Acquire a support probability of each candidate text paragraph, where the support probability indicates a possibility that the candidate text paragraph includes the third entity; Determining, among the multiple candidate text paragraphs, the candidate text paragraph with the highest support probability as the third candidate text paragraph, and determining the candidate text paragraphs other than the third candidate text paragraph among the multiple candidate text paragraphs as the fourth candidate text paragraph; Obtaining the paragraph overlap ratio between each of the fourth candidate text paragraphs and the third candidate text paragraphs; Among the multiple candidate text paragraphs, the fourth candidate text paragraph whose paragraph overlap rate is not less than the reference paragraph overlap rate is removed, and the remaining candidate text paragraphs after the removal are determined as the first candidate text paragraph, and the first candidate text paragraph is determined as the target text paragraph.

4. The method according to claim 3, characterized in that The obtaining of the paragraph overlap ratio between each of the fourth candidate text paragraphs and the third candidate text paragraphs includes: For each of the fourth alternative text paragraphs, complete the following steps: Determining the overlapping text paragraphs of the fourth candidate text paragraph and the third candidate text paragraph, and determining the number of first characters of the overlapping text paragraphs; Determining a fused text paragraph of the fourth candidate text paragraph and the third candidate text paragraph, and determining the second character quantity of the fused text paragraph; The first number of characters is divided by the second number of characters to obtain a division ratio, and the division ratio is determined as a paragraph overlap ratio between the fourth candidate text paragraph and the third candidate text paragraph.

5. The method according to claim 1, characterized in that When the one or more first entities to be extracted are target entity types, after merging and redundancy optimization is performed on the third text paragraphs in each of the second text paragraphs and the one or more first text paragraphs to obtain one or more target text paragraphs, the method further includes: For each target text paragraph in the environmental quality report to be analyzed, complete the following steps to obtain the entity extraction result of the environmental quality report to be analyzed: Based on the entity type recognition network, entity type recognition is performed on the target text paragraph to obtain the entity type corresponding to the first entity included in the target text paragraph; If the entity type is the target entity type, a text entity corresponding to the target entity type is extracted from the target text paragraph.

6. The method according to claim 5, characterized in that Before performing entity type recognition on the target text paragraph based on the entity type recognition network, the method further includes: Obtaining a text paragraph training sample containing a priori tags, wherein the text paragraph training sample includes an entity training sample; Based on the entity type recognition network, entity type recognition is performed on the text paragraph training sample to obtain an estimated entity type corresponding to the entity training sample in the text paragraph training sample; Determining a network training cost of the entity type recognition network according to an error between the estimated entity type and the priori label; According to the network training cost of the entity type recognition network, the network parameter variables of the entity type recognition network are adjusted until a preset first training stop condition is met to obtain a trained entity type recognition network.

7. The method according to claim 1, characterized in that When the one or more first entities to be extracted are target entity types, performing a second entity recognition operation on each of the second text paragraphs to obtain a third text paragraph in each of the second text paragraphs includes: For each of the second text paragraphs, complete the following steps: Based on the second entity recognition network, entity recognition of one or more entity types is performed on the second text paragraph to obtain a recognition result; the one or more entity types include the target entity type, and the recognition result includes one or more recognition annotations and candidate entity types corresponding to the candidate entities in each of the recognition annotations, and the recognition annotations are used to mark the positions of the candidate entities in the second text paragraph; According to the recognition result, determining that a first candidate entity whose candidate entity type is the target entity type is the first entity, and determining that a text paragraph corresponding to the recognition mark where the first candidate entity is located is a third text paragraph in the second text paragraph; Before performing entity recognition of entities of one or more entity types on the second text paragraph based on the second entity recognition network and obtaining the recognition result, the method further includes: Acquire a text paragraph training sample containing a priori tags, wherein the a priori tags include actual identification annotations of entity training samples in the text paragraph training sample and actual categories corresponding to the entity training samples; Performing entity recognition on the text paragraph training sample based on the second entity recognition network to obtain an estimated result, wherein the estimated result includes an estimated recognition label of the entity training sample in the text paragraph training sample and an estimated entity type corresponding to the entity training sample; Obtaining a first error between the estimated recognition annotation and the actual recognition annotation, and determining a first network training cost of the second entity recognition network based on the first error; Obtaining a second error between the estimated entity type and the actual category, and determining a second network training cost of the second entity recognition network according to the second error; According to the first network training cost and the second network training cost, the network parameters of the second entity recognition network are adjusted until a preset second training stop condition is met to obtain a trained second entity recognition network.

8. The method according to claim 1, characterized in that When the one or more first entities to be extracted are target entity types, and the target entity type includes multiple subordinate entity types, performing a second entity recognition operation on each of the second text paragraphs to obtain a third text paragraph in each of the second text paragraphs includes: For each of the second text paragraphs, complete the following steps: For each of the subordinate entity types, performing entity recognition of a first entity of the subordinate entity type on the second text paragraph to obtain a subordinate third text paragraph in the second text paragraph, wherein the subordinate third text paragraph includes a first entity of the subordinate entity type; Determine the subordinate third text paragraph corresponding to each of the subordinate entity types in the second text paragraph as the third text paragraph in the second text paragraph; When the one or more first entities to be extracted are of the first target entity type, and the second entity is of the second target entity type, performing a first entity recognition operation on the environmental quality report to be analyzed to obtain one or more first text paragraphs and one or more second text paragraphs in the environmental quality report to be analyzed includes: Based on the first entity recognition network, entity recognition of entities of several entity types is performed on the environmental quality report to be analyzed, and a recognition result is obtained; the several entity types include the first target entity type and the second target entity type, and the recognition result includes one or more identification annotations, and candidate entity types corresponding to the candidate entities in each of the identification annotations, and the identification annotations are used to mark the positions of the candidate entities in the environmental quality report to be analyzed; According to the recognition result, determining that a first candidate entity whose candidate entity type is the first target entity type is the first entity, and determining that a text paragraph corresponding to the recognition mark where the first candidate entity is located is the first text paragraph; According to the recognition result, a second candidate entity whose candidate entity type is the second target entity type is determined to be the second entity, and a text paragraph corresponding to the recognition mark where the second candidate entity is located is determined to be the second text paragraph.

9. A computer system comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, wherein: When the processor executes the program, the steps in the method according to any one of claims 1 to 8 are implemented.