Entity library updating method, device, computer equipment and storage medium

By automatically triggering the entity library update, using historical query requests and different entity extraction methods, supplementing entities in the entity library, solving the problem of low entity recognition accuracy in the existing technology, realizing automatic supplementation and online query of the entity library Improved accuracy.

CN114297207BActive Publication Date: 2024-11-29TENCENT DIGITAL TIANJIN
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111487025.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-07
Publication Date
2024-11-29
Estimated Expiration
2041-12-07

AI Technical Summary

Technical Problem

The existing technology is difficult to effectively improve the accuracy of entity identification in online query services, and requires a lot of manpower and time, which has poor results.

Method used

By automatically triggering the entity library update when specific conditions are met, the log data of the online query service is used to obtain historical query requests, and the query request is used to perform entity extraction using different methods than the existing entity extraction, supplementing candidate entities that are not in the entity library.

Benefits of technology

It realizes automatic supplementation and enrichment of entity libraries, improves the accuracy of online queries, and reduces the need and time of manual maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114297207B_ABST
    Figure CN114297207B_ABST
Patent Text Reader

Abstract

The present application relates to an entity library update method, device, computer equipment and storage medium. The method includes: when the first entity library update condition is met, triggering the entity library update; obtaining historical query requests from the log data of the online query service as the request to be queried, the business query service such as the music or video query service; using at least one entity extraction method different from the entity extraction method used by the online query service to extract entities from the request to be queried to obtain candidate entities; if the candidate entity is not in the entity library, then adding the candidate entity to the entity library. The method uses different entity extraction methods for historical query requests to extract more entities, or mine entities that have not been extracted before, thereby realizing automatic supplementation of the entity library. As the entity library is continuously supplemented, the entity library is enriched, thereby promoting the accuracy of online queries.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the fields of Internet and artificial intelligence technology, and in particular to an entity library updating method, apparatus, computer equipment and storage medium. Background Art

[0002] With the development of Internet technology and artificial intelligence technology, query results can be fed back by entering queries through terminals or interacting with smart devices. In the specific query process, entity extraction is performed on the text of the query request. The entity contains the key information of the query target. The online query system further uses the structured information obtained from semantic understanding to provide feedback on the query request. For example, a query request of "a song X by singer A" includes two entities, namely "singer A" and "X song". Then, using these two words as keywords in the query can obtain accurate query results that meet the user's intentions. It can be seen that the accuracy of entity recognition is very important for query feedback.

[0003] To improve the accuracy of entity recognition, the traditional approach is to improve the performance of the entity recognition model. At this stage, the performance of the entity recognition model is already at a relatively high level. If you want to further improve the performance of the entity recognition model, it often takes a lot of manpower and time, and the effect is minimal. Therefore, it is urgent to provide a method to improve the entity recognition effect in online query business. Summary of the invention

[0004] Based on this, it is necessary to provide an entity library updating method, device, computer equipment and storage medium that can improve the entity recognition effect in response to the above technical problems.

[0005] A method for updating an entity library, the method comprising:

[0006] When the first entity library update condition is met, triggering the entity library update;

[0007] Obtain historical query requests from the log data of the online query service as pending query requests;

[0008] Using at least one entity extraction method different from that used by the online query service to extract entities from the query request to obtain candidate entities;

[0009] If the candidate entity is not in the entity library, the candidate entity is added to the entity library.

[0010] A physical library updating device, the device comprising:

[0011] An update trigger module, used to trigger an entity library update when a first entity library update condition is met;

[0012] The log processing module is used to obtain historical query requests from the log data of the online query business as requests to be queried;

[0013] An entity extraction module, configured to extract entities from the query request using at least one entity extraction method different from that used by the online query service to obtain candidate entities;

[0014] The supplement module is used to supplement the candidate entity to the entity library if the candidate entity is not in the entity library.

[0015] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0016] When the first entity library update condition is met, triggering the entity library update;

[0017] Obtain historical query requests from the log data of the online query service as pending query requests;

[0018] Using at least one entity extraction method different from that used by the online query service to extract entities from the query request to obtain candidate entities;

[0019] If the candidate entity is not in the entity library, the candidate entity is added to the entity library.

[0020] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:

[0021] When the first entity library update condition is met, triggering the entity library update;

[0022] Obtain historical query requests from the log data of the online query service as pending query requests;

[0023] Using at least one entity extraction method different from that used by the online query service to extract entities from the query request to obtain candidate entities;

[0024] If the candidate entity is not in the entity library, the candidate entity is added to the entity library.

[0025] A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the following steps are implemented:

[0026] When the first entity library update condition is met, triggering the entity library update;

[0027] Obtain historical query requests from the log data of the online query service as pending query requests;

[0028] Using at least one entity extraction method different from that used by the online query service to extract entities from the query request to obtain candidate entities;

[0029] If the candidate entity is not in the entity library, the candidate entity is added to the entity library.

[0030] The above-mentioned entity library update method, device, computer equipment and storage medium can automatically trigger the entity library update when the first entity library update condition is met. The query request represents the user's demand. Accurately extracting entities from the query request can help understand the user's demand. Therefore, the historical query request is obtained from the log data of the online query service as the query request to be queried. At least one entity extraction method different from that used by the online query service is used to extract entities from the query request to be queried, so that more entities can be extracted by using different entity extraction methods for the historical query request, or entities that have not been extracted before can be mined to realize automatic supplementation of the entity library. As the entity library is continuously supplemented, the entity library is enriched, thereby promoting the accuracy of online queries. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 An application environment diagram of an entity library updating method in an embodiment;

[0032] Figure 2 A schematic diagram of a flow chart of an entity library updating method in one embodiment;

[0033] Figure 3 A schematic diagram of the structure of an entity extraction model in an embodiment;

[0034] Figure 4 A schematic diagram of an interface for adding a page through an entity in an embodiment;

[0035] Figure 5 A schematic diagram of a closed-loop process for multiple entity update modes in one embodiment;

[0036] Figure 6 It is a structural block diagram of an entity library updating device in one embodiment;

[0037] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0038] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0039] The entity library update method provided in this application can be applied to various scenarios such as cloud technology, artificial intelligence, smart transportation, and assisted driving. Figure 1 As shown, the terminal 102 communicates with the server 104 through the network. The terminal 102 receives a query request input by a user, and the input method of the query request can be voice input or text input. The server performs entity extraction on the query request, obtains the entity in the query request, and then searches based on the entity, and feeds back the query result to the terminal. The server also triggers an entity library update when the first entity library update condition is met; obtains historical query requests from the log data of the online query service as the request to be queried; uses at least one entity extraction method different from that used by the online query service to perform entity extraction on the request to be queried to obtain a candidate entity; if the candidate entity is not in the entity library, the candidate entity is added to the entity library.

[0040] Among them, the terminal 102 includes but is not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, car terminals, etc., and the server 104 can be implemented with an independent server or a server cluster composed of multiple servers.

[0041] In one embodiment, Figure 2 As shown, a method for updating an entity library is provided, which is applied to Figure 1 The server in the example is used to illustrate the following steps:

[0042] Step 202: When the first entity library update condition is met, triggering the entity library update.

[0043] When the first entity library update condition is met, the entity library update is triggered, and no manual operation is required, so that the entity library is automatically updated.

[0044] Entities are also called named entities, which include names of people, institutions, places, and all other entities identified by names. More extensive entities also include numbers, dates, currencies, addresses, and so on. Entity libraries can be used for entity extraction. Entity extraction is named entity recognition. The main task of named entity recognition (NER) is to identify proper names such as names of people and places and meaningful quantitative phrases such as time and date in the text and classify them. Named entity recognition technology is an indispensable component of various natural language processing technologies such as information extraction, information retrieval, machine translation, and question-answering systems.

[0045] For named entity recognition technology, in addition to a high-performance entity recognition model, a rich entity library is also required, because the entity library is a very important feature when performing model classification and entity recognition.

[0046] Among them, the entity library is also an entity dictionary. The entity library defines prior knowledge such as entity name, entity ID description file, and entity structure information. In other words, the entity library is a collection of entities, providing entity instances and informing the boundaries and rules of the entity set. This is very important feature information for entity extraction. The richer the entity library, the more entities can be identified.

[0047] In the traditional way, when a new query business is created, the staff usually provides a batch of initialized entity libraries. During the operation, entity data is regularly collected and supplemented according to online problems and products. The whole process is mainly manual, time-consuming and timeliness cannot be guaranteed. Although it does not affect the functional integrity of the overall query business, for individual query requests, the entity extraction and recognition may not accurately understand the user's intention because the entity is not included in the entity library.

[0048] In this embodiment, by setting the first entity library update condition, the entity library update is triggered when the first entity library update condition is met.

[0049] The first entity library update condition may be a time condition, that is, triggering the entity library to update regularly, such as triggering the entity library to update weekly, so as to achieve regular automatic update of the entity library.

[0050] Step 204 , obtaining historical query requests from the log data of the online query service as requests to be queried.

[0051] Historical query requests are the query requests received by the online query service from users in the past period of time. The online query service provides query services, which can be based on text input by users or based on voice interaction. The query service is not limited to any field, and can be web page query, multimedia query, product query, etc.

[0052] For online query services, query requests represent the key information of user demands and usually contain clear entities. For example, online queries on a music platform usually contain the name of the singer or the song. For example, online queries on a medical platform usually contain the name of the doctor or the name of the department.

[0053] Taking the task-based dialogue system as an example, entities are used to express important information in the query request input by the user. For example, in a query request such as "Listen to a song X by singer A", the query request itself expresses the user's intention to listen to the song, and there is also the singer's name "singer A" and the song's name "X song". Such entities are used to represent the specific important information in this query request, so that subsequent services can use the structured information obtained by semantic understanding to respond to the user's query request.

[0054] Therefore, historical query requests can be used as pending query requests, and multiple entity extraction methods can be used to extract entities, and entities that are not in the entity library can be added to the entity library.

[0055] The pending query requests may include all historical query requests within an update cycle, or may only include query requests for which entity extraction fails within an update cycle. Entity extraction failure means that in an online query service, the entity extraction method used by the online query service cannot identify an entity from the query request.

[0056] Step 206: Use at least one entity extraction method different from that used by the online query service to extract entities from the query request to obtain candidate entities.

[0057] In the process of online query business processing, in order to accurately understand the user's intention, entity extraction is usually performed to obtain keywords. In the process of online query business processing, when receiving the user's query request, the first entity extraction method is used to extract the online query request. For example, the user enters the query request "Y song by singer B" on a certain music platform. Using the first extraction method, assuming that "Y song" is a new song, only the entity "singer B" can be extracted.

[0058] In the entity library update process, for historical query requests of online query services, in order to extract entities that have not been extracted in historical query requests, a second entity extraction method can be used to extract entities from the query requests to be processed. The second entity extraction method includes one entity extraction method, or at least two entity extraction methods, and at least one of the first entity extraction method and the second entity extraction method is different. For example, for the historical query request "Singer B's Y song", the second extraction method (not limited to one, can be at least two different extraction methods) is used to extract the entities "Singer B" and "Y song".

[0059] In practical applications, the first entity extraction method may be entity extraction model extraction, and the second entity extraction method may be entity extraction model extraction, or the second entity extraction method may be entity model extraction and template matching extraction, or the second entity extraction method may be template matching and other entity extraction model extractions. For another example, the first entity extraction method may be template matching extraction, and the second entity extraction method may be entity extraction model extraction.

[0060] The template matching method specifically matches the preset template with the historical query request to extract the entity in the query request. For example, if a template is "I want to listen to ***", and a query request is "I want to listen to song Y of song B", the entity "Y song" can be extracted by template matching.

[0061] The entity extraction model method is to use the trained entity model to extract entities from historical query requests. The entity extraction model can be trained using existing training methods, which will not be described in detail here. For example, the neural network structure used by the model can be a transformer structure, such as Figure 3 As shown in the figure, the structure of the transformer consists of an encoder and a decoder. Using this entity extraction model, when the query request is "Chongqing Renhe Pharmacy", the entities "Chongqing" and "Renhe Pharmacy" can be extracted.

[0062] In this embodiment, the entity extraction method used for updating the entity library includes at least one entity extraction method different from the entity extraction method used for the online query service. Since at least one entity extraction method different from the online query service is used, it is possible to extract entities from the query request in at least one different entity extraction method, that is, the entity extraction method is increased, so that the probability of entities in the query request being extracted is increased, that is, different entity extraction methods can be used for historical query requests to extract more entities, or to mine entities that have not been extracted before.

[0063] Among them, the entity extraction method used in the entity library update process gives priority to accuracy, so that the extracted candidate entities are as high-confidence entities as possible.

[0064] In one embodiment, the entity extraction method used for updating the entity library includes two parallel processing methods, and the union of the results of the two entity methods is taken as the result of the query request as the candidate entity. For example, one is to use template matching. Among them, the matching templates used in different business scenarios should take into account the specific needs of the business scenarios. In other words, the matching templates used in different business scenarios are different and are determined in combination with specific needs. Taking the music platform as an example, query requests usually include keywords such as "I want to listen to ***", "I want to watch ***", "Play ***", etc. Based on this, "I want to listen to ***", "I want to watch ***", "Play ***" and "Play ***" can be used as matching templates. For example, for a query request "I want to watch the news broadcast", the entity "News Broadcast" can be extracted using the matching template "I want to watch ***". Among them, the matching template can be obtained by statistically analyzing the high-frequency query requests of the log, so that the matching template can match the needs of the online query business and accurately extract the candidate entities in the log.

[0065] The other is to use the entity extraction model. Based on consistency considerations, the entity extraction template used for entity library updates is the same as the entity extraction model used for online query services. Specifically, the entity extraction model is used to identify entities that are not in the entity library and select candidate entities with high probability.

[0066] Step 208: If the candidate entity is not in the entity library, then add the candidate entity to the entity library.

[0067] Specifically, the candidate entities are further filtered with the entities already existing in the entity library to avoid duplicate entities in the entity library. When the candidate entity does not exist in the entity library, the candidate entity is added to the entity library so that the entities in the entity library are continuously supplemented.

[0068] The above-mentioned entity library update method can automatically trigger the entity library update when the first entity library update condition is met. The query request represents the user demand. Accurately extracting entities from the query request can help understand the user demand. Therefore, the historical query request is obtained from the log data of the online query service as the query request to be queried. At least one entity extraction method different from that used by the online query service is used to extract entities from the query request to be queried. Thus, by using different entity extraction methods for the historical query request, more entities are extracted, or entities that have not been extracted before are mined, so as to realize the automatic supplement of the entity library. As the entity library is continuously supplemented, the entity library is enriched, thereby promoting the accuracy of online queries.

[0069] In another embodiment, obtaining historical query requests from the log data of the online query service as requests to be queried includes: obtaining query requests from historical query requests where entity extraction fails according to the log data of the online query service as requests to be queried.

[0070] Specifically, for online query services, most of its query requests can accurately extract entities. When only query requests that failed to extract entities in historical query requests are used as pending query requests, only these query requests that failed to extract entities can be used to extract entities using at least one entity extraction method different from that used by online query services. On the one hand, the amount of data to be processed for entity library updates can be reduced, and this reduced amount of data is the data that has been successfully identified in the past, that is, it exists in the entity library. Reducing this amount of data will not lead to a reduction in the amount of entity supplementation due to the reduction in data sources. On the other hand, after reducing the amount of data in pending query requests, the processing efficiency can be improved. That is, while ensuring processing efficiency, the update quality is not reduced.

[0071] Among them, in the online query business, query requests for successful entity extraction and query requests for failed entity extraction are marked with different identifiers. When supplementing entities based on historical data, query requests for failed entity extraction can be quickly extracted according to the tags of historical query requests.

[0072] In another embodiment, the first entity library update condition includes: the first condition: the current time reaches the preset scheduled update time, that is, by setting the update frequency, the entity library is regularly triggered to update, such as triggering the entity library to update every week, so as to achieve regular automatic update of the entity library.

[0073] The first entity library update condition is also: the number of query requests for online query services in the current update cycle reaches a preset value. That is, when the query business volume is greater than the preset value, the entity library update is triggered. When the query business volume is greater than the threshold, it means that the query business volume in the current update cycle has reached a high level, and the possibility of entities to be supplemented increases. At this time, triggering the entity library update can achieve a better effect.

[0074] The first entity library update condition may also be: the number of query requests that failed to extract entities in the online query business during the current update cycle reaches a preset value. When the number of failed entity extractions reaches the preset value, it indicates that there are a certain number of query requests that failed to extract entities during the current update cycle, that is, the number of query requests that cannot be extracted by the entity extraction method currently used by the online query system reaches the preset value. At this time, triggering the entity library update can achieve a better effect.

[0075] The first entity library update condition may also include: the proportion of query requests with failed entity extraction in the online query business in the current update cycle reaches a preset value. The proportion of query requests with failed entity extraction in the online query request business is specifically the proportion of query requests with failed entity extraction to total query requests. When this proportion increases, it means that the number of query requests that cannot be extracted by the entity extraction method currently used by the online query system has reached a preset value. At this time, triggering the entity library update can achieve a better effect.

[0076] In another embodiment, the method for obtaining candidate entities also includes: when the second entity library update condition is met, triggering the entity library update, crawling web page content from a preset business-related website; according to the business scenario, using a corresponding parsing method to parse the web page content to obtain the candidate entity.

[0077] The second entity library update condition includes a time condition, that is, a timed trigger to update the entity library by crawling. The time of the second entity library update condition can be shorter than the time of the first entity library update condition, such as triggering the entity library update every day, thereby realizing regular automatic update of the entity library.

[0078] Different application platforms have different preset business-related websites. The preset business-related website should be an authoritative website in the field of the platform, or a website with matching professionalism. For example, if the business scenario is a medical scenario, the preset related website can be a hospital website, or a website related to medical services. If the business scenario is a multimedia application, the preset business-related website can be a website of a music publishing platform or a website of a video publishing platform.

[0079] The URL of the business-related website can be preset, and when the second entity library update condition is met, the webpage content is crawled from the preset business-related website. The URL of the business-related website can be added or deleted and maintained manually according to business needs. The crawling can be implemented based on the python crawler framework Scrapy (which integrates webpage crawling, webpage parsing and other functions).

[0080] According to the business scenario, the web page content is parsed using the corresponding parsing method to obtain candidate entities. Different business scenarios have different entity contents to be extracted, and the parsing methods are also different. But in general, it is usually parsed according to preset keywords of preset entity attributes. In other words, for different business scenarios, different parsing keywords can be preset according to entity attributes. If the business scenario is a medical scenario, the preset keywords can be name and department name. By parsing the name field and the department name field, the doctor's name can be parsed as an entity, and the department name can be parsed as an entity. For another example, when the business scenario is a multimedia application, the preset keywords can be song names, movie names, singer names, director names, etc., then by parsing the name field, the song name and movie name can be parsed as entities, and by parsing the name field, the singer and director names can be parsed as entities.

[0081] Taking multimedia applications as an example, when the update conditions of the second entity library are met, the crawler regularly crawls movie names, song names, etc. from popular video and song websites. For example, for the ** video website, since only the names need to be crawled, the whole process can be quickly parsed. This can be implemented based on the python crawler framework Scrapy (which integrates web crawling, web parsing and other functions), crawling its web page content and parsing out the movie names, TV series names, and cartoon names. Since it is entity data crawled from professional video websites, the quality is very high, and the entities corresponding to the latest movies, TV series, cartoons, etc. that have been launched can be added to the library in a timely manner. The later stage of this supplementary process is mainly incremental updates, which mainly solve the latest TV series names, movie names, song names, etc., so that the system can handle new word entities.

[0082] In another embodiment, the method of obtaining candidate entities further includes: obtaining a candidate entity set pushed by a third party through an entity update interface, and cleaning each entity in the candidate entity set according to a preset cleaning rule to obtain the candidate entity.

[0083] Specifically, the third parties in platform cooperation have their own requirements for entities. For example, the TV manufacturers in the home appliance category that cooperate with the multimedia platform have their own requirements for multimedia entities. In response to this situation, the platform has developed an interface for entity update docking. The third party calls the interface and pushes a customized entity set. However, since the multimedia entities customized by the third party may not conform to the entity rules of the platform, in actual operation, it is still necessary to further clean the candidate entity set uploaded through the entity update interface according to the preset cleaning rules.

[0084] Among them, the preset cleaning rules are set according to the entity expressions commonly used in the business scenario. The purpose is to convert similar entity expressions into entity expressions that conform to the platform rules. Taking the multimedia platform as an example, the preset cleaning rules may include: 1. Only filter entities with a character length greater than 16 and without the keyword "之" in the content; 2. Replace the results of "* season", "* episode", "* part", and "chapter" with empty; 3. Filter special symbols. After cleaning, the entity originally "Infernal Affairs 3" can be converted to "Infernal Affairs", and the entity originally "The Legend of the Condor Heroes (Hong Kong and Taiwan version)" can be uniformly converted to "The Legend of the Condor Heroes". Among them, data cleaning can be processed using the corresponding regular expressions.

[0085] This entity example provides a way for the third party to autonomously update the entity library, provides customized entities that meet the requirements, and converts the customized entities into entity expressions that meet the platform requirements through cleaning.

[0086] In another embodiment, the method for obtaining candidate entities further includes: obtaining the candidate entities added on the entity addition page.

[0087] Specifically, a manual operation page can also be provided for personnel such as development, operation and maintenance, and products to operate. For example, for the initial import of entity data, a data modification interface is provided through the entity addition page in the later stage. In one embodiment, the entity addition page is as Figure 4 shown.

[0088] This embodiment provides a way for development to update the entity library.

[0089] In another embodiment, after the updated entity library, the supplemented entities are published to the online query service in real time. By publishing the entities to the online query service in real time, the changes in the data are updated to the online query service in real time, eliminating the need for manual periodic publishing by humans, and enabling the online query service to take effect in seconds.

[0090] In another embodiment, for the update record of the entity library, an email backup record is sent to the mailbox of the relevant personnel, so that the change of each data can be traced back to history, which is necessary for monitoring the amount of data update each time. Among them, the backup record includes information such as the update method, the name of the updated entity, the update time, the operator and the operation time.

[0091] In another embodiment, Figure 5 As shown, the entity library update method uses multiple complementary methods in parallel to achieve a closed-loop update of the entity library. Specifically, it includes:

[0092] The first method is to mine entities from log data, with a weekly update frequency. Figure 5 As shown, historical query requests are obtained from the online query service log data as the request to be queried, and at least one entity extraction method different from that used by the online query service is used to extract entities from the request to be queried to obtain candidate entities. The entity extraction method can use template matching and entity extraction models. For candidate entities, they are filtered with the existing entity library. If they are not included in the existing entity library, the entities are added to the entity library.

[0093] The second method is to pre-set the crawling of related website entities and update them every day. Figure 5 As shown, the preset business-related website crawls web page content, parses the web page content, and obtains candidate entities. For the candidate entities, they are filtered with the existing entity library. If they are not included in the existing entity library, the entities are added to the entity library.

[0094] The third method: push entities through the entity update interface, with a monthly update frequency. Obtain the candidate entity set pushed by the third party through the entity update interface, clean each entity in the candidate entity set according to the preset cleaning rules, and obtain the candidate entity. For the candidate entity, filter it with the existing entity library. If it is not included in the existing entity library, add the entity to the entity library.

[0095] The fourth type: update entities manually on the page, with real-time update frequency. Obtain candidate entities added on the entity addition page, which can be manually added or deleted. For candidate entities, filter them with the existing entity library. If they are not included in the existing entity library, add the entity to the entity library.

[0096] The above four update methods are carried out in parallel to ensure that the entity data is as complete as possible, while ensuring that popular resources are updated in a timely manner. In order of importance, they are: mining entities from log data, crawling entities from related websites, automatic import interfaces provided by third parties, and manual operation pages on the platform for quick resolution of online problems. And when the entity data is updated to the entity library, the changed entity data will be notified to each online semantic component service in the form of a stream, which will directly affect the online service. The whole process takes effect in seconds; and each update detail has an email backup record for easy rollback.

[0097] Among them, in order to test the effect of each entity update method, manual sampling inspection can be carried out regularly and the update strategy can be adjusted in time. From the sampling inspection effect, the first update method has the best effect. The accuracy rate of candidate entities mined from log data can reach 85%, which has a good effect on data supplementation.

[0098] The entity library updating method of the present application is applied to the multimedia platform, the entity data accumulated by the entity supplement process and the improvement of the system effect.

[0099] Specifically, the accumulation of entity data in total consists of the above four processes: log mining stores about 5K entities each time; popular website crawling stores about 100 entities each time (since it is an incremental update, except for the first crawl of more entity data, the subsequent incremental part is less, mainly to solve the problem of new movies and TV series); third parties generally update data monthly. Currently, the platform has accumulated about 600,000+ entity data (including about 450,000 singers, about 100,000 movies, about 30,000 TV series, and about 35,000 cartoons).

[0100] The help to the final effect of the platform is mainly reflected in the stable trend of online indicators. If at a certain point in time, the online indicators are optimized to 90%, if the entire system cannot be closed-loop self-updated and optimized, then as time goes on, the system's indicators will definitely decline. For example, on the TV side, users' query requests will definitely tend to the latest and most popular TV series, movies, songs, etc., and these multimedia entities have novelty and timeliness, which may cause the platform entity library to not exist. If the system cannot update the data by itself, then when solving these problems, it may fail to process, and then the platform's indicators will most likely decline (this is a characteristic of multimedia scenarios). After adopting the entity library update method of this application, the indicators of the online system change more smoothly and stably, and the entity library update records are regularly checked, and records of new entities being stored can be found, indicating that the entire data update closed-loop system is in line with expectations.

[0101] This application mainly establishes a mechanism for automatic update and mining on the issue of entity maintenance and update. This has brought a great positive improvement to the final effect of the platform system, especially for the extraction of multimedia entities. Multimedia entity-related skills are a relatively high-frequency usage scenario in the dialogue system, and entities often represent the key information expression in the user's query request. Whether the entity dictionary is rich enough has a great impact on the extraction. Otherwise, no matter how good the model is, it is difficult for a good cook to cook without rice. Therefore, if you want to improve the effect of the entire system, both the algorithm and data directions cannot be missed. This application mainly establishes a complete closed-loop mechanism from the perspective of data to solve this problem. Whether it is from the accumulation of entity data, or from the latest entity data flowing back to the system, and ultimately improving the online system's analysis of the latest entity data in the user's original request, it has met expectations well.

[0102] It should be understood that although Figure 2 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.

[0103] In one embodiment, Figure 6 As shown, an entity library update device is provided. The device can adopt a software module or a hardware module, or a combination of the two to become a part of a computer device. The device specifically includes: an update trigger module 502, a log processing module 504, an entity extraction module 506 and a supplement module 508, wherein:

[0104] An update triggering module 502, configured to trigger an entity library update when a first entity library update condition is met;

[0105] The log processing module 504 is used to obtain historical query requests from the log data of the online query service as the request to be queried;

[0106] An entity extraction module 506, configured to extract entities from the query request using at least one entity extraction method different from that used by the online query service to obtain candidate entities;

[0107] The supplement module 508 is configured to supplement the candidate entity to the entity library if the candidate entity is not in the entity library.

[0108] The above-mentioned entity library update device can automatically trigger the entity library update when the first entity library update condition is met. The query request represents the user demand. Accurately extracting entities from the query request can help understand the user demand. Therefore, the historical query request is obtained from the log data of the online query service as the query request to be queried. At least one entity extraction method different from that used by the online query service is used to extract entities from the query request to be queried. Thus, by using different entity extraction methods for the historical query request, more entities are extracted, or entities that have not been extracted before are mined, so as to realize the automatic supplement of the entity library. As the entity library is continuously supplemented, the entity library is enriched, thereby promoting the accuracy of online queries.

[0109] In another embodiment, the log processing module is used to: obtain, according to log data, query requests in which entity extraction fails in historical query requests as pending query requests.

[0110] In another embodiment, the first entity library update condition includes at least one of the following:

[0111] The first one: the current time reaches the preset scheduled update time;

[0112] The second type: the number of online query requests in the current update cycle reaches the preset value;

[0113] The third type: the number of query requests that failed to extract entities in the online query business during the current update cycle reaches the preset value;

[0114] The fourth type: The proportion of query requests in which entity extraction fails in the online query business in the current update cycle reaches the preset value.

[0115] In another embodiment, it also includes a crawling module and a parsing module;

[0116] An update trigger module, used to trigger the entity library update when the second entity library update condition is met;

[0117] The crawling module is used to crawl web page content from preset business-related websites;

[0118] The parsing module is used to parse the web page content in a corresponding parsing manner according to the business scenario to obtain candidate entities.

[0119] In another embodiment, it further includes: an interface processing module, which is used to obtain a candidate entity set pushed by a third party through an entity update interface, and clean each entity in the candidate entity set according to a preset cleaning rule to obtain a candidate entity.

[0120] In another embodiment, it also includes: a page processing module, which is used to obtain candidate entities added to the entity addition page.

[0121] In another embodiment, a publishing module is further included, for publishing the supplemented entity to the online query service in real time.

[0122] The specific definition of the entity library update device can be found in the definition of the entity library update method above, which will not be repeated here. Each module in the above-mentioned entity library update device can be implemented in whole or in part by software, hardware and their combination. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0123] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 7 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store entity data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for updating an entity library is implemented.

[0124] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0125] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0126] In one embodiment, a computer-readable storage medium is provided, storing a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0127] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0128] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0129] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0130] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0131] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A method for updating an entity library, the method comprising: According to the update frequency of daily updates, web page content is obtained from a preset business-related website related to the business scenario, and the web page content is parsed using a parsing method corresponding to the business scenario. If the candidate entity obtained by the parsing is not in the entity library, the candidate entity obtained by the parsing is added to the entity library; According to the update frequency of weekly update, when the number of query requests for entity extraction failure in the online query service in the current update period reaches a first preset value, the proportion of query requests reaches a second preset value, the current time reaches a preset scheduled update time, or the number of query requests for the online query service in the current update period reaches a preset value, the query request for entity extraction failure is obtained from the log data of the online query service as the request to be queried; at least one entity extraction method different from that used by the online query service is used to perform entity extraction on the request to be queried to obtain a candidate entity; if the candidate entity is not in the entity library, the candidate entity is added to the entity library; According to the update frequency of monthly update, the candidate entity set pushed by the third party is obtained through the entity update interface, and each entity in the candidate entity set is cleaned according to the preset cleaning rules to obtain the candidate entity that meets the rules of the platform to which the online query business belongs. If the candidate entity obtained by cleaning is not in the entity library, the candidate entity obtained by cleaning is added to the entity library; Acquire candidate entities added on the entity adding page in real time, and if the acquired candidate entities are not in the entity library, add the acquired candidate entities to the entity library; Publishing the entities added to the entity library to the online query service; A backup email for tracing the update of the entity library is sent in the form of an email.

2. The method according to claim 1, characterized in that The method further comprises: Using an entity extraction model, extracting entities from the query request to obtain entities extracted by the entity extraction model; the entity extraction model is the same as the entity extraction model used by the online query service; The adopting at least one entity extraction method different from that used by the online query service to extract entities from the query request to obtain candidate entities includes: Template matching is used to extract entities from the query request to obtain entities obtained by template matching, and the entities extracted by the entity extraction model and the entities obtained by template matching are combined to obtain candidate entities.

3. The method according to claim 1, characterized in that The entity extraction method used by the online query service is entity extraction model extraction or template matching extraction.

4. The method according to any one of claims 1 to 3, characterized in that: The publishing of the entities added to the entity library to the online query service includes: The entities added to the entity library are published to the online query service in real time.

5. A physical library updating device, characterized in that: The device comprises: A log processing module, which is used to update at a weekly frequency, and obtain query requests for which entity extraction failed in the online query service in the current update period as requests to be queried from the log data of the online query service when the number of query requests for which entity extraction failed in the online query service in the current update period reaches a first preset value, the proportion of query requests reaches a second preset value, the current time reaches a preset scheduled update time, or the number of query requests for the online query service in the current update period reaches a preset value; an entity extraction module, which is used to extract entities from the requests to be queried using at least one entity extraction method different from that used by the online query service to obtain candidate entities; A supplement module, configured to supplement the candidate entity to the entity library if the candidate entity is not in the entity library; The interface processing module is used to obtain the candidate entity set pushed by the third party through the entity update interface according to the update frequency of monthly update, clean each entity in the candidate entity set according to the preset cleaning rules, and obtain the candidate entity that meets the rules of the platform to which the online query service belongs. If the candidate entity obtained by cleaning is not in the entity library, the candidate entity obtained by cleaning is added to the entity library; the publishing module is used to publish the entity added to the entity library to the online query service; The device is also used for: obtaining web page content from preset business-related websites related to business scenarios at a daily update frequency, parsing the web page content using a parsing method corresponding to the business scenario, and if the candidate entity obtained by the parsing is not in the entity library, adding the candidate entity obtained by the parsing to the entity library; obtaining the candidate entity added on the entity adding page in real time, and if the obtained candidate entity is not in the entity library, adding the obtained candidate entity to the entity library; and sending a backup email for tracing the update of the entity library by email.

6. The device according to claim 5, characterized in that The entity extraction module is further used for: Using an entity extraction model, extracting entities from the query request to obtain entities extracted by the entity extraction model; the entity extraction model is the same as the entity extraction model used by the online query service; Template matching is used to extract entities from the query request to obtain entities obtained by template matching, and the entities extracted by the entity extraction model and the entities obtained by template matching are combined to obtain candidate entities.

7. The device according to claim 5, characterized in that The entity extraction method used by the online query service is entity extraction model extraction or template matching extraction.

8. The device according to any one of claims 5 to 7, characterized in that: The publishing module is also used for: The entities added to the entity library are published to the online query service in real time.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Entity library expansion method and device

    CN104102739A

  • Query analysis-based map optimization method, apparatus and device, and medium

    CN113254671A