Information query method and device, medium and electronic equipment

Through the combination of entity recognition model and text matching model, the central entity words in query information are identified, which solves the problems of poor information matching degree and high cost of rule database construction in the existing technology, and achieves more accurate information query and higher User experience.

CN119106109APending Publication Date: 2024-12-10TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310671774.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-07
Publication Date
2024-12-10

AI Technical Summary

Technical Problem

The prior art cannot accurately identify the central entity words that users want to search in the query information, resulting in poor information matching. The construction of the rule base depends on manpower and time, making it difficult to guarantee coverage.

Method used

The candidate entity words are extracted through the pre-trained entity recognition model, and the matching degree between the candidate entity words and query information is determined by combining the text matching model, accurately identify the central entity words, reduce manual intervention and cost, and improve coverage.

Benefits of technology

It significantly improves the recognition accuracy of the central entity word, reduces the recognition errors and omissions of candidate entity word, improves the accuracy and user experience of information query, reduces labor costs, and enhances the relevance of search results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119106109A_ABST
    Figure CN119106109A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an information query method and device, a computer readable medium and electronic equipment. The method comprises the steps that query information to be recognized is acquired; extracting a plurality of candidate entity words corresponding to the to-be-recognized query information through an entity recognition model, wherein the candidate entity words comprise at least one type of entity words: the entity words contained in the to-be-recognized query information and the entity words which are not contained in the to-be-recognized query information but are related to the to-be-recognized query information; respectively determining the matching degree between each candidate entity word and the query information to be identified; according to the matching degree of the candidate entity words and the to-be-recognized query information, a center entity word of the to-be-recognized query information is determined from the candidate entity words, and the center entity word is the entity word most capable of representing the to-be-recognized query information; and obtaining a query result matched with the to-be-identified query information based on the central entity word. According to the embodiment of the invention, the accuracy of identifying the central entity word of the to-be-identified query information can be improved, so that information query can be carried out more accurately.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of natural language processing, and in particular to a method, device, computer-readable medium and electronic device for querying information. Background Art

[0002] Searching for information by inputting search information is the main way for users to obtain information on the Internet.

[0003] The search information submitted by the user may contain more than one entity word. If the search information contains multiple entity words, there may be only one entity word that the user wants to search for.

[0004] However, existing solutions cannot accurately determine which entity word the user wants to search for based on the retrieval information, resulting in a poor match between the information returned to the user and the user's retrieval information. Summary of the invention

[0005] The embodiments of the present application provide a method, device, computer-readable medium and electronic device for querying information, which can more accurately identify the central entity words of the query information to be identified, at least to a certain extent, and thus enable more precise information query.

[0006] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.

[0007] According to one aspect of an embodiment of the present application, a method for querying information is provided, the method comprising: obtaining query information to be identified; extracting a plurality of candidate entity words corresponding to the query information to be identified through a pre-trained entity recognition model; , The multiple candidate entity words include at least one type of entity words selected from the following: entity words included in the query information to be identified, and entity words not included in the query information to be identified but related to the query information to be identified; respectively determining the degree of match between each candidate entity word and the query information to be identified; determining the central entity word of the query information to be identified from each candidate entity word according to the degree of match between each candidate entity word and the query information to be identified, the central entity word being the entity word that best represents the query information to be identified; and obtaining a query result matching the query information to be identified based on the central entity word.

[0008] According to one aspect of an embodiment of the present application, a device for querying information is provided, the device comprising: an acquisition unit, configured to acquire query information to be identified; an extraction unit, configured to extract a plurality of candidate entity words corresponding to the query information to be identified through a pre-trained entity recognition model, the plurality of candidate entity words comprising at least one type of entity words selected from the following: entity words included in the query information to be identified, entity words not included in the query information to be identified but related to the query information to be identified; a matching degree determination unit, configured to respectively determine the matching degree of each candidate entity word with the query information to be identified; a central entity word determination unit, configured to determine the central entity word of the query information to be identified from each candidate entity word according to the matching degree of each candidate entity word with the query information to be identified, the central entity word being the entity word that best represents the query information to be identified; and a query unit, configured to obtain a query result matching the query information to be identified based on the central entity word.

[0009] In some embodiments of the present application, based on the aforementioned scheme, the extraction unit is configured to: input the query information to be identified into a pre-trained entity recognition model to obtain at least one first entity word extracted by the entity recognition model; perform entity word matching on the query information to be identified based on a pre-constructed entity word dictionary to obtain at least one second entity word in the query information to be identified, and the entity word dictionary includes multiple entity words; generate multiple candidate entity words corresponding to the query information to be identified based on the first entity word and the second entity word.

[0010] In some embodiments of the present application, based on the aforementioned scheme, the extraction unit is configured to: deduplicate the first entity word and the second entity word to obtain the deduplicated first entity word and the deduplicated second entity word; determine the union of the deduplicated first entity word and the deduplicated second entity word, and use the entity words in the union as candidate entity words.

[0011] In some embodiments of the present application, based on the aforementioned scheme, the matching degree determination unit is configured as follows: each candidate entity word is respectively concatenated with the query information to be identified to obtain each concatenated information; each concatenated information is respectively input into a text matching model, and encoding and classification operations are performed in the text matching model in sequence to obtain a classification probability output by the text matching model, wherein the text matching model is trained based on a training sample set, and the training sample set includes multiple positive samples and multiple negative samples, the positive sample is a text pair consisting of a first query information and a central entity word in the first query information, and the negative sample is a text pair consisting of a second query information and a non-central entity word, and the non-central entity word is different from the central entity word in the second query information; the classification probability corresponding to each concatenated information is used as the matching degree of the corresponding candidate entity word and the query information to be identified.

[0012] In some embodiments of the present application, based on the aforementioned scheme, the device also includes a rule base matching unit, and the rule base matching unit is used to determine the central entity word corresponding to the query information to be identified based on the rules in the preset rule base when the query information to be identified matches the rules in the preset rule base.

[0013] In some embodiments of the present application, based on the above-mentioned scheme, the central entity word determination unit is configured to: use the candidate entity word with the highest matching degree with the query information to be identified as the central entity word of the query information to be identified.

[0014] In some embodiments of the present application, based on the aforementioned scheme, the extraction unit is configured to: perform at least one of the following preprocessing operations on the query information to be identified, to obtain at least one preprocessed query information to be identified: error correction processing, rewriting processing, and expansion processing, wherein the error correction processing is used to correct the erroneous content in the query information to be identified, the rewriting processing is used to replace at least one word in the query information to be identified with a synonym, and the expansion processing is used to replace at least one word in the query information to be identified with a subordinate word; extract candidate entity words from each preprocessed query information to be identified through the pre-trained entity recognition model as the candidate entity words corresponding to the query information to be identified.

[0015] In some embodiments of the present application, based on the aforementioned scheme, the central entity word is the central product word, and the query unit is configured to: match the central entity word corresponding to the query information to be identified and each candidate entity word other than the central entity word with the product words of the products in the product library to obtain a matching result; obtain product information matching the query information to be identified based on the matching result; and return the product information to the sender of the query information to be identified.

[0016] In some embodiments of the present application, based on the aforementioned scheme, the matching result is the matching degree between the query information to be identified and each product in the product library, and the query unit is configured to: obtain product information of a predetermined number of products with the highest matching degree with the query information to be identified, as the product information matching the query information to be identified.

[0017] According to one aspect of an embodiment of the present application, a computer-readable medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method for querying information as described in the above embodiment is implemented.

[0018] According to one aspect of an embodiment of the present application, an electronic device is provided, comprising: one or more processors; a storage device for storing one or more programs, which, when the one or more programs are executed by the one or more processors, enables the one or more processors to implement the method for querying information as described in the above embodiments.

[0019] According to one aspect of an embodiment of the present application, a computer program product is provided, which includes computer instructions, wherein the computer instructions are stored in a computer-readable storage medium, a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method for querying information as described in the above embodiments.

[0020] In the technical solutions provided in some embodiments of the present application, after obtaining the query information to be identified, a plurality of candidate entity words corresponding to the query information to be identified are extracted by first using the pre-trained entity recognition model, and then the matching degree of each candidate entity word with the query information to be identified is determined, and the central entity word is determined from each candidate entity word according to the matching degree of each candidate entity word with the query information to be identified, and finally the query result matching the query information to be identified is obtained based on the central entity word. The candidate entity words can be accurately identified by the entity recognition model, and the recognition errors and omissions of the candidate entity words can be avoided to the greatest extent. Then, the central entity word can be accurately determined by matching each candidate entity word with the query information to be identified. Therefore, the embodiment of the present application can significantly improve the accuracy of identifying the central entity word of the query information to be identified by combining entity recognition with the matching of the candidate entity words with the query information to be identified, and then the information query can be more accurately performed, so that the query results obtained are more likely to be what the user needs, thereby improving the user experience.

[0021] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0023] Figure 1 A schematic diagram showing an exemplary system architecture to which the technical solution of the embodiments of the present application can be applied;

[0024] Figure 2 A flowchart of a method for querying information according to an embodiment of the present application is shown;

[0025] Figure 3 A schematic diagram showing an overall framework according to an embodiment of the present application is shown;

[0026] Figure 4 An embodiment according to the present application is shown. Figure 2 A flowchart of the details of step 220 in an embodiment;

[0027] Figure 5 An embodiment according to the present application is shown. Figure 4 A flowchart of the details of step 223 in the embodiment;

[0028] Figure 6 An embodiment according to the present application is shown. Figure 2 A flowchart of the details of step 230 in an embodiment;

[0029] Figure 7 A schematic diagram of a network structure of a text matching model according to an embodiment of the present application is shown;

[0030] Figure 8 An embodiment according to the present application is shown. Figure 2 A flowchart of the details of step 240 in an embodiment;

[0031] Fig. 9 An embodiment according to the present application is shown. Figure 2 A flowchart of the details of step 250 in an embodiment;

[0032] Fig.10 An embodiment according to the present application is shown. Fig. 9 A flowchart of the details of step 252 in the embodiment;

[0033] Fig.11 A schematic diagram of a process of an e-commerce search scenario according to an embodiment of the present application is shown;

[0034] Fig.12 A block diagram of a device for querying information according to an embodiment of the present application is shown;

[0035] Fig.13 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown. DETAILED DESCRIPTION

[0036] 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 this application will be more comprehensive and complete and fully convey the concept of the example embodiments to those skilled in the art.

[0037] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, known methods, devices, realizations or operations are not shown or described in detail to avoid blurring the various aspects of the application.

[0038] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0039] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.

[0040] In the e-commerce search scenario, users actively enter query information (query) to clearly express their needs, and then the e-commerce search engine retrieves the corresponding products from the product library and finally displays them to the user. Query information understanding is a key link in the search system. In the e-commerce search field, it mainly includes subtasks such as search intent recognition and brand word, product word, central product word, and attribute word recognition. Query information often contains multiple product words. For example, celery and pork dumplings contain three product words: celery, pork, and dumplings, but dumplings are the only product that users really want to search for. The central product word recognition task is used to solve the central word recognition problem in this multi-product word scenario.

[0041] In the related art, the core product word recognition is mainly based on the product word recognition task and the rule base establishment task. However, both tasks have certain defects, as follows:

[0042] 1. Product word recognition task. Usually, the product word recognition task builds a product word recognition model and trains it on the query corpus. Since the training corpus is incomplete or the distribution is inconsistent with the natural query distribution, there will be problems with product word recognition errors and product word recognition omissions. Identifying incorrect product words and omitting product words will lead to errors in the central product word, which will in turn lead to the wrong products being displayed in the search, or even no matching products to be displayed.

[0043] 2. Rule base construction task. The rule base construction task requires the collection of a large amount of data for statistics, which requires manpower and time costs. The analysis and writing of rules also require professional technicians, with a lot of manual intervention and insufficient automation. In addition, although the accuracy of rule matching is high, each rule only solves a specific query, and coverage is difficult to guarantee.

[0044] To this end, the present application first provides a method for querying information. The method for querying information provided by the embodiment of the present application can overcome the above-mentioned defects. On the one hand, it no longer relies mainly on the construction of a rule base, and the manpower and time costs are low; on the other hand, it can greatly reduce the omissions and errors in the candidate entity word recognition process by first accurately identifying the candidate entity words using an entity recognition model, and then accurately determine the central entity word by matching each candidate entity word with the query information to be identified.

[0045] Figure 1 A schematic diagram of an exemplary system architecture to which the technical solution of the embodiment of the present application can be applied is shown. Figure 1 As shown, the system architecture 100 may include a user terminal 110, a front-end server 120, a commodity product vocabulary 130, and a cloud 140. A communication connection is established between the user terminal 110 and the front-end server 120, and the front-end server 120 also establishes a communication connection with the cloud 140 and the commodity product vocabulary 130. The user terminal 110 is installed with a client of the e-commerce platform; the front-end server 120 is deployed with a server of the e-commerce platform, and the server is embedded with a pre-trained entity recognition model and a text matching model; the cloud 140 stores commodity information of commodities, and the commodity product vocabulary 130 stores a number of product words corresponding to each commodity. The front-end server 120 is the executor of the embodiment of the present application. When a method for querying information provided by the present application is applied to Figure 1In the system architecture shown, a process may be as follows: first, the user enters query information by typing on a virtual keyboard through the client of the e-commerce platform installed on the user terminal 110, and the query information indicates the product that the user wants to buy, such as "celery and pork dumplings"; then, when the user clicks the "search" or "query button" displayed on the human-computer interaction interface of the client, the user terminal 110 will obtain the query information and send the query information to the front-end server 120; next, the server end of the front-end server 120 first uses the entity recognition model to identify multiple candidate entity words in the query information. For example, the three candidate entities "celery", "pork" and "dumplings" can be identified from the query information "celery and pork dumplings". word; then, the server side of the front-end server 120 uses the text matching model to determine the matching degree of each candidate entity word with the query information, and uses the candidate entity word with the highest matching degree with the query information as the identified central entity word. For example, the central entity word identified in the query information of “celery and pork dumplings” may be “dumplings”; then, the front-end server 120 matches the central entity word and other candidate entity words corresponding to “celery and pork dumplings” with the product words corresponding to the product in the product product thesaurus 130, and determines the corresponding product with the highest matching degree; finally, the front-end server 120 obtains the corresponding product information from the cloud 140 according to the product, and returns the product information to the user terminal 110, so that the user can see the product information.

[0046] In some embodiments of the present application, the front-end server 120 is also provided with a pre-built entity word dictionary, and the front-end server 120 also uses the query information to match the entity word dictionary to obtain candidate entity words.

[0047] In some embodiments of the present application, after the front-end server 120 uses the entity recognition model to identify multiple candidate entity words in the query information, it determines whether each candidate entity word exists in a pre-constructed entity word dictionary, and takes all candidate entity words in the pre-constructed entity word dictionary as the final candidate entity words.

[0048] In some embodiments of the present application, the front-end server 120 determines a number of commodities with the highest matching degree, and returns the commodity information of all the determined commodities to the user terminal 110 .

[0049] It should be understood that Figure 1The number of user terminals, front-end servers, and commodity product thesaurus in the example is only illustrative. According to the implementation requirements, there can be any number of user terminals, front-end servers, and commodity product thesaurus, that is, there can be multiple user terminals, front-end servers, and commodity product thesaurus. For example, the front-end server can be a server cluster composed of multiple servers.

[0050] It should be noted that Figure 1 The embodiment shown is only one embodiment of the present application. Figure 1 In the scheme of the embodiment, it is mainly used for the scenario of commodity search on the e-commerce platform, but in other embodiments of the present application, it can also be applied to various other scenarios requiring information query, such as article query, book query, etc. Figure 1 In the scheme of the embodiment, the method for querying information is executed by the front-end server, and the user terminal is a smart phone. However, in other embodiments of the present application, the user terminal and the execution subject can also be various types of terminal devices such as laptop computers, desktop computers, tablet computers, vehicle-mounted terminals, portable wearable devices, workstations, etc.; although in Figure 1 In the scheme of the embodiment, the product words corresponding to the goods are stored in the product word library, the product information is stored in the cloud, and the method of querying information is executed by a separately set front-end server. However, in other embodiments of the present application, the product words corresponding to the goods and the product information can be stored in the cloud, and the method of querying information can also be executed by the cloud; although in Figure 1 In the solution of the embodiment, the user inputs the query information by typing on a virtual keyboard, but in other embodiments of the present application, the user can also enter the query information by voice, for example, by voice through an artificial intelligence assistant, that is, the client of the e-commerce platform indirectly obtains the query information from the user from the artificial intelligence assistant. The embodiments of the present application do not make any limitation on this, and the protection scope of the present application should not be limited in any way.

[0051] It is easy to understand that the method for querying information provided in the embodiment of the present application is generally executed by the server, and accordingly, the device for querying information is generally set in the server. However, in other embodiments of the present application, the terminal device may also have similar functions as the server, thereby executing the solution for querying information provided in the embodiment of the present application.

[0052] Therefore, the embodiments of the present application can be applied to a terminal or a server. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited to this. The terminal and the server can be directly or indirectly connected via wired or wireless communication, and this application is not limited here.

[0053] The solution of the embodiment of the present application can be applied to the field of cloud computing. Cloud computing is a computing model that distributes computing tasks on a resource pool composed of a large number of computers, so that various application systems can obtain computing power, storage space and information services as needed. The network that provides resources is called a "cloud". The resources in the "cloud" are infinitely expandable in the eyes of users, and can be obtained at any time, used on demand, expanded at any time, and paid for by use.

[0054] As a cloud computing basic capability provider, a cloud computing resource pool (referred to as a cloud platform, generally referred to as IaaS (Infrastructure as a Service)) will be established, and various types of virtual resources will be deployed in the resource pool for external customers to choose to use. The cloud computing resource pool mainly includes: computing devices (virtualized machines, including operating systems), storage devices, and network devices.

[0055] According to the logical function division, the PaaS (Platform as a Service) layer can be deployed on the IaaS (Infrastructure as a Service) layer, and the SaaS (Software as a Service) layer can be deployed on the PaaS layer. SaaS can also be deployed directly on IaaS. PaaS is a platform for software operation, such as databases, web containers, etc. SaaS is a variety of business software, such as web portals, SMS mass senders, etc. Generally speaking, SaaS and PaaS are upper layers relative to IaaS.

[0056] The implementation details of the technical solution of the embodiment of the present application are described in detail below:

[0057] Figure 2A flowchart of a method for querying information according to an embodiment of the present application is shown. The method for querying information can be executed by various devices capable of computing and processing, such as user terminals or cloud servers. User terminals include but are not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle terminals, aircraft, smart watches, etc. The solution of the embodiment of the present application can be applied to various scenarios requiring information query, such as e-commerce search. The following introduces the solution of the embodiment of the present application by using the solution of the embodiment of the present application as an example of how it can be applied to e-commerce search scenarios. Please refer to Figure 2 As shown, the method for querying information includes at least the following steps:

[0058] In step 210, query information to be identified is obtained.

[0059] The query information to be identified may be sent by a user through a query request. Therefore, the sender of the query information to be identified may be the user, and the query request may carry the query information to be identified input by the user.

[0060] The query information to be identified (query) can be the query information of the e-commerce search scenario submitted by the user. For example, the e-commerce platform can obtain the query information when the user enters the name of the product he wants to buy in the APP of the e-commerce platform. The query information to be identified is usually a paragraph of text, which may not contain any punctuation marks or may contain punctuation marks such as spaces, commas, and semicolons. For example, the query information to be identified can be "celery and pork dumplings".

[0061] In step 220, a plurality of candidate entity words corresponding to the query information to be identified are extracted by using the pre-trained entity recognition model. , The multiple candidate entity words include at least one type of entity words from the following categories: entity words included in the query information to be identified, and entity words not included in the query information to be identified but related to the query information to be identified.

[0062] The entity recognition model can complete the NER (Named Entity Recognition) task.

[0063] The entity recognition model can be constructed through the BERT (Bidirectional Encoder Representations from Transformer) model. Specifically, the original BERT model can be self-supervised pre-trained on a large amount of unlabeled corpus to obtain a pre-trained BERT model, which can be specifically done through the MLM (Masked Language Model) task and the NSP (Next sentence prediction) task; then, the pre-trained BERT model is fine-tuned using the corpus to finally obtain an entity recognition model. The corpus can include multiple segments of corpus and the annotation information corresponding to each segment of corpus. The annotation information here refers to the entity words in the corpus.

[0064] The entity recognition model built based on the BERT model can output the probability that each word belongs to an entity word, and finally select the entity words whose corresponding probabilities are greater than the predetermined probability threshold as candidate entity words.

[0065] Of course, an entity recognition model can also be built based on the Long Short-Term Memory (LSTM) model and Conditional Random Fields (CRF).

[0066] The candidate entity words can be directly extracted from the query information to be identified using the entity recognition model, or can be extracted from other information related to the query information to be identified (for example, information obtained by rewriting the query information to be identified) using the entity recognition model.

[0067] Figure 3 A schematic diagram of the overall framework according to an embodiment of the present application is shown. Figure 3 As shown in the figure, after the user inputs the query information to be identified, the first stage is entered to extract candidate product words, where the candidate product words are candidate entity words. It can be seen that the first stage includes the following contents: an entity recognition model is obtained based on training corpus, and then the entity recognition model is used to perform product word named entity recognition (NER), and finally the identified candidate entity words are obtained.

[0068] In one embodiment of the present application, a plurality of candidate entity words corresponding to the query information to be identified are extracted by a pre-trained entity recognition model, including: performing at least one of the following pre-processing operations on the query information to be identified, to obtain at least one pre-processed query information to be identified: error correction processing, rewriting processing, and expansion processing, wherein the error correction processing is used to correct the erroneous content in the query information to be identified, the rewriting processing is used to replace at least one word in the query information to be identified with a synonym, and the expansion processing is used to replace at least one word in the query information to be identified with a subordinate word. The pre-trained entity recognition model extracts candidate entity words from each pre-processed query information to be identified as candidate entity words corresponding to the query information to be identified.

[0069] For error correction processing, an example is as follows: the query information to be identified includes "pingguo", but the user actually wants to query "apple", then, through error correction processing, "pingguo" can be automatically modified to "apple"; for rewriting processing, an example is as follows: the query information to be identified includes "dumplings", then, through rewriting processing, "dumplings" can be automatically modified to "water dumplings"; for extension processing, an example is as follows: the query information to be identified includes "washing machine", then, through extension processing, "washing machine" can be automatically modified to "washer-dryer".

[0070] After the preprocessed query information to be identified is obtained, the same operation as the query information to be identified in the following embodiment may be performed on the preprocessed query information to be identified to obtain corresponding candidate entity words.

[0071] Figure 4 An embodiment according to the present application is shown. Figure 2 Flow chart of details of step 220 in the embodiment. Figure 4 As shown, extracting multiple candidate entity words corresponding to the query information to be identified through the pre-trained entity recognition model may specifically include the following steps:

[0072] In step 221, the query information to be recognized is input into a pre-trained entity recognition model to obtain at least one first entity word extracted by the entity recognition model.

[0073] As mentioned above, by building an entity recognition model based on a BERT model or a combination of an LSTM model and a CRF model, the first entity word in the query information to be recognized can be obtained. Usually, the first entity word extracted by the entity recognition model is often a noun.

[0074] In step 222, entity word matching is performed on the query information to be identified based on a pre-built entity word dictionary to obtain at least one second entity word in the query information to be identified, and the entity word dictionary includes a plurality of entity words.

[0075] Specifically, you can first use word segmentation tools such as Jieba to divide the query information to be identified into words; then, for each word divided, determine whether the word exists in the entity word dictionary, that is, determine whether there is a word consistent with the word in the entity word dictionary, so as to perform entity word matching; finally, the word that exists in the entity word dictionary in the divided word is used as the final second entity word.

[0076] In addition, the first embedding vector corresponding to each entity word in the entity word dictionary can be obtained in advance, and each divided word can be converted into a second embedding vector, and then the similarity between each first embedding vector and each second embedding vector can be determined respectively; then, for each divided word, if the similarity between the first embedding vector corresponding to an entity word in the entity word dictionary and the second embedding vector of the word is the largest, the entity word is used as the obtained second entity word.

[0077] Please continue to see Figure 3 As shown, stage one also includes matching product words based on a product word dictionary to extract candidate product words. The product word dictionary here is the entity word dictionary used in step 222 when the embodiment of the present application is applied to the e-commerce search scenario.

[0078] In one embodiment of the present application, after matching the entity words to be identified query information based on the pre-built entity word dictionary, the method for querying information may further include the following steps:

[0079] If the pre-constructed entity word dictionary does not include the first entity word extracted by the entity recognition model, the first entity word is added to the pre-constructed entity word dictionary.

[0080] The first entity word extracted by the entity recognition model may be an entity word that does not belong to the entity word dictionary. In an embodiment of the present application, by automatically adding a first entity word to a pre-constructed entity word dictionary when it does not exist in the pre-constructed entity word dictionary, the entity word dictionary is continuously updated, thereby providing a data basis for subsequent matching of candidate entity words.

[0081] In step 223, a plurality of candidate entity words corresponding to the query information to be identified are generated according to the first entity word and the second entity word.

[0082] The intersection of the first entity word and the second entity word may be taken as a candidate entity word.

[0083] Figure 5 An embodiment according to the present application is shown. Figure 4 Flow chart of details of step 223 in the embodiment. Please refer to Figure 5As shown, generating multiple candidate entity words corresponding to the query information to be identified according to the first entity word and the second entity word may specifically include the following steps:

[0084] In step 2231, the first entity word and the second entity word are deduplicated to obtain deduplicated first entity words and deduplicated second entity words.

[0085] The first entity word and / or the second entity word may contain repeated entity words, and the first entity word and the second entity word are deduplicated, that is, if the first entity word contains several repeated entity words, only one entity word is retained among these repeated entity words; if the second entity word contains several repeated entity words, only one entity word is retained among these repeated entity words. Finally, the deduplicated first entity word and the deduplicated second entity word can be obtained.

[0086] In step 2232, a union of the first entity word after deduplication and the second entity word after deduplication is determined, and the entity words in the union are used as candidate entity words.

[0087] The determined union includes all first entity words after deduplication and all second entity words after deduplication. If there are repeated entity words between the first entity words after deduplication and the second entity words after deduplication, only one of the repeated entity words is retained.

[0088] Please continue to see Figure 3 As shown, after stage one, a candidate product word list can be obtained, which includes product word 1 and product word 2, wherein the candidate product word list is the entity words in the union, product word 1 is the first entity word after deduplication, and product word 2 is the second entity word after deduplication.

[0089] In an embodiment of the present application, candidate entity words are extracted by combining an entity word dictionary with an entity recognition model, and the extraction results obtained by the two methods are merged by taking the union method, which greatly improves the accuracy and coverage of candidate entity word extraction and significantly reduces the possibility of incorrect candidate entity word recognition or missing candidate entity words.

[0090] In step 230, the matching degree between each candidate entity word and the query information to be identified is determined respectively.

[0091] For each candidate entity word, its matching degree with the query information to be identified must be determined.

[0092] Figure 6 An embodiment according to the present application is shown. Figure 2 Flow chart of details of step 230 in the embodiment. Figure 6As shown, respectively determining the matching degree between each candidate entity word and the query information to be identified may specifically include the following steps:

[0093] In step 231, each candidate entity word is concatenated with the query information to be identified to obtain concatenated information.

[0094] By concatenating each candidate entity word with the query information to be identified, a corresponding concatenated information can be obtained. Therefore, the number of concatenated information finally obtained is equal to the number of candidate entity words.

[0095] In step 232, each piece of spliced ​​information is respectively input into the text matching model, and encoding and classification operations are performed in the text matching model in sequence to obtain the classification probability output by the text matching model, wherein the text matching model is trained based on a training sample set, and the training sample set includes multiple positive samples and multiple negative samples, the positive sample is a text pair consisting of the first query information and the central entity word in the first query information, and the negative sample is a text pair consisting of the second query information and the non-central entity word, and the non-central entity word is different from the central entity word in the second query information.

[0096] The central entity word is the entity word that best represents the query information containing the central entity word.

[0097] The central entity word in the positive sample is the label corresponding to the first query information, and the non-central entity word in the negative sample is the label corresponding to the second query information. The non-central entity word in the negative sample can be other entity words in the entity words included in the second query information except the central entity word, or it can be an entity word that does not belong to the second query information.

[0098] The text matching model can also be trained based on the BERT (Bidirectional Encoder Representations from Transformer) model.

[0099] Please continue to see Figure 3 As shown, in stage 2, the BERT model is trained based on the training corpus, and then the trained BERT model is used to identify the central product word, and the training corpus is the training sample set in step 232. Before the BERT model is trained based on the training corpus, pre-training can be performed on a large-scale corpus based on the MLM (Masked Language Model) task and the NSP (Next sentence prediction) task, and then the BERT model is fine-tuned based on the training corpus.

[0100] Figure 7 FIG. 1 shows a schematic diagram of a network structure of a text matching model according to an embodiment of the present application. Figure 7 As shown, the BERT model may include an embedding layer, a BERT layer, and an output layer, wherein the BERT layer includes multiple stacked Transformer Encoder layers, each Transformer Encoder layer includes a multi-head self-attention mechanism layer and a feedforward neural network layer, and the output layer includes a fully connected layer and a sigmoid activation function layer connected to the fully connected layer. The processing flow of the text matching model is as follows: before the concatenated information is input into the text matching model, the concatenated information is first split into tokens, and the [CLS] tag is added at the beginning of the concatenated information. The [SEP] tag is added at the end of the query information to be identified and the candidate entity word respectively to separate the query information to be identified and the candidate entity word. The embedding layer is used to map all tokens into token vectors, and the token vectors corresponding to the tokens and the corresponding position encoding vectors are added to obtain the addition result in rectangular form; the addition result in rectangular form is input into the BERT layer, and the BERT layer performs encoding processing by the multi-head self-attention mechanism layer and the feedforward neural network layer to obtain the final hidden layer vector; the hidden layer vector will be input into the output layer, and the output layer maps the hidden layer vector to the output probability based on the fully connected layer and the sigmoid activation function layer.

[0101] In step 233, the classification probability corresponding to each piece of concatenated information is used as the matching degree between the corresponding candidate entity word and the query information to be identified.

[0102] Please continue to see Figure 7 As shown, the output probability of the output layer is used to characterize the matching degree between the corresponding candidate entity word and the query information to be identified, that is, the probability that the candidate entity word in the concatenated information is the central entity word.

[0103] For each piece of spliced ​​information, the corresponding classification probability can be obtained through the text matching model.

[0104] Please continue to see Figure 2 In step 240, according to the matching degree between each candidate entity word and the query information to be identified, the central entity word of the query information to be identified is determined from each candidate entity word, and the central entity word is the entity word that best represents the query information to be identified.

[0105] Please continue to see Figure 3 As shown, the identified central product word will be output eventually.

[0106] In one embodiment of the present application, according to the matching degree between each candidate entity word and the query information to be identified, determining the central entity word of the query information to be identified from each candidate entity word includes:

[0107] When the query information to be identified matches the rules in the preset rule base, the candidate central entity word of the query information to be identified is determined based on the rules in the preset rule base; when the candidate central entity word is a candidate entity word and the matching degree between the candidate central entity word and the query information to be identified meets a predetermined condition, the candidate central entity word is used as the central entity word of the query information to be identified; when the candidate central entity word is not a candidate entity word or the matching degree between the candidate central entity word and the query information to be identified does not meet the predetermined condition, the candidate entity word with the highest matching degree with the query information to be identified is used as the central entity word of the query information to be identified.

[0108] The predetermined condition may be that the matching degree reaches a predetermined matching degree threshold.

[0109] In the embodiment of the present application, the central entity word is determined by combining a preset rule base and a matching method, which improves the accuracy of identifying the central entity word to a certain extent.

[0110] Figure 8 An embodiment according to the present application is shown. Figure 2 Flow chart of details of step 240 in the embodiment. Figure 8 As shown, according to the matching degree between each candidate entity word and the query information to be identified, determining the central entity word of the query information to be identified from each candidate entity word may specifically include the following steps:

[0111] In step 240 ′, the candidate entity word with the highest matching degree with the query information to be identified is used as the central entity word of the query information to be identified.

[0112] If a candidate entity word has the highest matching degree with the query information to be identified, then it means that it is most likely the central entity word.

[0113] For further information, please see Figure 7 As shown, after obtaining the candidate entity word with the highest matching degree, the corresponding output probability is compared with the predetermined probability threshold. If the output probability is greater than the predetermined probability threshold, the candidate entity word is identified as the central entity word. For example, the concatenated information includes the query information to be identified "celery and pork dumplings" and the candidate entity word "dumplings", and the predetermined probability threshold is 0.5. Then, if the output probability is 0.9>0.5, "dumplings" can be identified as the central product word of the query information to be identified "celery and pork dumplings".

[0114] If the output probability corresponding to the candidate entity word with the highest matching degree still does not exceed the predetermined probability threshold, it means that the central entity word may not be accurately obtained through matching. At this time, other methods can be used to determine the central entity word. For example, the central entity word can be determined based on a preset rule library.

[0115] In step 250, query results matching the query information to be identified are obtained based on the central entity word.

[0116] In one embodiment of the present application, extracting multiple candidate entity words corresponding to the query information to be identified by the pre-trained entity recognition model is performed when the query information to be identified does not match the rules in the preset rule base. After obtaining the query information to be identified, the method for querying information also includes: when the query information to be identified matches the rules in the preset rule base, determining the central entity word corresponding to the query information to be identified based on the rules in the preset rule base.

[0117] The preset rule base can also be used to assist in determining the central entity word. Specifically, if the query information to be identified matches the rules in the preset rule base, then after obtaining the query information to be identified, steps 220 to 240 are skipped and step 250 is directly executed.

[0118] The preset rule library may contain multiple rules, each of which is obtained by statistics and analysis of a large amount of collected data. For example, a rule may be: if the entity words of multiple consecutive nouns in the query information to be identified are connected in sequence, and the last entity word is at the end of the query information to be identified, then the last entity word can be identified as the central entity word.

[0119] In one embodiment of the present application, the identified central entity word is a central product word.

[0120] Fig. 9 An embodiment according to the present application is shown. Figure 2 Flow chart of the details of step 250 in the embodiment. Fig. 9 As shown, obtaining query results matching the query information to be identified based on the central entity word may include the following steps:

[0121] In step 251, the central entity word corresponding to the query information to be identified and each candidate entity word other than the central entity word are matched with the product words of the commodities in the commodity library to obtain a matching result.

[0122] Product words may be set in advance for each commodity in the commodity library, and these product words may include central product words and other product words.

[0123] The matching result can be whether the central product word in the product words of the commodity is consistent with the central entity word of the query information to be identified, and whether each candidate entity word other than the central entity word of the query information to be identified is consistent with other product words in the product words of the commodity except the central product word.

[0124] The matching result can also be the matching degree between the query information to be identified and each product in the product library. The matching degree can be calculated in the following way: determine the first similarity between the word embedding vector of the central product word of the target product and the word embedding vector of the central entity word of the query information to be identified; for each candidate entity word of the query information to be identified, determine the second similarity between the word embedding vector of the candidate entity word and the word embedding vectors of other product words of the target product, and obtain the maximum second similarity corresponding to the candidate entity word; determine the weighted sum of the first similarity and each maximum second similarity as the matching degree between the query information to be identified and the target product.

[0125] In step 252, commodity information matching the query information to be identified is obtained according to the matching result.

[0126] Product information may include a variety of information such as the product name, origin, shipping place, parameters, pictures, videos, etc. The product name may include the product words of the product in the product library.

[0127] Fig.10 An embodiment according to the present application is shown. Fig. 9 Flow chart of the details of step 252 in the embodiment. Fig.10 As shown, obtaining product information matching the query information to be identified according to the matching result may include the following steps:

[0128] In step 252 ′, product information of a predetermined number of products with the highest matching degree with the query information to be identified is obtained as product information matching the query information to be identified.

[0129] The commodities may be sorted from high to low according to the matching degree with the query information to be identified, and the commodity information of a predetermined number (eg, 10) of commodities ranked first is used as the commodity information matching the query information to be identified.

[0130] In step 253, the product information is returned to the sender of the query information to be identified.

[0131] The product information matching the query information to be identified can be returned to the APP of the e-commerce platform, and the user can browse the product information he needs.

[0132] Fig.11 A schematic diagram of the process of an e-commerce search scenario according to an embodiment of the present application is shown. Fig.11As shown, it includes the following processes: first, input the query information (Query) to be identified; then, perform Query processing, including Query rewriting, Query rewriting and Query expansion; then, perform Query understanding, on the one hand, perform Query intent recognition, on the other hand, perform Query central word recognition; finally, perform product retrieval in the Elastic Search engine, and output the product display based on the retrieval results, wherein Elastic Search is an open source, distributed search and data analysis engine with Elastic Stack as the core, and Elastic Search is the product library in the embodiment of this application. It can be seen that intent recognition is also performed during Query understanding. Therefore, in the embodiment of this application, intent information corresponding to the query information to be identified can also be obtained, and the intent information can reflect the semantics of the query information to be identified at a macro level; when performing product retrieval, combining intent information and central product words for product matching can obtain more accurate retrieval results.

[0133] In summary, according to the method for querying information provided in the embodiment of the present application, a two-stage technical solution for central entity word recognition is proposed. First, candidate entity words are identified in the first stage, and then central entity words are extracted in the second stage, thereby improving the accuracy of identifying the central entity words of the query information to be identified, thereby enabling more accurate information query, reducing human intervention and the resulting human costs, and covering more central product word recognition scenarios. The inventor of the present application conducted experiments on an online search system. The experimental results show that compared with the existing technical solutions, the user's query click rate increased from 59% to 61%, which means that the technical solution proposed in the embodiment of the present application optimizes the recognition effect of central product words, thereby helping to increase the possibility of returning effective display results after the user searches for a query.

[0134] The following describes an apparatus embodiment of the present application, which can be used to execute the method for querying information in the above-mentioned embodiment of the present application. For details not disclosed in the apparatus embodiment of the present application, please refer to the above-mentioned embodiment of the method for querying information in the present application.

[0135] Fig.12 A block diagram of a device for querying information according to an embodiment of the present application is shown.

[0136] Reference Fig.12As shown, according to an embodiment of the present application, a device 1200 for querying information includes: an acquisition unit 1210 , an extraction unit 1220 , a matching degree determination unit 1230 , a central entity word determination unit 1240 and a query unit 1250 . Among them, the acquisition unit 1210 is used to obtain the query information to be identified; the extraction unit 1220 is used to extract multiple candidate entity words corresponding to the query information to be identified through a pre-trained entity recognition model, and the multiple candidate entity words include at least one type of entity words from the following: entity words contained in the query information to be identified, and entity words not contained in the query information to be identified but related to the query information to be identified; the matching degree determination unit 1230 is used to respectively determine the matching degree of each candidate entity word with the query information to be identified; the central entity word determination unit 1240 is used to determine the central entity word of the query information to be identified from each candidate entity word according to the matching degree of each candidate entity word with the query information to be identified, and the central entity word is the entity word that best represents the query information to be identified; the query unit 1250 is used to obtain a query result matching the query information to be identified based on the central entity word.

[0137] In some embodiments of the present application, based on the aforementioned scheme, the extraction unit 1220 is configured to: input the query information to be identified into a pre-trained entity recognition model to obtain at least one first entity word extracted by the entity recognition model; perform entity word matching on the query information to be identified based on a pre-constructed entity word dictionary to obtain at least one second entity word in the query information to be identified, and the entity word dictionary includes multiple entity words; generate multiple candidate entity words corresponding to the query information to be identified based on the first entity word and the second entity word.

[0138] In some embodiments of the present application, based on the aforementioned scheme, the extraction unit 1220 is configured to: deduplicate the first entity word and the second entity word to obtain the deduplicated first entity word and the deduplicated second entity word; determine the union of the deduplicated first entity word and the deduplicated second entity word, and use the entity words in the union as candidate entity words.

[0139] In some embodiments of the present application, based on the aforementioned scheme, the matching degree determination unit 1230 is configured to: respectively concatenate each candidate entity word with the query information to be identified to obtain each concatenated information; respectively input each concatenated information into a text matching model, and sequentially perform encoding and classification operations in the text matching model to obtain a classification probability output by the text matching model, wherein the text matching model is trained based on a training sample set, the training sample set includes multiple positive samples and multiple negative samples, the positive sample is a text pair consisting of a first query information and a central entity word in the first query information, and the negative sample is a text pair consisting of a second query information and a non-central entity word, and the non-central entity word is different from the central entity word in the second query information; and the classification probability corresponding to each concatenated information is used as the matching degree of the corresponding candidate entity word and the query information to be identified.

[0140] In some embodiments of the present application, based on the aforementioned scheme, the device also includes a rule base matching unit, and the rule base matching unit is used to determine the central entity word corresponding to the query information to be identified based on the rules in the preset rule base when the query information to be identified matches the rules in the preset rule base.

[0141] In some embodiments of the present application, based on the above-mentioned solution, the central entity word determination unit 1240 is configured to: use the candidate entity word with the highest matching degree with the query information to be identified as the central entity word of the query information to be identified.

[0142] In some embodiments of the present application, based on the aforementioned scheme, the extraction unit 1220 is configured to: perform at least one of the following preprocessing operations on the query information to be identified, to obtain at least one preprocessed query information to be identified: error correction processing, rewriting processing, and expansion processing, wherein the error correction processing is used to correct the erroneous content in the query information to be identified, the rewriting processing is used to replace at least one word in the query information to be identified with a synonym, and the expansion processing is used to replace at least one word in the query information to be identified with a subordinate word; extract candidate entity words from each preprocessed query information to be identified through the pre-trained entity recognition model as the candidate entity words corresponding to the query information to be identified.

[0143] In some embodiments of the present application, based on the aforementioned scheme, the central entity word is the central product word, and the query unit 1250 is configured to: match the central entity word corresponding to the query information to be identified and each candidate entity word other than the central entity word with the product words of the goods in the product library to obtain a matching result; obtain the product information matching the query information to be identified based on the matching result; and return the product information to the sender of the query information to be identified.

[0144] In some embodiments of the present application, based on the aforementioned scheme, the matching result is the matching degree between the query information to be identified and each product in the product library, and the query unit 1250 is configured to: obtain the product information of a predetermined number of products with the highest matching degree with the query information to be identified, as the product information matching the query information to be identified.

[0145] Fig.13 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown.

[0146] It should be noted that Fig.13 The computer system 1300 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0147] like Fig.13 As shown, the computer system 1300 includes a central processing unit (CPU) 1301, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1302 or the program loaded from the storage part 1308 to the random access memory (RAM) 1303, such as executing the method described in the above embodiment. In RAM 1303, various programs and data required for system operation are also stored. CPU 1301, ROM 1302 and RAM 1303 are connected to each other through bus 1304. Input / output (I / O) interface 1305 is also connected to bus 1304.

[0148] The following components are connected to the I / O interface 1305: an input section 1306 including a keyboard, a mouse, etc.; an output section 1307 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1308 including a hard disk, etc.; and a communication section 1309 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 1309 performs communication processing via a network such as the Internet. A drive 1310 is also connected to the I / O interface 1305 as needed. A removable medium 1311, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1310 as needed so that a computer program read therefrom is installed into the storage section 1308 as needed.

[0149] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 1309, and / or installed from a removable medium 1311. When the computer program is executed by a central processing unit (CPU) 1301, various functions defined in the system of the present application are executed.

[0150] It should be noted that the computer-readable medium shown in the embodiment of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-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 of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a 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. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by an instruction execution system, device or device or used in combination with it. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0151] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0152] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.

[0153] As one aspect, the present application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by an electronic device, the electronic device implements the method described in the above embodiment.

[0154] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.

[0155] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation methods of the present application.

[0156] It can be understood that in the specific implementation of this application, when data related to query information is applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0157] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the embodiments disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application.

[0158] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A method for querying information, characterized in that: The method comprises: Obtain query information to be identified; Extract multiple candidate entity words corresponding to the query information to be identified by using the pre-trained entity recognition model , The multiple candidate entity words include at least one type of entity words from the following: entity words included in the query information to be identified, and entity words not included in the query information to be identified but related to the query information to be identified; Determine the matching degree between each candidate entity word and the query information to be identified; According to the matching degree between each candidate entity word and the query information to be identified, determining the central entity word of the query information to be identified from each candidate entity word, wherein the central entity word is the entity word that best represents the query information to be identified; A query result matching the query information to be identified is obtained based on the central entity word.

2. The method for querying information according to claim 1, characterized in that: The entity recognition model obtained by pre-training extracts a plurality of candidate entity words corresponding to the query information to be recognized, including: Inputting the query information to be identified into a pre-trained entity recognition model to obtain at least one first entity word extracted by the entity recognition model; Performing entity word matching on the query information to be identified based on a pre-built entity word dictionary to obtain at least one second entity word in the query information to be identified, wherein the entity word dictionary includes a plurality of entity words; A plurality of candidate entity words corresponding to the query information to be identified are generated according to the first entity word and the second entity word.

3. The method for querying information according to claim 2, characterized in that: The step of generating a plurality of candidate entity words corresponding to the query information to be identified according to the first entity word and the second entity word includes: Deduplicating the first entity word and the second entity word to obtain deduplicated first entity words and deduplicated second entity words; A union of the first entity words after deduplication and the second entity words after deduplication is determined, and the entity words in the union are used as candidate entity words.

4. The method for querying information according to claim 1, characterized in that: The step of respectively determining the matching degree between each candidate entity word and the query information to be identified includes: Each candidate entity word is concatenated with the query information to be identified to obtain concatenated information; Input each piece of concatenated information into a text matching model respectively, perform encoding and classification operations in the text matching model in sequence, and obtain the classification probability output by the text matching model, wherein the text matching model is trained based on a training sample set, the training sample set includes a plurality of positive samples and a plurality of negative samples, the positive sample is a text pair consisting of a first query information and a central entity word in the first query information, and the negative sample is a text pair consisting of a second query information and a non-central entity word, and the non-central entity word is different from the central entity word in the second query information; The classification probability corresponding to each piece of concatenated information is used as the matching degree between the corresponding candidate entity word and the query information to be identified.

5. The method for querying information according to claim 1, characterized in that: The extracting of a plurality of candidate entity words corresponding to the query information to be identified by the pre-trained entity recognition model is performed when the query information to be identified does not match the rules in the preset rule library. After obtaining the query information to be identified, the method further includes: In the case that the query information to be identified matches the rules in the preset rule base, a central entity word corresponding to the query information to be identified is determined based on the rules in the preset rule base.

6. The method for querying information according to claim 1, characterized in that: The step of determining the central entity word of the query information to be identified from the candidate entity words according to the matching degree between the candidate entity words and the query information to be identified includes: The candidate entity word with the highest matching degree with the query information to be identified is used as the central entity word of the query information to be identified.

7. The method for querying information according to claim 1, characterized in that: The entity recognition model obtained by pre-training extracts a plurality of candidate entity words corresponding to the query information to be recognized, including: Performing at least one of the following preprocessing operations on the query information to be identified, respectively, to obtain at least one preprocessed query information to be identified: error correction processing, rewriting processing, and expansion processing, wherein the error correction processing is used to correct erroneous content in the query information to be identified, the rewriting processing is used to replace at least one word in the query information to be identified with a synonym, and the expansion processing is used to replace at least one word in the query information to be identified with a subordinate word; The entity recognition model obtained by pre-training extracts candidate entity words from each pre-processed query information to be recognized as candidate entity words corresponding to the query information to be recognized.

8. The method for querying information according to any one of claims 1 to 7, characterized in that: The central entity word is a central product word, and obtaining a query result matching the query information to be identified based on the central entity word includes: Matching the central entity word corresponding to the query information to be identified and each candidate entity word other than the central entity word with the product words of the commodity in the commodity library to obtain a matching result; Acquire product information matching the query information to be identified according to the matching result; The product information is returned to the sender of the query information to be identified.

9. The method for querying information according to claim 8, characterized in that: The matching result is a matching degree between the query information to be identified and each commodity in the commodity library, and obtaining commodity information matching the query information to be identified according to the matching result includes: The commodity information of a predetermined number of commodities with the highest matching degree with the query information to be identified is obtained as the commodity information matching the query information to be identified.

10. A device for querying information, characterized in that: The device comprises: An acquisition unit, used for acquiring query information to be identified; An extraction unit is used to extract a plurality of candidate entity words corresponding to the query information to be identified through a pre-trained entity recognition model, wherein the plurality of candidate entity words include at least one type of entity words selected from the following categories: entity words included in the query information to be identified, and entity words not included in the query information to be identified but related to the query information to be identified; A matching degree determination unit, used to respectively determine the matching degree between each candidate entity word and the query information to be identified; A central entity word determination unit, configured to determine a central entity word of the query information to be identified from each candidate entity word according to a degree of match between each candidate entity word and the query information to be identified, wherein the central entity word is the entity word that best represents the query information to be identified; A query unit is used to obtain a query result matching the query information to be identified based on the central entity word.

11. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for querying information according to any one of claims 1 to 9 is implemented.

12. An electronic device, characterized in that: include: one or more processors; A storage device, used to store one or more programs, when the one or more programs are executed by the one or more processors, enables the one or more processors to implement the method for querying information as described in any one of claims 1 to 9.

13. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method for querying information as described in any one of claims 1 to 9.