A plant name search method, system and storage medium based on dictionary tree
Through the search method based on dictionary tree, the problem of not being able to search for plant names in multiple languages at the same time in the prior art is solved, and the rapid and accurate retrieval of plant names and efficiency improvements are achieved.
Patent Information
- Application Number
- CN202411244491.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2044-09-06
AI Technical Summary
Existing plant name search tools cannot search plant names in multiple languages at the same time, and the search efficiency is low due to the huge data.
The search method based on dictionary tree is adopted, by creating indexes of Chinese and Latin names, matching the dictionary tree index by character to achieve simultaneous search in multiple languages and improving search efficiency.
It realizes fast and accurate search of plant names in multiple languages, improves search efficiency, and is compatible with the search of Latin and Chinese names at the same time.
Smart Images

Figure CN118760739B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of plant name search, and in particular to a plant name search method, system and storage medium based on a dictionary tree. Background Art
[0002] When reading literature or journals, people will inevitably encounter unfamiliar plant types. In order to learn more about the plant, they need to use plant name search tools to search for it. There are many languages used to represent plant names, such as Chinese, English and Latin, and the word segmentation rules for each language are different. Therefore, existing plant name search tools can only search in a single language and cannot search in multiple languages at the same time.
[0003] In addition to the above-mentioned search language limitations, existing plant name search tools usually use each element in the plant name dataset to retrieve all the content in the target text. Since the plant name dataset is relatively large, each search takes a lot of time. Therefore, existing plant name search tools can neither realize simultaneous search in multiple languages, nor have relatively low search efficiency. Summary of the invention
[0004] The purpose of the embodiments of the present invention is to provide a plant name search method, system and storage medium based on a dictionary tree, which improves the search efficiency of plant names on the basis of realizing simultaneous search in multiple languages.
[0005] To achieve the above objectives, the embodiments of the present invention provide the following solutions.
[0006] A plant name search method based on a dictionary tree includes: obtaining a target text containing a plant name; the target text includes multiple characters; the multiple characters include Chinese characters and non-Chinese characters; the non-Chinese characters include at least Latin characters and processing characters; the processing characters include at least space, carriage return and line feed.
[0007] Create a first variable, a second variable, a plant name index, a first dictionary tree index and a second dictionary tree index; the first variable is used to record the current word composed of multiple non-Chinese characters; the second variable is used to record the current Latin name composed of multiple words, or, a Chinese name composed of multiple Chinese characters; the plant name index is an index that stores basic information of different plants; the basic information includes at least: plant name, name level, name status and accepted name; the first dictionary tree index is an index that stores Chinese names of different plants; the second dictionary tree index is an index that stores Latin names of different plants.
[0008] Based on the target text, a current character, a current first variable and a current second variable are read.
[0009] When the current second variable is not empty, and the current character and the current second variable belong to different character types, determine whether the current second variable is a Chinese name; if so, first execute the plant Chinese name retrieval process based on the current second variable to determine the retrieval result, and then execute the end character judgment process; if not, first execute the plant Latin name retrieval process based on the current second variable to determine the retrieval result, and then execute the end character judgment process; the plant Chinese name retrieval process is a process for retrieving plant names using the first dictionary tree index and the plant name index; the Latin name retrieval process is a process for retrieving plant names using the second dictionary tree index and the plant name index.
[0010] When the current second variable is empty, or the current character and the current second variable belong to the same character type, determine whether the current character is a Chinese character; if so, update the second variable based on the current second variable and the current character, and execute the plant Chinese name retrieval process based on the updated second variable to determine the retrieval result, and then execute the end character judgment process; if not, determine whether the current character is a processing character; when the current character is a processing character, update the second variable based on the current second variable and the current first variable, and execute the plant Latin name retrieval process based on the updated second variable to determine the retrieval result, and then execute the end character judgment process; when the current character is not a processing character, update the first variable based on the current first variable and the current character and read the next character of the current character.
[0011] Among them, the end character judgment process specifically includes: judging whether the current character is the end character of the target text; if so, outputting the search result; if not, reading the next character of the current character until all characters in the target text are traversed; the search result includes at least: the Chinese name of the plant, the Latin name of the plant, the name level, the name status and the accepted name.
[0012] Optionally, after updating the second variable based on the current second variable and the current first variable, it also includes: determining whether the updated second variable complies with the Latin name rules; if so, executing the plant Latin name retrieval process according to the updated second variable to determine the retrieval result; if not, initializing the current first variable and the updated second variable, and then executing the terminator judgment process; the Latin name rules at least include starting with an uppercase letter.
[0013] Optionally, the process of creating the plant name index, the first dictionary tree index and the second dictionary tree index specifically includes: obtaining a plant information data set; the plant information data set includes: a first data set, a second data set and a third data set; the first data set includes Chinese names of different plants; the second data set includes Latin names of different plants; the third data set includes basic information of different plants; the Chinese names of different plants in the first data set are split by characters, and the split items are stored in a dictionary tree with the same prefix to obtain a first dictionary tree index; the Latin names of different plants in the second data set are split by spaces, and the split items are stored in another dictionary tree with the same prefix to obtain a second dictionary tree index; the third data set is stored in a Solr search engine to obtain a plant name index.
[0014] Optionally, the tree-based plant name search method further includes: creating a third variable; the third variable is used to record the plant name that has been matched currently.
[0015] Optionally, there are multiple nodes on the first dictionary tree index; the nodes include root nodes and child nodes; the plant Chinese name retrieval process specifically includes: splitting the second variable by characters, and determining whether each item after the split matches the node on the first dictionary tree index; if not, initializing the first variable and the second variable, and then executing the precise retrieval process; the precise retrieval process is a process for determining the retrieval result using the plant name index; if so, determining whether there is a child node at the node that matches the last item after the split; when there is a child node, determining whether the node that matches the last item after the split is marked with a plant name confirmation label; if so, assigning the second variable to the third variable and initializing the first variable, and then executing the terminator judgment process; if not, directly executing the terminator judgment process; the plant name confirmation label is a label that marks the current node as a plant name; when there is no child node, first assigning the second variable to the third variable and then initializing the first variable and the second variable, and then executing the precise retrieval process.
[0016] Optionally, there are multiple nodes on the second dictionary tree index; the nodes include root nodes and child nodes; the plant Latin name retrieval process specifically includes: splitting the second variable by space, and determining whether each item after the split matches the node on the second dictionary tree index; if not, initializing the first variable and the second variable, and then executing the precise retrieval process; the precise retrieval process is a process for determining the retrieval result using the plant name index; if so, determining whether there is a child node at the node that matches the last item after the split; when there is a child node, determining whether the node that matches the last item after the split is marked with a plant name confirmation label; if so, assigning the second variable to the third variable and initializing the first variable, and then executing the terminator judgment process; if not, directly executing the terminator judgment process; the plant name confirmation label is a label that marks the current node as a plant name; when there is no child node, first assigning the second variable to the third variable and then initializing the first variable and the second variable, and then executing the precise retrieval process.
[0017] Optionally, the precise search process specifically includes: determining whether the third variable is empty; if so, directly executing the terminator determination process; if not, first using the plant name index to retrieve the third variable to obtain a search result, and then executing the terminator determination process.
[0018] A computer system comprises: a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the plant name search method based on the dictionary tree.
[0019] A computer-readable storage medium stores a computer program, which implements the plant name search method based on the dictionary tree when executed by a processor.
[0020] According to the specific embodiment provided by the embodiment of the present invention, the present invention discloses the following technical effects: the present invention changes the search method of the traditional plant name search tool, and classifies, judges and compares each character in the target text by matching each character with the dictionary tree index, thereby improving the efficiency of traversing and retrieving the target text. In addition, in order to be compatible with the search of the Latin name and the Chinese name of the plant at the same time, the present invention creates a first dictionary tree index based on the Chinese name of different plants, creates a second dictionary tree index based on the Latin name of different plants, and matches the classified characters with the corresponding dictionary tree index, which can not only realize the simultaneous search of multiple languages, but also improve the search efficiency of plant names. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0022] Figure 1 A first flow chart of a plant name search method based on a dictionary tree provided in an embodiment of the present invention.
[0023] Figure 2 A schematic diagram of a first dictionary tree index provided in an embodiment of the present invention.
[0024] Figure 3 A schematic diagram of a second dictionary tree index provided in an embodiment of the present invention.
[0025] Figure 4 A schematic diagram of a plant name index provided by an embodiment of the present invention.
[0026] Figure 5 A second flow chart of a plant name search method based on a dictionary tree provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0027] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions 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 are within the scope of protection of the present invention.
[0028] The purpose of the present invention is to provide a plant name search method, system and storage medium based on a dictionary tree, which improves the search efficiency of plant names on the basis of realizing simultaneous search in multiple languages.
[0029] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0030] Example 1.
[0031] like Figure 1 As shown, this embodiment provides a plant name search method based on a dictionary tree, which is specifically as follows.
[0032] Step 101: Obtain a target text containing a plant name; the target text includes multiple characters; the multiple characters include Chinese characters and non-Chinese characters; the non-Chinese characters include at least Latin characters and processing characters; the processing characters include at least space, carriage return and line feed.
[0033] Among them, the content of the target text may include information such as the Chinese name of the plant, the Latin name of the plant and the habits of the plant, for example, "Camptothecin is an important class of monoterpene indole alkaloids, mainly found in plants such as Camptotheca acuminata, Nothapodytes tomentosa and Ophiorrhizapumila. Camptothecin can selectively bind to DNA topoisomerase l and inhibit its activity, thereby exerting anti-tumor activity. However, the acquisition and derivatization of camptothecin face great challenges. Domestic and foreign scholars have conducted a lot of research on the chemical semi-synthesis and total synthesis of camptothecin analogs, and have accumulated rich structure-activity relationship data of camptothecin derivatives."
[0034] Step 102: Create a first variable, a second variable, a plant name index, a first dictionary tree index, and a second dictionary tree index; the first variable is used to record the current word composed of multiple non-Chinese characters; the second variable is used to record the current Latin name composed of multiple words, or, the Chinese name composed of multiple Chinese characters; the plant name index is an index for storing basic information of different plants; the basic information at least includes: plant name, name level, name status and accepted name; the first dictionary tree index is an index for storing Chinese names of different plants; the second dictionary tree index is an index for storing Latin names of different plants. In addition, the method also needs to create a third variable; the third variable is used to record the plant name that has been matched.
[0035] As a preferred implementation, the process of creating the plant name index, the first dictionary tree index and the second dictionary tree index is as follows.
[0036] The first step is to obtain a plant information data set; the plant information data set includes: a first data set, a second data set and a third data set; the first data set includes the Chinese names of different plants; the second data set includes the Latin names of different plants; the third data set includes basic information of different plants.
[0037] Among them, the plant information dataset is a dataset that covers most of the plant name information in the world. By removing duplicates from the Latin names of the plants in this dataset, a dataset D1 with only Latin names of plants can be obtained. The dataset D1 includes but is not limited to the following fields: plant name, name level, name status, accepted name, publication, publication time and other information. Because the content of the "plant name" field of dataset D1 is the Latin name of the plant, it is necessary to supplement the Chinese name of the plant. For the Chinese name of the plant, mainly based on the correspondence between the Latin name and the Chinese name of the plant in the "List of Chinese Biological Species", the deduplicated Chinese name and its name level, name status, accepted name, publication, publication time and other information are supplemented to the dataset D1 to form a dataset D2, thereby integrating all the relevant information of the Latin name and Chinese name of the plant.
[0038] In the second step, the Chinese names of different plants in the first data set are split by characters, and the split items are stored in a dictionary tree with the same prefix to obtain a first dictionary tree index; the first dictionary tree index has multiple nodes; the nodes include root nodes and child nodes. Figure 2 As shown, the Chinese names of different plants may be stored in the first dictionary tree index as follows: spruce, Yunnan pine, Yunnan azalea, Yunnan elaeocarpus, garlic, allium tianshanense, and lily of the tianshan Mountains.
[0039] The third step is to split the Latin names of different plants in the second data set by spaces, and store the split items in another dictionary tree with the same prefix to obtain the second dictionary tree index; the second dictionary tree index has multiple nodes; the nodes include root nodes and child nodes. Figure 3 As shown, the Latin names of different plants may be stored in the second dictionary tree index as follows: Vanda, Vanda lowii, Vanda tricolor, Vanda tricolor var.flava, Lilium, Lilium henrici, Lilium henrici var. henrici, Lilium henrici var. Maculatum.
[0040] Step 4: Store the third dataset in the Solr search engine to obtain the plant name index (for details, see Figure 4 ).
[0041] Step 103: Based on the target text, read the current character, the current first variable and the current second variable.
[0042] Step 104: When the current second variable is not empty, and the current character and the current second variable belong to different character types, determine whether the current second variable is a Chinese name; if so, first execute the plant Chinese name retrieval process based on the current second variable to determine the retrieval result, and then execute the end character judgment process; if not, first execute the plant Latin name retrieval process based on the current second variable to determine the retrieval result, and then execute the end character judgment process; the plant Chinese name retrieval process is a process for retrieving plant names using the first dictionary tree index and the plant name index; the Latin name retrieval process is a process for retrieving plant names using the second dictionary tree index and the plant name index.
[0043] Furthermore, the Chinese plant name retrieval process specifically includes: splitting the second variable by characters, and determining whether each item after the split matches the node on the first dictionary tree index; if not, initializing the first variable and the second variable, and then executing the precise retrieval process; the precise retrieval process is a process for determining the retrieval result using the plant name index; if so, determining whether there is a child node at the node that matches the last item after the split; when there is a child node, determining whether the node that matches the last item after the split is marked with a plant name confirmation label; if so, assigning the second variable to the third variable and initializing the first variable, and then executing the end character judgment process; if not, directly executing the end character judgment process; the plant name confirmation label is a label that marks the current node as a plant name; when there is no child node, first assigning the second variable to the third variable and then initializing the first variable and the second variable, and then executing the precise retrieval process.
[0044] Furthermore, the plant Latin name retrieval process specifically includes: splitting the second variable by spaces, and determining whether each item after the split matches the node on the second dictionary tree index; if not, initializing the first variable and the second variable, and executing the precise retrieval process; if so, determining whether there is a child node at the node that matches the last item after the split; when there is a child node, determining whether the node that matches the last item after the split is marked with a plant name confirmation tag; if so, assigning the second variable to the third variable and initializing the first variable, and then executing the terminator judgment process; if not, directly executing the terminator judgment process; when there is no child node, first assigning the second variable to the third variable and then initializing the first variable and the second variable, and then executing the precise retrieval process.
[0045] Furthermore, the precise search process specifically includes: determining whether the third variable is empty; if so, directly executing the terminator determination process; if not, first using the plant name index to search the third variable to obtain the search result, and then executing the terminator determination process.
[0046] Furthermore, the end character judgment process specifically includes: judging whether the current character is the end character of the target text; if so, outputting the search result (the final output search result is the same as Figure 4 ); if not, read the next character of the current character until all characters in the target text are traversed; the search results include at least: Chinese name of the plant, Latin name of the plant, name level, name status and accepted name.
[0047] Step 105: When the current second variable is empty, or the current character and the current second variable belong to the same character type, determine whether the current character is a Chinese character; if so, update the second variable based on the current second variable and the current character (updated second variable = current second variable + current character), and execute the plant Chinese name search process based on the updated second variable to determine the search result, and then execute the end character judgment process; if not, determine whether the current character is a processing character; when the current character is a processing character, update the second variable based on the current second variable and the current first variable (updated second variable = current second variable + space + current first variable), and execute the plant Latin name search process according to the updated second variable to determine the search result, and then execute the end character judgment process; when the current character is not a processing character, update the first variable based on the current first variable and the current character (updated first variable = current first variable + current character) and read the next character of the current character.
[0048] Furthermore, after updating the second variable based on the current second variable and the current first variable, it also includes: determining whether the updated second variable complies with the Latin name rules (starting with "×" or with a capital letter); if so, executing the plant Latin name search process according to the updated second variable to determine the search result; if not, initializing the current first variable and the updated second variable, and then executing the end character judgment process.
[0049] Therefore, the above-mentioned plant name search method based on the dictionary tree can quickly and accurately search the Latin name and Chinese name of the plant from the target text, and output all the searched Latin name and Chinese name of the plant, as well as their corresponding name level, name status, accepted name, publication, publication time and other information.
[0050] Example 2.
[0051] like Figure 5 As shown, this embodiment provides a practical application scenario of a plant name search method based on a dictionary tree, which is as follows.
[0052] Step S1: After creating and initializing three variables, word, words, and target, execute step S2; wherein word is used to record the current word composed of non-Chinese characters, words is used to record the current name composed of n words or n Chinese characters (n>=1), and target is used to record the current matched plant name.
[0053] Step S2: When traversing the target text character by character, a character c is read from the target text and step S3 is executed.
[0054] Step S3: Determine whether "the current words is not empty, and c and words are of different categories (that is, one of words and c is Chinese and the other is non-Chinese)" is satisfied; if so, execute step S4; if not, execute step S5.
[0055] Step S4: Determine whether words is Chinese; if so, execute step S7; if not, execute step S13.
[0056] Step S5: Determine whether the character c is Chinese; if so, execute step S6; if not, execute step S9.
[0057] Step S6: After concatenating the current words with the character c to obtain new words, execute step S7.
[0058] Step S7: Compare words with the first dictionary tree index T1; if there is no match, execute step S8; if there is a match, execute step S14.
[0059] Step S8: After initializing words and word, execute step S19.
[0060] Step S9: Determine whether character c is a processing character (space, carriage return, line feed, tab, page feed, null character, end character, etc.); if not, execute step S10; if so, execute step S11.
[0061] Step S10: After concatenating the current word and character c into a new word, execute step S2.
[0062] Step S11: After concatenating the current words with word to obtain new words (the words are non-Chinese and may be Latin names), execute step S12.
[0063] Step S12: Determine whether words conforms to the rules of Latin names (i.e., starts with "×" or with a capital letter); if so, execute step S13; if not, execute step S18.
[0064] Step S13: compare words with the second dictionary tree index T2; if there is no match, execute step S8; if there is a match, execute step S14.
[0065] Step S14: Determine whether the node matching the tail of words has a child node; if not, execute step S15; if so, execute step S16.
[0066] Step S15: After assigning words to target, initialize words and word, and execute step S19.
[0067] Step S16: Determine whether the tag at the node matched at the end of words is a plant name; if so, execute step S17; if not, execute step S21.
[0068] Step S17: Assign words to target and initialize word, and execute step S21.
[0069] Step S18: Initialize words, word, and execute step S21.
[0070] Step S19: Determine whether target is empty; if not, execute step S20; if so, execute step S21.
[0071] Step S20: accurately search for target in the plant name index T3, and temporarily store the search result in Result, and then execute step S21.
[0072] Step S21: Determine whether character c is the terminator of the target text; if not, execute step S22; if so, execute step S23.
[0073] Step S22: Read the next character from the target text and execute step S2.
[0074] Step S23: After the target text is traversed, the Result is output and the search ends.
[0075] Example 3.
[0076] An embodiment of the present invention provides a computer system, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-mentioned plant name search method based on the dictionary tree.
[0077] Example 4.
[0078] An embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the plant name search method based on the dictionary tree is implemented.
[0079] In summary, the present invention also has the following advantages.
[0080] 1) Compared with some plant list datasets that only use a certain country or an international one, the present invention integrates the world's mainstream plant list datasets, covering the name data of most plants, and can search for corresponding plant names from the target text to the greatest extent.
[0081] 2) Traditional plant name search tools are generally developed and designed through word segmentation mode, but the word segmentation rules of Chinese and foreign languages are inconsistent, which also makes the search tools incompatible with the search of Latin names and Chinese names at the same time. The present invention traverses each character one by one and classifies, judges and compares the characters, so that it can be compatible with the search of Latin names and Chinese names at the same time.
[0082] 3) The present invention stores the Latin names and Chinese names of different plants in a dictionary tree data structure, which effectively improves the search efficiency of plant names. In particular, the Latin names of plant species are named in the form of "genus name + specific epithet", which is highly consistent with the storage structure of the dictionary tree.
[0083] 4) Traditional plant name search tools can generally only search for plant names in the target text without associating other information. However, the plant name index created by the present invention based on the Solr search engine can output the plant name and other related information together, so that users can carry out the next step of statistics and analysis.
[0084] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0085] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of the present invention. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A plant name search method based on a dictionary tree, characterized in that: include: Acquire a target text containing a plant name; the target text includes a plurality of characters; The multiple characters include Chinese characters and non-Chinese characters; the non-Chinese characters include at least Latin characters and processing characters; the processing characters include at least space, carriage return and line feed; Create a first variable, a second variable, a plant name index, a first dictionary tree index, and a second dictionary tree index; the first variable is used to record the current word composed of multiple non-Chinese characters; the second variable is used to record the current Latin name composed of multiple words, or the Chinese name composed of multiple Chinese characters; The plant name index is an index storing basic information of different plants; the basic information includes at least: plant name, name level, name status and accepted name; the first dictionary tree index is an index storing Chinese names of different plants; the second dictionary tree index is an index storing Latin names of different plants; Based on the target text, read the current character, the current first variable and the current second variable; When the current second variable is not empty, and the current character and the current second variable belong to different character types, determine whether the current second variable is a Chinese name; if so, first execute the plant Chinese name search process based on the current second variable to determine the search result, and then execute the end character judgment process; if not, first execute the plant Latin name search process based on the current second variable to determine the search result, and then execute the end character judgment process; the plant Chinese name search process is a process for searching the plant name using the first dictionary tree index and the plant name index; the Latin name search process is a process for searching the plant name using the second dictionary tree index and the plant name index; When the current second variable is empty, or the current character and the current second variable belong to the same character type, determine whether the current character is a Chinese character; if so, update the second variable based on the current second variable and the current character, and execute the plant Chinese name search process based on the updated second variable to determine the search result, and then execute the end character judgment process; if not, determine whether the current character is a processing character; when the current character is a processing character, update the second variable based on the current second variable and the current first variable, and execute the plant Latin name search process based on the updated second variable to determine the search result, and then execute the end character judgment process; when the current character is not a processing character, update the first variable based on the current first variable and the current character and read the next character of the current character; The end character determination process specifically includes: Determine whether the current character is the end character of the target text; if so, output the search result; if not, read the next character of the current character until all characters in the target text are traversed; the search result includes at least: the Chinese name of the plant, the Latin name of the plant, the name level, the name status and the accepted name.
2. The plant name search method based on dictionary tree according to claim 1 is characterized in that: After updating the second variable based on the current second variable and the current first variable, further comprising: Determine whether the updated second variable complies with the Latin name rules; if so, execute the plant Latin name search process according to the updated second variable to determine the search result; if not, initialize the current first variable and the updated second variable, and then execute the terminator judgment process; the Latin name rules at least include starting with an uppercase letter.
3. The plant name search method based on dictionary tree according to claim 1 is characterized in that: The process of creating the plant name index, the first dictionary tree index and the second dictionary tree index specifically includes: Acquire a plant information data set; the plant information data set includes: a first data set, a second data set and a third data set; the first data set includes Chinese names of different plants; the second data set includes Latin names of different plants; the third data set includes basic information of different plants; Splitting the Chinese names of different plants in the first data set by characters, and storing the split items in a dictionary tree in a manner of the same prefix to obtain a first dictionary tree index; Splitting the Latin names of different plants in the second data set by spaces, and storing the split items in another dictionary tree in the same prefix manner to obtain a second dictionary tree index; The third data set is stored in the Solr search engine to obtain a plant name index.
4. The plant name search method based on dictionary tree according to claim 1 is characterized in that: The method further comprises: Create a third variable; the third variable is used to record the name of the plant that has been matched currently.
5. The plant name search method based on dictionary tree according to claim 4 is characterized in that: The first dictionary tree index has multiple nodes; the nodes include a root node and a child node; the plant Chinese name search process specifically includes: Split the second variable by characters, and determine whether each item after the split matches a node on the first dictionary tree index; If not, after initializing the first variable and the second variable, an accurate search process is executed; the accurate search process is a process of determining the search result by using the plant name index; If so, determine whether there is a child node at the node that matches the last item after the split; When there is a child node, determine whether the node matching the last item after the split is marked with a plant name confirmation label; if so, assign the second variable to the third variable and initialize the first variable, and then execute the terminator judgment process; if not, directly execute the terminator judgment process; the plant name confirmation label is a label marking the current node as a plant name; When there is no child node, the second variable is first assigned to the third variable, and then the first variable and the second variable are initialized, and then the precise search process is executed.
6. The plant name search method based on dictionary tree according to claim 4 is characterized in that: The second dictionary tree index has multiple nodes; the nodes include a root node and a child node; the plant Latin name retrieval process specifically includes: Split the second variable by spaces, and determine whether each item after the split matches a node on the second dictionary tree index; If not, after initializing the first variable and the second variable, an accurate search process is executed; the accurate search process is a process of determining the search result by using the plant name index; If so, determine whether there is a child node at the node that matches the last item after the split; When there is a child node, determine whether the node matching the last item after the split is marked with a plant name confirmation label; if so, assign the second variable to the third variable and initialize the first variable, and then execute the terminator judgment process; if not, directly execute the terminator judgment process; the plant name confirmation label is a label marking the current node as a plant name; When there is no child node, the second variable is first assigned to the third variable, and then the first variable and the second variable are initialized, and then the precise search process is executed.
7. The plant name search method based on dictionary tree according to claim 5 or 6, characterized in that: The precise search process specifically includes: Determine whether the third variable is empty; if so, directly execute the terminator determination process; if not, first use the plant name index to search the third variable to obtain the search result, and then execute the terminator determination process.
8. A computer system comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the plant name search method based on the dictionary tree as described in any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the plant name search method based on the dictionary tree described in any one of claims 1 to 7 is implemented.
