A text matching method, device, electronic device and storage medium, and a government service text matching method
Through the automated text matching method, the text similarity is used to match the standardized entity name text, which solves the problem of low standardization efficiency of non-standardized entity name documents and improves the efficiency of government service matters optimization.
Patent Information
- Application Number
- CN202110130726.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-29
- Publication Date
- 2025-01-17
- Estimated Expiration
- 2041-01-29
AI Technical Summary
In the prior art, the standardization efficiency of non-standardized entity name documents is low, which is mainly due to the reliance on manual summary, resulting in major challenges in the optimization of government service matters.
By obtaining the target entity category of the entity name text to be matched, obtaining candidate normalized entity name text according to the category, and matching the normalized entity name text using text similarity, realizing an automated text matching process.
It improves the efficiency of standardization of entity name documents, reduces dependence on manual summary, and improves the efficiency of optimization of government service matters.
Smart Images

Figure CN114818706B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and more particularly to a text matching method. The present application also relates to a text matching device, an electronic device and a storage medium, and a government service text matching method. Background Art
[0002] With the rapid development of Internet technology, more and more Internet-based business service systems have begun to appear or have been applied in different service fields, such as the "Internet + Government Services" technology system for government services has begun to be built. However, the Internet-based business service system has to face many problems at the same time, such as the standardization of entity name documents.
[0003] Taking "Internet + Government Services" as an example, in the process of optimizing government services, it is necessary to analyze which materials can be digitized. At this time, the usual practice is to collect the materials that government services rely on most from various governments, and then analyze which materials can be digitized. However, when describing the government materials required for government services, local governments often describe the names of government service materials in a non-standardized manner, such as describing the "Resident Identity Card of the People's Republic of China" as "Personal Identity Card", "Double Identity Card", "Couple Identity Card", etc. The non-standardized description of the names of government service materials not only creates a poor user experience, but also brings great challenges to the subsequent optimization of government services. Therefore, how to standardize non-standardized entity name documents has become an urgent problem to be solved in the development of Internet-based business service systems.
[0004] In the prior art, the method for solving the problem of standardizing non-standardized entity name documents is generally to establish a database containing a large number of entity name documents of the same category, and manually summarize the non-standardized entity name documents describing the same entity name in the database and link them to the standardized entity name document describing the entity name. Since the existing method for solving the problem of standardizing non-standardized entity name documents needs to be based on manual summary, the efficiency of standardizing non-standardized entity name documents is low. Summary of the invention
[0005] The present application provides a text matching method, device, electronic device and storage medium to improve the efficiency of entity name document standardization.
[0006] The present application provides a text matching method, comprising:
[0007] Get the target entity category corresponding to the entity name text to be matched;
[0008] According to the target entity category, obtaining a candidate standardized entity name text corresponding to the to-be-matched entity name text whose entity category is the same as the target entity category;
[0009] According to the text similarity between the entity name text to be matched and the candidate standardized entity name text, a target standardized entity name text that matches the entity name text to be matched is obtained from the candidate standardized entity name text.
[0010] Optionally, the method further includes: providing the target standardized entity name text to a user device.
[0011] Optionally, the method further includes: associating the to-be-matched entity name text with the target standardized entity name text.
[0012] Optionally, associating the to-be-matched entity name text with the target standardized entity name text includes: establishing a corresponding relationship between the to-be-matched entity name text and the target standardized entity name text.
[0013] Optionally, obtaining the target entity category corresponding to the to-be-matched entity name text includes: obtaining a text matching instruction issued by the user device, wherein the text matching instruction carries the to-be-matched entity name text;
[0014] The providing the location recommendation information to the user device includes: providing the target standardized entity name text to the user device in response to the text matching instruction.
[0015] Optionally, it also includes: displaying the target standardized entity name text.
[0016] Optionally, obtaining the target entity category corresponding to the to-be-matched entity name text includes:
[0017] Using a preset word segmentation strategy to segment the entity name text to be matched, and obtaining category keywords in the entity name text to be matched;
[0018] The target entity category is obtained according to the category keywords in the to-be-matched entity name text.
[0019] Optionally, obtaining, according to the target entity category, a candidate standardized entity name text corresponding to the to-be-matched entity name text having the same entity category as the target entity category, comprises:
[0020] Obtaining, according to the keywords in the to-be-matched entity name text, an associated standardized entity name text associated with the to-be-matched entity name;
[0021] Obtaining the entity category of the associated standardized entity name text;
[0022] The candidate standardized entity name text is obtained from the associated standardized entity name text according to the target entity category and the entity category.
[0023] Optionally, obtaining a target standardized entity name text that matches the entity name text to be matched from the candidate standardized entity name text according to the text similarity between the entity name text to be matched and the candidate standardized entity name text includes:
[0024] Obtaining the weights of the keywords in the to-be-matched entity name text and the weights of the keywords in the candidate standardized entity name text;
[0025] Obtaining a first word vector corresponding to a keyword in the to-be-matched entity name text and a second word vector corresponding to a keyword in the candidate standardized entity name text;
[0026] Obtaining a word vector similarity between the first word vector and the second word vector according to the weight of the key words in the to-be-matched entity name text, the weight of the key words in the candidate standardized entity name text, the first word vector, and the second word vector;
[0027] The text similarity is obtained according to the word vector similarity.
[0028] Optionally, obtaining the text similarity according to the word vector similarity includes:
[0029] Obtain a character string that matches the text of the entity name to be matched;
[0030] Obtain a character string corresponding to the candidate standardized entity name text;
[0031] According to the character string matched by the to-be-matched entity name text and the character string corresponding to the candidate standardized entity name text, obtaining the character string similarity between the character string matched by the to-be-matched entity name text and the character string corresponding to the candidate standardized entity name text;
[0032] The text similarity is obtained according to the word vector similarity and the character string similarity.
[0033] Optionally, obtaining the text similarity based on the word vector similarity and the string similarity includes: weighting the word vector similarity and the string similarity according to a preset first similarity weight corresponding to the word vector similarity and a second similarity weight corresponding to the word vector similarity to obtain the text similarity.
[0034] Optionally, it also includes: determining whether the text similarity reaches a text similarity threshold;
[0035] The method of obtaining a target standardized entity name text that matches the entity name text to be matched from the candidate standardized entity name text based on the text similarity between the entity name text to be matched and the candidate standardized entity name text comprises: if the text similarity reaches the text similarity threshold, obtaining the candidate standardized entity name text whose text similarity reaches the text similarity threshold from the candidate standardized entity name text as the target standardized entity name text.
[0036] Optionally, the step of obtaining, from the candidate standardized entity name texts, the candidate standardized entity name text whose text similarity reaches the text similarity threshold as the target standardized entity name text comprises: obtaining, from the candidate standardized entity name texts, the candidate standardized entity name text whose text similarity reaches the text similarity threshold and has the highest similarity as the target standardized entity name text.
[0037] Optionally, the method further includes: if the text similarity does not reach the text similarity threshold, determining that the target standardized entity name text does not exist in the candidate standardized entity name text.
[0038] In another aspect, the present application further provides a text matching device, comprising:
[0039] A target entity category obtaining unit, used to obtain a target entity category corresponding to the entity name text to be matched;
[0040] A candidate text obtaining unit, configured to obtain, according to the target entity category, a candidate standardized entity name text corresponding to the to-be-matched entity name text whose entity category is the same as the target entity category;
[0041] The target text matching unit is used to obtain a target standardized entity name text that matches the entity name text to be matched from the candidate standardized entity name texts according to the text similarity between the entity name text to be matched and the candidate standardized entity name texts.
[0042] In another aspect, the present application further provides an electronic device, comprising:
[0043] Processor; and
[0044] The memory is used to store a program of the text matching method. After the device is powered on and the program of the text matching method is run by the processor, the following steps are performed:
[0045] Get the target entity category corresponding to the entity name text to be matched;
[0046] According to the target entity category, obtaining a candidate standardized entity name text corresponding to the to-be-matched entity name text whose entity category is the same as the target entity category;
[0047] According to the text similarity between the entity name text to be matched and the candidate standardized entity name text, a target standardized entity name text that matches the entity name text to be matched is obtained from the candidate standardized entity name text.
[0048] On the other hand, the present application further provides a storage medium storing a program of a text matching method, the program is executed by a processor to perform the following steps: obtaining a target entity category corresponding to a text of an entity name to be matched;
[0049] According to the target entity category, obtaining a candidate standardized entity name text corresponding to the to-be-matched entity name text whose entity category is the same as the target entity category;
[0050] According to the text similarity between the entity name text to be matched and the candidate standardized entity name text, a target standardized entity name text that matches the entity name text to be matched is obtained from the candidate standardized entity name text.
[0051] On the other hand, the present application also provides a government service text matching method, including:
[0052] Obtain a target entity category corresponding to the entity name text to be matched and used to describe the name of the government service material;
[0053] According to the target entity category, obtaining a candidate standardized entity name text corresponding to the to-be-matched entity name text whose entity category is the same as the target entity category;
[0054] According to the text similarity between the entity name text to be matched and the candidate standardized entity name text, obtaining a target standardized entity name text that matches the entity name text to be matched from the candidate standardized entity name text;
[0055] The to-be-matched entity name text is associated with the target standardized entity name text.
[0056] In another aspect, the present application further provides an address text matching method, comprising:
[0057] Obtain a target entity category corresponding to the entity name text to be matched and used to describe the geographic location name;
[0058] According to the target entity category, obtaining a candidate standardized entity name text corresponding to the to-be-matched entity name text whose entity category is the same as the target entity category;
[0059] According to the text similarity between the entity name text to be matched and the candidate standardized entity name text, obtaining a target standardized entity name text that matches the entity name text to be matched from the candidate standardized entity name text;
[0060] The to-be-matched entity name text is associated with the target standardized entity name text.
[0061] Compared with the prior art, this application has the following advantages:
[0062] The present application provides a text matching method, which includes obtaining a target entity category corresponding to an entity name text to be matched; obtaining, based on the target entity category, a candidate standardized entity name text corresponding to the entity name text to be matched whose entity category is the same as the target entity category; and obtaining, from the candidate standardized entity name text, a target standardized entity name text that matches the entity name text to be matched based on the text similarity between the entity name text to be matched and the candidate standardized entity name text. The text matching method provided by the present application can obtain a target standardized entity name text that matches the entity name text to be matched based on the text similarity between the entity name text to be matched and the candidate standardized entity name text, without relying on manual summarization to match the entity name text to be matched with the target standardized entity name text, thereby improving the efficiency of entity name document standardization. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 A schematic diagram of a first scenario of a text matching method provided in the first embodiment of the present application.
[0064] Figure 2 This is a flowchart of a text matching method provided in the first embodiment of the present application.
[0065] Figure 3 This is a schematic diagram of the first scenario of the text matching method provided in the first embodiment of the present application.
[0066] Figure 4 This is a schematic diagram of a text matching device provided in the second embodiment of the present application.
[0067] Figure 5 A schematic diagram of an electronic device provided in an embodiment of the present application.
[0068] Figure 6 This is a flowchart of a text matching method provided in the fifth embodiment of the present application. DETAILED DESCRIPTION
[0069] Many specific details are described in the following description to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present application, so the present application is not limited by the specific implementation disclosed below.
[0070] In order to more clearly show the text matching method provided in the first embodiment of the present application, the application scenario of the text matching method provided in the first embodiment of the present application is first introduced. The text matching method provided in the first embodiment of the present application, the execution subject can be a server, it can also be a client with a related text recognition application installed, or it can be a server and a client at the same time, that is, the text matching method is completed by the interaction between the server and the client and the server. The so-called client is an application or software installed on the user device that can implement the text matching method provided in the embodiment of the present application, and the so-called user device is generally a mobile phone, PC (Personal Computer, personal computer) and a tablet computer in a specific implementation mode, and the so-called application (APP, Application) or software that can implement the text matching method provided in the embodiment of the present application can be a mobile phone application, a webpage version of online text matching software and computer software. The so-called server is a computing device for providing data processing and other services for the above-mentioned client, and the so-called server is generally a server or a server cluster in a specific implementation mode.
[0071] In the first embodiment of the present application, the application scenario of the text matching method is completed by the interaction between the server and the client and the server, and the client is a computer software installed on the computer that can implement the text matching method provided in the embodiment of the present application. For a detailed description of the text matching method provided in the first embodiment of the present application, please refer to Figure 1 , which is a first scenario schematic diagram of the text matching method provided in the first embodiment of the present application.
[0072] First, after the client 101 obtains the text matching trigger operation triggered for the client 101 on the user device, the client 101 obtains the entity name text to be matched based on the user device.
[0073] In the first embodiment of the present application, the so-called entity name text is the text used to describe the name of the entity in the target text. The so-called target text is generally a document, a paragraph or a sentence, such as: government service items, network service items other than government services, equipment operation procedures and chemical experiment steps introduction, and so on. When the entity name text is a text used to describe the name of the government service material, the so-called entity is generally the government service material required in the government service items; when the entity name text is a text used to describe the name of the network service material, the so-called entity can also be the network service material required in the network service items other than government services. In addition, the so-called entity can also be other types of entities, such as: equipment in the equipment operation process description, chemicals in the chemical experiment steps introduction, and chemical reaction devices. In other words, in the first embodiment of the present application, there is no specific limitation on the target text and the entity.
[0074] The so-called entity name text to be matched is generally a non-standardized entity name text, or a standardized entity name text. The so-called standardized entity name text and non-standardized entity name text are respectively the standard description text and non-standard description text of the same entity name. Specifically, the "Resident Identity Card of the People's Republic of China" can be taken as an example. The standardized entity name text of the "Resident Identity Card of the People's Republic of China" is "Resident Identity Card of the People's Republic of China", and the non-standardized entity name text can be "Individual Identity Card", "Double Identity Card", "Couple Identity Card", etc. It can also be taken as an example of "Real Estate Registration Application Form". The standardized entity name text of "Real Estate Registration Application Form" is "Real Estate Registration Application Form", and the non-standardized entity name text can be "Real Estate Registration Application Form", etc. It can also be taken as an example of "Personnel File". The standardized entity name text of "Personnel File" is "Personnel File", and the non-standardized entity name text can be "Applicant Personnel File", "Insured Person Personnel File" and "Original Personnel File", etc.
[0075] In "Internet + Government Services", the non-standardized description of the names of government service materials not only causes a poor user experience, but also brings great challenges to the subsequent optimization of government service matters. It will also cause inconvenience to users in other application scenarios. Therefore, the text matching method provided in the first embodiment of the present application needs to match the entity name text to be matched with the standardized entity name text corresponding to it. That is, a target standardized entity name text that matches the entity name text to be matched is obtained, that is, the non-standardized entity name text is standardized. The so-called target standardized entity name text is a standard description text whose text similarity with the entity name text to be matched exceeds the text similarity threshold and describes the same entity name as the entity name text to be matched.
[0076] Then, after the client 101 obtains the entity name text to be matched, it will further issue a text matching instruction to the server 102 based on the user's triggering operation on the user device, and the text matching instruction carries the entity name text to be matched. In addition, after the client 101 obtains the entity name text to be matched, it can also first send the entity name text to be matched to the server 102, and then issue a text matching instruction for the entity name text to be matched to the server 102. In the first embodiment of the present application, there is no specific limitation on the specific way in which the client 101 sends the entity name text to be matched to the server 102. After the server 102 obtains the text matching instruction carrying the entity name text to be matched, it will execute the following steps in sequence to obtain the target standardized entity name text that matches the entity name text to be matched. Please refer to Figure 2 , which is a flowchart of a text matching method provided in the first embodiment of the present application.
[0077] In step S201, the target entity category corresponding to the entity name text to be matched is obtained.
[0078] The so-called entity category is the category of the entity described by the entity name text, and the entity category is a category pre-divided according to a preset entity category division strategy. In the specific implementation process, the process of obtaining the target entity category is: first, adopt a preset word segmentation strategy to segment the entity name text to be matched, and obtain the category keywords in the entity name text to be matched; then, according to the category keywords in the entity name text to be matched, obtain the target entity category. The so-called category keyword is a word in the entity name text that can identify the entity category. Specifically, take the entity as a government service material as an example, such as: when the entity name text to be matched is "some application", "some certification", "some certificate" and "some table", for "some application", "some certification", "some certificate" and "some table", "application", "certificate", "certificate" and "table", etc. are the category keywords in the entity name text to be matched. In the first embodiment of the present application, the category pre-divided according to the preset entity category division strategy is the entity category determined according to the category keywords in the entity name text that are pre-counted. Therefore, the “application form” category, “certification form” category, “certificate” category, and “form” category are categories that are pre-divided according to the preset entity category classification strategy.
[0079] In the first embodiment of the present application, the specific implementation method of obtaining the target entity category according to the category keywords in the entity name text to be matched is: obtaining the target entity category according to the category keywords in the entity name text to be matched and the correspondence between the category keywords and the categories.
[0080] In the first embodiment of the present application, the category of the entity is determined based on the category keywords in the pre-counted entity name text, which can ensure that after obtaining the category keywords in the entity name text, the entity category of the entity name text can be directly obtained based on the category keywords, thereby making the acquisition of the entity category of the entity name text simpler and faster.
[0081] It should be noted that when encountering a new entity name text, the reverse maximum matching method can be used to confirm the entity category of the new entity name text.
[0082] The so-called pre-set word segmentation strategy can be: using the Chinese word segmenter used for word segmentation in natural language processing to segment the entity name text to be matched. In the first embodiment of the present application, in order to control the granularity of word segmentation, a personalized dictionary can be further introduced to divide the entity name text into continuous word sequences in order, and then determine whether the continuous word sequence is the final word segmentation result based on the rules and whether the continuous word sequence is in a given personalized dictionary.
[0083] In step S202, according to the target entity category, a candidate standardized entity name text corresponding to the to-be-matched entity name text having the same entity category as the target entity category is obtained.
[0084] The candidate standardized entity name text corresponding to the entity name text to be matched is a standardized entity name text obtained based on the keywords in the entity name text to be matched and associated with the keywords in the entity name text to be matched. In the specific implementation process, the bm25 (Best Match) recall strategy is adopted for the entity name text to be matched, and the ES (Elastic Search, distributed full-text retrieval) tool is used to quickly recall the associated standardized entity name text associated with the entity name to be matched in the preset standardized entity name text data.
[0085] In the first embodiment of the present application, the specific implementation method of obtaining the candidate standardized entity name text is as follows: first, based on the keywords in the entity name text to be matched, the associated standardized entity name text associated with the entity name to be matched is obtained. Then, the entity category of the associated standardized entity name text is obtained. Finally, based on the target entity category and the entity category, the candidate standardized entity name text is obtained from the associated standardized entity name text. Among them, the detailed process of the entity category of the associated standardized entity name text is similar to the process of obtaining the target entity category corresponding to the entity name text to be matched. For details, please refer to the description of the target entity category acquisition process in step S201, which will not be repeated in detail here.
[0086] In step S203, based on the text similarity between the entity name text to be matched and the candidate standardized entity name text, a target standardized entity name text that matches the entity name text to be matched is obtained from the candidate standardized entity name text.
[0087] In the specific implementation process, the process of obtaining text similarity is as follows: First, obtain the weight of the keywords in the entity name text to be matched and the weight of the keywords in the candidate standardized entity name text. Second, obtain the first word vector corresponding to the keywords in the entity name text to be matched, and the second word vector corresponding to the keywords in the candidate standardized entity name text. Third, based on the weight of the keywords in the entity name text to be matched, the weight of the keywords in the candidate standardized entity name text, the first word vector and the second word vector, obtain the word vector similarity of the first word vector and the second word vector. Fourth, based on the word vector similarity, obtain text similarity.
[0088] In the first embodiment of the present application, a method for obtaining a first word vector corresponding to a keyword in the entity name text to be matched and a second word vector corresponding to a keyword in the candidate standardized entity name text is as follows: based on the Word2vec (Word ToVector, a related model used to generate word vectors) model, the keywords in the entity name text to be matched and the keywords in the candidate standardized entity name text are mapped to a vector, thereby obtaining a first word vector and a second word vector. The so-called Word2vec model is a network model that is obtained by training a model based on a given corpus and expresses a word in a vector form quickly and effectively.
[0089] In the first embodiment of the present application, the specific implementation method of obtaining the weights of the keywords in the to-be-matched entity name text and the weights of the keywords in the candidate standardized entity name text is as follows:
[0090] First, the entity name text to be matched and the candidate standardized entity name text are taken as a target text set.
[0091] Then, the entity name text to be matched and the candidate standardized entity name text are segmented respectively to obtain different keywords in the entity name text to be matched and the candidate standardized entity name text.
[0092] Finally, the TF-IDF (Term Frequency–Inverse Document Frequency, a commonly used weighting technology for information retrieval data mining) technology is used to obtain the TF (Term Frequency, word frequency) of different keywords in the entity name text to be matched in the entity name text to be matched, the IDF (Inverse Document Frequency, inverse document frequency index) of different keywords in the entity name text to be matched in the target text set, and the word frequency of different keywords in the candidate standardized entity name text in the candidate standardized entity name text, and the inverse document frequency index of different keywords in the candidate standardized entity name text in the target text set; then, according to the word frequency and inverse document frequency index, the TF-IDF of different keywords in the entity name text to be matched and the TF-IDF of different keywords in the candidate standardized entity name text are obtained; and according to the TF-IDF of different keywords in the entity name text to be matched and the TF-IDF of different keywords in the candidate standardized entity name text, the weights of different keywords in the entity name text to be matched and the different keywords in the candidate standardized entity name text in calculating the word vector similarity are determined.
[0093] Taking the name text of government service materials "Resident Identity Card of the People's Republic of China" as an example, if the name text of government service materials is "Resident Identity Card of the People's Republic of China", for the target text set composed of the corresponding candidate standardized entity name texts, the TF-IDF of "People's Republic of China" is 2, the TF-IDF of "resident" is 1, and the TF-IDF of "identity card" is 7, then when calculating the word vector similarity, the weight of "People's Republic of China" is 0.2, the weight of "resident" is 0.1, and the weight of "identity card" is 0.7.
[0094] In the first embodiment of the present application, according to the weight of the keywords in the entity name text to be matched, the weight of the keywords in the candidate standardized entity name text, the first word vector and the second word vector, the process of obtaining the word vector similarity of the first word vector and the second word vector is: solving the cosine similarity of the first word vector and the second word vector as the word vector similarity for the first word vector and the second word vector. Specifically, when solving the cosine similarity of the first word vector and the second word vector for the first word vector and the second word vector, the elements in the first word vector and the second word vector are multiplied by their respective weights.
[0095] In order to improve the accuracy of the text similarity between the entity name text to be matched and the candidate standardized entity name text, in the first embodiment of the present application, when obtaining the text similarity, the string similarity is further introduced to solve the text similarity. In the specific implementation process, first, the string matching the entity name text to be matched is obtained; secondly, the string corresponding to the candidate standardized entity name text is obtained; thirdly, according to the string matching the entity name text to be matched and the string corresponding to the candidate standardized entity name text, the string similarity between the string matching the entity name text to be matched and the string corresponding to the candidate standardized entity name text is obtained; finally, according to the word vector similarity and the string similarity, the text similarity is obtained. Specifically, according to the first similarity weight corresponding to the preset word vector similarity and the second similarity weight corresponding to the word vector similarity, the word vector similarity and the string similarity are weighted to obtain the text similarity.
[0096] In the first embodiment of the present application, before obtaining the text similarity based on the word vector similarity and the string similarity, it is necessary to first determine whether the text similarity reaches the text similarity threshold. If the text similarity reaches the text similarity threshold, then from the candidate standardized entity name text, a candidate standardized entity name text whose text similarity reaches the text similarity threshold is obtained as the target standardized entity name text. Specifically, from the candidate standardized entity name text, a candidate standardized entity name text whose text similarity reaches the text similarity threshold and has the highest similarity is obtained as the target standardized entity name text. For example, the text similarity between "Personal Identity Card" and "Resident Identity Card of the People's Republic of China" is 0.78. When the preset text similarity threshold is 0.7, "Resident Identity Card of the People's Republic of China" is used as the target standardized entity name text of "Personal Identity Card".
[0097] In addition, if the text similarity does not reach the text similarity threshold, it is determined that the target standardized entity name text does not exist in the candidate standardized entity name text.
[0098] In the first embodiment of the present application, when the server 102 determines that the target standardized entity name text does not exist in the candidate standardized entity name text, feedback information that the target standardized entity name text does not exist is generated and fed back to the client 101, and the client 101 displays the feedback information through the interactive interface of the user device.
[0099] After the server 102 obtains the target standardized entity name text, it can first provide the target standardized entity name text to the client 101 for the text matching instruction, and then the client 101 associates the entity name text to be matched with the target standardized entity name text, that is, establishes a corresponding relationship between the entity name text to be matched and the target standardized entity name text. In addition, after the server 102 obtains the target standardized entity name text, it can also first associate the entity name text to be matched with the target standardized entity name text, and then obtain the association result and provide it to the client 101.
[0100] The text matching method provided in the first embodiment of the present application can also be applied to application scenarios where the server is the execution subject. Figure 3 , which is a first scenario schematic diagram of the text matching method provided in the first embodiment of the present application.
[0101] Step S301: Obtain the entity name text to be matched. Step S302: Obtain the target entity category, that is, obtain the target entity category corresponding to the entity name text to be matched. Step S303: Obtain candidate standardized entity name texts, that is, according to the target entity category, obtain the candidate standardized entity name texts corresponding to the entity name text to be matched whose entity category is the same as the target entity category. Step S304-1: Obtain word vector similarity. Step S304-2: Obtain string similarity. Step S305: Obtain text similarity, that is, obtain text similarity based on word vector similarity and string similarity. Step S306: Determine whether the text similarity reaches the text similarity threshold. Step S306-1: If so, obtain the target standardized entity name text, that is, from the candidate standardized entity name texts, obtain the candidate standardized entity name text whose text similarity reaches the text similarity threshold as the target standardized entity name text. Step S306 - 2 : If not, obtain feedback information, that is, determine that the target standardized entity name text does not exist in the candidate standardized entity name text, and obtain feedback information of the target standardized entity name text that is not obtained.
[0102] The text matching method provided in the first embodiment of the present application can also be applied to application scenarios where the client is the execution entity.
[0103] In the specific implementation process, after obtaining the entity name text to be matched, the client will execute the following steps in sequence: first, obtain the target entity category corresponding to the entity name text to be matched; then, based on the target entity category, obtain the candidate standardized entity name text corresponding to the entity name text to be matched whose entity category is the same as the target entity category; finally, based on the text similarity between the entity name text to be matched and the candidate standardized entity name text, obtain the target standardized entity name text that matches the entity name text to be matched from the candidate standardized entity name text.
[0104] In the first embodiment of the present application, the application scenario of the text matching method provided in the first embodiment of the present application is not specifically limited, such as: the text matching method provided in the first embodiment of the present application can also be applied to other scenarios, which will not be described one by one here. The above application scenarios are provided to facilitate the understanding of the text matching method provided in the first embodiment of the present application, and are not used to limit the text matching method provided in the first embodiment of the present application.
[0105] In the first embodiment of the present application, a text matching method is provided, by obtaining multiple location element texts in a location query text, where the multiple location element texts are texts used to describe locations in the location query text; for the multiple location element texts, candidate location information corresponding to the multiple location element texts is obtained; the candidate location information corresponding to the multiple location element texts is sorted according to at least one of the number of occurrences of the multiple location element texts in the location query text and the clustering scores of the candidate location information corresponding to the multiple location element texts, and location recommendation information for the location query text is obtained according to the sorting result. The text matching method provided in the first embodiment of the present application sorts the candidate location information corresponding to the multiple location element texts based on the multiple location element texts, and can ensure that the candidate location information in the location recommendation information for the location query text corresponds to the multiple location element texts, thereby improving the accuracy of the location recommendation information when there are multiple location element texts in the location query text.
[0106] A text matching method is provided in the first embodiment of the present application, by obtaining a target entity category corresponding to an entity name text to be matched; according to the target entity category, obtaining a candidate standardized entity name text corresponding to the entity name text to be matched whose entity category is the same as the target entity category; according to the text similarity between the entity name text to be matched and the candidate standardized entity name text, obtaining a target standardized entity name text that matches the entity name text to be matched from the candidate standardized entity name text. The text matching method provided in the first embodiment of the present application can obtain a target standardized entity name text that matches the entity name text to be matched according to the text similarity between the entity name text to be matched and the candidate standardized entity name text, without relying on manual summarization to match the entity name text to be matched with the target standardized entity name text, thereby improving the efficiency of entity name document standardization. Second embodiment
[0107] Corresponding to the application scenario of the text matching method provided in the embodiment of the present application and the text matching method provided in the first embodiment, the second embodiment of the present application also provides a text matching method. Since the device embodiment is basically similar to the application scenario of the text matching method provided in the embodiment of the present application and the text matching method provided in the first embodiment, the description is relatively simple. For relevant parts, please refer to the application scenario of the text matching method provided in the embodiment of the present application and the partial description of the text matching method provided in the first embodiment. The device embodiment described below is only illustrative.
[0108] Please refer to Figure 4 , which is a schematic diagram of a text matching device provided in the second embodiment of the present application.
[0109] The text matching device comprises:
[0110] The target entity category obtaining unit 401 is used to obtain the target entity category corresponding to the entity name text to be matched;
[0111] A candidate text obtaining unit 402 is used to obtain, according to the target entity category, a candidate standardized entity name text corresponding to the to-be-matched entity name text whose entity category is the same as the target entity category;
[0112] The target text matching unit 403 is used to obtain a target standardized entity name text that matches the entity name text to be matched from the candidate standardized entity name texts according to the text similarity between the entity name text to be matched and the candidate standardized entity name texts.
[0113] Optionally, the text matching device provided in the second embodiment of the present application further includes: a text providing unit, used to provide the target standardized entity name text to the user equipment.
[0114] Optionally, the text matching device provided in the second embodiment of the present application further includes: a text association unit, used to associate the entity name text to be matched with the target standardized entity name text.
[0115] Optionally, the text association unit is specifically used to establish a corresponding relationship between the to-be-matched entity name text and the target standardized entity name text.
[0116] Optionally, the target entity category obtaining unit 401 is specifically used to obtain a text matching instruction issued by the user equipment, wherein the text matching instruction carries the text of the entity name to be matched;
[0117] The text providing unit is specifically configured to provide the target standardized entity name text to the user device in response to the text matching instruction.
[0118] Optionally, the text matching device provided in the second embodiment of the present application further includes: a text display unit, used to display the target standardized entity name text.
[0119] Optionally, the target entity category obtaining unit 401 is specifically used to adopt a preset word segmentation strategy to segment the entity name text to be matched, and obtain category keywords in the entity name text to be matched; and obtain the target entity category based on the category keywords in the entity name text to be matched.
[0120] Optionally, the candidate text obtaining unit 402 is specifically used to obtain the associated standardized entity name text associated with the entity name to be matched based on keywords in the entity name text to be matched; obtain the entity category of the associated standardized entity name text; and obtain the candidate standardized entity name text from the associated standardized entity name text based on the target entity category and the entity category.
[0121] Optionally, the target text matching unit 403 is specifically used to obtain the weights of the keywords in the entity name text to be matched and the weights of the keywords in the candidate standardized entity name text; obtain the first word vector corresponding to the keywords in the entity name text to be matched, and the second word vector corresponding to the keywords in the candidate standardized entity name text; obtain the word vector similarity between the first word vector and the second word vector based on the weights of the keywords in the entity name text to be matched, the weights of the keywords in the candidate standardized entity name text, the first word vector and the second word vector; and obtain the text similarity based on the word vector similarity.
[0122] Optionally, obtaining the text similarity according to the word vector similarity includes: obtaining a character string that matches the text of the entity name to be matched;
[0123] Obtain a character string corresponding to the candidate standardized entity name text;
[0124] According to the character string matched by the to-be-matched entity name text and the character string corresponding to the candidate standardized entity name text, obtaining the character string similarity between the character string matched by the to-be-matched entity name text and the character string corresponding to the candidate standardized entity name text;
[0125] The text similarity is obtained according to the word vector similarity and the character string similarity.
[0126] Optionally, obtaining the text similarity based on the word vector similarity and the string similarity includes: weighting the word vector similarity and the string similarity according to a preset first similarity weight corresponding to the word vector similarity and a second similarity weight corresponding to the word vector similarity to obtain the text similarity.
[0127] Optionally, the text matching device provided in the second embodiment of the present application further includes: a similarity judgment unit, configured to judge whether the text similarity reaches a text similarity threshold;
[0128] The target text matching unit 403 is specifically used to obtain the candidate standardized entity name text whose text similarity reaches the text similarity threshold as the target standardized entity name text from the candidate standardized entity name text if the judgment result of the similarity judgment unit is yes.
[0129] Optionally, the step of obtaining, from the candidate standardized entity name texts, the candidate standardized entity name text whose text similarity reaches the text similarity threshold as the target standardized entity name text comprises: obtaining, from the candidate standardized entity name texts, the candidate standardized entity name text whose text similarity reaches the text similarity threshold and has the highest similarity as the target standardized entity name text.
[0130] Optionally, the text matching device provided in the second embodiment of the present application further includes: a result determination unit, used to determine that the target standardized entity name text does not exist in the candidate standardized entity name text if the judgment result of the similarity judgment unit is no.
[0131] Third embodiment
[0132] Corresponding to the application scenario of the text matching method provided in the embodiment of the present application and the text matching method provided in the first embodiment, the third embodiment of the present application further provides an electronic device. Since the third embodiment is basically similar to the application scenario of the text matching method provided in the embodiment of the present application and the text matching method provided in the first embodiment, the description is relatively simple. For relevant parts, please refer to the application scenario of the text matching method provided in the embodiment of the present application and the partial description of the text matching method provided in the first embodiment. The third embodiment described below is only illustrative.
[0133] Please refer to Figure 5 , which is a schematic diagram of an electronic device provided in an embodiment of the present application.
[0134] The electronic device includes: a processor 501;
[0135] and a memory 502 for storing a program of the information processing method. After the device is powered on and the program of the information processing method is run by the processor, the following steps are performed:
[0136] Get the target entity category corresponding to the entity name text to be matched;
[0137] According to the target entity category, obtaining a candidate standardized entity name text corresponding to the to-be-matched entity name text whose entity category is the same as the target entity category;
[0138] According to the text similarity between the entity name text to be matched and the candidate standardized entity name text, a target standardized entity name text that matches the entity name text to be matched is obtained from the candidate standardized entity name text.
[0139] It should be noted that the detailed description of the electronic device provided in the eighth embodiment of the present application can refer to the application scenario of the live broadcast service system provided in the embodiment of the present application, the live broadcast service system provided in the first embodiment and the relevant description of the above-mentioned method embodiment, and will not be repeated here.
[0140] Fourth embodiment
[0141] Corresponding to the application scenario of the text matching method provided in the embodiment of the present application and the text matching method provided in the first embodiment, the fourth embodiment of the present application also provides a storage medium. Since the fourth embodiment is basically similar to the application scenario of the text matching method provided in the embodiment of the present application and the text matching method provided in the first embodiment, the description is relatively simple. For relevant parts, please refer to the application scenario of the text matching method provided in the embodiment of the present application and the partial description of the text matching method provided in the first embodiment. The device embodiment described below is only illustrative.
[0142] The storage medium stores a computer program, which is executed by a processor to perform the following steps:
[0143] Get the target entity category corresponding to the entity name text to be matched;
[0144] According to the target entity category, obtaining a candidate standardized entity name text corresponding to the to-be-matched entity name text whose entity category is the same as the target entity category;
[0145] According to the text similarity between the entity name text to be matched and the candidate standardized entity name text, a target standardized entity name text that matches the entity name text to be matched is obtained from the candidate standardized entity name text.
[0146] It should be noted that the detailed description of the storage medium provided in the ninth embodiment of the present application can refer to the application scenario of the text matching method provided in the embodiment of the present application and the related description of the text matching method provided in the first embodiment, and will not be repeated here.
[0147] Fifth embodiment
[0148] Corresponding to the application scenario of the text matching method provided in the embodiment of the present application and the text matching method provided in the first embodiment, the fifth embodiment of the present application also provides another text matching method. Since the device embodiment is basically similar to the application scenario of the text matching method provided in the embodiment of the present application and the text matching method provided in the first embodiment, the description is relatively simple. For relevant points, please refer to the application scenario of the text matching method provided in the embodiment of the present application and the partial description of the text matching method provided in the first embodiment. The method embodiment described below is merely illustrative.
[0149] A text matching method provided in the fifth embodiment of the present application is as follows: Figure 6 Provide explanation.
[0150] Figure 6 This is a flowchart of a text matching method provided in the fifth embodiment of the present application. Figure 6 This is a flowchart of a text matching method provided in the fifth embodiment of the present application, the method comprising: step S601 to step S604.
[0151] In step S601, a target entity category corresponding to the entity name text to be matched and used to describe the name of the government service material is obtained.
[0152] In the fifth embodiment of the present application, the so-called entity name text is the text used to describe the name of the entity in the target text. The so-called target text is generally a document, a paragraph or a sentence, such as: government service items, network service items other than government services, equipment operation procedures and chemical experiment steps. The so-called entity is generally the government service materials required in the government service items. In this case, the entity name text is the text used to describe the name of the government service materials; the so-called entity can also be the network service materials required in the network service items other than government services. In this case, the entity name text is the text used to describe the name of the network service materials. In addition, the so-called entity can also be other types of entities, such as: equipment in the equipment operation process description, chemicals in the chemical experiment steps introduction, and chemical reaction devices. In other words, in the first embodiment of the present application, there is no specific limitation on the target text and the entity.
[0153] The so-called entity name text to be matched is generally a non-standardized entity name text, or a standardized entity name text. The so-called standardized entity name text and non-standardized entity name text are respectively the standard description text and non-standard description text of the same entity name. Specifically, the "Resident Identity Card of the People's Republic of China" can be taken as an example. The standardized entity name text of the "Resident Identity Card of the People's Republic of China" is "Resident Identity Card of the People's Republic of China", and the non-standardized entity name text can be "Individual Identity Card", "Double Identity Card", "Couple Identity Card", etc. It can also be taken as an example of "Real Estate Registration Application Form". The standardized entity name text of "Real Estate Registration Application Form" is "Real Estate Registration Application Form", and the non-standardized entity name text can be "Real Estate Registration Application Form", etc. It can also be taken as an example of "Personnel File". The standardized entity name text of "Personnel File" is "Personnel File", and the non-standardized entity name text can be "Applicant Personnel File", "Insured Person Personnel File" and "Original Personnel File", etc.
[0154] The so-called entity category is the category of the entity described by the entity name text, and the entity category is a category pre-divided according to a preset entity category division strategy. In the specific implementation process, the process of obtaining the target entity category is: first, adopt a preset word segmentation strategy to segment the entity name text to be matched, and obtain the category keywords in the entity name text to be matched; then, according to the category keywords in the entity name text to be matched, obtain the target entity category. The so-called category keyword is a word in the entity name text that can identify the entity category. Specifically, take the entity as a government service material as an example, such as: when the entity name text to be matched is "some application", "some certification", "some certificate" and "some table", for "some application", "some certification", "some certificate" and "some table", "application", "certificate", "certificate" and "table", etc. are the category keywords in the entity name text to be matched. In the fifth embodiment of the present application, the category pre-divided according to the preset entity category division strategy is the entity category determined according to the category keywords in the entity name text that are pre-counted. Therefore, the “application form” category, “certification form” category, “certificate” category, and “form” category are categories that are pre-divided according to the preset entity category classification strategy.
[0155] In step S602, according to the target entity category, a candidate standardized entity name text corresponding to the to-be-matched entity name text having the same entity category as the target entity category is obtained.
[0156] In the fifth embodiment of the present application, the candidate standardized entity name text corresponding to the entity name text to be matched is a standardized entity name text obtained based on the keywords in the entity name text to be matched and associated with the keywords in the entity name text to be matched. In the specific implementation process, for the entity name text to be matched, the recall strategy of bm25 is adopted, and the ES tool is used to quickly recall the associated standardized entity name text associated with the entity name to be matched in the preset standardized entity name text data.
[0157] In step S603, based on the text similarity between the entity name text to be matched and the candidate standardized entity name text, a target standardized entity name text that matches the entity name text to be matched is obtained from the candidate standardized entity name text.
[0158] In the specific implementation process, before obtaining the text similarity based on the word vector similarity and the string similarity, it is necessary to first determine whether the text similarity reaches the text similarity threshold. If the text similarity reaches the text similarity threshold, then from the candidate standardized entity name texts, the candidate standardized entity name texts whose text similarity reaches the text similarity threshold are obtained as the target standardized entity name texts. Specifically, from the candidate standardized entity name texts, the candidate standardized entity name texts whose text similarity reaches the text similarity threshold and has the highest similarity are obtained as the target standardized entity name texts.
[0159] In addition, if the text similarity does not reach the text similarity threshold, it is determined that the target standardized entity name text does not exist in the candidate standardized entity name text.
[0160] In step S604, the entity name text to be matched is associated with the target standardized entity name text.
[0161] The specific implementation method of the so-called association is generally: establishing a corresponding relationship between the entity name text to be matched and the target standardized entity name text.
[0162] Sixth embodiment
[0163] Corresponding to the application scenario of the text matching method provided in the embodiment of the present application and the text matching method provided in the first embodiment, the sixth embodiment of the present application also provides another text matching method. Since the device embodiment is basically similar to the application scenario of the text matching method provided in the embodiment of the present application and the text matching method provided in the first embodiment, the description is relatively simple. For relevant points, please refer to the application scenario of the text matching method provided in the embodiment of the present application and the partial description of the text matching method provided in the first embodiment. The method embodiment described below is merely illustrative.
[0164] First, a target entity category corresponding to the entity name text to be matched and used to describe the geographic location name is obtained.
[0165] In the sixth embodiment of the present application, the so-called entity name text is the text in the target text used to describe the name of the geographical location. The so-called target text is generally a document, a paragraph or a sentence, such as: a document used to describe the geographical location collected when creating a map, a document used to describe the geographical location involved in the process of social governance and urban management, etc. It should be noted that in the first embodiment of the present application, the target text and the entity are not specifically limited.
[0166] The so-called entity name text to be matched is generally a non-standardized entity name text, and can also be a standardized entity name text. The so-called standardized entity name text and non-standardized entity name text are respectively the standard description text and non-standard description text of the same entity name. Specifically, taking "People's Republic of China" as an example, the standardized entity name text of "People's Republic of China" is "People's Republic of my country", and the non-standardized entity name text can be "China", "our country", and so on. You can also take "Beijing Olympic Park" as an example. The standardized entity name text of "Beijing Olympic Park" is "Beijing Olympic Park", and the non-standardized entity name text can be "Olympic Park", etc.
[0167] The so-called entity category is the category of the entity described by the entity name text, and the entity category is a category pre-divided according to a preset entity category division strategy. In the specific implementation process, the process of obtaining the target entity category is: first, adopt a preset word segmentation strategy to segment the entity name text to be matched, and obtain the category keywords in the entity name text to be matched; then, according to the category keywords in the entity name text to be matched, obtain the target entity category. The so-called category keyword is a word in the entity name text that can identify the entity category. Specifically, taking the entity as a government service material as an example, such as: when the entity name text to be matched is "such and such a country", "such and such a province", "such and such a city" and "such and such a mountain", for "such and such a country", "such and such a province", "such and such a city" and "such and such a mountain", "country", "province", "city" and "mountain" are the category keywords in the entity name text to be matched. In the sixth embodiment of the present application, the category pre-divided according to the preset entity category division strategy is the entity category determined according to the category keywords in the entity name text that are pre-counted. Therefore, the “country” category, the “province and municipality directly under the central government” category, the “mountain” category, and the “district” category are categories that are pre-divided according to the preset entity category classification strategy.
[0168] Secondly, according to the target entity category, the candidate standardized entity name text corresponding to the to-be-matched entity name text whose entity category is the same as the target entity category is obtained.
[0169] In the sixth embodiment of the present application, the candidate standardized entity name text corresponding to the entity name text to be matched is a standardized entity name text obtained based on the keywords in the entity name text to be matched and associated with the keywords in the entity name text to be matched. In the specific implementation process, for the entity name text to be matched, the recall strategy of bm25 is adopted, and the ES tool is used to quickly recall the associated standardized entity name text associated with the entity name to be matched in the preset standardized entity name text data.
[0170] Thirdly, based on the text similarity between the entity name text to be matched and the candidate standardized entity name text, a target standardized entity name text that matches the entity name text to be matched is obtained from the candidate standardized entity name text.
[0171] In the specific implementation process, before obtaining the text similarity based on the word vector similarity and the string similarity, it is necessary to first determine whether the text similarity reaches the text similarity threshold. If the text similarity reaches the text similarity threshold, then from the candidate standardized entity name texts, the candidate standardized entity name texts whose text similarity reaches the text similarity threshold are obtained as the target standardized entity name texts. Specifically, from the candidate standardized entity name texts, the candidate standardized entity name texts whose text similarity reaches the text similarity threshold and has the highest similarity are obtained as the target standardized entity name texts.
[0172] In addition, if the text similarity does not reach the text similarity threshold, it is determined that the target standardized entity name text does not exist in the candidate standardized entity name text.
[0173] Finally, the entity name text to be matched is associated with the target standardized entity name text.
[0174] The specific implementation method of the so-called association is generally: establishing a corresponding relationship between the entity name text to be matched and the target standardized entity name text.
[0175] Although the present application is disclosed as above in the preferred embodiment, it is not intended to limit the present application. Any technical personnel in this field may make possible changes and modifications without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.
[0176] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0177] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0178] 1. Computer readable media includes permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other physical types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic disk storage or other magnetic storage media or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined in this article, computer readable media does not include non-transitory media such as modulated data signals and carrier waves.
[0179] 2. Those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems or computer program products. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
Claims
1. A text matching method, characterized in that: include: Get the target entity category corresponding to the entity name text to be matched; According to the target entity category, obtaining a candidate standardized entity name text corresponding to the to-be-matched entity name text whose entity category is the same as the target entity category, including: according to keywords in the to-be-matched entity name text, obtaining an associated standardized entity name text associated with the to-be-matched entity name; Obtaining the entity category of the associated standardized entity name text; Obtaining the candidate standardized entity name text from the associated standardized entity name text according to the target entity category and the entity category; According to the text similarity between the entity name text to be matched and the candidate standardized entity name text, a target standardized entity name text that matches the entity name text to be matched is obtained from the candidate standardized entity name text.
2. The text matching method according to claim 1, characterized in that: Also includes: The target standardized entity name text is provided to a user device.
3. The text matching method according to claim 1 or 2, characterized in that: Also includes: The to-be-matched entity name text is associated with the target standardized entity name text.
4. The text matching method according to claim 3, characterized in that: The associating the to-be-matched entity name text with the target standardized entity name text includes: establishing a corresponding relationship between the to-be-matched entity name text and the target standardized entity name text.
5. The text matching method according to claim 2, characterized in that: The obtaining of the target entity category corresponding to the to-be-matched entity name text includes: obtaining a text matching instruction issued by the user device, wherein the text matching instruction carries the to-be-matched entity name text; The providing the target standardized entity name text to the user device includes: providing the target standardized entity name text to the user device in response to the text matching instruction.
6. The text matching method according to claim 1, characterized in that: Also includes: Displays the target standardized entity name text.
7. The text matching method according to claim 1, characterized in that: The step of obtaining the target entity category corresponding to the entity name text to be matched includes: Using a preset word segmentation strategy to segment the entity name text to be matched, and obtaining category keywords in the entity name text to be matched; The target entity category is obtained according to the category keywords in the to-be-matched entity name text.
8. The text matching method according to claim 1, characterized in that: The step of obtaining a target standardized entity name text that matches the entity name text to be matched from the candidate standardized entity name text according to the text similarity between the entity name text to be matched and the candidate standardized entity name text comprises: Obtaining the weights of the keywords in the to-be-matched entity name text and the weights of the keywords in the candidate standardized entity name text; Obtaining a first word vector corresponding to a keyword in the to-be-matched entity name text and a second word vector corresponding to a keyword in the candidate standardized entity name text; Obtaining a word vector similarity between the first word vector and the second word vector according to the weight of the key words in the to-be-matched entity name text, the weight of the key words in the candidate standardized entity name text, the first word vector, and the second word vector; The text similarity is obtained according to the word vector similarity.
9. The text matching method according to claim 8, characterized in that: The obtaining the text similarity according to the word vector similarity includes: Obtain a character string that matches the text of the entity name to be matched; Obtain a character string corresponding to the candidate standardized entity name text; According to the character string matched by the to-be-matched entity name text and the character string corresponding to the candidate standardized entity name text, obtaining the character string similarity between the character string matched by the to-be-matched entity name text and the character string corresponding to the candidate standardized entity name text; The text similarity is obtained according to the word vector similarity and the character string similarity.
10. The text matching method according to claim 9, characterized in that: The obtaining of the text similarity based on the word vector similarity and the string similarity includes: weighting the word vector similarity and the string similarity according to a preset first similarity weight corresponding to the word vector similarity and a second similarity weight corresponding to the word vector similarity to obtain the text similarity.
11. The text matching method according to claim 1, characterized in that: Also includes: Determining whether the text similarity reaches a text similarity threshold; The method of obtaining a target standardized entity name text that matches the entity name text to be matched from the candidate standardized entity name text based on the text similarity between the entity name text to be matched and the candidate standardized entity name text comprises: if the text similarity reaches the text similarity threshold, obtaining the candidate standardized entity name text whose text similarity reaches the text similarity threshold from the candidate standardized entity name text as the target standardized entity name text.
12. The text matching method according to claim 11, characterized in that: The step of obtaining, from the candidate standardized entity name texts, the candidate standardized entity name texts whose text similarity reaches the text similarity threshold as the target standardized entity name text comprises: obtaining, from the candidate standardized entity name texts, the candidate standardized entity name texts whose text similarity reaches the text similarity threshold and has the highest similarity as the target standardized entity name text.
13. The text matching method according to claim 11, characterized in that: Also includes: If the text similarity does not reach the text similarity threshold, it is determined that the target standardized entity name text does not exist in the candidate standardized entity name text.
14. A text matching device, characterized in that: include: A target entity category obtaining unit, used to obtain a target entity category corresponding to the entity name text to be matched; A candidate text obtaining unit is used to obtain, according to the target entity category, a candidate standardized entity name text corresponding to the to-be-matched entity name text whose entity category is the same as the target entity category, including: obtaining, according to keywords in the to-be-matched entity name text, an associated standardized entity name text associated with the to-be-matched entity name; obtaining the entity category of the associated standardized entity name text; obtaining the candidate standardized entity name text from the associated standardized entity name text according to the target entity category and the entity category; The target text matching unit is used to obtain a target standardized entity name text that matches the entity name text to be matched from the candidate standardized entity name texts according to the text similarity between the entity name text to be matched and the candidate standardized entity name texts.
15. An electronic device, characterized in that: include: processor; as well as The memory is used to store a program of the text matching method. After the device is powered on and the program of the text matching method is run by the processor, the following steps are performed: Get the target entity category corresponding to the entity name text to be matched; According to the target entity category, obtaining a candidate standardized entity name text corresponding to the to-be-matched entity name text whose entity category is the same as the target entity category, including: according to keywords in the to-be-matched entity name text, obtaining an associated standardized entity name text associated with the to-be-matched entity name; Obtaining the entity category of the associated standardized entity name text; Obtaining the candidate standardized entity name text from the associated standardized entity name text according to the target entity category and the entity category; According to the text similarity between the entity name text to be matched and the candidate standardized entity name text, a target standardized entity name text that matches the entity name text to be matched is obtained from the candidate standardized entity name text.
16. A storage medium, characterized in that: A program storing a text matching method is executed by a processor to perform the following steps: Get the target entity category corresponding to the entity name text to be matched; According to the target entity category, obtaining a candidate standardized entity name text corresponding to the to-be-matched entity name text whose entity category is the same as the target entity category, including: according to keywords in the to-be-matched entity name text, obtaining an associated standardized entity name text associated with the to-be-matched entity name; Obtaining the entity category of the associated standardized entity name text; Obtaining the candidate standardized entity name text from the associated standardized entity name text according to the target entity category and the entity category; According to the text similarity between the entity name text to be matched and the candidate standardized entity name text, a target standardized entity name text that matches the entity name text to be matched is obtained from the candidate standardized entity name text.
17. A government service text matching method, characterized in that: include: Obtain a target entity category corresponding to the entity name text to be matched and used to describe the name of the government service material; According to the target entity category, obtaining a candidate standardized entity name text corresponding to the to-be-matched entity name text whose entity category is the same as the target entity category, including: according to keywords in the to-be-matched entity name text, obtaining an associated standardized entity name text associated with the to-be-matched entity name; Obtaining the entity category of the associated standardized entity name text; Obtaining the candidate standardized entity name text from the associated standardized entity name text according to the target entity category and the entity category; According to the text similarity between the entity name text to be matched and the candidate standardized entity name text, obtaining a target standardized entity name text that matches the entity name text to be matched from the candidate standardized entity name text; The to-be-matched entity name text is associated with the target standardized entity name text.
18. An address text matching method, characterized in that: include: Obtain a target entity category corresponding to the entity name text to be matched and used to describe the geographic location name; According to the target entity category, obtaining a candidate standardized entity name text corresponding to the to-be-matched entity name text whose entity category is the same as the target entity category, including: according to keywords in the to-be-matched entity name text, obtaining an associated standardized entity name text associated with the to-be-matched entity name; Obtaining the entity category of the associated standardized entity name text; Obtaining the candidate standardized entity name text from the associated standardized entity name text according to the target entity category and the entity category; According to the text similarity between the entity name text to be matched and the candidate standardized entity name text, obtaining a target standardized entity name text that matches the entity name text to be matched from the candidate standardized entity name text; The to-be-matched entity name text is associated with the target standardized entity name text.
Citation Information
Patent Citations
Method and device for determining similar text, storage medium and electronic equipment
CN111126054A