Entity recognition method, system, device and storage medium
By extracting feature data from the article and matching it with the POI database, and automatically selecting the most matching POI, the problem of time-consuming and low accuracy in entity recognition in the prior art is solved, and efficient entity-POI link automation is achieved.
Patent Information
- Application Number
- CN202210536585.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-17
- Publication Date
- 2024-12-17
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, entity identification requires a lot of manpower and time, and the accuracy rate is not high, resulting in heavy burden on the online travel agency management platform and unable to effectively automate the link between entities and POI.
By extracting the feature data of the entity to be identified from the article, recalling the candidate POI in the POI database, combining the feature data to match the matching model, and automatically selecting the most matching POI for linking.
It realizes the automation of entity recognition, saves manpower, improves efficiency and accuracy, and can automatically post links between attractions and POIs in the article.
Smart Images

Figure CN114881036B_ABST
Abstract
Description
Background Art
[0002] The goal of entity recognition is to map entities to corresponding POIs (Point of Interest) in the POI database, so that entities in articles can be automatically linked to POIs on the online travel agency platform, and corresponding scenic spots can be linked to classic entities in articles. The existing method is generally to manually identify entities in articles and confirm the corresponding entity locations in the articles. However, this method requires a lot of manpower and time, and manual recognition may not be accurate, which also creates a great burden on the management platform of online travel agencies.
[0003] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present invention, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0004] In view of the problems in the prior art, the purpose of the present invention is to provide an entity recognition method, system, device and storage medium to realize the automation of entity recognition, which can automatically attach POI links to scenic spot entities in articles, thereby saving manpower and improving efficiency and accuracy.
[0005] The embodiment of the present invention provides an entity recognition method, comprising the following steps:
[0006] Extract entities to be identified from the article and obtain feature data of the entities to be identified;
[0007] Recalling candidate POIs corresponding to the entity in the POI database;
[0008] Combining the feature data of the entity to be identified with the feature data of each candidate POI respectively to obtain matching feature data of the entity to be identified corresponding to each candidate POI;
[0009] Inputting the matching feature data of the entity to be identified corresponding to each candidate POI into the trained matching model respectively, and obtaining the matching value of the matching feature data of the entity to be identified corresponding to each candidate POI output by the matching model;
[0010] A matching POI of the entity to be identified is selected from the candidate POIs according to the matching value.
[0011] In some embodiments, the feature data of the entity to be identified includes text data of the entity to be identified and context data of the entity to be identified.
[0012] In some embodiments, extracting the entity to be identified from the article and obtaining feature data of the entity to be identified includes the following steps:
[0013] Segment the article to obtain multiple article fragments;
[0014] Extracting entities from each of the article fragments, and using the article fragment corresponding to the entity as context data of the entity;
[0015] Split the extracted entities into prefixes, keywords, and suffixes.
[0016] In some embodiments, the step of recalling candidate POIs corresponding to the entity in a POI database comprises the following steps:
[0017] POIs are recalled from the POI database in the order of priority: keyword, keyword plus suffix, keyword plus prefix.
[0018] In some embodiments, after recalling the POI from the POI database, the following steps are further included:
[0019] Determine whether the entity suffix is consistent with the suffixes of each recalled POI;
[0020] Filter out recalled POIs whose suffix is inconsistent with the entity suffix.
[0021] In some embodiments, after filtering out candidate POIs whose suffixes are inconsistent with the entity suffixes, the following steps are also included:
[0022] For the recalled POIs, the edit distance between each POI and the entity is calculated;
[0023] The recalled POIs are sorted from small to large according to the edit distance, and a preset number of recalled POIs are selected from front to back as candidate POIs.
[0024] In some embodiments, the following steps are also included:
[0025] An index is established for the POI database, wherein the index includes one or more of a 2-gram inverted index, a character level inverted index, an English inverted index, and a pinyin inverted index.
[0026] In some embodiments, the characteristic data of the candidate POI includes at least one of the name, alias, province, city and specific address of the candidate POI.
[0027] In some embodiments, the method further includes inputting the title and content of the article into a trained classification model to obtain the category of the article;
[0028] Selecting a matching POI of the entity to be identified from the candidate POIs according to the matching value comprises the following steps:
[0029] Determine the preset number of matching POIs based on the type of article;
[0030] Selecting a preset number of matching POIs with the highest matching values from the candidate POIs;
[0031] Determine whether manual review is required based on the category of the article;
[0032] If manual review is required, the matching POI is sent to the corresponding review terminal.
[0033] The embodiment of the present invention further provides an entity recognition system for implementing the entity recognition method, the system comprising:
[0034] An entity extraction module is used to extract entities to be identified from articles and obtain feature data of entities to be identified;
[0035] A POI recall module, used to recall candidate POIs corresponding to the entity in a POI database;
[0036] A feature extraction module, used to combine the feature data of the entity to be identified with the feature data of each candidate POI, to obtain matching feature data of the entity to be identified corresponding to each candidate POI;
[0037] The POI matching module is used to input the matching feature data of the entity to be identified corresponding to each candidate POI into the trained matching model respectively, obtain the matching value of the matching feature data of the entity to be identified corresponding to each candidate POI output by the matching model; and select the matching POI of the entity to be identified from the candidate POI according to the matching value.
[0038] The embodiment of the present invention further provides an entity recognition device, including:
[0039] processor;
[0040] a memory storing executable instructions of the processor;
[0041] The processor is configured to perform the steps of the entity recognition method by executing the executable instructions.
[0042] An embodiment of the present invention also provides a computer-readable storage medium for storing a program, wherein the program implements the steps of the entity recognition method when executed by a processor.
[0043] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure.
[0044] The entity recognition method, system, device and storage medium of the present invention have the following beneficial effects:
[0045] The present invention realizes the automation of entity recognition by recalling and matching POIs of entities, and can automatically attach POI links to scenic spot entities in articles, thereby saving manpower, improving the efficiency of entity recognition, and having a high accuracy rate. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Other features, objectives and advantages of the present invention will become more apparent from a reading of the detailed description of non-limiting embodiments made with reference to the following accompanying drawings.
[0047] Figure 1 is a flow chart of an entity recognition method according to an embodiment of the present invention;
[0048] Figure 2 It is a flowchart of extracting entities to be identified from articles and obtaining feature data of the entities to be identified according to an embodiment of the present invention;
[0049] Figure 3 is a flowchart of recalling candidate POIs corresponding to the entity in a POI database according to an embodiment of the present invention;
[0050] Figure 4 is a schematic diagram of the structure of an entity recognition system according to an embodiment of the present invention;
[0051] Figure 5 is a schematic diagram of the structure of an entity identification device according to an embodiment of the present invention;
[0052] Figure 6 It is a schematic diagram of the structure of a computer-readable storage medium according to an embodiment of the present invention. DETAILED DESCRIPTION
[0053] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0054] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0055] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the steps. For example, some steps may be decomposed, while some steps may be combined or partially combined. Therefore, the actual execution order may be changed according to the actual situation.
[0056] like Figure 1 As shown, an embodiment of the present invention provides an entity recognition method, comprising the following steps:
[0057] S100: extracting entities to be identified from the article and obtaining feature data of the entities to be identified;
[0058] The article may be an article published on an online travel agency platform, such as articles introducing scenic spots and travel guides. Articles introducing scenic spots generally describe one or a small number of scenic spots, and the number of entities in them is small. When performing entity recognition later, it is easy to achieve a high article-level accuracy rate. Travel guides are characterized by including a large number of scenic spots, such as travel notes and inventory, and the number of entities in them is large. It is easy to miss or misidentify them when performing entity recognition.
[0059] S200: Recalling candidate POIs corresponding to the entity in a POI database;
[0060] The POI database is a database of all POIs included in the online travel agency platform, including the name, alias, address, characteristics, category and other data of each POI;
[0061] S300: combining the feature data of the entity to be identified with the feature data of each candidate POI respectively to obtain matching feature data of the entity to be identified corresponding to each candidate POI;
[0062] For example, if one entity to be identified corresponds to three candidate POIs, the feature data of the entity to be identified is combined with the feature data of the first candidate POI to obtain matching feature data corresponding to the first candidate POI, the feature data of the entity to be identified is combined with the feature data of the second candidate POI to obtain matching feature data corresponding to the second candidate POI, and the feature data of the entity to be identified is combined with the feature data of the third candidate POI to obtain matching feature data corresponding to the third candidate POI;
[0063] In this embodiment, the characteristic data of the candidate POI includes at least one of the name, alias, province, city and specific address of the candidate POI;
[0064] S400: inputting the matching feature data of the entity to be identified corresponding to each candidate POI into the trained matching model respectively, and obtaining the matching value of the matching feature data of the entity to be identified corresponding to each candidate POI output by the matching model;
[0065] The matching model may be a deep learning model, such as a convolutional neural network, electra, etc. Before step S400, it is necessary to collect a plurality of sample data in advance to pre-train the matching model. The plurality of sample data may include, for example, matching feature data of a plurality of sample entities and POIs, and manually annotate the POIs corresponding to the plurality of sample entities, that is, the matching value of the sample entity with the POI it matches is 1, and the matching value with other POIs is 0, and then the matching feature data of the sample entity and the POI are input into the matching model to obtain the matching value predicted by the matching model, construct a loss function based on the predicted matching value and the manual annotation, and reversely iterate and train the matching model;
[0066] In this embodiment, the entity, the context of the entity, the candidate POI name, alias, province, city, specific address, etc. are spliced together as the input of the matching model; the principle considered is to determine whether the address information appearing in the context of the entity matches the address information of the candidate POI;
[0067] S500: Selecting a matching POI of the entity to be identified from the candidate POIs according to the matching value, that is, preferentially selecting the candidate POI with the highest matching value as the matching POI.
[0068] The present invention first recalls candidate POIs through steps S100 and S200, then calculates the matching value between each candidate POI and the entity through steps S300 and S400, further accurately matches, and selects the matching POI according to the matching value through step S500, thereby realizing the automation of entity recognition, and can realize that the scenic spot entity in the article is automatically attached with a POI link, thereby saving manpower, improving the efficiency of entity recognition, and having a high accuracy rate. The entity recognition method of the present invention can be deployed on the server of an online travel agency, or on a separate server, and can obtain the POI database of the online travel agency and the articles published on the platform.
[0069] In this embodiment, the feature data of the entity to be identified includes text data of the entity to be identified and context data of the entity to be identified. Figure 2 As shown, the step S100: extracting the entity to be identified from the article and obtaining the feature data of the entity to be identified includes the following steps:
[0070] S110: segmenting the article to obtain multiple article segments;
[0071] When segmenting, the article can be segmented according to punctuation marks, spaces, conjunctions, etc. to obtain article segments within a preset length range, so as to perform entity recognition on each article segment separately. The preset length can be set as needed, such as 200 words, 300 words, etc.;
[0072] S120: extracting entities from each of the article segments, and using the article segment corresponding to the entity as context data of the entity;
[0073] For example, if "Shanghai Disneyland" is extracted from an article fragment, the entity text is "Shanghai Disneyland", and the article fragment containing the entity is the context data; if "Nanjing Yuhuatai Park" is extracted from another article fragment, the entity text is "Nanjing Yuhuatai Park", and the article fragment containing the entity is the context data;
[0074] S130: Segment the extracted entities into prefixes, keywords, and suffixes;
[0075] For example, Shanghai Disneyland can be divided into Shanghai (prefix), Disney (keyword) and Park (suffix). Nanjing Yuhuatai Park can be divided into Nanjing (prefix), Yuhuatai (keyword) and Park (suffix). Prefixes and suffixes are determined based on the vocabulary. Prefixes include country, province, city name, etc., and suffixes are summarized based on a large number of POIs, such as park, museum, etc. After removing the prefix and suffix, the remaining is the keyword, which is the core of the entity.
[0076] like Figure 3 As shown, in this embodiment, the step S200: recalling candidate POIs corresponding to the entity in the POI database includes the following steps:
[0077] S210: recalling POIs from the POI database in the order of priority of keyword, keyword plus suffix, keyword plus prefix, and further, adding a pinyin after the keyword plus prefix, that is, recalling POIs from the POI database in the order of priority of keyword, keyword plus suffix, keyword plus prefix, and pinyin;
[0078] When recalling, a similarity judgment method can be used. For example, when recalling using keywords, the similarity between the keyword and the name of the POI is calculated. The similarity can be calculated using cosine similarity, Euclidean distance, etc., and then the POI with the highest similarity and the number of reservations is selected or the POI with a similarity greater than a preset similarity threshold is selected as the recalled POI, and then the keyword plus prefix is used to calculate the similarity, and so on;
[0079] S220: Determine whether the entity suffix is consistent with the suffixes of each recalled POI;
[0080] S230: filtering out the recalled POIs whose suffix is inconsistent with the entity suffix;
[0081] That is, if the similarity between the suffix of a recalled POI and the entity suffix is 0, it is considered inconsistent and the recalled POI is directly filtered out;
[0082] S240: For the recalled POIs, the edit distance between each POI and the entity is calculated. The smaller the edit distance, the higher the similarity between the recalled POI and the entity. The larger the edit distance, the lower the similarity between the recalled POI and the entity.
[0083] S250: Sort the recalled POIs from small to large according to the edit distance, select a preset number of recalled POIs from front to back as candidate POIs, and complete the recall of POIs, for example, select the top-40 as the input for the next step to prevent performance problems caused by too many recalls.
[0084] In this embodiment, in order to quickly search for massive POI data, before the step S200: recalling the candidate POIs corresponding to the entity in the POI database, the following steps are also included:
[0085] The POI database is indexed to improve the speed of recalling POIs. The index includes one or more of a 2-gram inverted index, a character-level inverted index, an English inverted index, and a pinyin inverted index. Specifically, the 2-gram inverted index refers to: the POI name is indexed after 2-gram segmentation, and the union is used for recall; the character-level inverted index refers to: the POI name is indexed at the word level, and the intersection is used for recall; the English inverted index refers to: the English name (if any) is indexed at the word level; the pinyin inverted index refers to: the Chinese pinyin is indexed. The present invention is not limited to this. According to different needs, the index category is not limited to the four types listed here, and other types of indexes can also be established. The step of indexing the POI database can be performed between steps S100 and S200, or before step S100.
[0086] In this embodiment, the step S400: before selecting the matching POI of the entity to be identified from the candidate POI according to the matching value, also includes: inputting the title and content of the article into a trained classification model to obtain the category of the article. This step can be performed between steps S300 and S400, or between steps S200 and S400, or between steps S100 and S400, or before step S100. The categories of the article include articles introducing scenic spots and articles on travel guides. The classification model can be, for example, a roberta pre-trained model or other deep learning models. The training of the classification model may include: pre-collecting multiple sample articles and labeling the sample articles by categories. The title and content of the sample article are input into the classification model, the article category predicted by the classification model is obtained, the loss function is calculated according to the actual labeled category of the sample article and the article category, and the classification model is reversely iterated and trained based on the loss function.
[0087] The step S400: selecting a matching POI of the entity to be identified from the candidate POIs according to the matching value, comprises the following steps:
[0088] Determine the preset number of matching POIs based on the type of article;
[0089] Selecting a preset number of matching POIs with the highest matching values from the candidate POIs;
[0090] Since the entity recognition accuracy of scenic spot introduction articles is higher, and the entity recognition accuracy of travel guide articles is lower, the preset number of scenic spot introduction articles is smaller than the preset number of travel guide articles; for example, the preset number of scenic spot introduction articles is set to 1, and the preset number of travel guide articles is set to 3. If the current article type is a scenic spot introduction article, a POI with the highest matching value is selected from the candidate POIs as the matching POI. If the current article type is a travel guide article, three POIs with the highest matching values are selected from the candidate POIs as the matching POIs, which are left for subsequent manual review.
[0091] Determine whether manual review is required based on the category of the article;
[0092] If manual review is required, the matching POI is sent to the corresponding review terminal;
[0093] For example, it is set that tourist attraction introduction articles do not need manual review, while travel guide articles need manual review. If the current article category is a travel guide article, the three matching POIs with the highest matching values are sent to the staff's review terminal, and the most suitable POI is selected manually from the three matching POIs;
[0094] If manual review is not required, the current process ends.
[0095] Therefore, this embodiment uses the deep model to parse the entities in the article, and can find one or more POIs in the POI library that best match it, which greatly facilitates the automatic POI attachment. For articles about scenic spots, POI attachment can be directly performed in large quantities. For articles about travel guides, it provides convenience for reviewers, greatly improves review efficiency, and saves review costs.
[0096] like Figure 4 As shown, an embodiment of the present invention further provides an entity recognition system for implementing the entity recognition method, the system comprising:
[0097] The entity extraction module M100 is used to extract the entity to be identified from the article and obtain the feature data of the entity to be identified. The article may be an article published on an online travel agency platform, such as an article introducing scenic spots or a travel guide. The feature data of the entity to be identified includes the text data of the entity to be identified and the context data of the entity to be identified.
[0098] The POI recall module M200 is used to recall the candidate POI corresponding to the entity in the POI database, which is a database of all POIs included in the online travel agency platform, including the name, alias, address, characteristics, category and other data of each POI;
[0099] A feature extraction module M300 is used to combine the feature data of the entity to be identified with the feature data of each candidate POI to obtain matching feature data of the entity to be identified corresponding to each candidate POI, wherein the feature data of the candidate POI includes at least one of the name, alias, province, city and specific address of the candidate POI;
[0100] The POI matching module M400 is used to input the matching feature data of the entity to be identified corresponding to each candidate POI into the trained matching model respectively, and obtain the matching value of the matching feature data of the entity to be identified corresponding to each candidate POI output by the matching model. The matching model can be a deep learning model, such as a convolutional neural network, electra, etc.; the POI matching module M400 is also used to select the matching POI of the entity to be identified from the candidate POIs according to the matching value.
[0101] The present invention first recalls candidate POIs through entity extraction module M100 and POI recall module M200, and then calculates the matching value between each candidate POI and the entity through feature extraction module M300 and POI matching module M400, further accurately matches, and selects matching POI according to the matching value through step S500, thereby realizing the automation of entity recognition, and can realize that the scenic spot entity in the article is automatically linked to the POI, thereby saving manpower, improving the efficiency of entity recognition, and having a high accuracy rate. The entity recognition system of the present invention can be deployed on the server of an online travel agency, and can also be deployed on a separate server, and can obtain the POI database of the online travel agency and the articles published on the platform.
[0102] In this embodiment, the entity extraction module M100 extracts entities to be identified from the article and obtains feature data of the entities to be identified, including: segmenting the article to obtain multiple article segments; extracting entities from each of the article segments, and using the article segment corresponding to the entity as the context data of the entity; and segmenting the extracted entities into prefixes, keywords, and suffixes. Prefixes and suffixes are determined based on a vocabulary, and prefixes include country, province, city names, etc., and suffixes are summarized based on a large number of POIs, such as parks, museums, etc. What remains after removing the prefix and suffix is the keyword, which is the core of the entity.
[0103] In this embodiment, the POI recall module M200 recalls the candidate POIs corresponding to the entity in the POI database, including: recalling POIs from the POI database in the order of priority of keywords, keywords plus suffixes, and keywords plus prefixes; filtering out recalled POIs whose suffixes are inconsistent with the entity suffixes; for the recalled POIs, calculating the edit distance between each POI and the entity; sorting each recalled POI from small to large according to the edit distance, selecting a preset number of recalled POIs from front to back as candidate POIs, and completing the recall of POIs.
[0104] In this embodiment, the entity recognition system further includes an index building module for building an index for the POI database, thereby increasing the speed of recalling POIs. The index includes one or more of a 2-gram inverted index, a character level inverted index, an English inverted index, and a pinyin inverted index. However, the categories of the indexes of the present invention are not limited to the four types listed here.
[0105] In this embodiment, the entity recognition system further includes an article classification module, which is used to input the title and content of the article into a trained classification model to obtain the category of the article. The classification model can be, for example, a roberta pre-trained model or other deep learning models.
[0106] In this embodiment, the POI matching module M400 selects the matching POI of the entity to be identified from the candidate POIs according to the matching value, including: determining a preset number of matching POIs according to the type of article; selecting a preset number of matching POIs with the highest matching values from the candidate POIs; judging whether manual review is required according to the category of the article; if manual review is required, sending the matching POI to the corresponding review terminal; if manual review is not required, ending the current process.
[0107] An embodiment of the present invention further provides an entity recognition device, comprising a processor; a memory, in which executable instructions of the processor are stored; wherein the processor is configured to perform the steps of the entity recognition method by executing the executable instructions.
[0108] It will be appreciated by those skilled in the art that various aspects of the present invention may be implemented as systems, methods or program products. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, which may be collectively referred to herein as "circuits", "modules" or "platforms".
[0109] Refer to the following Figure 5 The electronic device 600 according to this embodiment of the present invention is described. Figure 5 The electronic device 600 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0110] like Figure 5 As shown, the electronic device 600 is in the form of a general 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 system components (including the storage unit 620 and the processing unit 610), a display unit 640, etc.
[0111] The storage unit stores a program code, which can be executed by the processing unit 610, so that the processing unit 610 performs the steps according to various exemplary embodiments of the present invention described in the above entity recognition method section of this specification. For example, the processing unit 610 can perform the following steps: Figure 1 Follow the steps shown in .
[0112] The storage unit 620 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 6201 and / or a cache memory unit 6202 , and may further include a read-only memory unit (ROM) 6203 .
[0113] The storage unit 620 may also include a program / utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including but not limited to: an operating system, one or more application programs, other program modules and program data, each of which or some combination may include the implementation of a network environment.
[0114] Bus 630 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0115] The electronic device 600 may also communicate with one or more external devices 700 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 600, and / or communicate with any device that enables the electronic device 600 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 650. Furthermore, the electronic device 600 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 660. The network adapter 660 may communicate with other modules of the electronic device 600 via a bus 630. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the 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 systems.
[0116] In the entity recognition device, the program in the memory implements the steps of the entity recognition method when being executed by the processor. Therefore, the device can also obtain the technical effect of the above-mentioned entity recognition method.
[0117] The embodiment of the present invention also provides a computer-readable storage medium for storing a program, and when the program is executed by a processor, the steps of the entity recognition method are implemented. In some possible implementations, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code, and when the program product is executed on a terminal device, the program code is used to cause the terminal device to perform the steps of various exemplary embodiments of the present invention described in the above-mentioned entity recognition method section of this specification.
[0118] refer to Figure 6 As shown, a program product 800 for implementing the above method according to an embodiment of the present invention is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be executed on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0119] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0120] The computer readable storage medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by an instruction execution system, an apparatus, or a device or used in combination with it. The program code contained on the readable storage medium may be transmitted with any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.
[0121] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0122] When the program in the computer storage medium is executed by the processor, the steps of the entity recognition method are implemented. Therefore, the computer storage medium can also obtain the technical effect of the above-mentioned entity recognition method.
[0123] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.
Claims
1. An entity recognition method, characterized in that: The steps include: Extract entities to be identified from the article and obtain feature data of the entities to be identified; Recalling candidate POIs corresponding to the entity in the POI database; Combining the feature data of the entity to be identified with the feature data of each candidate POI respectively to obtain matching feature data of the entity to be identified corresponding to each candidate POI; Inputting the matching feature data of the entity to be identified corresponding to each candidate POI into the trained matching model respectively, and obtaining the matching value of the matching feature data of the entity to be identified corresponding to each candidate POI output by the matching model; Selecting a matching POI of the entity to be identified from the candidate POIs according to the matching value; The feature data of the entity to be identified includes text data of the entity to be identified and context data of the entity to be identified; The step of extracting the entity to be identified from the article and obtaining the feature data of the entity to be identified comprises the following steps: Segment the article to obtain multiple article fragments; Entities in each of the article segments are extracted, and the article segment corresponding to the entity is used as context data of the entity.
2. The entity recognition method according to claim 1, characterized in that: The method of extracting entities to be identified from the article, obtaining feature data of the entities to be identified, extracting entities from each of the article segments, and using the article segments corresponding to the entities as context data of the entities, further includes the following steps: Split the extracted entities into prefixes, keywords, and suffixes.
3. The entity recognition method according to claim 2, characterized in that: The step of recalling candidate POIs corresponding to the entity in the POI database comprises the following steps: POIs are recalled from the POI database in the order of priority: keyword, keyword plus suffix, keyword plus prefix.
4. The entity recognition method according to claim 3, characterized in that: After recalling the POI from the POI database, the following steps are also included: Determine whether the entity suffix is consistent with the suffixes of each recalled POI; Filter out recalled POIs whose suffix is inconsistent with the entity suffix.
5. The entity recognition method according to claim 4, characterized in that: After filtering out the candidate POIs whose suffixes are inconsistent with the entity suffixes, the following steps are also included: For the recalled POIs, the edit distance between each POI and the entity is calculated; The recalled POIs are sorted from small to large according to the edit distance, and a preset number of recalled POIs are selected from front to back as candidate POIs.
6. The entity recognition method according to claim 1, characterized in that: The following steps are also included: An index is established for the POI database, wherein the index includes one or more of a 2-gram inverted index, a character level inverted index, an English inverted index, and a pinyin inverted index.
7. The entity recognition method according to claim 1, characterized in that: The characteristic data of the candidate POI includes at least one of the name, alias, province, city and specific address of the candidate POI.
8. The entity recognition method according to claim 1, characterized in that: The method further includes inputting the title and content of the article into a trained classification model to obtain the category of the article; Selecting a matching POI of the entity to be identified from the candidate POIs according to the matching value comprises the following steps: Determine the preset number of matching POIs based on the type of article; Selecting a preset number of matching POIs with the highest matching values from the candidate POIs; Determine whether manual review is required based on the category of the article; If manual review is required, the matching POI is sent to the corresponding review terminal.
9. An entity recognition system, characterized in that: For implementing the entity recognition method according to any one of claims 1 to 8, the system comprises: An entity extraction module is used to extract entities to be identified from articles and obtain feature data of entities to be identified; A POI recall module, used to recall candidate POIs corresponding to the entity in a POI database; A feature extraction module, used to combine the feature data of the entity to be identified with the feature data of each candidate POI, to obtain matching feature data of the entity to be identified corresponding to each candidate POI; The POI matching module is used to input the matching feature data of the entity to be identified corresponding to each candidate POI into the trained matching model respectively, obtain the matching value of the matching feature data of the entity to be identified corresponding to each candidate POI output by the matching model; and select the matching POI of the entity to be identified from the candidate POI according to the matching value.
10. An entity recognition device, characterized in that: include: processor; a memory storing executable instructions of the processor; The processor is configured to perform the steps of the entity identification method according to any one of claims 1 to 8 by executing the executable instructions.
11. A computer-readable storage medium for storing a program, characterized in that: When the program is executed by a processor, the steps of the entity recognition method according to any one of claims 1 to 8 are implemented.
