[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN112507091A - Method, device, equipment and storage medium for retrieving information - Google Patents

Method, device, equipment and storage medium for retrieving information Download PDF

Info

Publication number
CN112507091A
CN112507091A CN202011383217.7A CN202011383217A CN112507091A CN 112507091 A CN112507091 A CN 112507091A CN 202011383217 A CN202011383217 A CN 202011383217A CN 112507091 A CN112507091 A CN 112507091A
Authority
CN
China
Prior art keywords
query statement
query
approximate
retrieval
statement
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011383217.7A
Other languages
Chinese (zh)
Inventor
张洋
林荣逸
王丛
关百胜
张小羽
刘子航
王锴睿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Baidu Health Beijing Technology Co ltd
Original Assignee
Baidu Health Beijing Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Baidu Health Beijing Technology Co ltd filed Critical Baidu Health Beijing Technology Co ltd
Priority to CN202011383217.7A priority Critical patent/CN112507091A/en
Publication of CN112507091A publication Critical patent/CN112507091A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3322Query formulation using system suggestions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Mathematical Physics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application discloses a method, a device, equipment and a storage medium for retrieving information, and relates to the technical field of artificial intelligence such as intelligent recommendation and deep learning. One embodiment of the method for retrieving information includes: acquiring an input query statement; converting the query statement into a semantic vector by adopting a pre-trained semantic matching model; determining at least one approximate query statement of the query statement based on the semantic vector and an approximate nearest neighbor retrieval index library constructed in advance according to the query statement and the retrieval result; and determining a retrieval result of the query statement based on at least one approximate query statement, so that generalization of the input query statement is realized through approximate nearest neighbor retrieval, and the recall rate of the low-frequency query request is improved.

Description

Method, device, equipment and storage medium for retrieving information
Technical Field
The present application relates to the field of computer technologies, and in particular, to artificial intelligence technologies such as intelligent recommendation and deep learning, and more particularly, to a method, an apparatus, a device, and a storage medium for retrieving information.
Background
One core task of information retrieval is to calculate the semantic relevance between a query request (query) input by a user and each document (doc) as a retrieval object. Specifically, the matching degree between the query request and the title (title) of each doc can be evaluated, for example, a score (score) of the matching degree between the query and the title is calculated, each doc can be sorted in the order from high to low according to the score, and then the doc in the top N bits after sorting is returned to the user as a retrieval result, where N is a positive integer.
In some specific fields (such as medical fields) retrieval scenes, recall results of high-frequency query requests can well meet user requirements, but recall results of low-frequency query requests cannot meet the user requirements, and the user search experience effect is reduced.
Disclosure of Invention
The embodiment of the application provides a method, a device, equipment and a storage medium for retrieving information.
In a first aspect, an embodiment of the present application provides a method for retrieving information, including: acquiring an input query statement; converting the query statement into a semantic vector by adopting a pre-trained semantic matching model; determining at least one approximate query statement of the query statement based on the semantic vector and an approximate nearest neighbor retrieval index library constructed in advance according to the query statement and the retrieval result; based on the at least one approximate query statement, a retrieval result of the query statement is determined.
In a second aspect, an embodiment of the present application provides an apparatus for retrieving information, including: the device comprises: an input module configured to obtain an input query statement; a conversion module configured to convert the query statement into a semantic vector using a pre-trained semantic matching model; a first determining module configured to determine at least one approximate query statement of the query statement based on the semantic vector and an approximate nearest neighbor search index library constructed in advance according to the query statement and the search result; a second determination module configured to determine a retrieval result of the query statement based on the at least one approximate query statement.
In a third aspect, an embodiment of the present application provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method as described in any one of the implementations of the first aspect.
In a fourth aspect, embodiments of the present application propose a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method as described in any one of the implementations of the first aspect.
According to the method, the device, the equipment and the storage medium for retrieving the information, the input query statement is firstly obtained; then, adopting a pre-trained semantic matching model to convert the query statement into a semantic vector; then, determining at least one approximate query statement of the query statement based on the semantic vector and an approximate nearest neighbor retrieval index library constructed in advance according to the query statement and the retrieval result; and finally, determining a retrieval result of the query statement based on at least one approximate query statement, so that generalization of the input query statement is realized through approximate nearest neighbor retrieval, and the recall rate of the low-frequency query is improved.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings. The drawings are included to provide a better understanding of the present solution and are not intended to limit the present application. Wherein:
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 is a schematic flow chart diagram illustrating one embodiment of a method for retrieving information according to the present application;
FIG. 3 is a schematic flow chart diagram illustrating another embodiment of a method of retrieving information according to the present application;
FIG. 4 is a schematic diagram of an application scenario of an embodiment of a method of retrieving information according to the present application;
FIG. 5 is a schematic block diagram of an embodiment of an apparatus for retrieving information according to the present application;
fig. 6 is a block diagram of an electronic device for implementing a method of retrieving information according to an embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
As mentioned in the background, recall results for low frequency query requests are often not able to meet user needs in a domain-specific (e.g., medical) retrieval scenario. For the problems of insufficient recall and poor correlation of low-frequency query, common technical means comprise:
1. the method comprises the steps of constructing a key-value retrieval mechanism to solve the problem by directionally mining data of a low-frequency query request in an offline manner;
2. and continuously optimizing the semantic matching model based on characteristics such as click and the like of user search.
The scheme 1 is simple to implement, completely depends on offline data mining for the problem of insufficient recalling of the low-frequency query request, and has no generalization capability.
With regard to the scheme 2, due to the fact that the characteristic information of the low-frequency query request is insufficient, the recognition accuracy of the semantic matching model on the low-frequency query request is insufficient, and the model iteration time is long.
In view of the foregoing defects in the prior art, embodiments of the present application provide a method for retrieving information to solve the problems of insufficient recall and poor correlation of low-frequency query requests.
Fig. 1 shows an exemplary system architecture 100 to which embodiments of the method of retrieving information or the apparatus for retrieving information of the present application may be applied.
As shown in fig. 1, the system architecture 100 may include a terminal device 101, a network 102, and a server 103. Network 102 is the medium used to provide communication links between terminal devices 101 and server 103. Network 102 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
Terminal device 101 may interact with server 103 through network 102. The terminal device 101 may input a query sentence, including but not limited to a smart phone, a tablet computer, a personal digital assistant, an e-book reader, a personal computer, a smart television, a query service terminal, and the like.
The server 103 may provide various services, and for example, the server 103 may perform processing such as analysis on data such as an input query sentence acquired from the terminal apparatus 101, and generate a processing result (for example, a search result for determining the query sentence).
The server 103 may be hardware or software. When the server 103 is hardware, it may be implemented as a distributed server cluster composed of a plurality of servers, or may be implemented as a single server. When the server 103 is software, it may be implemented as multiple pieces of software or software modules (e.g., to provide distributed services), or as a single piece of software or software module. And is not particularly limited herein.
It should be noted that the method for retrieving information provided in the embodiment of the present application is generally executed by the server 103, and accordingly, the apparatus for retrieving information is generally disposed in the server 103.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to FIG. 2, a flow 200 of one embodiment of a method of retrieving information in accordance with the present application is shown. The method comprises the following steps:
step 201, acquiring an input query statement.
In this embodiment, the execution subject of the method of retrieving information (e.g., server 103 shown in fig. 1) may obtain the input query statement.
A user may conduct a search query through various terminal devices, such as terminal device 101 shown in fig. 1. These terminal devices may present a user interface (e.g., a browser interface) to a user to input query statements. The user may enter the query statement via various input tools, such as a touch screen, stylus, keyboard, microphone, and the like. The query statement may be a text query, a voice query, or other type of query. If the query statement is a non-text query, the text query may be converted to a text query using various suitable techniques, such as OCR (Optical Character Recognition), voice Recognition, and the like. The terminal device may then send the originally received or converted query statement to a search server (e.g., server 103 of fig. 1).
Step 202, converting the query statement into a semantic vector by adopting a pre-trained semantic matching model.
In this embodiment, the execution body may adopt a pre-trained semantic matching model to convert the query statement into a semantic vector.
The semantic matching model can be constructed by learning the semantic relevance of the query-title pair. The query-title pair may be stored in a query log. The query log records, for example, query requests used in each user query session, search results presented, and user click operations on the search results. These search results may be characterized, for example, by web page title titles, and thus query-title pairs refer to query-search result pairs.
The semantic matching model measures the credibility of the query-title by matching the potential semantics of the query and the relation contained in the vector space representation by using a score function based on correlation/similarity. Illustratively, the query is: how diabetes is treated, title is: how well the diabetes can be treated, then the relevance score for this query-title pair should be high.
The semantic matching model can comprise an input layer, a representation layer and a matching layer. And the input layer converts the word sequence in the query-title pair into a word embedding sequence through a lookup table. The presentation layer mainly functions to construct from word-to-sentence representations or to convert embedded representations of isolated words of a sequence into one or more low-dimensional dense semantic vectors with global information. And the matching layer performs interactive calculation on the expression vector of the query-title pair and performs training of a semantic matching model according to a loss function.
The query statement can be input into the trained semantic matching model, and a semantic vector of the query statement is obtained on a presentation layer of the semantic matching model. Illustratively, the semantic matching model may be a SimNet semantic model.
And step 203, determining at least one approximate query statement of the query statement based on the semantic vector and an approximate nearest neighbor retrieval index library constructed in advance according to the query statement and the retrieval result.
In this embodiment, the execution body may determine at least one approximate query statement of the query statement based on the semantic vector and an approximate nearest neighbor search index library constructed in advance from the query statement and the search result.
The approximate nearest neighbor search index library can be constructed by mining query-search result (docalist) data in an off-line manner. The method includes the steps that Approximate Nearest Neighbor retrieval (ANN) utilizes the characteristic that cluster-shaped aggregation distribution can be formed among data after the data volume is increased, data in a database are classified or coded through a data analysis clustering method, the data category of target data is predicted according to the data characteristics of the target data, and part or all of the data category is returned as a retrieval result. The core idea of approximate nearest-neighbor retrieval is to search for data items that are likely to be neighbors and no longer be limited to returning only the most likely items, improving retrieval efficiency at the expense of accuracy within an acceptable range. The method mainly comprises two methods, one is a method of hash hashing, and the other is vector quantization.
The ANN index library stores the vector of the query and the data identifier of the search result (docalist) corresponding to the query. Given an input query, Top N query vectors with the closest spatial distance and data identifications of corresponding retrieval results can be retrieved from the ANN index library, wherein N is a positive integer. Whereas in the key-value retrieval mechanism in the prior art, only the retrieval result matched with the fixed character string can be retrieved given an input query. In contrast, the ANN retrieval mechanism has a generalization effect, does not depend on character string matching, and can generalize retrieval.
The semantic vectors can be input into the approximate nearest neighbor search index library, and Top N vectors closest to the spatial distance of the semantic vectors and the data identifications of the search results corresponding to the Top N vectors can be searched. Here, the query corresponding to Top N vectors closest to the spatial distance of the semantic vector may be used as an approximate query statement of the query statement. Illustratively, the input query statement is: how to treat diabetes can be searched for approximate query sentences such as 'treatment of diabetes', 'how diabetes can be treated' and the like through ANN retrieval.
Step 204, based on at least one approximate query statement, determining a retrieval result of the query statement.
In this embodiment, the execution body may determine the search result of the query statement based on at least one approximate query statement.
Wherein the relevant set of candidate retrieval results (doc) may be recalled based on approximate query statement semantics. The semantic recall refers to a rapid index recall technology for performing word vector representation on candidate resources and constructing a vector representation basis, and is different from a traditional word-based inverted index method, and results are directly recalled to users from the aspect of semantic relevance.
Wherein candidate results that match the approximate query request may be searched in a number of ways. In some implementations, methods of text matching, such as word matching, may be used to search for candidate results that match the approximate query request. Some commonly used algorithms for word matching methods may include, for example, BM25(Best Match) algorithm, proximite (Term proximity scoring) algorithm, and the like. And calculating the matching degree of the candidate resources and the approximate query request through a word matching algorithm, and then giving a retrieval result matched with the approximate query request based on the matching degree. The above search method can be implemented by using various algorithms known at present, and is not described herein.
The method for retrieving information provided by the above embodiment of the application realizes generalization of the input query statement through approximate nearest neighbor retrieval, and upgrades the conventional key-value retrieval mechanism to a soft key-value retrieval mechanism, thereby improving the recall rate of the low-frequency query request.
In some optional implementations of the embodiment of the present application, the step 203 includes: and searching at least one query semantic vector with a space distance meeting a preset threshold value from the approximate nearest neighbor retrieval index library based on an Annoy algorithm, wherein at least one query statement corresponding to the at least one query semantic vector is at least one approximate query statement of the query statement.
Among them, the Annoy (approach Neighbors Oh Yeah) algorithm is an algorithm that can search for similar data in high-dimensional dense data. And Annoy establishes a binary tree to enable the complexity of each point searching time to be O (log N), similar data nodes are closer in position on the binary tree, and the required Top N similar neighbor nodes are searched by continuously traversing from the root node to the leaf nodes. The Annoy algorithm can quickly find similar Top N texts from a huge amount of texts expressed in a dense vector form.
Wherein, k-neighborhood search similar to semantic vector can be performed in the approximate nearest neighbor retrieval index library by using the Annoy algorithm.
In some optional implementations of embodiments of the present application, the step 204 includes: and determining the retrieval result of the query statement according to the correlation of the at least one approximate query statement and the query statement.
With further reference to FIG. 3, shown is a flow diagram of another embodiment of a method of retrieving information, the method comprising the steps of:
step 301, obtaining an input query statement.
Step 301 is substantially the same as step 201, and therefore will not be described again.
Step 302, a pre-trained semantic matching model is used to convert the query statement into a semantic vector.
Step 302 is substantially the same as step 202, and therefore is not described in detail.
Step 303, determining at least one approximate query statement of the query statement based on the semantic vector and an approximate nearest neighbor search index library constructed in advance according to the query statement and the search result.
Step 303 is substantially the same as step 203, and therefore is not described in detail.
Step 304, determining a retrieval result of the query statement based on the at least one approximate query statement.
Step 304 is substantially the same as step 204 and thus will not be described again.
And 305, sorting the retrieval results of the query sentences according to the relevance of the at least one approximate query sentence and the query sentences.
The relevance of the approximate query statement and the query statement can be scored, and the recall result of the approximate query statement with a high relevance score is preferentially displayed. Some commonly used algorithms may be used to score the approximate query statement and the relevance of the query statement, such as BM25(Best Match) algorithm, proximite (Term proximity scoring) algorithm, and so on. The BM25 algorithm is a common formula for scoring relevance, and is to calculate the relevance of all words in an approximate query sentence and the query sentence, and then add the scores. The above-mentioned correlation scoring method can be implemented by using various algorithms known at present, and is not described herein.
In some optional implementations of this embodiment, the step 204 further includes: and sorting the retrieval results of the query sentences according to the browsing amount and/or the clicking amount of the search results of at least one approximate query sentence.
Wherein, the larger the browsing amount of the search result is, the larger the position weight is; the larger the amount of clicks on a search result, the greater its location weight. Wherein, the larger the position weight is, the more forward the ranking of the retrieval results is.
In some optional implementations of this embodiment, the data type of the retrieval result of the query statement includes any one of: speech, articles, question and answer.
The method for retrieving information provided by the embodiment can be applied to medical retrieval scenes, and is particularly suitable for medical aggregation cards. The medical aggregate card refers to a retrieval result which is generated by searching a medical query request by using a search engine. The data types of the retrieval result comprise voice, articles and question answers.
For ease of understanding, fig. 4 shows a schematic view of an application scenario of an embodiment of a method of retrieving information according to the present application.
As shown in fig. 4, the method for retrieving information provided in the embodiment of the present application may be applied to a soft Key-value retrieval mechanism, so as to implement that one query recalls multiple approximate queries*File (doc). The method for realizing ANN generalization comprises the following steps:
s1: training a SimNet semantic model to be used as an encoder based on the query-title correlation;
s2: mining massive Key-value data (query-retrieval result) in an off-line manner, and constructing an ANN index library;
s3: after a query input through a webpage is obtained, a SimNet semantic model is called to encode the query into a 128-dimensional vector, and at least one approximation of the query is searched in an ANN index basequery*
S4: resolving at least one approximate query*The file (doc) attached to the recall result.
With further reference to fig. 5, as an implementation of the method shown in the above figures, the present application provides an embodiment of an apparatus for retrieving information, which corresponds to the embodiment of the method shown in fig. 2, and which is particularly applicable to various electronic devices.
As shown in fig. 5, the apparatus 500 for retrieving information of the present embodiment may include: an input module 501, a conversion module 502, a first determination module 503, and a second determination module 504. The input module 501 is configured to obtain an input query statement; a conversion module 502 configured to convert the query statement into a semantic vector using a pre-trained semantic matching model; a first determining module 503 configured to determine at least one approximate query statement of the query statement based on the semantic vector and an approximate nearest neighbor search index library constructed in advance from the query statement and the search result; a second determination module 504 configured to determine a retrieval result of the query statement based on the at least one approximate query statement.
In the present embodiment, in the apparatus 500 for retrieving information: the specific processing of the input module 501, the conversion module 502, the first determination module 503 and the second determination module 504 and the technical effects thereof can refer to the related descriptions of step 201 and step 204 in the corresponding embodiment of fig. 2, which are not described herein again.
In some optional implementations of this embodiment, the first determining module 503 is further configured to: and searching at least one query semantic vector with a space distance meeting a preset threshold value from the approximate nearest neighbor retrieval index library based on an Annoy algorithm, wherein at least one query statement corresponding to the at least one query semantic vector is at least one approximate query statement of the query statement.
In some optional implementations of this embodiment, the second determining module 504 further includes: and the sequencing module is configured to sequence the retrieval results of the query statements according to the relevance of the at least one approximate query statement and the query statements.
In some optional implementations of the embodiment, the ranking module is further configured to rank the search results of the query statement according to a browsing amount and/or a click amount of the search results of the at least one approximate query statement.
In some optional implementations of the present embodiment, the semantic matching model is trained based on the relevance of the query statement and the search result.
In some optional implementations of this embodiment, the data type of the retrieval result of the query statement includes any one of: speech, articles, question and answer.
As shown in fig. 6, the electronic device is a block diagram of an electronic device according to an embodiment of the present application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application that are described and/or claimed herein.
As shown in fig. 6, the electronic apparatus includes: one or more processors 601, memory 602, and interfaces for connecting the various components, including a high-speed interface and a low-speed interface. The various components are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions for execution within the electronic device, including instructions stored in or on the memory to display graphical information of a GUI on an external input/output apparatus (such as a display device coupled to the interface). In other embodiments, multiple processors and/or multiple buses may be used, along with multiple memories and multiple memories, as desired. Also, multiple electronic devices may be connected, with each device providing portions of the necessary operations (e.g., as a server array, a group of blade servers, or a multi-processor system). In fig. 6, one processor 601 is taken as an example.
The memory 602 is a non-transitory computer readable storage medium as provided herein. The memory stores instructions executable by the at least one processor to cause the at least one processor to perform the method of retrieving information provided herein. The non-transitory computer readable storage medium of the present application stores computer instructions for causing a computer to perform the method of retrieving information provided herein.
The memory 602, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the method for retrieving information in the embodiments of the present application (for example, the input module 501, the conversion module 502, the first determination module 503, and the second determination module 504 shown in fig. 5). The processor 601 executes various functional applications of the server and data processing, i.e., implements the method of retrieving information in the above-described method embodiments, by executing non-transitory software programs, instructions, and modules stored in the memory 602.
The memory 602 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the electronic device of the method of retrieving information, and the like. Further, the memory 602 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 602 optionally includes memory located remotely from the processor 601, and such remote memory may be coupled to the electronic device of the method of retrieving information via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The electronic device of the method of retrieving information may further include: an input device 603 and an output device 604. The processor 601, the memory 602, the input device 603 and the output device 604 may be connected by a bus or other means, and fig. 6 illustrates the connection by a bus as an example.
The input device 603 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device of the method of retrieving information, such as an input device like a touch screen, a keypad, a mouse, a track pad, a touch pad, a pointer stick, one or more mouse buttons, a track ball, a joystick, etc. The output devices 604 may include a display device, auxiliary lighting devices (e.g., LEDs), and tactile feedback devices (e.g., vibrating motors), among others. The display device may include, but is not limited to, a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display, and a plasma display. In some implementations, the display device can be a touch screen.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, application specific ASICs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
These computer programs (also known as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented using high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, Programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
According to the technical scheme of the application, firstly, an input query statement is obtained; then, adopting a pre-trained semantic matching model to convert the query statement into a semantic vector; then, determining at least one approximate query statement of the query statement based on the semantic vector and an approximate nearest neighbor retrieval index library constructed in advance according to the query statement and the retrieval result; and finally, determining a retrieval result of the query statement based on at least one approximate query statement, so that generalization of the input query statement is realized through approximate nearest neighbor retrieval, and the recall rate of the low-frequency query request is improved.
Artificial intelligence is the subject of research that makes computers simulate some human mental processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.), both at the hardware level and at the software level. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing, and the like; the artificial intelligence software technology mainly comprises a computer vision technology, a voice recognition technology, a natural language processing technology, machine learning/deep learning, a big data processing technology, a knowledge map technology and the like.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present application may be executed in parallel, sequentially, or in different orders, and the present invention is not limited thereto as long as the desired results of the technical solutions disclosed in the present application can be achieved.
The above-described embodiments should not be construed as limiting the scope of the present application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (14)

1. A method of retrieving information, comprising:
acquiring an input query statement;
converting the query statement into a semantic vector by adopting a pre-trained semantic matching model;
determining at least one approximate query statement of the query statement based on the semantic vector and an approximate nearest neighbor retrieval index library constructed in advance according to the query statement and a retrieval result;
determining a retrieval result of the query statement based on the at least one approximate query statement.
2. The method of claim 1, wherein the determining at least one approximate query statement of the query statements based on the semantic vector and an approximate nearest neighbor search index library constructed in advance from the query statements and search results comprises:
and searching at least one query semantic vector with a space distance meeting a preset threshold value from the approximate nearest neighbor retrieval index library based on an Annoy algorithm, wherein at least one query statement corresponding to the at least one query semantic vector is at least one approximate query statement of the query statement.
3. The method of claim 1, wherein the determining search results for the query statement based on the at least one approximate query statement further comprises:
and sequencing the retrieval results of the query statement according to the relevance of the at least one approximate query statement and the query statement.
4. The method of claim 3, wherein the determining search results for the query statement based on the at least one approximate query statement further comprises:
and sorting the retrieval results of the query sentences according to the browsing amount and/or the click rate of the search results of the at least one approximate query sentence.
5. The method of claim 1, wherein the semantic matching model is trained based on relevance of query statements and search results.
6. The method of claim 1, wherein the data type of the search result of the query statement comprises any one of:
speech, articles, question and answer.
7. An apparatus for retrieving information, wherein the apparatus comprises:
an input module configured to obtain an input query statement;
a conversion module configured to convert the query statement into a semantic vector using a pre-trained semantic matching model;
a first determination module configured to determine at least one approximate query statement of the query statements based on the semantic vector and an approximate nearest neighbor search index library constructed in advance from the query statements and search results;
a second determination module configured to determine a retrieval result of the query statement based on the at least one approximate query statement.
8. The apparatus of claim 7, wherein the first determination module is further configured to:
and searching at least one query semantic vector with a space distance meeting a preset threshold value from the approximate nearest neighbor retrieval index library based on an Annoy algorithm, wherein at least one query statement corresponding to the at least one query semantic vector is at least one approximate query statement of the query statement.
9. The apparatus of claim 7, wherein the second determining means further comprises:
a ranking module configured to rank the search results of the query statement according to a relevance of the at least one approximate query statement to the query statement.
10. The apparatus of claim 9, wherein the ranking module is further configured to rank the retrieved results of the query statement according to a browsing volume and/or a click volume of the search results of the at least one approximate query statement.
11. The apparatus of claim 7, wherein the semantic matching model is trained based on relevance of query statements and search results.
12. The apparatus of claim 7, wherein the data type of the retrieval result of the query statement comprises any one of:
speech, articles, question and answer.
13. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.
14. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-6.
CN202011383217.7A 2020-12-01 2020-12-01 Method, device, equipment and storage medium for retrieving information Pending CN112507091A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011383217.7A CN112507091A (en) 2020-12-01 2020-12-01 Method, device, equipment and storage medium for retrieving information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011383217.7A CN112507091A (en) 2020-12-01 2020-12-01 Method, device, equipment and storage medium for retrieving information

Publications (1)

Publication Number Publication Date
CN112507091A true CN112507091A (en) 2021-03-16

Family

ID=74969024

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011383217.7A Pending CN112507091A (en) 2020-12-01 2020-12-01 Method, device, equipment and storage medium for retrieving information

Country Status (1)

Country Link
CN (1) CN112507091A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113094604A (en) * 2021-04-15 2021-07-09 支付宝(杭州)信息技术有限公司 Search result ordering method, search method and device
CN113157727A (en) * 2021-05-24 2021-07-23 腾讯音乐娱乐科技(深圳)有限公司 Method, apparatus and storage medium for providing recall result
CN113360769A (en) * 2021-06-28 2021-09-07 北京百度网讯科技有限公司 Information query method and device, electronic equipment and storage medium
CN113408280A (en) * 2021-06-30 2021-09-17 北京百度网讯科技有限公司 Negative example construction method, device, equipment and storage medium
CN114238564A (en) * 2021-12-09 2022-03-25 阳光保险集团股份有限公司 Information retrieval method and device, electronic equipment and storage medium
CN114691828A (en) * 2022-03-23 2022-07-01 腾讯科技(深圳)有限公司 Data processing method, device, equipment and medium
CN114978604A (en) * 2022-04-25 2022-08-30 西南大学 Security gateway system for software defined service perception
CN115168537A (en) * 2022-06-30 2022-10-11 北京百度网讯科技有限公司 Training method and device of semantic retrieval model, electronic equipment and storage medium
CN117609285A (en) * 2023-11-09 2024-02-27 中移互联网有限公司 Vector retrieval method and device, electronic equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104899322A (en) * 2015-06-18 2015-09-09 百度在线网络技术(北京)有限公司 Search engine and implementation method thereof
CN108959551A (en) * 2018-06-29 2018-12-07 北京百度网讯科技有限公司 Method for digging, device, storage medium and the terminal device of neighbour's semanteme
CN110309267A (en) * 2019-07-08 2019-10-08 哈尔滨工业大学 Semantic retrieving method and system based on pre-training model
CN111198940A (en) * 2019-12-27 2020-05-26 北京百度网讯科技有限公司 FAQ method, question-answer search system, electronic device, and storage medium
US20200210491A1 (en) * 2018-12-31 2020-07-02 Charles University Faculty of Mathematics and Physics Computer-Implemented Method of Domain-Specific Full-Text Document Search
WO2020133549A1 (en) * 2018-12-29 2020-07-02 Beijing Didi Infinity Technology And Development Co., Ltd. Artificial intelligent systems and methods for semantic-based search
CN111858859A (en) * 2019-04-01 2020-10-30 北京百度网讯科技有限公司 Automatic question-answering processing method, device, computer equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104899322A (en) * 2015-06-18 2015-09-09 百度在线网络技术(北京)有限公司 Search engine and implementation method thereof
CN108959551A (en) * 2018-06-29 2018-12-07 北京百度网讯科技有限公司 Method for digging, device, storage medium and the terminal device of neighbour's semanteme
WO2020133549A1 (en) * 2018-12-29 2020-07-02 Beijing Didi Infinity Technology And Development Co., Ltd. Artificial intelligent systems and methods for semantic-based search
US20200210491A1 (en) * 2018-12-31 2020-07-02 Charles University Faculty of Mathematics and Physics Computer-Implemented Method of Domain-Specific Full-Text Document Search
CN111858859A (en) * 2019-04-01 2020-10-30 北京百度网讯科技有限公司 Automatic question-answering processing method, device, computer equipment and storage medium
CN110309267A (en) * 2019-07-08 2019-10-08 哈尔滨工业大学 Semantic retrieving method and system based on pre-training model
CN111198940A (en) * 2019-12-27 2020-05-26 北京百度网讯科技有限公司 FAQ method, question-answer search system, electronic device, and storage medium

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
刘林;秦杰;: "基于Ontology的语义检索模型研究", 计算机与数字工程, no. 12, pages 60 - 63 *
暴躁的猴子: "百度语义匹配模型-simnet代码整理", pages 1 - 13, Retrieved from the Internet <URL:https://blog.csdn.net/orangefly0214/article/details/92649653> *
梁秀;许建秋;秦小麟;: "K近邻近似模式匹配查询", 小型微型计算机系统, no. 12, pages 2735 - 2742 *
肖君: "教育资源库使用效益评估模式及其实证研究", 31 December 2014, 上海交通大学出版社, pages: 170 *

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113094604A (en) * 2021-04-15 2021-07-09 支付宝(杭州)信息技术有限公司 Search result ordering method, search method and device
CN113094604B (en) * 2021-04-15 2022-05-03 支付宝(杭州)信息技术有限公司 Search result ordering method, search method and device
CN113157727B (en) * 2021-05-24 2022-12-13 腾讯音乐娱乐科技(深圳)有限公司 Method, apparatus and storage medium for providing recall result
CN113157727A (en) * 2021-05-24 2021-07-23 腾讯音乐娱乐科技(深圳)有限公司 Method, apparatus and storage medium for providing recall result
CN113360769A (en) * 2021-06-28 2021-09-07 北京百度网讯科技有限公司 Information query method and device, electronic equipment and storage medium
CN113360769B (en) * 2021-06-28 2024-02-09 北京百度网讯科技有限公司 Information query method, device, electronic equipment and storage medium
CN113408280A (en) * 2021-06-30 2021-09-17 北京百度网讯科技有限公司 Negative example construction method, device, equipment and storage medium
CN113408280B (en) * 2021-06-30 2024-03-22 北京百度网讯科技有限公司 Negative example construction method, device, equipment and storage medium
CN114238564A (en) * 2021-12-09 2022-03-25 阳光保险集团股份有限公司 Information retrieval method and device, electronic equipment and storage medium
CN114691828A (en) * 2022-03-23 2022-07-01 腾讯科技(深圳)有限公司 Data processing method, device, equipment and medium
CN114691828B (en) * 2022-03-23 2024-09-20 腾讯科技(深圳)有限公司 Data processing method, device, equipment and medium
CN114978604A (en) * 2022-04-25 2022-08-30 西南大学 Security gateway system for software defined service perception
CN115168537A (en) * 2022-06-30 2022-10-11 北京百度网讯科技有限公司 Training method and device of semantic retrieval model, electronic equipment and storage medium
CN115168537B (en) * 2022-06-30 2023-06-27 北京百度网讯科技有限公司 Training method and device for semantic retrieval model, electronic equipment and storage medium
CN117609285A (en) * 2023-11-09 2024-02-27 中移互联网有限公司 Vector retrieval method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN112507091A (en) Method, device, equipment and storage medium for retrieving information
US11327978B2 (en) Content authoring
CN112560479B (en) Abstract extraction model training method, abstract extraction device and electronic equipment
CN112507715A (en) Method, device, equipment and storage medium for determining incidence relation between entities
CN112860866B (en) Semantic retrieval method, device, equipment and storage medium
CN108701161B (en) Providing images for search queries
CN111737559B (en) Resource ordering method, method for training ordering model and corresponding device
US20170161619A1 (en) Concept-Based Navigation
US20170262783A1 (en) Team Formation
US11714840B2 (en) Method and apparatus for information query and storage medium
JP7397903B2 (en) Intelligent interaction methods, devices, electronic devices and storage media
CN111274407B (en) Method and device for calculating triplet confidence in knowledge graph
CN111539209B (en) Method and apparatus for entity classification
CN112115232A (en) Data error correction method and device and server
CN113869060A (en) Semantic data processing method and search method and device
CN111783861A (en) Data classification method, model training device and electronic equipment
CN111859953A (en) Training data mining method and device, electronic equipment and storage medium
CN111666292A (en) Similarity model establishing method and device for retrieving geographic positions
CN112541362B (en) Generalization processing method, device, equipment and computer storage medium
CN114328800A (en) Text processing method and device, electronic equipment and computer readable storage medium
CN111984774B (en) Searching method, searching device, searching equipment and storage medium
CN112506864A (en) File retrieval method and device, electronic equipment and readable storage medium
CN112579750A (en) Similar medical record retrieval method, device, equipment and storage medium
CN112597768A (en) Text auditing method and device, electronic equipment, storage medium and program product
CN117609418A (en) Document processing method, device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination