Energy power text structured data consistency determination method and device
By obtaining and analyzing structured data of energy and electricity texts, determining the theme and internal consistency of the text, it solves the problem that it is difficult to judge the theme and consistency when the text is too long, and achieves in-depth analysis and consistency evaluation of the text content.
Patent Information
- Application Number
- CN202411696654.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-04-11
AI Technical Summary
When the text is too long, it is difficult to determine the theme described in the text, check whether the overall description of the text is consistent with the theme to be described, and to determine whether the upper and lower descriptions of the text are consistent.
By obtaining the target text, determine the text type and theme to which it belongs, and build node items, including first-level nodes and second-level nodes. Based on the target text, determine the node data corresponding to the node item, compare whether the description of the target text is consistent with the description of the text's theme, and whether the description within the text is consistent, and finally determine the consistency result of the text.
It effectively solves the problem that it is difficult to determine the subject matter and check consistency when the text is too long. Through the use of structured data and node items, it realizes in-depth analysis and consistency evaluation of text content.
Smart Images

Figure CN119808756A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of text processing, and in particular to a method and device for determining consistency of structured data of energy and power text. Background Art
[0002] With the development of the times, long texts on energy and power text structured data emerge in an endless stream, and texts responding to different themes also pour out. Sometimes, because the text is too long, it may be assigned to different departments for writing, and some departments lack coordination or even conflict with each other. For example, when creating a text based on the theme of coal-fired power development, the theme is "rationally building coal-fired power", and the text is created based on this theme. Later, the theme was corrected to "strictly control coal-fired power projects", so the original text was revised to obtain a new text, or directly rewritten to obtain a new text. At this time, because the text is too long, it is difficult to determine whether the text conforms to the theme and whether there are conflicts in the text.
[0003] It can be seen that in the related art, when the text is too long, it is usually difficult to determine the main theme described by the text, and it is even more difficult to check whether the overall description of the text is consistent with the main theme to be described, and it is also difficult to determine whether the descriptions above and below the text are consistent.
[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present invention provide a method and device for determining the consistency of structured data in energy and power texts, so as to at least solve the technical problems in the related art that when the text is too long, it is usually difficult to determine the main idea described in the text, and it is even more difficult to check whether the overall description of the text is consistent with the main idea to be described, and it is also difficult to judge whether the descriptions above and below the text are consistent.
[0006] According to one aspect of an embodiment of the present invention, a method for determining consistency of structured data of an energy and power text is provided, comprising: obtaining a target text, wherein the target text is an energy and power structured data text whose text length exceeds a predetermined threshold; determining the text type to which the target text belongs, and the text subject corresponding to the target text; determining a node item corresponding to the text type, wherein the node item includes a plurality of first-level nodes, and a plurality of second-level nodes corresponding to the plurality of first-level nodes respectively; determining node data corresponding to the node item based on the target text; determining a first result of whether a description of the target text is consistent with a description of the text subject, and determining a second result of whether the descriptions included in the target text are consistent; determining a consistency result corresponding to the target text based on the first result and the second result.
[0007] Optionally, in the case where the type of the secondary node is a selection type, the node data corresponding to the node item is determined based on the target text, including: extracting hit texts corresponding to the multiple first-level nodes respectively from the target text; performing selection operations on the multiple second-level nodes respectively corresponding to the multiple first-level nodes based on the respectively corresponding hit texts to obtain at least one selected second-level node respectively corresponding to the multiple first-level nodes; determining a topological graph corresponding to the node item based on at least one selected second-level node respectively corresponding to the multiple first-level nodes, wherein in the topological graph, first-level nodes with association are connected, and the multiple first-level nodes are respectively connected to at least one corresponding selected second-level node; determining the node data corresponding to the node item based on the topological graph corresponding to the node item.
[0008] Optionally, in the case that the type of the secondary node also includes an entry type, the node data corresponding to the node item is determined based on the topological map corresponding to the node item, including: determining the entry text corresponding to the secondary node of the entry type based on the respectively corresponding hit texts; determining the similarity index between the entry text and the text represented by other secondary node items, wherein the other secondary node items include secondary nodes of the selection type under the corresponding primary node; determining an entry topological map based on the similarity index, wherein the entry topological map is a topological map formed by connecting secondary nodes carrying associated weights, and the associated weights are determined based on the corresponding similarity index; supplementing the entry topological map to the topological map to obtain a first supplementary topological map; determining the node data corresponding to the node item based on the first supplementary topological map.
[0009] Optionally, based on the topological map corresponding to the node item, the node data corresponding to the node item is determined, including: determining the node to be supplemented in the topological map that has only one connecting line; based on the target text, supplementing the topological relationship of the node to be supplemented in the topological map to obtain a second supplementary topological map; based on the second supplementary topological map, determining the node data corresponding to the node item.
[0010] Optionally, based on the respectively corresponding hit texts, a selection operation is performed on the respectively corresponding multiple secondary nodes to obtain at least one respectively corresponding selected secondary node, including: determining the text description quantities respectively corresponding to the multiple first-level nodes, and the text description quantities respectively corresponding to the multiple selected second-level nodes; determining the first-level node weights respectively corresponding to the multiple first-level nodes based on the text description quantities corresponding to the first-level nodes and the corresponding benchmark description quantities, and determining the second-level node weights respectively corresponding to the multiple selected second-level nodes based on the text description quantities respectively corresponding to the multiple selected second-level nodes and the corresponding benchmark description quantities; assigning corresponding first-level node weights to the multiple first-level nodes, and assigning corresponding second-level node weights to the multiple second-level nodes.
[0011] Optionally, determining the first result of whether the description of the target text is consistent with the description of the text subject based on the node data corresponding to the node item includes: determining the subject node corresponding to the text subject; determining the matching index between a secondary node selected from the node data and the subject node; and determining the first result of whether the description of the target text is consistent with the description of the text subject based on the matching index.
[0012] Optionally, determining the second result of whether the descriptions included in the target text are consistent based on the node data corresponding to the node item includes: determining a multi-branch node that is simultaneously connected to multiple secondary nodes in a topological graph included in the node data; and determining the second result of whether the descriptions included in the target text are consistent based on the multi-branch node.
[0013] According to one aspect of an embodiment of the present invention, a device for determining consistency of structured data of energy and power text is provided, comprising: an acquisition module, used to acquire a target text, wherein the target text is an energy and power structured data text whose text length exceeds a predetermined threshold; a first determination module, used to determine the text type to which the target text belongs, and the text subject corresponding to the target text; a second determination module, used to determine the node item corresponding to the text type, wherein the node item includes a plurality of first-level nodes, and a plurality of second-level nodes corresponding to the plurality of first-level nodes respectively; a third determination module, used to determine the node data corresponding to the node item based on the target text; a fourth determination module, used to determine a first result of whether the description of the target text is consistent with the description of the text subject, and to determine a second result of whether the descriptions included in the target text are consistent, based on the node data corresponding to the node item; and a fifth determination module, used to determine the consistency result corresponding to the target text based on the first result and the second result.
[0014] According to one aspect of an embodiment of the present invention, an electronic device is provided, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement any of the above-mentioned methods for determining consistency of energy and power text structured data.
[0015] According to one aspect of an embodiment of the present invention, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute any of the above-mentioned methods for determining consistency of energy and power text structured data.
[0016] In an embodiment of the present invention, a target text is obtained, wherein the target text is an energy power structured data text whose text length exceeds a predetermined threshold. The text type to which the target text belongs and the text subject corresponding to the target text are determined. The node item corresponding to the text type is determined, wherein the node item includes multiple first-level nodes and multiple second-level nodes corresponding to the multiple first-level nodes. According to the target text, the node data corresponding to the node item is determined. According to the node data corresponding to the node item, a first result is determined as to whether the description of the target text is consistent with the description of the text subject, and a second result is determined as to whether the descriptions included in the target text are consistent. According to the first result and the second result, the consistency result corresponding to the target text is determined. Among them, the node item is determined, and the node item includes a first-level node and a second-level node. These node items can assist in text structuring and content analysis, and can help decompose complex text content into more understandable units. According to the content of the target text, the node data is filled in for the defined node item. With in-depth analysis and structured representation of the text content, the information in the text is presented in a logically clear and structured manner. After that, the first result and the second result are determined. The first result compares the description of the target text with the description of the main theme of the text to check whether the two are consistent. This helps to find out whether the text content deviates from its main argument or core information. The second result can analyze whether the descriptions included in the target text are consistent, that is, check the logical coherence and information consistency within the text. This step helps to identify problems such as contradictions or logical jumps in the text. Combining the first result and the second result, the overall consistency of the target text is evaluated. That is, if the text description is consistent with the main theme, and the description inside the text is also consistent, it is considered that the text has good consistency, thereby solving the technical problem in the related art that when the text is too long, it is usually difficult to determine the main theme described by the text, and it is even more difficult to check whether the overall description of the text is consistent with the main theme to be described, and it is also difficult to judge whether the descriptions above and below the text are consistent. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0018] Figure 1 is a flow chart of a method for determining consistency of energy and power text structured data according to an embodiment of the present invention;
[0019] Figure 2 It is a structural block diagram of a device for determining consistency of structured data of energy and power text according to an embodiment of the present invention. DETAILED DESCRIPTION
[0020] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0021] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0022] Example 1
[0023] According to an embodiment of the present invention, an embodiment of a method for determining the consistency of structured data in energy and power text is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0024] Figure 1 is a flow chart of a method for determining consistency of energy and power text structured data according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:
[0025] Step S102, obtaining a target text, wherein the target text is an energy power structured data text whose text length exceeds a predetermined threshold;
[0026] In step S102 provided in the present application, the target text is a text written in accordance with the main idea of the text, and is a text related to the consistency of the structured data of the energy and power text, wherein the structured data can be data stored in a clearly defined pattern or format, and can be presented in a table, database, text or other form that is easy to understand and process. This data has clear fields and values, or has a clear meaning, and can be easily queried, analyzed and processed. Structured data can be used to store various types of information such as numbers and texts. The processing method of this data is more standardized and standardized, making the management and analysis of data easier and more efficient. For example, the main idea of the text is a text for determining coal-fired power strategy, a research paper on new solar cell materials, etc., which is not limited here and can be adaptively set according to actual applications and scenarios. The target text provided in the present application is an energy and power structured data text whose text length exceeds a predetermined threshold. It is considered that the energy and power structured data text whose text length exceeds a predetermined threshold is a text with a longer length. When the text length is longer, it can be known that the description content of the text is difficult to capture and contains complex information.
[0027] The predetermined threshold can be set based on actual experience or adaptively set according to the application scenario. For example, when processing academic papers, a higher threshold can be set because the papers are usually long; and when processing short articles or comments on social media, a lower threshold can be set.
[0028] Step S104, determining the text type to which the target text belongs and the text subject corresponding to the target text;
[0029] The present application provides step S104, in which the text type to which the target text belongs and the text theme corresponding to the target text are determined. For the text type, the type to which the text belongs can be determined by analyzing factors such as the language style, structural features, content theme, etc. of the text. It can also be directly determined what type of text the text is, such as a paper, patent, news, etc. In order to determine the subsequent corresponding node items. For the text theme, it can be the theme of the text to be written that is determined in advance. In order to determine whether the theme described by the written text is consistent with the prescribed theme.
[0030] Step S106, determining a node item corresponding to the text type, wherein the node item includes a plurality of first-level nodes and a plurality of second-level nodes corresponding to the plurality of first-level nodes respectively;
[0031] In step S106 provided in the present application, the node item corresponding to the text type is determined. In information organization or data structure, the node item generally refers to the basic unit constituting the graph structure, and the node item refers to the structural element used to classify and describe the characteristics of the text. Among them, the first-level node generally represents the most important classification standard or category, and the first-level node corresponds to the second-level node, which is a further subdivision under the first-level node, representing a more specific classification or feature.
[0032] If the text type is a policy-making text type, the first-level node may include text type (X1), text publication form (X2), text behavior element (X3), text regulation cycle (X4), text regulation scope (X5), text body (X6), text recipient object (X7), text guarantee (X8), etc.
[0033] The secondary nodes can be as follows: the secondary nodes corresponding to the text body (X6) can be body 1 (X61), body 2 (X62), body 3 (X63), body 4 (X64), and others (X65). The secondary nodes corresponding to the text guarantee (X8) can be construction (X81), financial support (X82), convenient services (X83), consultation (X84), technical support (X85), resource support (X86), special funds (X87), legal guarantee (X88), network security (X89), meeting (X810), notification (X811), etc., which can be customized according to actual applications and scenarios.
[0034] Step S108, determining the node data corresponding to the node item according to the target text;
[0035] In step S108 provided in the present application, it is explained that the node data corresponding to the node item is determined based on the target text, wherein the node data is the specific information or data corresponding to the node item, which is used to identify the specific attributes or features of the text. For example, it can be determined based on the text content that the text contains the text body (X6), specifically, it involves body 1 (X61), body 3 (X63). When it involves the corresponding body, the secondary node can be operated or identified accordingly, such as marked as 1, or the node is connected in the topology diagram to indicate that it involves related content. Thereby determining the node data corresponding to the node item, wherein the secondary node can also include an entry node. In the case of not hitting other secondary nodes, the relevant content can be extracted and refined to obtain an entry node to avoid node loss caused by not hitting the node.
[0036] Step S110, determining a first result of whether the description of the target text is consistent with the description of the text subject according to the node data corresponding to the node item, and determining a second result of whether the descriptions included in the target text are consistent with each other;
[0037] In step S110 provided in the present application, a first result of determining whether the description of the target text is consistent with the description of the text subject based on the node data corresponding to the node item, and a second result of determining whether the descriptions included in the target text are consistent with each other are described.
[0038] Among them, it is determined whether the description of the target text is consistent with the description of the text theme. This step requires comparing the content of the target text with the classification standards defined by node items (such as text type, text release form, etc.) and corresponding node data (such as resolutions, document releases, etc.) to determine whether the target text accurately reflects the core characteristics or theme of its classification.
[0039] For example, if the text type is Energy Power Environmental Protection Announcement, the above node data indicates that the announcement clearly states the goals, measures, and implementation steps of the environmental protection policy, which is consistent with the main theme of the text type "Announcement (X15)" and meets the classification standards of environmental protection policies. Therefore, the first result shows that the description of the announcement is consistent with its text main theme.
[0040] Among them, determine whether the descriptions included in the target text are consistent. This step focuses on the logic and coherence between the various parts or descriptions within the target text. If the internal descriptions are contradictory or lack logical connection, inconsistent results will also result.
[0041] For example, through the above node data, we can see that the announcement introduces the background and importance of environmental protection, then lists specific measures in detail, including reducing pollution and protecting the ecology, and finally emphasizes the execution and supervision subjects. These descriptions are logically clear, information is coherent, and the style is unified. There are no logical contradictions or information duplication. Therefore, the second result shows that the descriptions within the announcement are consistent.
[0042] When determining the above-mentioned first result, in order to more accurately judge the consistency between the target text and the main theme of the text, natural language processing technology (NLP) can be used to extract key information of the text (such as keywords, sentiment tendencies, etc.) to obtain the above-mentioned node data, so that the node data can accurately represent the represented features, thereby determining whether it is consistent with the main theme based on the node data that accurately represents the features.
[0043] When determining the second result and judging the consistency of the internal description of the target text, the following aspects can be considered: logical coherence (whether there is a reasonable causal relationship, time sequence, etc. between the descriptions), information consistency (whether different parts provide information that supports or supplements each other, and whether the operations performed by the subject are consistent), and language style consistency (whether a unified tone, wording, etc. are maintained). In addition, methods such as text similarity calculation can be used to assist in the judgment.
[0044] Step S112, determining a consistency result corresponding to the target text according to the first result and the second result.
[0045] In step S112 provided in the present application, it is explained that the consistency result corresponding to the target text is determined based on the first result and the second result, that is, the process of determining the consistency result corresponding to the target text based on two previous results (the first result and the second result) is explained. The first result focuses on the consistency between the description of the target text and its text theme (or the core features of the classification to which it belongs), while the second result focuses on the consistency between the various descriptions within the target text. By combining these two results, the overall consistency of the target text can be comprehensively evaluated.
[0046] Through the above steps S102-S112, the target text is obtained, wherein the target text is an energy power structured data text whose text length exceeds a predetermined threshold. Determine the text type to which the target text belongs, and the text subject corresponding to the target text. Determine the node item corresponding to the text type, wherein the node item includes multiple first-level nodes, and multiple second-level nodes corresponding to the multiple first-level nodes. According to the target text, determine the node data corresponding to the node item. According to the node data corresponding to the node item, determine the first result of whether the description of the target text is consistent with the description of the text subject, and determine the second result of whether the descriptions included in the target text are consistent. According to the first result and the second result, determine the consistency result corresponding to the target text. Among them, the node item is determined, and the node item includes a first-level node and a second-level node. These node items can assist in text structuring and content analysis, and can help decompose complex text content into more understandable units. According to the content of the target text, fill the node data for the defined node item. With in-depth analysis and structured representation of the text content, the information in the text is presented in a logically clear and structured manner. After that, the first result and the second result are determined. The first result compares the description of the target text with the description of the main theme of the text to check whether the two are consistent. This helps to find out whether the text content deviates from its main argument or core information. The second result can analyze whether the descriptions included in the target text are consistent, that is, check the logical coherence and information consistency within the text. This step helps to identify problems such as contradictions or logical jumps in the text. Combining the first result and the second result, the overall consistency of the target text is evaluated. That is, if the text description is consistent with the main theme, and the description inside the text is also consistent, it is considered that the text has good consistency, thereby solving the technical problem in the related art that when the text is too long, it is usually difficult to determine the main theme described by the text, and it is even more difficult to check whether the overall description of the text is consistent with the main theme to be described, and it is also difficult to judge whether the descriptions above and below the text are consistent.
[0047] As an optional embodiment, in the case where the type of the secondary node is a selection type, the node data corresponding to the node item is determined based on the target text, including: extracting hit texts corresponding to multiple first-level nodes from the target text; based on the respectively corresponding hit texts, performing selection operations on the respectively corresponding multiple second-level nodes to obtain respectively corresponding at least one selected second-level node; based on the at least one selected second-level node corresponding to the multiple first-level nodes, determining a topological graph corresponding to the node item, wherein in the topological graph, first-level nodes with association are connected, and multiple first-level nodes are respectively connected to at least one corresponding selected second-level node; based on the topological graph corresponding to the node item, determining the node data corresponding to the node item.
[0048] In this embodiment, a process of determining node data corresponding to a node item based on a target text when the type of a secondary node is a selection type is described.
[0049] First, the hit text is extracted, that is, the hit text corresponding to multiple first-level nodes needs to be identified from the target text. These hit texts are the content related to the first-level nodes that are directly or indirectly mentioned in the target text. After that, based on the hit text corresponding to each first-level node, the second-level node selection operation is performed. Since the second-level node is a selection type, it may be necessary to select one or more of the most suitable nodes from multiple possible second-level nodes based on the specific content of the hit text. In other words, you only need to select, if you select it, it is a hit, if you do not select it, it is a miss.
[0050] Then, a topology graph can be constructed, that is, after selecting all relevant secondary nodes, a topology graph is constructed to represent the relationship between these nodes. In this topology graph, the associated primary nodes are connected to each other, and each primary node is connected to at least one of its corresponding selected secondary nodes. This representation method helps to intuitively understand the structure and classification information of the text content.
[0051] Finally, based on the constructed topology map, the node data corresponding to the node item can be determined. These data are obtained by in-depth analysis and processing of the target text, and can accurately reflect the classification characteristics and core content of the text. The construction of the topology map can also be achieved with the help of graph theory and data visualization technology. By applying these technologies to the field of text classification, the structure and classification information of the text content can be more intuitively displayed, and the accuracy and efficiency of classification can be improved.
[0052] It should be noted that in this process, natural language processing (NLP) technology may be needed to automatically extract hit text and select secondary nodes. For example, named entity recognition (NER) can be used to identify key entities and concepts in the text, semantic analysis can be used to understand the meaning and context of the text, and classification algorithms can be used to automatically select the most appropriate secondary node.
[0053] For example:
[0054] Suppose there is a scientific research paper on "Research on New Solar Cell Materials", which discusses in detail the synthesis method, performance characterization and application prospects of the new materials.
[0055] Extract hit text: First-level node 1: Research field - From the title and abstract of the paper, hit text related to "new solar cell materials" can be extracted, which directly corresponds to the research field of the paper. First-level node 2: Experimental methods - The "Material Synthesis" section in the paper describes the preparation process of new materials. This is the hit text corresponding to the first-level node of experimental methods. First-level node 3: Performance characterization - The "Performance Testing and Characterization" section in the paper provides various performance indicators of new materials. This is the hit text corresponding to the first-level node of performance characterization. First-level node 4: Application prospects - In the "Discussion and Outlook" section of the paper, the authors discussed the application potential of the new material in the field of solar cells. This is the hit text corresponding to the first-level node of application prospects.
[0056] Select secondary nodes: For "Research field": you can select a secondary node such as "new solar cell materials" to represent the field. For "Experimental method": based on the hit text, you can select "chemical synthesis method (secondary node)" as the selected node, because the paper clearly mentions the chemical synthesis process of the material. For "Performance characterization": you can select "photoelectric conversion efficiency (secondary node)" and "stability test (secondary node)" as the selected nodes, because these two are important indicators for evaluating the performance of solar cell materials. For "Application prospects": you can select "commercialization potential (secondary node)" to indicate the possibility of application of this new material in the future market.
[0057] Then construct a topological map: In the topological map, "Research Field" is connected to the other three first-level nodes ("Experimental Methods", "Performance Characterization" and "Application Prospects"). Each first-level node is then connected to its corresponding selected second-level node to form a complete classification system. For example, the "Experimental Methods" node is connected to the "Chemical Synthesis Method" node, the "Performance Characterization" node is connected to the "Photoelectric Conversion Efficiency" and "Stability Test" nodes, and the "Application Prospects" node is connected to the "Commercial Potential" node. Other unhit second-level nodes are not connected.
[0058] Finally, based on this topological graph, the node data corresponding to the node items can be determined. These data accurately reflect the classification characteristics and core content of the paper, so as to make subsequent judgments.
[0059] As an optional embodiment, when the type of the secondary node also includes an entry type, the node data corresponding to the node item is determined based on the topological map corresponding to the node item, including: determining the entry text corresponding to the secondary node of the entry type based on the respectively corresponding hit texts; determining the similarity index between the entry text and the text represented by other secondary node items, wherein the other secondary node items include secondary nodes of the selection type under the corresponding primary node; determining the entry topological map based on the similarity index, wherein the entry topological map is a topological map formed by connecting secondary nodes carrying associated weights, and the associated weights are determined based on the corresponding similarity index; supplementing the entry topological map to the topological map to obtain a first supplementary topological map; determining the node data corresponding to the node item based on the first supplementary topological map.
[0060] In this embodiment, the embodiment illustrates how to further determine the process of node data corresponding to the node item when the secondary node type includes the input type. This process not only involves extracting key information from the target text to construct a basic topology map, but also includes special processing of the secondary nodes of the input type, that is, determining the input text, and constructing the input topology map based on the similarity of these texts with the texts of the secondary node items of other selected types, and finally supplementing this input topology map to the original topology map to improve the node data.
[0061] For the secondary nodes of the input type, its specific input text needs to be determined based on the corresponding hit text (which may come from a part of the target text or external input). Compare the input text with the text represented by the secondary node items of other selected types under the same level node, and calculate the similarity index between them. This similarity index can reflect the similarity or correlation between the texts. Based on the similarity index, construct an input topology map.
[0062] In this topology, the secondary nodes of the input type will be connected to other related secondary nodes (whether they are selection types or other input types), and the weight of the connection line is determined by the similarity index, indicating the strength of the association between them. The constructed input topology is added to the original topology to form the first supplementary topology. It can be seen that it does not create a new node based on the original node item, which avoids affecting the subsequent consistency judgment and avoiding adding complexity.
[0063] The original topology map is supplemented according to the first supplementary topology map. This supplementation process may involve adjustment and optimization of the structure of the original topology map to ensure that the connections between all nodes are reasonable and accurate. Finally, according to the first supplementary topology map, the information of all nodes and connecting lines is integrated to determine the node data corresponding to the node item. These data not only include the information in the original topology map, but also integrate the input text obtained through similarity analysis and its association with other nodes.
[0064] As an optional embodiment, node data corresponding to the node item is determined based on a topological map corresponding to the node item, including: determining a node to be supplemented in the topological map that has only one connecting line; based on the target text, supplementing the topological relationship of the node to be supplemented in the topological map to obtain a second supplementary topological map; and determining the node data corresponding to the node item based on the second supplementary topological map.
[0065] In this embodiment, it is explained how to further determine the refinement steps of node data when processing a topological graph corresponding to a node item. This process pays special attention to those nodes to be supplemented that have only one connection line in the topological graph, which may represent an information point that has not been fully described or associated. By supplementing the topological relationship of these nodes to be supplemented in the topological graph based on the target text, the structure of the entire topological graph can be enriched and improved, thereby more accurately determining the node data corresponding to the node item.
[0066] First, identify those nodes in the topology map that have only one connection line. These nodes are considered to be nodes to be supplemented. They may represent the initial introduction of a certain information point or concept, but have not yet established a comprehensive association with other related nodes. Next, based on the content of the target text, carefully analyze the potential relationship between these nodes to be supplemented and other nodes. By understanding the context, logical relationships, and semantic information of the text, determine how to supplement the topological relationships of these nodes to be supplemented in the topology map. This may involve adding new connection lines, adjusting the weights or directions of existing connection lines, or introducing new nodes to establish more complex associations. After supplementing the topological relationships of the nodes to be supplemented, a new topology map is obtained, that is, the second supplementary topology map.
[0067] This topology is more complete and richer than the original topology, and can more accurately reflect the complex relationship between the nodes in the target text. Finally, based on the second supplementary topology, the content of the target text can be more comprehensively understood and analyzed. By comprehensively considering the information of all nodes and connecting lines in the topology, the node data corresponding to the node item can be determined. These data include not only the attribute information of the node itself, but also a detailed description of the association relationship between nodes. In order to better determine the consistency after.
[0068] As an optional embodiment, based on the respectively corresponding hit texts, a selection operation is performed on the respectively corresponding multiple secondary nodes to obtain at least one respectively corresponding selected secondary node, including: determining the text description quantities respectively corresponding to the multiple first-level nodes, and the text description quantities respectively corresponding to the multiple selected second-level nodes; determining the first-level node weights respectively corresponding to the multiple first-level nodes based on the text description quantities corresponding to the first-level nodes and the corresponding benchmark description quantities, and determining the second-level node weights respectively corresponding to the multiple selected second-level nodes based on the text description quantities respectively corresponding to the multiple selected second-level nodes and the corresponding benchmark description quantities; assigning corresponding first-level node weights to the multiple first-level nodes, and assigning corresponding second-level node weights to the multiple second-level nodes.
[0069] In this embodiment, a process of selecting multiple secondary nodes based on hit text and assigning weights to these nodes and their primary nodes in a text processing or information extraction task is described. This process aims to evaluate the importance of nodes by quantifying the amount of text description.
[0070] First, it is necessary to determine the amount of text description corresponding to each first-level node and the selected second-level node. This is usually achieved by counting the number of words, sentences or paragraphs related to the node in the text. The amount of text description reflects the level of detail and importance of the description of the node in the text. In order to evaluate the importance of the node, it is necessary to set a baseline description as a reference. The baseline description can be based on the average description of the entire text set, the standard description of a specific field, or a threshold customized according to actual needs.
[0071] Then, based on the comparison results of the text description corresponding to the first-level node and the selected second-level node with the benchmark description, their importance weights are calculated respectively. The weight value is usually calculated by a certain function or algorithm, aiming to reflect the importance of the node in the text. Finally, the calculated weight values are assigned to the corresponding first-level nodes and second-level nodes respectively. These weight values will be used as important parameters in subsequent text processing or information extraction tasks to guide the decision-making process of related algorithms or models.
[0072] It should be noted that when calculating the weight, different algorithms or functions can be used to calculate the node weight, such as the weight calculation method based on TF-IDF (term frequency-inverse document frequency), the graph ranking algorithm based on PageRank, etc. These algorithms can be selected and optimized according to the characteristics and needs of the text. In addition, when calculating the node weight, the contextual information in the text can be further considered, such as the location of the node, the relationship with other nodes, the paragraph or chapter in which it is located, etc. This information helps to more accurately evaluate the importance and meaning of the node in the text.
[0073] In addition, in some specific field applications, domain knowledge can be combined to optimize the calculation of node weights. For example, in medical literature analysis, the weight values of relevant nodes can be adjusted according to the authority and importance of medical terms.
[0074] As an optional embodiment, determining the first result of whether the description of the target text is consistent with the description of the text subject based on the node data corresponding to the node item includes: determining the subject node corresponding to the text subject; determining the matching index between the secondary node and the subject node selected in the node data; and determining the first result of whether the description of the target text is consistent with the description of the text subject based on the matching index.
[0075] In this embodiment, a process for evaluating the consistency between the target text description and the text theme description based on node data is described. In this process, the relationship between a specific node (such as a selected secondary node) in the node data and the theme node corresponding to the text theme is analyzed to determine whether the text content is closely centered around the theme.
[0076] First, it is necessary to clarify the main theme of the text. The main theme node can be a node automatically formed according to the main theme of the text. The main theme node contains the main theme information that the text should correspond to. Next, it is necessary to calculate the matching index between the selected secondary node and the main theme node. The matching index is a quantitative indicator to measure the degree of association or similarity between nodes. It can be calculated by a variety of methods, such as based on the direct connection relationship between nodes, the number of common neighbor nodes, the length or weight of the path between nodes, etc. Finally, based on the value of the matching index, evaluate whether the description of the target text is consistent with the description of the main theme of the text. If the matching index is high, it means that there is a strong correlation between the selected secondary node and the main theme node, so it can be inferred that the text content is well developed around the main theme; conversely, if the matching index is low, it may mean that there is a certain deviation between the text content and the main theme.
[0077] As an optional embodiment, determining the second result of whether the descriptions included in the target text are consistent based on the node data corresponding to the node item includes: determining a multi-branch node that is simultaneously connected to multiple secondary nodes in a topological diagram included in the node data; and determining the second result of whether the descriptions included in the target text are consistent based on the multi-branch node.
[0078] In this embodiment, a process is described to evaluate the consistency between different descriptions in the target text by analyzing the topological graph structure in the node data, especially the multi-branch node. In this process, the multi-branch node is a key point connecting multiple secondary nodes, and its existence and connection mode can reflect the relevance and consistency between different descriptions in the text.
[0079] First, in the topological graph included in the node data, identify those multi-branch nodes that are connected to multiple secondary nodes at the same time. These nodes usually represent the intersection or common points between different descriptions in the text, and are an important basis for evaluating the consistency of descriptions. Next, analyze the connection relationship between the multi-branch node and each secondary node. These connection relationships may include the number, weight, direction, etc. of connection lines, which together constitute a quantitative representation of the correlation between descriptions. Finally, based on the connection relationship of the multi-branch node, evaluate whether the descriptions included in the target text are consistent. If the multi-branch node can smoothly connect multiple related secondary nodes, and the connection relationship is reasonable and tight, then it can be considered that the descriptions in the text are consistent. If the connection relationship is loose, contradictory, or there are obvious breakpoints, it may mean that there are inconsistencies between the descriptions in the text. The specific method of determining whether it is consistent can be customized according to the actual application and scenario.
[0080] For example, because the nodes used in this application are fixed, reasonable node connection lines and unreasonable node connection lines can be set to indicate which nodes are reasonably connected to each other and which nodes are not reasonably connected to each other. This can be used as a basis for judgment.
[0081] In addition, it is also possible to determine whether node A is connected to node B with a larger weight and to another node C with a smaller weight. In this case, the above phenomenon may be caused by a descriptive error, that is, node A should be connected to node B, but due to a typo or other problem, node A is connected to node C. In this way, it can also be determined whether there is a problem of inconsistent descriptions, etc.
[0082] Based on the above embodiments and optional embodiments, an optional implementation is provided, which is described in detail below.
[0083] In an optional implementation manner of the present invention, a method for evaluating the consistency of energy and power text orientation is provided.
[0084] Index variables are set according to the environmental monitoring label system; wherein, the index variables include 9 first-level variables (same as the above-mentioned first-level nodes) and 61 second-level variables (same as the above-mentioned second-level nodes);
[0085] Assign values and set weights for 61 secondary variables, analyze the sample text and construct a multi-input-output table, calculate the value of each primary variable Xi and the comprehensive value of the text X, and judge the consistency of the sample text at all levels of variables and the comprehensiveness based on the energy and power text orientation consistency evaluation index; among which, the energy and power text orientation consistency evaluation index is constructed through the value of each primary variable Xi or the comprehensive value of the text X, the mean value and the variance.
[0086] Furthermore, it also includes:
[0087] In the environmental monitoring label system, labels that are more relevant to text evaluation are selected, and 9 primary variables and 61 secondary variables are set. Table 1 is the classification and setting table of variables, as shown in Table 1;
[0088] Table 1
[0089]
[0090]
[0091] Each secondary variable is assigned a value of 1.1, 1.2, 1.3, etc., and a weight is assigned at the same time, and the sum of the weights of each primary variable is 1. Table 2 is a variable weighting and weight table, as shown in Table 2. If the text content meets the corresponding keywords of the secondary variable, then the corresponding value is assigned, and if it does not meet the corresponding value, then the value is assigned 0. For the primary variables text type X1, text release form X2, and text control cycle X4, each sample text only corresponds to one of the secondary variables under these three variables. For the remaining primary variables, the sample text can correspond to multiple secondary variables.
[0092] Table 2
[0093]
[0094]
[0095]
[0096]
[0097] Analyze the sample text, assign values to the secondary variables, construct a multi-input-output table, calculate the value of each primary variable Xi and the comprehensive value of the text X, and bring it into the energy and power text orientation consistency evaluation index to judge the text consistency.
[0098] Furthermore, the calculation method of the primary variable value Xi and the text comprehensive value X is:
[0099] According to the assignment and weight of each text, the value of each primary variable Xi is calculated by the following formula:
[0100]
[0101] Where: Xik represents the value of the kth secondary variable under the ith primary variable, where i is the number of the primary variable (i=1, 2, 3, 4, 5, 6, 7, 8, 9), and k is the number of the secondary variable under each primary variable (k=1, 2, 3, 4, 5, 6, 7, 8, 9…); Wik is the weight of the kth secondary variable under the ith primary variable. The specific assignment and weight values are shown in Table 2. The denominator in the formula is 1.
[0102] After obtaining the values of each primary variable Xi, calculate the text comprehensive value X according to the following formula.
[0103]
[0104] After obtaining the primary variable values Xi and the text comprehensive value X, the energy and power text orientation consistency evaluation index is used to calculate the consistency evaluation index of each variable and the comprehensive consistency evaluation index of the sample text, so as to judge the consistency of each variable and the comprehensive consistency of the sample text respectively.
[0105] Further, the steps for determining text consistency are:
[0106] According to the energy and power text orientation consistency evaluation index, as shown in the following formula:
[0107]
[0108] Where: PMCi is the energy and power text orientation consistency evaluation index, Xij is the primary variable value of the jth text under the i-th primary variable (j = 1, 2, 3, 4, 5, 6, 7, 8, 9...n), n is the number of sample texts, X i is the average value of the i-th first-level variable of the sample text.
[0109] First, the mean and variance of each primary variable Xi of the sample text are calculated respectively, and then substituted into the energy and power text orientation consistency evaluation index to obtain the consistency of the sample text in each primary variable;
[0110] Then , Calculate the mean and variance of the comprehensive value X of the sample text. In this case, Xij in the formula is the comprehensive value X of each sample text, X i is the average value of the comprehensive value X of the sample text. Substitute it into the energy and power text orientation consistency evaluation index to obtain the comprehensive consistency of the sample text.
[0111] Furthermore, the following criteria need to be used when evaluating the consistency of sample texts:
[0112] After obtaining the energy and power text orientation consistency evaluation index, if the value is between 0-0.25 (including 0.25), the consistency is poor; if the value is between 0.25-0.5 (including 0.5), the consistency is average; if the value is between 0.5-0.75 (including 0.75), the consistency is good; if the value is between 0.75-1 (including 1), the consistency is excellent. Table 3 is the evaluation standard table, as shown in Table 3.
[0113] Table 3
[0114]
[0115] Compared with related technologies, this energy and power text orientation consistency assessment method judges the consistency between texts, sets primary and secondary variables according to the environmental monitoring label system, and quantifies the sample text by assigning values and weights. At the same time, the energy and power text orientation consistency assessment index is calculated, which can not only evaluate the comprehensive consistency of the sample text, but also use this method to evaluate the consistency of the sample text in each primary variable, thereby helping to comprehensively analyze the consistency between sample texts, strengthen text coordination, and ensure that efforts are made in the same direction and a joint force is formed.
[0116] Five sample texts were selected, namely "Sample 1", "Sample 2", "Sample 3", "Sample 4" and "Sample 15". The above texts were analyzed. According to the variable assignment rules, the secondary variables of each text were assigned values, and a multi-input-output table was constructed. Then, the primary variable values Xi and the text comprehensive value X of each text were determined, and then the energy and power text orientation consistency index values of X1-X9 and X were determined, which were 0.8656, 0.9556, 0.5464, 0.9057, 0.3931, 0.6232, 0.7973, 0.5524, 0.4561 and 0.8509 respectively.
[0117] According to the evaluation criteria, the above index values respectively show that the selected five texts have excellent text consistency in the X1 dimension, excellent text consistency in the X2 dimension, good text consistency in the X3 dimension, excellent text consistency in the X4 dimension, average text consistency in the X5 dimension, good text consistency in the X6 dimension, excellent text consistency in the X7 dimension, good text consistency in the X8 dimension, average text consistency in the X9 dimension, and excellent overall text consistency. The manual verification method shows that the judgment results are consistent with the actual results, and has a good consistency determination effect.
[0118] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0119] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of various embodiments of the present invention.
[0120] Example 2
[0121] According to an embodiment of the present invention, a device for implementing the above-mentioned method for determining consistency of energy and power text structured data is also provided. Figure 2 is a structural block diagram of a device for determining consistency of energy and power text structured data according to an embodiment of the present invention, such as Figure 2 As shown, the device includes: an acquisition module 202, a first determination module 204, a second determination module 206, a third determination module 208, a fourth determination module 210 and a fifth determination module 212. The device is described in detail below.
[0122] An acquisition module 202 is used to acquire a target text, wherein the target text is an energy and power structured data text whose text length exceeds a predetermined threshold; a first determination module 204 is connected to the acquisition module 202, and is used to determine the text type to which the target text belongs, and the text subject corresponding to the target text; a second determination module 206 is connected to the first determination module 204, and is used to determine a node item corresponding to the text type, wherein the node item includes a plurality of first-level nodes, and a plurality of second-level nodes corresponding to the plurality of first-level nodes; a third determination module 208 is connected to the second determination module 206, and is used to determine the node data corresponding to the node item based on the target text; a fourth determination module 210 is connected to the third determination module 208, and is used to determine a first result of whether the description of the target text is consistent with the description of the text subject based on the node data corresponding to the node item, and to determine a second result of whether the descriptions included in the target text are consistent; a fifth determination module 212 is connected to the fourth determination module 210, and is used to determine a consistency result corresponding to the target text based on the first result and the second result.
[0123] It should be noted here that the above-mentioned acquisition module 202, the first determination module 204, the second determination module 206, the third determination module 208, the fourth determination module 210 and the fifth determination module 212 correspond to steps S102 to S112 in the implementation of the energy and power text structured data consistency determination method, and the instances and application scenarios implemented by the multiple modules are the same as the corresponding steps, but are not limited to the contents disclosed in the above-mentioned Example 1.
[0124] Example 3
[0125] According to another aspect of an embodiment of the present invention, there is also provided an electronic device, comprising: a processor; a memory for storing processor executable instructions, wherein the processor is configured to execute instructions to implement the following energy and power text structured data consistency determination method: obtaining a target text, wherein the target text is an energy and power structured data text whose text length exceeds a predetermined threshold; determining the text type to which the target text belongs, and the text subject corresponding to the target text; determining a node item corresponding to the text type, wherein the node item includes a plurality of first-level nodes, and a plurality of second-level nodes corresponding to the plurality of first-level nodes respectively; determining node data corresponding to the node item based on the target text; determining a first result of whether a description of the target text is consistent with a description of the text subject based on the node data corresponding to the node item, and determining a second result of whether the descriptions included in the target text are consistent; determining a consistency result corresponding to the target text based on the first result and the second result.
[0126] Optionally, in the case where the type of the secondary node is a selection type, the node data corresponding to the node item is determined based on the target text, including: extracting hit texts corresponding to multiple first-level nodes from the target text; based on the respectively corresponding hit texts, performing selection operations on the respectively corresponding multiple second-level nodes to obtain at least one respectively corresponding selected second-level node; based on at least one selected second-level node corresponding to the multiple first-level nodes, determining a topological graph corresponding to the node item, wherein in the topological graph, first-level nodes with association are connected, and multiple first-level nodes are respectively connected to at least one corresponding selected second-level node; based on the topological graph corresponding to the node item, determining the node data corresponding to the node item.
[0127] Optionally, in the case where the type of the secondary node also includes an entry type, the node data corresponding to the node item is determined based on the topological map corresponding to the node item, including: determining the entry text corresponding to the secondary node of the entry type based on the respectively corresponding hit texts; determining the similarity index between the entry text and the text represented by other secondary node items, wherein the other secondary node items include secondary nodes of the selection type under the corresponding primary node; determining the entry topological map based on the similarity index, wherein the entry topological map is a topological map formed by connecting secondary nodes carrying associated weights, and the associated weights are determined based on the corresponding similarity index; supplementing the entry topological map to the topological map to obtain a first supplementary topological map; determining the node data corresponding to the node item based on the first supplementary topological map.
[0128] Optionally, based on the topological map corresponding to the node item, the node data corresponding to the node item is determined, including: determining the node to be supplemented in the topological map that has only one connecting line; based on the target text, supplementing the topological relationship of the node to be supplemented in the topological map to obtain a second supplementary topological map; based on the second supplementary topological map, determining the node data corresponding to the node item.
[0129] Optionally, based on the respectively corresponding hit texts, a selection operation is performed on the respectively corresponding multiple secondary nodes to obtain at least one respectively corresponding selected secondary node, including: determining the text description quantities corresponding to the multiple first-level nodes, and the text description quantities corresponding to the multiple selected second-level nodes; determining the first-level node weights corresponding to the multiple first-level nodes based on the text description quantities corresponding to the first-level nodes and the corresponding benchmark description quantities, and determining the second-level node weights corresponding to the multiple selected second-level nodes based on the text description quantities corresponding to the multiple selected second-level nodes and the corresponding benchmark description quantities; assigning corresponding first-level node weights to the multiple first-level nodes, and assigning corresponding second-level node weights to the multiple second-level nodes.
[0130] Optionally, determining the first result of whether the description of the target text is consistent with the description of the text subject based on the node data corresponding to the node item includes: determining the subject node corresponding to the text subject; determining the matching index between the secondary node and the subject node selected in the node data; and determining the first result of whether the description of the target text is consistent with the description of the text subject based on the matching index.
[0131] Optionally, based on the node data corresponding to the node item, a second result of determining whether the descriptions included in the target text are consistent includes: determining a multi-branch node that is simultaneously connected to multiple secondary nodes in a topological graph included in the node data; based on the multi-branch node, determining a second result of whether the descriptions included in the target text are consistent.
[0132] Example 4
[0133] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is also provided. When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device can execute the following method for determining the consistency of energy and power text structured data: obtain a target text, wherein the target text is an energy and power structured data text whose text length exceeds a predetermined threshold; determine the text type to which the target text belongs, and the text subject corresponding to the target text; determine the node item corresponding to the text type, wherein the node item includes multiple first-level nodes, and multiple second-level nodes corresponding to the multiple first-level nodes respectively; based on the target text, determine the node data corresponding to the node item; based on the node data corresponding to the node item, determine a first result of whether the description of the target text is consistent with the description of the text subject, and determine a second result of whether the descriptions included in the target text are consistent; based on the first result and the second result, determine the consistency result corresponding to the target text.
[0134] Optionally, in the case where the type of the secondary node is a selection type, the node data corresponding to the node item is determined based on the target text, including: extracting hit texts corresponding to multiple first-level nodes from the target text; based on the respectively corresponding hit texts, performing selection operations on the respectively corresponding multiple second-level nodes to obtain at least one respectively corresponding selected second-level node; based on at least one selected second-level node corresponding to the multiple first-level nodes, determining a topological graph corresponding to the node item, wherein in the topological graph, first-level nodes with association are connected, and multiple first-level nodes are respectively connected to at least one corresponding selected second-level node; based on the topological graph corresponding to the node item, determining the node data corresponding to the node item.
[0135] Optionally, in the case where the type of the secondary node also includes an entry type, the node data corresponding to the node item is determined based on the topological map corresponding to the node item, including: determining the entry text corresponding to the secondary node of the entry type based on the respectively corresponding hit texts; determining the similarity index between the entry text and the text represented by other secondary node items, wherein the other secondary node items include secondary nodes of the selection type under the corresponding primary node; determining the entry topological map based on the similarity index, wherein the entry topological map is a topological map formed by connecting secondary nodes carrying associated weights, and the associated weights are determined based on the corresponding similarity index; supplementing the entry topological map to the topological map to obtain a first supplementary topological map; determining the node data corresponding to the node item based on the first supplementary topological map.
[0136] Optionally, based on the topological map corresponding to the node item, the node data corresponding to the node item is determined, including: determining the node to be supplemented in the topological map that has only one connecting line; based on the target text, supplementing the topological relationship of the node to be supplemented in the topological map to obtain a second supplementary topological map; based on the second supplementary topological map, determining the node data corresponding to the node item.
[0137] Optionally, based on the respectively corresponding hit texts, a selection operation is performed on the respectively corresponding multiple secondary nodes to obtain at least one respectively corresponding selected secondary node, including: determining the text description quantities corresponding to the multiple first-level nodes, and the text description quantities corresponding to the multiple selected second-level nodes; determining the first-level node weights corresponding to the multiple first-level nodes based on the text description quantities corresponding to the first-level nodes and the corresponding benchmark description quantities, and determining the second-level node weights corresponding to the multiple selected second-level nodes based on the text description quantities corresponding to the multiple selected second-level nodes and the corresponding benchmark description quantities; assigning corresponding first-level node weights to the multiple first-level nodes, and assigning corresponding second-level node weights to the multiple second-level nodes.
[0138] Optionally, determining the first result of whether the description of the target text is consistent with the description of the text subject based on the node data corresponding to the node item includes: determining the subject node corresponding to the text subject; determining the matching index between the secondary node and the subject node selected in the node data; and determining the first result of whether the description of the target text is consistent with the description of the text subject based on the matching index.
[0139] Optionally, based on the node data corresponding to the node item, a second result of determining whether the descriptions included in the target text are consistent includes: determining a multi-branch node that is simultaneously connected to multiple secondary nodes in a topological graph included in the node data; based on the multi-branch node, determining a second result of whether the descriptions included in the target text are consistent.
[0140] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0141] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0142] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0143] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed over multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0144] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0145] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0146] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for determining consistency of energy and power text structured data, characterized in that: include: Acquire a target text, wherein the target text is an energy and power text structured data text whose text length exceeds a predetermined threshold; Determine the text type to which the target text belongs and the text subject corresponding to the target text; Determine a node item corresponding to the text type, wherein the node item includes a plurality of first-level nodes and a plurality of second-level nodes respectively corresponding to the plurality of first-level nodes; Determine the node data corresponding to the node item according to the target text; Determine, based on the node data corresponding to the node item, a first result of whether the description of the target text is consistent with the description of the text subject, and determine a second result of whether the descriptions included in the target text are consistent with each other; A consistency result corresponding to the target text is determined based on the first result and the second result.
2. The method according to claim 1, characterized in that In the case where the type of the secondary node is a selection type, determining the node data corresponding to the node item according to the target text includes: Extracting, from the target text, hit texts corresponding to the plurality of first-level nodes respectively; Based on the respectively corresponding hit texts, a selection operation is performed on the respectively corresponding multiple secondary nodes to obtain at least one respectively corresponding selected secondary node; Based on at least one selected secondary node corresponding to each of the plurality of primary nodes, determining a topological graph corresponding to the node item, wherein in the topological graph, the primary nodes with association are connected, and the plurality of primary nodes are respectively connected to the corresponding at least one selected secondary node; The node data corresponding to the node item is determined according to the topological graph corresponding to the node item.
3. The method according to claim 2, characterized in that In the case that the type of the secondary node also includes an entry type, determining the node data corresponding to the node item according to the topological graph corresponding to the node item includes: Based on the respectively corresponding hit texts, determining the entry text corresponding to the secondary node of the entry type; Determine the similarity index between the input text and the text represented by other secondary node items, wherein the other secondary node items include secondary nodes of the selection type under the corresponding primary node; Determine an input topology map according to the similarity index, wherein the input topology map is a topology map formed by connecting secondary nodes carrying associated weights, and the associated weights are determined according to the corresponding similarity index; Supplementing the input topological map to the topological map to obtain a first supplementary topological map; Node data corresponding to the node item is determined according to the first supplementary topology graph.
4. The method according to claim 2, characterized in that Determining node data corresponding to the node item according to the topological graph corresponding to the node item includes: Determine the nodes to be supplemented in the topology diagram that have only one connection line; According to the target text, the topological relationship of the node to be supplemented is supplemented in the topological graph to obtain a second supplementary topological graph; According to the second supplementary topology graph, node data corresponding to the node item is determined.
5. The method according to claim 2, characterized in that Based on the respectively corresponding hit texts, a selection operation is performed on the respectively corresponding multiple secondary nodes to obtain at least one respectively corresponding selected secondary node, including: Determine the text description amounts corresponding to the plurality of first-level nodes, and the text description amounts corresponding to the plurality of selected second-level nodes; Determine the first-level node weights corresponding to the plurality of first-level nodes respectively according to the text description amount corresponding to the first-level node and the corresponding benchmark description amount, and determine the second-level node weights corresponding to the plurality of selected second-level nodes respectively according to the text description amount corresponding to the plurality of selected second-level nodes and the corresponding benchmark description amount; The plurality of first-level nodes are respectively assigned corresponding first-level node weights, and the plurality of second-level nodes are respectively assigned corresponding second-level node weights.
6. The method according to claim 2, characterized in that The first result of determining whether the description of the target text is consistent with the description of the text subject according to the node data corresponding to the node item includes: Determining a subject node corresponding to the subject of the text; Determine a matching index between a selected secondary node and the subject node in the node data; The first result is determined based on the matching index as to whether the description of the target text is consistent with the description of the subject of the text.
7. A method according to any one of claims 2 to 6, characterized in that The second result of determining whether the descriptions included in the target text are consistent with each other according to the node data corresponding to the node item includes: Determine a multi-branch node that is simultaneously connected to multiple secondary nodes in a topological graph included in the node data; The second result of determining whether the descriptions included in the target text are consistent with each other is determined according to the multi-branch nodes.
8. A device for determining consistency of energy and power text structured data, characterized in that: include: An acquisition module, used for acquiring a target text, wherein the target text is an energy power structured data text whose text length exceeds a predetermined threshold; A first determination module is used to determine the text type to which the target text belongs and the text subject corresponding to the target text; A second determination module is used to determine a node item corresponding to the text type, wherein the node item includes a plurality of first-level nodes and a plurality of second-level nodes respectively corresponding to the plurality of first-level nodes; A third determination module, used to determine the node data corresponding to the node item according to the target text; A fourth determination module is used to determine, based on the node data corresponding to the node item, a first result of whether the description of the target text is consistent with the description of the text subject, and to determine a second result of whether the descriptions included in the target text are consistent with each other; The fifth determination module is used to determine the consistency result corresponding to the target text according to the first result and the second result.
9. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement a method for determining consistency of energy and power text structured data as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method for determining consistency of energy and power text structured data as described in any one of claims 1 to 7.