Tourism entity name matching method, system, device and storage medium

By establishing a tourism entity noun dictionary and combining it with the Chinese RoBERTa model, the problems of false recall and insufficient precision in tourism entity noun matching were solved, achieving more efficient semantic-level matching and improving the accuracy of scenic spot name search.

CN115563965BActive Publication Date: 2025-11-25CTRIP TRAVEL INFORMATION TECH (SHANGHAI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211198498.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-29
Publication Date
2025-11-25
Estimated Expiration
2042-09-29

AI Technical Summary

Technical Problem

Existing technologies suffer from false recall and insufficient accuracy in matching tourism entity names, especially in the scenario of searching for scenic spot names, where traditional text matching methods cannot effectively solve semantic matching problems.

Method used

An entity noun dictionary based on POI information of tourist attractions is built, and combined with a Chinese RoBERTa neural network model, the matching results are optimized through training and preprocessing of data, and the generalization prediction ability of the model is used to supplement the scope not covered by the dictionary.

Benefits of technology

It improves the accuracy and recall rate of matching tourism entity names, effectively solving scenarios not covered by the dictionary and achieving more accurate matching of tourism entity names.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115563965B_ABST
    Figure CN115563965B_ABST
Patent Text Reader

Abstract

The application provides a tourism entity noun matching method, system, device and storage medium, the method comprises the following steps: establishing a tourism entity noun dictionary based on tourism attraction POI information; inputting the tourism entity noun dictionary data into a neural network model for training, and saving the trained tourism entity noun prediction matching model; and inputting an entity noun to be matched into the tourism entity noun dictionary and the tourism entity noun prediction matching model for matching to obtain a matching output. The application can optimize the matching result of the entity dictionary according to the similarity of the matching for the tourism entity noun, and effectively supplement the missing condition of the dictionary matching result by using the generalization prediction ability of the model for the range that cannot be covered by the dictionary.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence, and more specifically, to a method, system, device, and storage medium for matching tourism entity nouns. Background Technology

[0002] Entity nouns generally describe entities with specific meanings in text, such as attraction names, city names, and proper nouns. Entity noun matching is a crucial foundation for applications such as question-answering systems, information extraction, and syntactic analysis. In tourism searches, descriptions of attraction POIs (Points of Interest, referring to point-like data in internet maps) consist of multiple texts such as attraction names and addresses, which are not highly correlated with each other. If a search is performed across the entire text domain, it may result in a large number of false positives. Therefore, a dictionary-style structured search is used, searching only within the text domain related to attraction names, thus recalling only relevant attractions and accurately meeting user needs.

[0003] Solving text-domain problems ultimately boils down to text matching. Text matching is a crucial task in natural language processing, typically taking the form of text similarity and relevance calculations, and plays a core supporting role in application systems such as search engines, intelligent question answering, knowledge retrieval, and information flow recommendation. Generally, the goal of a text matching task is, given a search term and a set of candidate documents, to find the document that best matches the search term or to rank the documents according to their matching degree.

[0004] In search scenarios, relevant items are typically retrieved first using retrieval methods, and then these relevant items are reordered, with keywords playing a crucial role. In the ranking process of search and retrieval, text matching relevance is an important dimension; therefore, determining the semantic matching relationship and matching depth between two texts is a major research question.

[0005] Traditional text matching techniques include algorithms such as VSM, TF-IDF, BM25, and SimHash. TF-IDF and BM25 are term-level text matching; topic models such as LSA and LDA are semantic-level text matching. Text matching tasks can also be viewed as reasoning tasks, that is, determining whether text A and text B constitute a semantic inference or implication relationship. Given a sentence A describing a premise and a sentence B describing a hypothesis, if sentence B is true under the premise described by sentence A, then we say that text A implies B, or that A can infer B; if B is false, then text A and B contradict each other; if it is impossible to determine whether B is true or false based on A, then A and B are independent. If we ignore the third state of independence, it can be transformed into the matching state of text A and text B.

[0006] Matching algorithms based on lexical overlap have significant limitations. For example, the word "apple" can refer to different things in different contexts; it could refer to a fruit or a technology company. For text matching tasks, literal matching alone is insufficient; semantic matching is also necessary. Semantic matching primarily addresses the representation and computation of semantic meaning. Current text matching methods typically focus on matching single content and are closely related to the text domain. In scenarios like searching for tourist attractions, the search terms presented in the text are relatively short, limiting the range of products that can be retrieved.

[0007] Therefore, the present invention provides a method, system, device and storage medium for matching tourism entity nouns. Summary of the Invention

[0008] To address the problems in the prior art, the present invention aims to provide a method, system, device, and storage medium for matching tourism entity nouns, overcoming the difficulties of the prior art. It can optimize the entity dictionary matching results based on the similarity of the matching for tourism entity nouns, and effectively supplement the missing dictionary matching results by utilizing the generalization prediction capability of the model for the scope not covered by the dictionary.

[0009] Embodiments of the present invention provide a method for matching tourism entity names, comprising the following steps:

[0010] Establish a dictionary of tourism entity nouns based on POI information of tourist attractions;

[0011] The tourism entity noun dictionary data is input into a neural network model for training, and the trained tourism entity noun prediction and matching model is saved; and

[0012] A noun to be matched is input into the tourism entity noun dictionary and the tourism entity noun prediction matching model for matching, and the matching output is obtained.

[0013] Preferably, the step of establishing a tourism entity noun dictionary based on tourist attraction POI information includes:

[0014] Acquire tourism entity nouns and tourism entity resource data based on tourism business data resources;

[0015] Calculate the matching similarity between the tourism entity resource data and the tourism entity nouns respectively, and sort the tourism entity resource data according to the matching similarity.

[0016] A threshold for matching similarity is set to segment the tourism entity resource data. Tourism entity resource data with a matching similarity higher than the threshold is considered a successful match, while tourism entity resource data with a matching similarity lower than the threshold is considered a failed match.

[0017] Establish mapping relationships between the tourism entity nouns, the successful matching results, and the failed matching results, and build a tourism entity noun dictionary.

[0018] Preferably, the step of inputting the tourism entity noun dictionary data into a neural network model for training and saving the trained tourism entity noun prediction and matching model includes:

[0019] Based on the tourism entity noun dictionary, the tourism entity nouns, the successful matching results, and the failed matching results are obtained to establish a training dataset and label the dataset with training tags.

[0020] The training dataset is preprocessed with text.

[0021] The preprocessed training dataset and the training label data are input into the Chinese RoBERTa model for training; and

[0022] Save the trained Chinese RoBERTa model to obtain the tourism entity noun prediction and matching model.

[0023] Preferably, the step of inputting a target entity noun into the tourism entity noun dictionary and the tourism entity noun prediction matching model for matching to obtain a matching output includes:

[0024] Input a noun to be matched into the tourism entity noun dictionary for matching, and obtain the first matching result;

[0025] If the first matching result is a successful match, the first matching result is output as the matching result; if the first matching result is a failed match, the entity noun to be matched is input into the tourism entity noun prediction and matching model to obtain a second matching result; and

[0026] If the similarity of the second matching result is higher than the threshold, the second matching result is output as the matching result; if the similarity of the second matching result is lower than the threshold, a failed matching result is output.

[0027] Preferably, the step of calculating the matching similarity between the tourism entity resource data and the tourism entity nouns, and sorting the tourism entity resource data according to the matching similarity, includes:

[0028] The entity names of the tourist attractions are segmented into words, each segment is matched separately, and the matching similarity of each segment is weighted and calculated to finally obtain the matching similarity between the tourist entity resource data and the tourist entity names.

[0029] Preferably, the step of inputting the preprocessed training dataset and the training label data into the Chinese RoBERTa model for training includes:

[0030] The semantic vectors of the tourism entity nouns, the successful matching results, and the failed matching results are obtained based on the Chinese RoBERTa model pre-training.

[0031] Calculate the matching similarity between the semantic vectors of the tourism entity noun, the successful matching result, and the failed matching result;

[0032] The matching results are classified based on the matching similarity; and

[0033] The parameters of the Chinese RoBERTa model are adjusted based on the training label data.

[0034] Preferably, the text preprocessing of the training dataset includes processing the symbols in the text.

[0035] Embodiments of the present invention also provide a tourism entity noun matching system for implementing the above-described tourism entity noun matching method, the tourism entity noun matching system comprising:

[0036] The dictionary building module creates a dictionary of tourist entity nouns based on POI information of tourist attractions;

[0037] The training sample module inputs the tourism entity noun dictionary data into the neural network model for training and saves the trained tourism entity noun prediction and matching model.

[0038] The matching output module takes an entity noun to be matched and inputs it into the tourism entity noun dictionary and the tourism entity noun prediction matching model for matching, and obtains the matching output.

[0039] Embodiments of the present invention also provide a tourism entity noun matching device, comprising:

[0040] processor;

[0041] A memory in which executable instructions of the processor are stored;

[0042] The processor is configured to perform the steps of the above-described basic tourism entity noun matching method by executing the executable instructions.

[0043] Embodiments of the present invention also provide a computer-readable storage medium for storing a program, which, when executed, implements the steps of the above-described tourism entity noun matching method.

[0044] The purpose of this invention is to provide a method, system, device, and storage medium for matching tourism entity nouns. This method can optimize the matching results of entity dictionary based on the similarity of the matching results, and effectively supplement the missing dictionary matching results by utilizing the generalization prediction capability of the model for areas not covered by the dictionary. Attached Figure Description

[0045] Other features, objects, and advantages of the invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings.

[0046] Figure 1 This is a flowchart of the tourism entity noun matching method of the present invention.

[0047] Figure 2 This is a flowchart of step S130 of the tourism entity noun matching method of the present invention.

[0048] Figure 3 This is a dictionary matching diagram of the tourism entity noun matching method of the present invention.

[0049] Figure 4 This is a text matching flowchart of the tourism entity noun matching method of the present invention.

[0050] Figure 5 This is a diagram of the RoBERTa pre-trained model structure of the tourism entity noun matching method of the present invention.

[0051] Figure 6 This is a diagram of the Encoder structure in the Transformer structure of the tourism entity noun matching method of the present invention.

[0052] Figure 7 This is a multi-head attention structure diagram of the tourism entity noun matching method of the present invention.

[0053] Figure 8 This is a diagram of the Scaled Dot-ProductAttention layer structure in the multi-head attention structure of the tourism entity noun matching method of the present invention.

[0054] Figure 9 This is a schematic diagram of the module of the tourism entity noun matching system of the present invention.

[0055] Figure 10 This is a schematic diagram of the tourism entity noun matching device of the present invention.

[0056] Figure 11 This is a schematic diagram of the structure of a computer-readable storage medium according to an embodiment of the present invention. Detailed Implementation

[0057] The following specific examples illustrate the implementation methods of this application. Those skilled in the art can easily understand the other advantages and effects of this application from the content disclosed herein. This application can also be implemented or applied through other different specific embodiments, and various details in this application can be modified or changed according to different viewpoints and application systems without departing from the spirit of this application. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of this application can be combined with each other.

[0058] The embodiments of this application will now be described in detail with reference to the accompanying drawings, so that those skilled in the art can easily implement the application. This application may be embodied in many different forms and is not limited to the embodiments described herein.

[0059] In this application, the terms "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics represented in connection with that embodiment or example, which are included in at least one embodiment or example of this application. Furthermore, the specific features, structures, materials, or characteristics represented may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate different embodiments or examples represented in this application, as well as features of different embodiments or examples.

[0060] Furthermore, the terms "first" and "second" are used for illustrative purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the representation of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0061] For the purpose of clearly describing this application, devices that are not relevant to the description are omitted, and the same or similar components throughout the specification are given the same reference numerals.

[0062] Throughout this specification, when it is said that a device is "connected" to another device, this includes not only "direct connection" but also "indirect connection" by placing other components in between. Furthermore, when it is said that a device "comprises" a certain constituent element, unless otherwise stated otherwise, this does not exclude other constituent elements, but rather implies that other constituent elements may be included.

[0063] When we say that a device is "above" another device, this can mean that it is directly above the other device, or it can mean that other devices are present in between. Conversely, when we say that a device is "directly" "above" another device, there are no other devices present in between.

[0064] Although the terms first, second, etc., are used in some instances herein to refer to various elements, these elements should not be limited by these terms. These terms are used only to distinguish one element from another. For example, first interface and second interface, etc., are used. Furthermore, as used herein, the singular forms “a,” “an,” and “the” are intended to also include the plural forms unless the context indicates otherwise. It should be further understood that the terms “comprising,” “including,” indicate the presence of features, steps, operations, elements, components, items, kinds, and / or groups, but do not exclude the presence, occurrence, or addition of one or more other features, steps, operations, elements, components, items, kinds, and / or groups. The terms “or” and “and / or” as used herein are interpreted as inclusive, or mean any one or any combination thereof. Thus, “A, B, or C” or “A, B, and / or C” means “any one of: A; B; C; A and B; A and C; B and C; A, B, and C.” Exceptions to this definition will only occur if the combination of elements, functions, steps, or operations is inherently mutually exclusive in some way.

[0065] The technical terms used herein are for reference only to specific embodiments and are not intended to limit the scope of this application. The singular form used herein includes the plural form unless the statement explicitly indicates otherwise. The word "comprising" as used in the specification means to specify a particular characteristic, region, integer, step, operation, element, and / or component, and does not exclude the presence or addition of other characteristics, regions, integers, steps, operations, elements, and / or components.

[0066] Although not explicitly defined, all terms, including technical and scientific terms used herein, shall have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. Terms defined in commonly used dictionaries shall be further interpreted as having a meaning consistent with the relevant technical literature and the content of this present application, and shall not be over-interpreted as having an ideal or overly formulaic meaning unless otherwise defined.

[0067] Figure 1 This is a flowchart of the tourism entity noun matching method of the present invention. Figure 2 This is a flowchart of step S130 of the tourism entity noun matching method of the present invention. For example... Figures 1 to 2 As shown, the tourism entity noun matching method of the present invention includes the following steps:

[0068] S110. Establish a dictionary of tourism entity nouns based on POI information of tourist attractions;

[0069] S120. Input the tourism entity noun dictionary data into the neural network model for training, and save the trained tourism entity noun prediction and matching model; and

[0070] S130. Input the entity noun to be matched into the tourism entity noun dictionary and the tourism entity noun prediction matching model for matching, and obtain the matching output.

[0071] In a preferred embodiment, S110 includes:

[0072] S111. Obtain tourism entity nouns and tourism entity resource data based on tourism business data resources;

[0073] S112. Calculate the matching similarity between tourism entity resource data and tourism entity nouns respectively, and sort the tourism entity resource data according to the matching similarity.

[0074] S113. Set a similarity threshold to segment tourism entity resource data. Tourism entity resource data with a similarity higher than the threshold are considered successful matches, while those with a similarity lower than the threshold are considered failed matches.

[0075] S114. Establish mapping relationships between tourism entity nouns, successful matching results, and failed matching results, and establish a tourism entity noun dictionary, but not limited to this.

[0076] In a preferred embodiment, S120 includes:

[0077] S121. Based on the tourism entity noun dictionary, obtain tourism entity nouns, successful matching results and failed matching results, establish a training dataset, and label the training data.

[0078] S122. Perform text preprocessing on the training dataset;

[0079] S123. Input the preprocessed training dataset and training label data into the Chinese RoBERTa model for training; and

[0080] S124. Save the trained Chinese RoBERTa model to obtain the tourism entity noun prediction and matching model, but this is not the only option.

[0081] In a preferred embodiment, S130 includes:

[0082] S131. Input the entity noun to be matched into the tourism entity noun dictionary for matching, and obtain the first matching result;

[0083] S132. If the first matching result is a successful match, output the first matching result as the matching result; if the first matching result is a failed match, input the entity noun to be matched into the tourism entity noun prediction and matching model to obtain the second matching result; and

[0084] S133. If the similarity of the second matching result is higher than the threshold, the second matching result is output as the matching result. If the similarity of the second matching result is lower than the threshold, the failed matching result is output, but this is not the only limitation.

[0085] In a preferred embodiment, S112 includes:

[0086] The entity names of tourist attractions are segmented into words, each segment is matched separately, and the matching similarity of each segment is weighted and calculated to obtain the matching similarity between tourist entity resource data and tourist entity names, but this is not the only limit.

[0087] In a preferred embodiment, S123 includes:

[0088] S1231. Based on the pre-training of the Chinese RoBERTa model, semantic vectors of tourism entity nouns, successful matching results, and failed matching results are obtained respectively.

[0089] S1232. Calculate the matching similarity between the semantic vectors of tourism entity nouns, successful matching results, and failed matching results;

[0090] S1233, Classifying matching results based on matching similarity; and

[0091] S1234. Adjust the parameters of the Chinese RoBERTa model based on the training label data, but this is not a limitation.

[0092] In a preferred embodiment, text preprocessing of the training dataset includes, but is not limited to, processing symbols in the text.

[0093] One specific embodiment of the present invention is as follows:

[0094] First, a tourism entity noun dictionary is established for entity dictionary matching. This involves acquiring a business entity domain-adapted dictionary by mining business data resources, and compiling a dictionary of general terms for administrative divisions and scenic spots. The entity dictionary is added to a custom dictionary in jieba, and jieba segmentation is used to segment the entity nouns to be matched and the resource pool options. The segmentation results are then mapped to the entity dictionary, and cosine similarity is used to calculate the matching similarity of each part. Weights are then added to calculate the final matching similarity. The highest-scoring matching result between the entity nouns to be matched and the resource pool is obtained. A threshold is set based on business experience to determine the dictionary matching status.

[0095] Secondly, a neural network model is trained. Matched attraction entity name pairs are obtained from historical business data; these are considered positive samples. For each matched attraction, attractions from other resource pools are considered negative samples, matched using Cartesian products. Data preprocessing is performed, specifically removing useless symbols from the text. Basic training data and label data are organized in a specific format as input data. This invention employs a supervised pairwise approach for text matching, with the training data input format being [text A, text B, label]. The training network parameters of the RoBERTa pre-trained model are used to extract entity noun text features. A fine-tuned model for natural language inference is then used for classification via a multilayer perceptron consisting of two fully connected layers. The network parameters obtained from the fine-tuned training are saved as the final text matching model for downstream application inference.

[0096] Finally, the noun to be searched is matched and output. The entity noun to be matched is input into a tourism entity noun dictionary for matching, obtaining the raw text data for text matching. First, it is matched using the tourism entity noun dictionary; data that fails to find a match is then input into the prediction model. The data to be predicted is preprocessed, mainly by removing punctuation characters. The preprocessed text data is then input into the trained matching model to obtain the matching results. The results from the entity dictionary and the model predictions are then fused. Specifically, if the entity dictionary can directly achieve a matching state, that matching state is directly output; for the model's predicted matching results, a threshold is set based on prior knowledge; results above the threshold are output as a match, and results below the threshold are output as a mismatch.

[0097] Figure 3 This is a dictionary matching diagram of the tourism entity noun matching method of the present invention. For example... Figure 3 As shown, a tourism entity terminology dictionary is built based on tourist attraction POI information. A business entity domain-adapted dictionary is obtained by mining business data resources, and a dictionary of general terms for administrative divisions and scenic spots is compiled. Different platforms have various non-standard expressions for attraction entity names, which differ from the standard entity names defined by the business. The tourism entity terminology dictionary can be used to establish the correspondence between non-standard expressions and standard entities.

[0098] In the dictionary matching stage, the jieba segmentation method is introduced. When the entity noun to be matched contains entities not covered by the dictionary, the character-based maximum matching algorithm is prone to segmentation errors. For example, "Nanjing Yangtze River Bridge" can be segmented into two results: "Nanjing Mayor / Yangtze River Bridge" and "Nanjing City / Yangtze River Bridge". Therefore, a combination of model segmentation and domain dictionary-based segmentation is used, and dynamic programming is employed to find the optimal solution for the sum of the sequence weights of each segment of the entity word to be matched. "Nanjing City" will be in our entity city dictionary, and the final output based on the entity database is the result "Nanjing City / Yangtze River Bridge" in the tourism domain.

[0099] In dictionary matching, each part after jieba segmentation is matched separately, such as regional terms, core terms, and general terms. The parts are then weighted based on statistical data to obtain the final matching score. For example, when the noun to be matched is "Beijing Palace Museum," it is segmented into three parts: the regional term "Beijing," the core term "Palace Museum," and the general term "Museum." These three segments are then input into a tourism entity noun dictionary for matching, and the results are sorted from highest to lowest. Different weighting ratios are then applied to the regional, core, and general terms, with the core term typically having the highest weight. Finally, the weighted average of the overall matching results is calculated and sorted. When calculating the matching similarity of each part, this invention compares three methods: cosine similarity, minimum edit distance, and longest substring. Ultimately, the cosine similarity calculated using the 0,1 feature vectors after jieba segmentation is used as the matching similarity. The jieba segmentation calculation formula is as follows:

[0100]

[0101] Where X(x1,x2,…,xn) and Y(y1,y2,…,yn) are the text feature vectors of the two parties to be matched after jieba word segmentation.

[0102] Figure 4 This is a text matching flowchart of the tourism entity noun matching method of the present invention. Figure 5 This is a diagram of the RoBERTa pre-trained model structure for the tourism entity noun matching method of this invention. (See diagram for example.) Figures 4 to 5 As shown, the text matching process of the model prediction in this invention is as follows: First, obtain entity names and their corresponding matching result data; second, use manual judgment to determine whether the entity names match the provided corresponding results, and label them as training labels to form a basic training set; third, preprocess the text data; fourth, use the basic training data and label data as input, extract features using the training network parameters of the RoBERTa Chinese pre-trained model, and classify them into two outputs for natural language inference—matching and not matching—using a multilayer perceptron; fifth, save the trained network parameters to obtain the text matching model.

[0103] The overall structure of the invention is as follows: First, the semantic vector representation of each text is obtained by pre-training with RoBERTa. On this basis, the relationship between the two semantic vectors is obtained by concatenating, subtracting, and multiplying the two vectors using the Concat function. Finally, the classification is performed by MLP (Multilayer Perceptron) and then mapped to the matching result by NLI (Natural Language Inference).

[0104] The primary model used in training is the RoBERTa model, an improved version of the BERT model at multiple levels. It utilizes more training data and computational resources, trains with larger batch sizes, and for a longer period. Furthermore, it features numerous improvements in training methods, primarily dynamically changing the masking pattern based on the training data. A new masking pattern is generated each time a sequence is input into the model. Through continuous input of large amounts of data, the model gradually adapts to different masking strategies and learns different language representations. The RoBERTa model has strong text feature representation capabilities; therefore, it is used as the pre-trained model in this invention. Here, E represents the embedding vector, T represents the processed feature vector, and Trm represents the Transformer operation.

[0105] Since the primary application scenario of this invention is Chinese, the Chinese RoBERTa pre-trained model was chosen. It was trained using 30GB of Chinese data, containing 300 million sentences and 10 billion characters, drawn from news articles, community discussions, and multiple encyclopedias, covering hundreds of thousands of topics. The data is diverse and possesses strong semantic representation capabilities. The Chinese RoBERTa pre-trained model employs whole-word masking; if part of a complete word is masked, other parts belonging to the same word are also masked.

[0106] Figure 6 This is a diagram of the Encoder structure in the Transformer structure of the tourism entity noun matching method of the present invention. Figure 7 This is a multi-head attention structure diagram of the tourism entity noun matching method of the present invention. Figure 8 This is a diagram of the Scaled Dot-Product Attention layer structure in the multi-head attention structure of the tourism entity noun matching method of this invention. (See diagram for example.) Figures 6 to 8As shown, the Chinese RoBERTa model requires loading with the BERT model. The model uses the Encoder part of the Transformer structure, building a basic network structure by assembling multiple layers of Encoders. The Encoder in the Transformer structure is composed of multiple stacked encoder_layers, including a multi-head attention structure, Add & Norm layers, and FFN (Feed-Forward Network) layers.

[0107] Multi-head attention architecture is the most important basic structural unit, including a linear layer, a Scaled Dot-Product Attention layer, and a Concat layer. The linear layer performs a linear combination of the input vectors, the Scaled Dot-Product Attention layer handles scaling, and the Concat function concatenates, subtracts, and multiplies two vectors to obtain the relationship between them. In the Scaled Dot-Product Attention layer, Scale is the linear transformation function, Mask is the masking operation, Softmax is the loss function, and MatMul is the matrix multiplication function. The multi-head attention calculation formula is as follows:

[0108]

[0109] The entire self-attention calculation needs to be performed on each token.

[0110] MultiHead(Q,K,V)=Concat(head1,…,head h W O

[0111] where...head i =Attention(QW i Q ,KW i K VW i V )

[0112] Where V represents the input feature vector, K and Q represent the feature vectors used to calculate the Attention weights, which are obtained from the input feature vector, W represents the parameter matrix, and softmax is the normalization function.

[0113] The Add&Norm layer employs a residual structure and performs layer normalization. The residual structure addresses the vanishing gradient problem in neural networks, while the LayerNorm layer adds layer normalization.

[0114] The purpose of the FFN (Feed-Forward Network) layer is to deepen the network structure. An FFN layer consists of two linear operations with a ReLU activation function in between. The calculation formula for an FFN layer is as follows:

[0115] FFN(x) = max(0, xW1+b1)W2+b2

[0116] Where W1 and W2 are parameter matrices, b1 and b2 are offset vectors, x is the input vector, and max is the maximum value function.

[0117] Pre-trained models, obtained through training on large-scale unsupervised corpora, can acquire dynamic character-level semantic embeddings for text, which can then be applied in subsequent tasks. During the fine-tuning phase, the pre-trained language model is used to complete specific downstream Natural Language Processing (NLP) tasks; simply input the segmented sentence pairs to obtain the matching results.

[0118] Figure 9 This is a schematic diagram of the modules of the tourism entity noun matching system of the present invention. For example... Figure 9 As shown, embodiments of the present invention also provide a tourism entity noun matching system for implementing the above-described tourism entity noun matching method. The tourism entity noun matching system includes:

[0119] Module 51, the dictionary building module, builds a dictionary of tourist entity nouns based on POI information of tourist attractions;

[0120] Training sample module 52 inputs tourism entity noun dictionary data into the neural network model for training and saves the trained tourism entity noun prediction and matching model;

[0121] The matching output module 53 takes an entity noun to be matched and inputs it into the tourism entity noun dictionary and the tourism entity noun prediction matching model for matching, and obtains the matching output.

[0122] In a preferred embodiment, the dictionary building module 51 is configured to: acquire tourism entity nouns and tourism entity resource data based on tourism business data resources; calculate the matching similarity between tourism entity resource data and tourism entity nouns respectively; sort the tourism entity resource data according to the matching similarity, that is, perform word segmentation on tourism entity nouns, match each segment separately, and calculate the weighted matching similarity of each segment to finally obtain the matching similarity between tourism entity resource data and tourism entity nouns; set a matching similarity threshold to classify tourism entity resource data, take tourism entity resource data with matching similarity higher than the threshold as successful matching results, and take tourism entity resource data with matching similarity lower than the threshold as failed matching results; and establish a mapping relationship between tourism entity nouns, successful matching results, and failed matching results respectively, and build a tourism entity noun dictionary.

[0123] In a preferred embodiment, the training sample module 52 is configured to obtain tourism entity names, successful matching results, and failed matching results based on a tourism entity name dictionary, establish a training dataset, and label it with training tags; perform text preprocessing on the training dataset; obtain semantic vectors of tourism entity names, successful matching results, and failed matching results respectively based on the pre-training of the Chinese RoBERTa model; calculate the matching similarity between the semantic vectors of tourism entity names, successful matching results, and failed matching results; classify the matching results based on the matching similarity; adjust the parameters of the Chinese RoBERTa model based on the training tag data; and save the trained Chinese RoBERTa model to obtain the tourism entity name prediction and matching model.

[0124] In a preferred embodiment, the matching output module 53 is configured to input an entity noun to be matched into a tourism entity noun dictionary for matching to obtain a first matching result; if the first matching result is a successful matching result, output the first matching result as a matching result; if the first matching result is a failed matching result, input the entity noun to be matched into a tourism entity noun prediction matching model to obtain a second matching result; and if the matching similarity of the second matching result is higher than a threshold, output the second matching result as a matching result; if the similarity of the second matching result is lower than a threshold, output a failed matching result.

[0125] The tourism entity noun matching system of this invention can optimize the entity dictionary matching results based on the similarity of the matching for tourism entity nouns, and effectively supplement the missing dictionary matching results by utilizing the generalization prediction capability of the model for the scope not covered by the dictionary.

[0126] This invention also provides a tourism entity name matching device, including a processor and a memory storing executable instructions for the processor. The processor is configured to execute steps of a tourism entity name matching method via the executable instructions.

[0127] As shown above, the tourism entity noun matching device of this invention uses a deep learning model to optimize the entity dictionary matching results based on the similarity of the matching for tourism entity nouns. Furthermore, for areas not covered by the dictionary, the model's generalization prediction capability is used to effectively supplement the missing dictionary matching results.

[0128] Those skilled in the art will understand that various aspects of the present invention can be implemented as systems, methods, or program products. Therefore, various aspects of the present invention can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software aspects, collectively referred to herein as a "circuit," "module," or "platform."

[0129] Figure 10 This is a schematic diagram of the tourism entity noun matching device of the present invention. See below for reference. Figure 10 To describe an electronic device 600 according to this embodiment of the present invention. Figure 10 The electronic device 600 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.

[0130] like Figure 10 As shown, the electronic device 600 is presented in the form of a general-purpose computing device. The components of the electronic device 600 may include, but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different platform components (including storage unit 620 and processing unit 610), a display unit 640, etc.

[0131] The storage unit stores program code, which can be executed by the processing unit 610 to perform the steps described in the above-described section on the electronic prescription transfer processing method according to various exemplary embodiments of the present invention. For example, the processing unit 610 can perform actions such as... Figure 1 The steps are shown in the figure.

[0132] Storage unit 620 may include a readable medium in the form of a volatile storage unit, such as random access memory (RAM) 6201 and / or cache memory 6202, and may further include a read-only memory (ROM) 6203.

[0133] Storage unit 620 may also include a program / utility 6204 having a set (at least one) program module 6205, such program module 6205 including but not limited to: operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.

[0134] Bus 630 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the multiple bus structures.

[0135] Electronic device 600 can also communicate with one or more external devices 700 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with electronic device 600, and / or with any device that enables electronic device 600 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 650. Furthermore, electronic device 600 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 660. Network adapter 660 can communicate with other modules of electronic device 600 via bus 630. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms.

[0136] This invention also provides a computer-readable storage medium for storing a program, which, when executed, implements the steps of a tourism entity noun matching method. In some possible implementations, various aspects of the invention can also be implemented as a program product comprising program code that, when run on a terminal device, causes the terminal device to perform the steps described in the above-described electronic prescription processing method section of this specification according to various exemplary embodiments of the invention.

[0137] As shown above, when the program of the computer-readable storage medium of this embodiment is executed, it uses a deep learning model to optimize the entity dictionary matching results for tourism entity nouns based on the similarity of the matching, and for the range not covered by the dictionary, it uses the generalization prediction capability of the model to effectively supplement the missing dictionary matching results.

[0138] Figure 11 This is a schematic diagram of the structure of the computer-readable storage medium of the present invention. (Reference) Figure 11As shown, a program product 800 for implementing the above-described method according to an embodiment of the present invention is described. This product may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, the readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0139] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0140] Computer-readable storage media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable storage medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transfer a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0141] Program code for performing the operations of this invention can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0142] In summary, the purpose of this invention is to provide a method, system, device, and storage medium for matching tourism entity nouns. This method optimizes the matching results of entity dictionary based on the similarity of the matching results, and effectively supplements the missing dictionary matching results by utilizing the generalization prediction capability of the model for areas not covered by the dictionary.

[0143] The above description, in conjunction with specific preferred embodiments, provides a further detailed explanation of the present invention. It should not be construed that the specific implementation of the present invention is limited to these descriptions. For those skilled in the art, various simple deductions or substitutions can be made without departing from the concept of the present invention, and all such modifications and substitutions should be considered within the scope of protection of the present invention.

Claims

1. A method for matching tourism entity nouns, characterized in that, Includes the following steps: A dictionary of tourism entity names is established based on tourist attraction POI information. This process includes: acquiring tourism entity names and tourism entity resource data based on tourism business data resources; calculating the matching similarity between the tourism entity resource data and the tourism entity names, and sorting the tourism entity resource data according to the matching similarity; setting a threshold for the matching similarity to classify the tourism entity resource data, taking tourism entity resource data with a matching similarity higher than the threshold as successful matching results, and taking tourism entity resource data with a matching similarity lower than the threshold as failed matching results; and establishing a dictionary of tourism entity names based on tourist attraction POI information. The mapping relationship between tourism entity nouns, successful matching results, and failed matching results is established, and a tourism entity noun dictionary is created. The process of calculating the matching similarity between tourism entity resource data and tourism entity nouns, and sorting the tourism entity resource data according to the matching similarity, includes: segmenting the tourism entity nouns into words, matching each segment separately, and weighting the matching similarity of each segment to obtain the final matching similarity between the tourism entity resource data and the tourism entity nouns; wherein the segmentation includes regional terms, core terms, and general terms, with the matching similarity weight of core terms being higher than that of regional terms and general terms. The data from the tourism entity noun dictionary is input into a neural network model for training, and the trained neural network model is saved as a tourism entity noun prediction and matching model; and A noun to be matched is input into the tourism entity noun dictionary and the tourism entity noun prediction matching model for matching, and the matching output is obtained.

2. The tourism entity noun matching method as described in claim 1, characterized in that, The step of inputting the data from the tourism entity noun dictionary into a neural network model for training, and saving the trained neural network model as a tourism entity noun prediction and matching model, includes: Based on the tourism entity noun dictionary, the tourism entity nouns, the successful matching results, and the failed matching results are obtained to establish a training dataset and label the dataset with training tags. The training dataset is preprocessed with text. The preprocessed training dataset and training labels are input into the Chinese RoBERTa model for training; and Save the trained Chinese RoBERTa model to obtain the tourism entity noun prediction and matching model.

3. The tourism entity noun matching method as described in claim 1, characterized in that, The step of inputting a target entity noun into the tourism entity noun dictionary and the tourism entity noun prediction matching model for matching, and obtaining the matching output, includes: Input a noun to be matched into the tourism entity noun dictionary for matching, and obtain the first matching result; If the first matching result is a successful match, the first matching result is output as the matching result; if the first matching result is a failed match, the entity noun to be matched is input into the tourism entity noun prediction and matching model to obtain a second matching result; and If the similarity of the second matching result is higher than the threshold, the second matching result is output as the matching result; if the similarity of the second matching result is lower than the threshold, a failed matching result is output.

4. The tourism entity noun matching method as described in claim 2, characterized in that, The step of inputting the preprocessed training dataset and the training labels into the Chinese RoBERTa model for training includes: The semantic vectors of the tourism entity nouns, the successful matching results, and the failed matching results are obtained based on the Chinese RoBERTa model pre-training. Calculate the matching similarity between the semantic vectors of the tourism entity noun, the successful matching result, and the failed matching result; The matching results are classified based on the matching similarity; and The parameters of the Chinese RoBERTa model are adjusted based on the training labels.

5. The tourism entity noun matching method as described in claim 2, characterized in that: The text preprocessing of the training dataset includes processing the symbols in the text.

6. A tourism entity noun matching system, used to implement the tourism entity noun matching method of claim 1, characterized in that, include: The dictionary building module creates a dictionary of tourist entity nouns based on POI information of tourist attractions; The step of establishing a tourism entity noun dictionary based on tourist attraction POI information includes: acquiring tourism entity nouns and tourism entity resource data based on tourism business data resources; calculating the matching similarity between the tourism entity resource data and the tourism entity nouns, and sorting the tourism entity resource data according to the matching similarity; setting a threshold for the matching similarity to classify the tourism entity resource data, taking the tourism entity resource data with a matching similarity higher than the threshold as a successful match result, and taking the tourism entity resource data with a matching similarity lower than the threshold as a failed match result; and establishing a dictionary of tourism entity nouns, successful matches, and successful matches. The mapping relationship between the matching results and the failed matching results is established, and the tourism entity noun dictionary is constructed. The step of calculating the matching similarity between the tourism entity resource data and the tourism entity nouns, and sorting the tourism entity resource data according to the matching similarity, includes: performing word segmentation on the tourism entity nouns, matching each word segment separately, and weighting the matching similarity of each word segment to finally obtain the matching similarity between the tourism entity resource data and the tourism entity nouns; wherein, the word segmentation includes regional words, core words, and general words, and the matching similarity weight of the core words is higher than that of the regional words and the general words. The training sample module inputs the data from the tourism entity noun dictionary into the neural network model for training, and saves the trained neural network model as a tourism entity noun prediction and matching model. The matching output module takes an entity noun to be matched and inputs it into the tourism entity noun dictionary and the tourism entity noun prediction matching model for matching, and obtains the matching output.

7. A device for matching tourism entity nouns, characterized in that, include: processor; A memory in which executable instructions of the processor are stored; The processor is configured to perform the steps of the tourism entity noun matching method according to any one of claims 1 to 5 by executing the executable instructions.

8. A computer-readable storage medium for storing a program, characterized in that, When the program is executed by the processor, it implements the steps of the tourism entity noun matching method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Text matching method, device, equipment and storage medium

    CN114090735A

  • Text matching method, system and equipment in search scene and storage medium

    CN114416930A