An ecological environment information search method based on heterogeneous data fusion

By using a search method based on heterogeneous data fusion, the problems of weak correlation and insufficient accuracy in ecological and environmental information search are solved, enabling fast and accurate acquisition of data items and adapting to the needs of various search modes.

CN116578683BActive Publication Date: 2025-12-16广西壮族自治区环境信息中心
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310579505.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-22
Publication Date
2025-12-16
Estimated Expiration
2043-05-22

AI Technical Summary

Technical Problem

Existing ecological and environmental information search technologies suffer from problems such as weak relevance, inaccurate searches, insufficient depth, and inconvenience in use.

Method used

A search method based on heterogeneous data fusion is adopted. By acquiring ecological environment-related data, it is divided into different data items. Rules for intent, intent value and evaluation value are formulated. By using layered matching, joint matching and one-click matching modes, keywords are matched and combined to achieve accurate acquisition of data items.

Benefits of technology

It improves the accuracy and efficiency of ecological and environmental information search, enabling users to quickly obtain the data items they need and adapt to different search requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116578683B_ABST
    Figure CN116578683B_ABST
Patent Text Reader

Abstract

The present application relates to the field of ecological environment information technology, and more particularly to an ecological environment information search method based on heterogeneous data fusion, comprising the following steps: S1 obtaining ecological environment related data and obtaining rules; S2 selection of search mode; S3 in a layer-by-layer matching mode, inputting keywords in sequence and obtaining the data item to be searched according to the rules, taking the result of the last matching as the condition of the next matching; S4 in a joint matching mode, inputting keywords in sequence and obtaining the data item to be searched according to the rules, combining the input keywords two by two after each input; and S5 in a one-key matching mode, inputting multiple keywords simultaneously and obtaining the data item to be searched according to the rules, querying all the rules of keyword matching. The present application can improve the accuracy of the search and enable the user to quickly obtain the required ecological environment related data.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of ecological environment information technology, and particularly relates to an ecological environment information search method based on heterogeneous data fusion. BACKGROUND

[0002] The ecological environment is a short name of the environment composed of ecological relations, and refers to the sum of various natural (including the second nature formed under human intervention) forces (matter and energy) or actions closely related to human beings and affecting human life and production activities.

[0003] The ecological environment refers to the total sum of the quantity and quality of water resources, land resources, biological resources and climate resources affecting human survival and development, and is a complex ecological system related to the sustainable development of society and economy. The ecological environment problem refers to the various negative feedback effects endangering human survival caused by the damage and pollution of the natural environment in the process of human beings utilizing and transforming nature for their own survival and development.

[0004] A large amount of data has been accumulated in the field of ecological environment, including pollution sources, environmental assessment approval, environmental emergency, water, air, ocean, natural ecology and the like. However, these sources are miscellaneous data constructed by different units and different systems. The existing search technologies such as full-text search have the problems of weak relevance, inaccurate search, insufficient depth, inconvenience for use and the like. SUMMARY

[0005] In order to solve the above problems, the present application provides an ecological environment information search method based on heterogeneous data fusion, which can improve the accuracy of search and enable users to quickly obtain the required ecological environment related data.

[0006] In order to achieve the above purpose, the technical scheme adopted by the present application is as follows:

[0007] An ecological environment information search method based on heterogeneous data fusion comprises the following steps:

[0008] S1, acquiring ecological environment related data, and dividing the ecological environment related data into different data items, obtaining an intention, an intention value corresponding to the intention and an evaluation value of the intention value according to the data items, and obtaining a rule through the intention, the intention value and the evaluation value;

[0009] S2, selection of a search mode, the search mode comprising a layer-by-layer matching mode, a joint matching mode and a one-key matching mode;

[0010] S3, in the layer-by-layer matching mode, inputting a keyword in sequence and obtaining a data item required to be searched according to the rule, taking a result of last time matching as a condition of next time matching;

[0011] S4 in the joint matching mode, inputting the keywords in turn and combining the keywords inputted in turn in pairs according to the rules to obtain the data item to be searched after inputting each keyword;

[0012] S5 in the one-key matching mode, inputting multiple keywords at the same time and querying all the rules of the keyword matching according to the rules to obtain the data item to be searched.

[0013] Further, in step S1, the making of the rules comprises the following steps:

[0014] S1.1 data acquisition, acquiring the ecological environment related data and converging the ecological environment related data to a database;

[0015] S1.2 knowledge extraction, analyzing the data in step S1.1, classifying the ecological environment related data into different data items to classify the ecological environment related data;

[0016] S1.3 knowledge analysis, analyzing the data items in step S1.2 to obtain the fields in the data items that can be used for querying, and the fields are divided into enumerable values and index types;

[0017] S1.4 knowledge redefinition, converting the field data of the enumerable values and the index types in step S1.3 into intentions, and obtaining intention values and evaluation values according to the intentions;

[0018] S1.5 rule design, designing a search rule through a sql statement and according to the relationship between the intentions and the intention values and the evaluation values to obtain the corresponding data items;

[0019] S1.6 data update, executing the sql statement of the rule reversely to update the intention values and the evaluation values to a search engine library.

[0020] Further, the data item comprises a main entity, an associated entity and an attribute, the main entity is a main table of the data item, the main table of the data item comprises fields describing basic information of the data item; the associated entity is an associated table of the data item, the associated table of the data item comprises fields describing various aspect information of the data item; the attribute comprises an attribute of the main entity and an attribute of the associated entity, and the attribute is a field of a corresponding table;

[0021] The intention is a popular name of a field of a table, the intention is a condition selected by a user when querying; the intention value is a value of a field, the intention value is a value matched after a user inputs a keyword; the evaluation value is an extended value of the intention value, and the evaluation value is used for popularized extension of the intention value;

[0022] The rule is a combination data composed of data item ID, data item field, intent, and SQL statement, and the SQL statement includes a table of SQL, a query condition of SQL, and a query SQL. The value of the field and the evaluation value are saved to a search engine library by the query SQL, and are used for the search of the rule matching. When the rule is matched, the corresponding data item is obtained by the table of the SQL statement and the query condition of the SQL.

[0023] Further, in step S3, the layer-by-layer matching mode includes the following steps:

[0024] S3.1 inputting a first keyword, and matching the first keyword by word segmentation to obtain a first intent, a first intent value, and a first evaluation value, and obtaining a plurality of first matched intents according to the first intent value, the first evaluation value, and an inverted index of the first intent;

[0025] S3.2 selecting any first matched intent by a user, and matching the first matched intent with an inverted index of the rule to obtain a first rule and a first SQL statement, and executing the first SQL statement on the first intent value and the first evaluation value to obtain a first data item;

[0026] S3.3 inputting a second keyword by a user when the first data item is not the required content, and matching the second keyword by word segmentation to obtain a second intent, a second intent value, and a second evaluation value, and obtaining a plurality of second matched intents according to the second intent value, the second evaluation value, and an inverted index of the second intent;

[0027] S3.4 obtaining a combined second matched intent that can be combined with the first intent value according to the first SQL statement corresponding to the first rule and the SQL statement corresponding to the rule associated with the second matched intent;

[0028] S3.5 combining the first SQL statement corresponding to the first matched intent with the second SQL statement corresponding to the combined second matched intent to obtain a combined SQL statement;

[0029] S3.6 executing the combined SQL statement according to the intent value and the evaluation value of the first matched intent and the second matched intent to obtain a second data item;

[0030] S3.7 repeating steps S3.3-S.6 until the required data item is obtained using the above matching conditions as the matching conditions.

[0031] Further, in step S3.4, whether the table of the sql corresponding to the first sql statement according to the first rule matches the table of the sql of the second matched intent according to the rule corresponding to the second matched intent is determined to determine whether the first matched intent and the second matched intent can be combined.

[0032] Further, in step S3.5, the query condition of the sql in the first sql statement corresponding to the first matched intent and the query condition of the sql in the second sql statement corresponding to the combined second matched intent are obtained to obtain a combined sql statement.

[0033] Further, in step S4, the joint matching mode includes the following steps:

[0034] S4.1 input a third keyword, and match the third keyword by word segmentation to obtain a third intent, a third intent value and a third evaluation value, and obtain a plurality of third matched intents according to the third intent value, the third evaluation value and the inverted index of the third intent;

[0035] S4.2 input a fourth keyword, and match the fourth keyword by word segmentation to obtain a fourth intent, a fourth intent value and a fourth evaluation value, and obtain a plurality of fourth matched intents according to the fourth intent value, the fourth evaluation value and the inverted index of the fourth intent;

[0036] S4.3 determine whether the third matched intent and the fourth matched intent can be combined according to whether the table of the sql corresponding to the rule associated with the third matched intent matches the table of the sql corresponding to the rule associated with the fourth matched intent;

[0037] S4.4 obtain the third matched intent and the fourth matched intent that can be combined to obtain a combined intent, and obtain a combined sql statement according to the query condition of the sql corresponding to the third matched intent and the query condition of the sql corresponding to the fourth matched intent;

[0038] S4.5 execute the combined sql statement according to the intent value and the evaluation value of the third matched intent and the fourth matched intent to obtain a third data item;

[0039] S4.6 when the third data item is not the required data item, combine the matched intent of the next keyword with the combined intent, and repeat steps S4.2-S4.5 to obtain the required data item.

[0040] Further, in step S5, the one-key matching includes the following steps:

[0041] S5.1 input a plurality of different fifth keywords simultaneously;

[0042] S5.2 determining whether the fifth keyword exists in the index type data;

[0043] S5.3 when the fifth keyword exists in the index type data, performing the joint matching mode on the fifth keyword to obtain the required data item;

[0044] S5.4. when the fifth keyword does not exist in the index type data, performing the inverted index of the fifth keyword and the data item to obtain a combination of data items satisfying the inverted index of the fifth keyword.

[0045] The beneficial effects of the present application are:

[0046] According to the data model of the ecological environment, the data related to the ecological environment is analyzed, the attribute name is redefined, the search intention of the user is inferred according to the search habit of the user, the attribute name is converted into a search intention that is easy to understand, the attribute value is expanded, and the rigid data is expanded into a popular vocabulary, so that the user can input the vocabulary at will to search. At the same time, the identity of the data is comprehensively analyzed, and the attributes of the data are deeply analyzed. The attribute value is formulated, the numerical data formed by production and life is formulated, and a certain evaluation rule is formulated, so that the search can be carried out, and the knowledge graph technology is used to comprehensively describe the data, and multiple rules are formed. There is an association between rules, forming a network structure. The present application can meet different search needs by setting three search modes. In the layer-by-layer matching mode, the accurate data item can be obtained step by step by inputting the keywords in turn; in the joint matching mode, the data item with strong correlation can be obtained according to the correlation between the keywords; in the one-key matching mode, the required data item can be quickly obtained. BRIEF DESCRIPTION OF DRAWINGS

[0047] Figure 1 is a flow chart of an ecological environment information search method based on heterogeneous data fusion of a preferred embodiment of the present application.

[0048] Figure 2 is a rule generation flow chart of an ecological environment information search method based on heterogeneous data fusion of a preferred embodiment of the present application.

[0049] Figure 3 is a rule framework diagram of an ecological environment information search method based on heterogeneous data fusion of a preferred embodiment of the present application.

[0050] Figure 4 is a rule design schematic diagram of an ecological environment information search method based on heterogeneous data fusion of a preferred embodiment of the present application.

[0051] Figure 5is a layer-by-layer matching mode flow chart of an ecological environment information search method based on heterogeneous data fusion according to a preferred embodiment of the present application.

[0052] Figure 6 is a joint matching mode flow chart of an ecological environment information search method based on heterogeneous data fusion according to a preferred embodiment of the present application.

[0053] Figure 7 is a one-key matching mode flow chart of an ecological environment information search method based on heterogeneous data fusion according to a preferred embodiment of the present application. DETAILED DESCRIPTION

[0054] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all the other embodiments obtained by those skilled in the art without creative work fall within the scope of the present application.

[0055] It should be noted that when a component is referred to as being "fixed" to another component, it can be directly on the other component or there can be intervening components. When a component is referred to as being "connected" to another component, it can be directly connected to the other component or there can be intervening components. When a component is referred to as being "disposed" on another component, it can be directly on the other component or there can be intervening components. The terms "vertical", "horizontal", "left", "right", and similar terms as used herein are for purposes of description only.

[0056] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.

[0057] Please also refer to Figures 1 to 7 The ecological environment information search method based on heterogeneous data fusion according to the preferred embodiment of the present application includes the following steps:

[0058] S1 obtains ecological environment related data, divides the ecological environment related data into different data items, obtains an intention, an intention value corresponding to the intention, and an evaluation value of the intention value according to the data items, and obtains a rule through the intention, the intention value, and the evaluation value.

[0059] As Figure 2As shown, a rule generation flowchart is shown, in step S1, the rule making includes the following steps:

[0060] S1.1 data acquisition, acquiring ecological environment related data, and converging the ecological environment related data to a database.

[0061] S1.2 knowledge extraction, analyzing the data in step S1.1, classifying the ecological environment related data into different data items. In this embodiment, the data is analyzed by the data model of the ecological environment, so as to determine the type of data item to which the data belongs, and according to the data attribute, determine whether the main table or the associated table belongs to the data item.

[0062] S1.3 knowledge analysis, analyzing the data item in step S1.2 to obtain the fields in the data item that can be used for query, and the fields are divided into enumerable values and index types. The enumerable values can be data such as enterprise names, and the index types are related to time, such as "monitoring time" and the like.

[0063] S1.4 knowledge redefinition, converting the field data of the enumerable values and the index types in step S1.3 into intentions, and obtaining the intention values and the evaluation values according to the intentions.

[0064] S1.5 rule design, designing a search rule through a sql statement and according to the relationship between the intention and the intention value and the evaluation value, to obtain the corresponding data item;

[0065] S1.6 data update, executing the sql statement of the rule in reverse, updating the intention value and the evaluation value to the search engine library. Preferably, the index class data (numeric type and time type) is not synchronized.

[0066] In this embodiment, as shown in the figure, a rule framework diagram is shown; as shown in the figure, a rule design schematic diagram is shown. Among them, Figure 3 Figure 4 The data item includes a main entity, an associated entity and an attribute.

[0067] The main entity is the main table of the data item, and the main table of the data item includes fields describing the basic information of the data item.

[0068] The associated entity is the associated table of the data item, and the associated table of the data item includes fields describing various aspects of information of the data item.

[0069] The attribute includes the attribute of the main entity and the attribute of the associated entity, and the attribute is the field of the corresponding table.

[0070] The intention is the popular name of the field of the table, and the intention is used as the condition selected by the user when querying.

[0071] The intention is the popular name of the field of the table, and the intention is used as the condition selected by the user when querying.

[0072] ​The intent value is the value of the field, the intent value is the value that matches after the user enters the keyword, and the intent value is the item in the inverted index: Map<item, list <id>The value matched after the user enters a keyword.

[0073] Evaluation values ​​are extensions of intent values, used to popularize and expand upon intent values. Typically, user input keywords are common or easily understood terms, such as "Youjiang," which refers to a tributary of the Yujiang River. However, field values ​​usually only include "Yujiang tributary" and not "Youjiang." Therefore, one evaluation value for the field value "Yujiang tributary" is "Youjiang," allowing users to find data related to "Yujiang tributary" when searching for "Youjiang," and further refine their search to find the data they want.

[0074] The rule is a combination of data consisting of data item ID, data item fields, intent, and SQL statement. The SQL statement includes the SQL table, SQL query conditions, and query SQL. The query SQL saves the field values ​​and evaluation values ​​to the search engine database for rule matching. During rule matching, the corresponding data item can be obtained through the SQL table and SQL query conditions.

[0075] A data item is a collection of a certain type of data, which is knowledge extracted and summarized after data processing. For example, the data item "water pollution sources" represents a summary of enterprises that discharge wastewater.

[0076] Relationships: Different data items are not related at the entity level; that is, there is no foreign key relationship between the table of one data item and the table of another data item. However, intents can be related, and intent values ​​can be related, thereby realizing the relationship between data items.

[0077] The S2 search mode selection includes layered matching mode, combined matching mode, and one-click matching mode.

[0078] In the layered matching mode, S3 inputs keywords sequentially and uses the result of the previous match as the condition for the next match according to the rules to obtain the data items to be searched.

[0079] like Figure 5 The diagram shows a flowchart of the layer-by-layer matching mode. In step S3, the layer-by-layer matching mode includes the following steps:

[0080] S3.1 Input the first keyword, and obtain the first intent, the first intent value and its first evaluation value by performing word segmentation and matching on the first keyword. Obtain multiple first-matched intents by matching the first intent value, the first evaluation value and the inverted index of the first intent.

[0081] S3.2 The user selects any first matching intent, matches it with the inverted index of the first matching intent and the rule to obtain the first rule and the first SQL statement, and executes the first SQL statement on the first intent value and the first evaluation value to obtain the first data item.

[0082] S3.3 When the first data item is not the desired content, the user inputs a second keyword, and by performing word segmentation and matching on the second keyword, a second intent, a second intent value and a second evaluation value are obtained. Multiple second matching intents are obtained by matching the second intent value, the second evaluation value and the inverted index of the second intent.

[0083] S3.4 Based on the first SQL statement corresponding to the first rule and the SQL statement corresponding to the rule associated with the second matching intent, obtain a combined second matching intent that can be combined with the first intent value. In this embodiment, in step S3.4, determine whether the first matching intent and the second matching intent can be combined by checking whether the table of the SQL statement corresponding to the first rule is consistent with the table of the SQL statement associated with the rule of the second matching intent.

[0084] S3.5 Combine the first SQL statement corresponding to the first matching intention with the second SQL statement corresponding to the second matching intention to obtain a combined SQL statement. In this embodiment, in step S3.5, the combined SQL statement is obtained based on the query conditions of the SQL in the first SQL statement corresponding to the first matching intention and the query conditions of the SQL in the second SQL statement corresponding to the second matching intention.

[0085] S3.6 Execute a combined SQL statement based on the intent values ​​and evaluation values ​​of the first and second matching intents to obtain the second data item.

[0086] S3.7 Using the previous step as the matching condition, repeat steps S3.3-S.6 until the desired data item is obtained.

[0087] When searching, users often don't find the exact answer they want on their first attempt by entering keywords. By using a layered matching mode, users can search while entering keywords, remembering the conditions of the previous match with each match, and finally obtaining the accurate data item.

[0088] In the combined matching mode, S4 inputs keywords sequentially and combines each keyword with the previously input keywords according to the rules to obtain the data items to be searched.

[0089] like Figure 6 The diagram shows a flowchart of the joint matching mode. In step S4, the joint matching mode includes the following steps:

[0090] S4.1 inputting a third keyword, and matching the third keyword by word segmentation to obtain a third intent, a third intent value and a third evaluation value, and matching the third intent value and the third evaluation value with an inverted index of the third intent to obtain a plurality of third matched intents.

[0091] S4.2 inputting a fourth keyword, and matching the fourth keyword by word segmentation to obtain a fourth intent, a fourth intent value and a fourth evaluation value, and matching the fourth intent value and the fourth evaluation value with an inverted index of the fourth intent to obtain a plurality of fourth matched intents.

[0092] S4.3 judging whether the third matched intents and the fourth matched intents can be combined in pairs according to whether the tables associated with the sql corresponding to the rules in the third matched intents are consistent with the tables associated with the sql corresponding to the rules in the fourth matched intents.

[0093] S4.4 obtaining the third matched intents and the fourth matched intents that can be combined to obtain a combined intent, and obtaining a combined sql statement according to the query conditions of the sql corresponding to the third matched intents and the query conditions of the sql corresponding to the fourth matched intents.

[0094] S4.5 executing the combined sql statement according to the intent values and the evaluation values of the third matched intents and the fourth matched intents to obtain a third data item.

[0095] S4.6 when the third data item is not a required data item, combining the matched intents of the next keyword with the combined intent, and repeating steps S4.2-S4.5 to obtain the required data item.

[0096] In the joint matching mode, the user can select intent search after inputting multiple keywords, and the server combines the keywords with each other in pairs after the user inputs each keyword. And the server executes the query after the user selects the combined intent.

[0097] S5 in the one-key matching mode, multiple keywords are inputted at the same time, and all rules matched by the keywords are queried according to the rules to obtain the required data item.

[0098] As shown in the flowchart of the one-key matching mode, the one-key matching includes the following steps in step S5: Figure 7

[0099] S5.1 inputting multiple different fifth keywords at the same time;

[0100] S5.2 judging whether the fifth keywords exist index type data;

[0101] S5.3 when the fifth keywords exist index type data, performing joint matching mode on the fifth keywords to obtain the required data item;​

[0102] S5.4. When the fifth key does not exist, the fifth key is inverted indexed with the data item to obtain a data item combination satisfying the fifth key inverted index.

[0103] After the user inputs the key, no selection intention is selected, and a one-key search is directly performed. At this time, the server queries according to all rules matched by the key. If the rules include a numerical type, a corresponding SQL is directly executed. If no numerical type rule is included, an inverted index Map<ID, list<intention value, evaluation value>> of the intention value and the data item ID is directly configured to the data and returned.

[0104] The embodiment analyzes data related to the ecological environment according to a data model of the ecological environment, redefines attribute names, infers a search intention of a user according to a search habit of the user, converts the attribute names into a search intention easy for the user to understand, expands attribute values, and expands rigid data into words easy for the user to understand, so that the user can input words at will to search. Meanwhile, the identity of the data is comprehensively analyzed, and the attributes of the data are deeply analyzed.

[0105] Rules are formulated for attribute values. For numerical data formed by production and life, certain evaluation rules are formulated, so that the data can be searched, and the technology of a knowledge graph is used to comprehensively describe the data and form multiple rules. The rules are associated with each other to form a mesh structure. Three search modes are set to meet different search requirements. In the layer-by-layer matching mode, accurate data items can be obtained by inputting keys one by one. In the joint matching mode, data items with strong correlation can be obtained according to the correlation between the keys. In the one-key matching mode, the required data items can be quickly obtained.

[0106] The steps of the embodiment using the layer-by-layer matching mode are as follows:

[0107] S3.1. The user inputs a key 1, the server matches the key to an evaluation value and an intention value, and matches the evaluation value and the intention value with an inverted index Map<intention, list<intention value, evaluation value>> of the intention to obtain an intention List<intention value, evaluation value> satisfying the condition. Figure 1 , intention Figure 2 , intention Figure 3 >.

[0108] S3.2. The user selects one of the intentions Figure 1 , the server gets the rule 1 that meets the condition according to the inverted index Map<rule, list<intent>> of the intent and the rule, and gets the sql. The evaluation value and the intent value matched above are assigned to the field value in the sql, and the sql is executed to get the data item 1.

[0109] S3.3 When the data item 1 is not the required content, the user inputs a second keyword, the server matches the keyword to the evaluation value and the intent value, and matches the evaluation value, the intent value and the inverted index Map<intent, list<intent value, evaluation value>> of the intent to get the intents List<intent> that meet the condition. Figure 4 , the intents Figure 5 , the intents Figure 6 >.

[0110] S3.4 According to the rule 1, it is judged whether the two intents can be combined according to whether the table in the sql corresponding to the rule associated with the intent matched the second time is consistent with the table in the sql corresponding to the rule associated with the intent matched the first time. For example, the combination of the intents Figure 1 , the intents Figure 4 , and the combination of the intents Figure 1 , the intents Figure 6 .

[0111] S3.5 According to the sql corresponding to the intent Figure 1 , the query condition of the sql corresponding to the intent Figure 4 is obtained.

[0112] S3.6 The sql is executed to get the data item 2.

[0113] The steps of the joint matching mode adopted in this embodiment are as follows:

[0114] S4.1 The user inputs the keyword 1, the server matches the keyword to the evaluation value and the intent value, and matches the evaluation value, the intent value and the inverted index Map<intent, list<intent value, evaluation value>> of the intent to get the intents List<intent> that meet the condition. Figure 1 , the intents Figure 2 , the intents Figure 3 >.

[0115] S4.2 The user inputs the keyword 2, the server matches the keyword to the evaluation value and the intent value, and matches the evaluation value, the intent value and the inverted index Map<intent, list<intent value, evaluation value>> of the intent to get the intents List<intent> that meet the condition. Figure 4 , the intents Figure 5 , the intents Figure 6 >.

[0116] S4.3 judge whether the two intents can be combined according to whether the tables in the sql corresponding to the rule associated with the intent matched for the first time are consistent with the tables in the sql corresponding to the rule associated with the intent matched for the second time. For example, the combination of intents Figure 1 , the combination of intents Figure 4 , and the combination of intents Figure 1 , intents Figure 6 .

[0117] S4.4 obtain a combined sql according to the query conditions of the sql corresponding to the intent Figure 1 and the query conditions of the sql corresponding to the intent Figure 4 .

[0118] S4.5 execute the sql to obtain data item 1.

[0119] The steps of the one-key matching mode in this embodiment are as follows:

[0120] S5.1 the user inputs keyword 1 and keyword 2;

[0121] S5.2 judge whether the fifth keyword exists in the index type data;

[0122] S5.3 when the keyword 1 and the keyword 2 exist in the index type data, perform joint matching mode on the fifth keyword to obtain data item 1.

[0123] S5.4. when the keyword 1 and the keyword 2 do not exist in the index type data, perform inverted index on the fifth keyword and the data item, directly configure the inverted index Map<ID, list<intent value, evaluation value>> of the intent value and the data item ID to the data and return to obtain data item 2.< / id>

Claims

1. A method for searching ecological and environmental information based on heterogeneous data fusion, characterized in that, Includes the following steps: S1 Acquire ecological environment-related data and divide the ecological environment-related data into different data items. Based on the data items, obtain the intention, the intention value corresponding to the intention, and the evaluation value of the intention value. And obtain the rules through the intention, the intention value, and the evaluation value. In step S1, the formulation of the rule includes the following steps: S1.1 Data Acquisition: Acquire ecological and environmental related data and aggregate it into the database; S1.2 Knowledge extraction: Analyze the data in step S1.1, and divide the ecological environment-related data into different data items to classify the ecological environment-related data; S1.3 Knowledge analysis, analyzing the data items in step S1.2 to obtain the fields in the data items that can be used for querying, and the fields are divided into enumerable values ​​and indicator types; S1.4 Knowledge redefinition: Convert the enumerable values ​​and field data of the indicator type mentioned in step S1.3 into intents, and obtain intent values ​​and their evaluation values ​​based on the intents; The design of S1.5 rules involves using SQL statements and the relationship between the intent, the intent value, and the evaluation value to design search rules to obtain the corresponding data items. S1.6 Update the data by reversing the SQL statement of the rule and updating the intent value and the evaluation value to the search engine database; The data item includes a main entity, related entities, and attributes. The main entity is the main table of the data item, which includes fields describing the basic information of the data item. The related entities are the related tables of the data item, which include fields describing various aspects of the data item. The attributes include attributes of the main entity and attributes of the related entities, and the attributes are fields of the corresponding tables. The intent is a common name for a field in the table, and the intent is used as a condition selected by the user during a query; the intent value is the value of the field, and the intent value is the value matched after the user enters a keyword; the evaluation value is an extended value of the intent value, and the evaluation value is used for a common extension of the intent value. The rule is a combination of data consisting of data item ID, data item fields, intent, and SQL statement. The SQL statement includes the SQL table, SQL query conditions, and query SQL. The query SQL saves the field values ​​and the evaluation value to the search engine database for use in the rule matching search. When the rule is matched, the corresponding data item can be obtained through the SQL table and SQL query conditions. S2 Search Mode Selection, the search modes include layered matching mode, combined matching mode and one-click matching mode; S3 In the layered matching mode, keywords are entered sequentially and the result of the previous match is used as the condition for the next match according to the rules to obtain the data items to be searched; S4 In the combined matching mode, keywords are entered sequentially and combined with the previously entered keywords according to the rules to obtain the data items to be searched; In the one-click matching mode, S5 allows users to input multiple keywords simultaneously and query all rules that match the keywords according to the rules to obtain the data items to be searched.

2. The method for searching ecological environment information based on heterogeneous data fusion according to claim 1, characterized in that: In step S3, the layer-by-layer matching mode includes the following steps: S3.1 Input a first keyword, and obtain a first intent, a first intent value and a first evaluation value by performing word segmentation and matching on the first keyword; obtain multiple first matched intents by matching the first intent value, the first evaluation value and the inverted index of the first intent. S3.2 The user selects any of the first matching intents, matches the first matching intents with the inverted index of the rules to obtain the first rule and the first SQL statement, and executes the first SQL statement on the first intent value and the first evaluation value to obtain the first data item; S3.3 When the first data item is not the desired content, the user inputs a second keyword, and by performing word segmentation and matching on the second keyword, a second intent, a second intent value and a second evaluation value are obtained. Multiple second matching intents are obtained by matching the second intent value, the second evaluation value and the inverted index of the second intent. S3.4 Based on the first SQL statement corresponding to the first rule and the SQL statement corresponding to the rule associated with the second matching intent, obtain a combined second matching intent that can be combined with the first intent value; S3.5 Combine the first SQL statement corresponding to the first matching intention with the second SQL statement corresponding to the combined second matching intention to obtain a combined SQL statement; S3.6 Execute a combined SQL statement based on the intent values ​​and evaluation values ​​of the first matching intent and the second matching intent to obtain the second data item; S3.7 Using the previous step as the matching condition, repeat steps S3.3-S3.6 until the desired data item is obtained.

3. The method for searching ecological environment information based on heterogeneous data fusion according to claim 2, characterized in that: In step S3.4, the first matching intent and the second matching intent are determined to be able to be combined based on whether the table of the SQL statement corresponding to the first rule is consistent with the table of the SQL statement corresponding to the rule associated with the second matching intent.

4. The method for searching ecological environment information based on heterogeneous data fusion according to claim 2, characterized in that: In step S3.5, a combined SQL statement is obtained based on the query conditions of the SQL in the first SQL statement corresponding to the first matching intention and the query conditions of the SQL in the second SQL statement corresponding to the combined second matching intention.

5. The method for searching ecological environment information based on heterogeneous data fusion according to claim 1, characterized in that: In step S4, the joint matching pattern includes the following steps: S4.1 Input a third keyword, and obtain a third intent, a third intent value and a third evaluation value by performing word segmentation and matching on the third keyword. Obtain multiple third matching intents by matching the third intent value, the third evaluation value and the inverted index of the third intent. S4.2 Input the fourth keyword, and obtain the fourth intent, the fourth intent value and the fourth evaluation value by performing word segmentation and matching on the fourth keyword. Obtain multiple fourth matching intents by matching the fourth intent value, the fourth evaluation value and the inverted index of the fourth intent. S4.3 Determine whether the third pairing intent and the fourth pairing intent can be combined in pairs based on whether the table of the SQL corresponding to the rule in the third pairing intent is consistent with the table of the SQL corresponding to the rule in the fourth pairing intent. S4.4 Obtain the third and fourth matching intentions that can be combined to obtain a combined intention, and obtain a combined SQL statement according to the query conditions of the SQL corresponding to the third matching intention and the SQL query conditions corresponding to the fourth matching intention. S4.5 Execute a combined SQL statement based on the intent values ​​and evaluation values ​​of the third and fourth matching intents to obtain the third data item; S4.6 When the third data item is not the desired data item, combine the matching intention of the next keyword with the combination intention, and repeat steps S4.2-S4.5 to obtain the desired data item.

6. The method for searching ecological environment information based on heterogeneous data fusion according to claim 1, characterized in that: In step S5, the one-click matching includes the following steps: S5.1 Input multiple different fifth keywords simultaneously; S5.2 Determine whether the fifth keyword contains index-type data; S5.3 When the fifth keyword contains index-type data, perform the joint matching pattern on the fifth keyword to obtain the required data items; S5.

4. When the fifth key does not contain index-type data, the fifth key and the data item are inverted to obtain a combination of data items that satisfy the inverted index of the fifth key.

Citation Information

Patent Citations

  • Method for automatically generating sql statements from human natural languages for querying data

    CN111324631A

  • Natural language processing method and device, equipment and storage medium

    CN114186026A