WO2021189752A1 - 搜索方法及装置 - Google Patents
搜索方法及装置 Download PDFInfo
- Publication number
- WO2021189752A1 WO2021189752A1 PCT/CN2020/107418 CN2020107418W WO2021189752A1 WO 2021189752 A1 WO2021189752 A1 WO 2021189752A1 CN 2020107418 W CN2020107418 W CN 2020107418W WO 2021189752 A1 WO2021189752 A1 WO 2021189752A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- search
- layer
- keyword
- results
- vertical
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/903—Querying
- G06F16/90335—Query processing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/953—Querying, e.g. by the use of web search engines
- G06F16/9538—Presentation of query results
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/903—Querying
- G06F16/9038—Presentation of query results
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Definitions
- This application relates to the field of intelligent search technology for data processing, and in particular to a search method and device.
- Vertical search is a professional search for a certain industry. For example, a certain type of specialized information in a web page library is integrated, and the required data is extracted by targeted sub-fields for processing and then returned to the user in some form. Compared with general search engines with large amount of information, inaccurate query, insufficient depth, etc., vertical search achieves more accurate by providing valuable information and related services for a specific field, a specific group of people, or a specific demand Efficient search.
- search requests are usually initiated based on search terms.
- the requirements involved in the search request may include, for example, operational requirements, relevance requirements, or generalization requirements, and then different search requests are made.
- the results are summarized as the final result.
- the embodiments of the present application provide a search method and device to solve the technical problem that the vertical search obtains fewer results and is not highly accurate in the prior art.
- the first aspect of the embodiments of the present application provides a search method, including:
- search keywords in the case that the search keywords are keywords related to vertical search, use the fine ranking layer of the vertical search architecture to obtain the search results of the search keywords; use the business layer processing of the vertical search architecture
- the display effect of the search result is described to obtain the target search result; and the target search result is sent to the display device. That is to say, the embodiment of the application can use the refined ranking layer of the vertical search architecture to obtain the search results of the search keywords.
- the refined ranking layer can generally search 10 times the magnitude of data, so it can obtain a more complete and accurate search. result.
- the obtaining the search results of the search keywords by using the fine ranking layer of the vertical search architecture includes: using the search keywords at the fine ranking layer to obtain multiple search requests; Generate a queue to calculate the search request to obtain the search result of the search request; merge the search results of a plurality of the search requests to obtain the search result of the search keyword. In this way, a queue is used for calculation for any retrieval request, which can improve retrieval efficiency.
- the obtaining multiple retrieval requests by using the search keywords includes: adding a plurality of preset different fields to the search keywords respectively to obtain multiple retrieval requests.
- the obtaining multiple retrieval requests by using the search keyword includes: modifying fields of the search keyword multiple times according to a preset modification rule to obtain multiple retrieval requests.
- multiple queues corresponding to the multiple retrieval requests are distributed in a tree structure.
- the tree-like queue representation and the flexible and optional fine-ranking scheme it can be used in search scenarios of various vertical services at low cost, is versatile, and is better in efficiency than the existing scheme.
- the merging of the search results of the multiple retrieval requests includes: merging the search results calculated by each of the queues layer by layer according to the sequence of the tree structure.
- the merging of the results of the multiple retrieval requests includes: merging the results calculated by each of the queues according to the priority of the multiple queues corresponding to the multiple retrieval requests.
- the use of the business layer of the vertical search architecture to process the display effect of the search results to obtain the target search results includes: using the business layer of the vertical search architecture to adjust the fonts and/or fonts in the search results Or the size of the image in the search result to obtain the target search result. In this way, a better display effect can be obtained and user experience can be improved.
- a second aspect of the embodiments of the present application provides a search device, including:
- the processing module is further configured to obtain the search result of the search keyword by using the fine ranking layer of the vertical search architecture when the search keyword is a keyword related to a vertical search;
- the processing module is further configured to use the business layer of the vertical search architecture to process the display effect of the search result to obtain the target search result;
- the sending module is used to send the target search result to the display device.
- the processing module is specifically used for:
- For each search request generate a queue to calculate the search request, and obtain the search result of the search request;
- the processing module is specifically further used for:
- a plurality of preset different fields are respectively added to the search keywords to obtain a plurality of the search requests.
- the processing module is specifically further used for:
- multiple queues corresponding to the multiple retrieval requests are distributed in a tree structure.
- the processing module is specifically further used for:
- the search results calculated by the queues are merged layer by layer.
- the processing module is specifically further used for:
- the results calculated by the queues are combined.
- the processing module is specifically further used for:
- the business layer of the vertical search architecture is used to adjust the font in the search result and/or the size of the image in the search result to obtain the target search result.
- a third aspect of the embodiments of the present application provides an electronic device, including: at least one processor; Instructions, the instructions are executed by the at least one processor, so that the at least one processor can execute the method according to any one of the foregoing first aspects.
- the fourth aspect of the embodiments of the present application provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the method according to any one of the foregoing first aspects.
- the embodiment of this application provides a search method and device. It is found that in the prior art, multiple different requests are initiated at the business layer and then integrated, because each request in the business layer returns fewer results to the business. , Resulting in a lot of valuable content being discarded, and the final result after integration is less and inaccurate. Therefore, in the embodiment of the present application, after the search keyword is obtained, if the search keyword is a keyword related to vertical search, the refinement layer of the vertical search architecture is used to obtain the search result of the search keyword; the business using the vertical search architecture The layer processes the display effect of the search results to obtain the target search results; and sends the target search results to the display device.
- the embodiment of the application can use the refined ranking layer of the vertical search architecture to obtain the search results of the search keywords.
- the refined ranking layer can generally search 10 times the magnitude of data, so it can obtain a more complete and accurate search. result.
- FIG. 1 is a schematic diagram of a vertical search architecture provided by an embodiment of the application
- FIG. 2 is a schematic diagram of a system architecture to which the search method provided in an embodiment of the application is applicable;
- FIG. 3 is a schematic flowchart of a search method provided by an embodiment of this application.
- FIG. 4 is a schematic diagram of using a queue to calculate a retrieval request according to an embodiment of the application
- FIG. 5 is a schematic diagram of a work flow of a tree-like multi-queue provided by an embodiment of the application
- FIG. 6 is a schematic structural diagram of a traffic signal light identification device provided by an embodiment of the application.
- Fig. 7 is a block diagram of an electronic device used to implement the search method of an embodiment of the present application.
- the method in the embodiment of the present application can be applied to a terminal device or a server, and the terminal device can include electronic devices such as a mobile phone, a tablet computer, a notebook computer, or a desktop computer.
- the embodiments of the present application do not specifically limit the specific equipment to be applied.
- GUI graphical user interface
- controls and input boxes for receiving user operations may be set in the graphical user interface, so that the user can input search in the graphical user interface Keywords, and then implement the search method of the embodiment of the present application.
- specific content of the graphical user interface can be determined according to the actual application scenario, which is not specifically limited in the embodiment of the present invention.
- the user may wish to search for information about disease introduction, medicine, doctor, hospital, hospital registration, etc.; among them, disease introduction, medicine, doctor, hospital, hospital registration, etc. are different
- the data corresponding to the aspect usually belongs to data sources in different places. In the business layer, you need to send requests to the data sources in different places, and then select a certain number of search results from the search results obtained in each data source. Integration. In the selection process, a large amount of valuable content may be discarded, and the data information in the business layer in the search architecture is usually less, and each request in the business layer returns fewer results to the business layer. Integration The final result afterwards is less precise and cannot better meet user needs.
- the embodiment of the present application provides a vertical search architecture
- the vertical search architecture may include: a business layer, a refinement layer, and so on.
- the refined ranking layer of the vertical search architecture can be used to obtain the search results of the search keywords.
- the data information volume of the refined ranking layer is greater than that of the business layer. Get more complete and accurate search results.
- FIG. 1 shows a schematic diagram of a vertical search architecture according to an embodiment of the present application.
- the traffic entry can be used to enter search keywords.
- the fine ranking layer can be used to recall multiple search results of search keywords and to sort the search results of each recall.
- the fine-ranking layer can be used to achieve the following functions.
- Precise recall For example, given a specific search keyword (query), return a specific set of results, generally operating data, personalized mining data, etc.
- Inverted scene recall method, such as using the terms in the request to recall.
- Vector recall Semantic recall methods, such as converting requests into vectors and recalling them through models.
- Estimation Important ranking signals, such as models trained based on user clicks, are used for refined ranking strategies.
- Front row realize the storage of other information used by the fine row layer.
- the business layer can be used to perform display-level operations such as aggregation and modification on the results returned by the fine-ranking layer, and usually does not change the relative order of the results returned by the fine-ranking layer.
- the business uses the logic of the fine-ranking layer sorting as a business strategy, such as the selection of display styles, the expansion of fields, and so on.
- the vertical search architecture of the embodiment of the present application may also include a coarse-ranking layer.
- the coarse-ranking layer may be the uppermost layer in the vertical search architecture.
- Screening is generally to filter out thousands of levels from a set of more than 10,000 levels and input them to the fine ranking layer.
- the fine ranking layer can use a sorting algorithm to filter out the results that are most relevant to the search keywords entered by the user from the rough ranking results.
- the general scale is to filter out hundreds of levels from thousands of levels.
- FIG. 2 is a schematic diagram of an application scenario architecture to which the method provided in an embodiment of the application is applicable.
- the search method in the embodiment of the present application can be implemented based on the interaction between the terminal device 11 and the server 12.
- the user can enter a search keyword in the terminal device 11, the terminal device 11 can obtain the search keyword, the terminal device 11 can generate a search request containing the search keyword, and send the search request containing the search keyword to the server 12
- the server 12 can obtain the search keyword, the server 12 can determine whether the search keyword is a keyword related to a vertical search, and if the search keyword is a keyword related to a vertical search, the vertical search structure set in the server can be used
- the refined sorting layer of the software obtains the search results of the search keywords; and uses the business layer of the vertical search architecture to process the display effect of the search results to obtain the target search results; and then sends the target search results to the display device (such as the terminal device 11).
- the search result of the target can be displayed in the terminal device 11.
- the number of servers may be any value greater than or equal to 1, which is not
- a vertical search architecture can be set in the terminal device 11, and the terminal device can implement the search method in the embodiment of the present application.
- the user can enter a search keyword in the terminal device 11, the terminal device 11 can obtain the search keyword, and the terminal device 11 can determine whether the search keyword is a keyword related to vertical search.
- you can use the fine ranking layer of the vertical search architecture to obtain the search results of the search keywords; and use the business layer of the vertical search architecture to process the display effect of the search results to obtain the target search results; and then to the display device (such as The display device of the terminal device 11) transmits the target search result.
- the search result of the target can be displayed on the display device of the terminal device 11.
- the search method in the embodiment of the present application may also be applied to other scenarios, and the embodiment of the present application does not specifically limit this.
- the refined ranking layer of the vertical search architecture is used to obtain the search results of the search keywords, the refined ranking layer can generally search for 10 times the magnitude of data compared to the business layer, so it can get more complete , Accurate search results.
- FIG. 3 is a schematic flowchart of a search method provided by an embodiment of this application.
- the method may specifically include:
- the search keyword may be any content input by the user.
- the user can input search keywords in the input box, or use the voice control to voice input search keywords, etc., to obtain the search keywords.
- search keyword is a keyword related to a vertical search
- obtain a search result of the search keyword by using the fine ranking layer of the vertical search architecture.
- keywords related to vertical search can be pre-stored in a storage location such as a database. After the search keyword is obtained, it can be queried in the storage location such as the database whether the search keyword is included. If the search keyword is contained in a storage location such as a database, it can be determined that the search term is a keyword related to a vertical search. If the search keyword is not included in a storage location such as a database, it can be determined that the search term is not a keyword related to a vertical search.
- the keywords related to the vertical search may be keywords related to medical treatment, novels, pictures, etc.
- the embodiments of the present application do not specifically limit the keywords related to the vertical search.
- the process of determining whether the search term is a keyword related to vertical search may be imperceptible to the user, that is, when the user enters the search keyword, he does not need to pay attention to whether the search term is a normal search or a vertical search.
- the user enters a search keyword according to actual needs, and then the execution subject who executes the method of the embodiment of the present application can automatically determine whether the search keyword input by the user is a keyword related to vertical search, and execute the subsequent steps.
- the fine ranking layer of the vertical search architecture may be used to obtain the search results of the search keywords in any manner. For example, multiple search results of a search keyword can be recalled in the fine ranking layer, and each recalled search result can be sorted, and the multiple search results with the highest ranking can be used as the search result of the search keyword. This is not specifically limited.
- S103 Use the business layer of the vertical search architecture to process the display effect of the search results to obtain target search results.
- the search result of the search keyword can be sent to the business layer, and the business layer can process the display effect of the search result, for example, the return to the fine ranking layer As a result, perform display-level operations such as selection of display styles, field expansion and modification, and obtain target search results.
- S104 Send the target search result to the display device.
- the execution subject of S101-S103 is the server, then in S104, the display device may be the terminal device where the user enters the search keyword, the server may send the target search result to the terminal device, and the terminal device may display the target search results.
- the execution subject of S101-S103 is the terminal device where the user enters the search keyword.
- the display device may be the display screen of the terminal device, etc., and the terminal device may send the target search result to the display device.
- the display device can display the target search results.
- the embodiment of the application provides a search method and device. It is found that in the prior art, multiple different requests are initiated at the business layer and then integrated, because each request in the business layer is returned to the business The results are relatively small, resulting in a large amount of valuable content being discarded, and the final result after integration is less and inaccurate. Therefore, in the embodiment of the present application, after the search keyword is obtained, if the search keyword is a keyword related to vertical search, the refinement layer of the vertical search architecture is used to obtain the search result of the search keyword; the business using the vertical search architecture The layer processes the display effect of the search results to obtain the target search results; and sends the target search results to the display device.
- the embodiment of the application can use the refined ranking layer of the vertical search architecture to obtain the search results of the search keywords.
- the refined ranking layer can generally search 10 times the magnitude of data, so it can obtain a more complete and accurate search. result.
- the obtaining the search result of the search keyword by using the fine sorting layer of the vertical search architecture includes: using the fine sorting layer in the fine sorting layer. Search for keywords to obtain multiple search requests; for each search request, generate a queue to calculate the search request to obtain the search result of the search request; merge the search results of multiple search requests to obtain the search Keyword search results.
- the search keyword can be processed in the fine ranking layer according to the business scenario to obtain multiple retrieval requests, and then for each retrieval request, a queue is generated to calculate the retrieval result of the retrieval request, and multiple retrievals are merged
- the requested search result, the search result of the search keyword is obtained.
- FIG. 4 shows a schematic diagram of calculating a retrieval request by using multiple queues in a fine ranking layer.
- the main request can be a request containing search keywords.
- the main request can be flexibly split into multiple sub-requests. When splitting, each sub-request can also be further split into more detailed sub-requests. Each sub-request corresponds to a queue for separate calculation, and then the calculation results of each queue can be combined to obtain the search result of the search keyword.
- using the search keywords at the refinement layer to obtain multiple retrieval requests may be: adding a plurality of preset different fields to the search keywords respectively to obtain multiple retrievals. ask. For example, if the user enters the search keyword "cold”, he can add fields for "cold” to obtain “cold medicine”, “cold registration”, “cold diet”, etc., so as to obtain multiple search requests under different subcategories.
- using the search keywords to obtain multiple search requests at the refined ranking layer may be: modifying the field of the search keywords multiple times according to a preset modification rule to obtain multiple search requests .
- the preset modification rule can be to replace the invalid words in the search keywords with keywords of different subcategories. For example, if the user enters the search keyword "What to do if you catch a cold", you can modify the "What to do if you catch a cold” multiple times. The invalid words "What should I do” received "cold medicine", “cold registration”, “cold diet”, etc., which resulted in multiple search requests under different subcategories.
- multiple queues corresponding to multiple retrieval requests are distributed in a tree structure.
- FIG. 5 shows a schematic diagram of the workflow of a tree-like multi-queue, and a retrieval request can be flexibly split into a tree-like queue.
- each multi-queue information can be written into a designated field, and the designated field of each queue can be added to the search keyword at the fine ranking layer to generate a search request for each queue.
- a new search request by modifying the specified request field after copying according to the search keyword.
- the above methods of generating search requests can also be cross-integrated and used to flexibly generate multi-layer sub-queues under various demand scenarios. .
- Each queue can be calculated separately, and then the calculation results of each queue can be gradually combined to obtain the final result.
- the priority of the queues can be determined (the priority of each queue can be determined according to the actual application scenario, which is not specifically limited in the embodiment of the present application), and the results of the high priority queues can be merged first.
- queue filter conditions such as setting selection/discarding conditions for each sub-queue.
- the business layer will issue the "what if you catch a cold” query, and the framework of the fine ranking layer will call the business-defined split queue method to split different sub-categories Retrieval requests, such as "cold medicines", “cold registration”, “cold diet” and other retrieval requests, these retrieval requests are sent from separate sub-queues in parallel to the coarse sorting layer for recall and coarse sorting.
- Retrieval requests such as "cold medicines”, “cold registration”, “cold diet” and other retrieval requests
- these retrieval requests are sent from separate sub-queues in parallel to the coarse sorting layer for recall and coarse sorting.
- the returned results of the coarse sorting can be customized for fine sorting, such as the "cold registration" sub-queue, which can freely combine and sort the returned medical information with factors such as hospital grade, patient score, and distance to visit.
- the sub-queue After the sub-queue is finished, it will be aggregated with other related sub-queues according to other configured rules. For example, the "drug" result and the "diet” result alternately appear. The sorted collection. Furthermore, the business layer of the vertical search architecture can be used to adjust the fonts in the search results returned by the fine-ranking layer, and/or adjust the size of the images in the search results returned by the fine-ranking layer to obtain target search results.
- the embodiment of the present application can trigger multiple requests at the fine-ranking layer according to the business scenario, and the multiple requests are represented in the form of a tree diagram of any level.
- Each queue can perform fine-ranking calculations separately, and then the entire tree-shaped request The queues are merged and the final result is returned.
- the calculation of search results at the fine-ranking layer can get more signals and data (compared to the business layer, which can generally get 10 times the magnitude of data).
- the tree queue can support a variety of fine-ranking algorithms (Such as rule-based text similarity algorithm, closeness algorithm, BM25 algorithm, and statistics-based click-through rate estimation model algorithm, etc.), the effect is far better than the integration of different requests at the business layer.
- fine-ranking algorithms Sud as rule-based text similarity algorithm, closeness algorithm, BM25 algorithm, and statistics-based click-through rate estimation model algorithm, etc.
- FIG. 6 is a schematic structural diagram of an embodiment of a search device provided by this application. As shown in Figure 6, the search device provided in this embodiment includes:
- the processing module 61 is used to obtain search keywords
- the processing module 61 is further configured to obtain the search result of the search keyword by using the fine ranking layer of the vertical search architecture when the search keyword is a keyword related to vertical search;
- the processing module 61 is further configured to use the business layer of the vertical search architecture to process the display effect of the search results to obtain target search results;
- the sending module 62 is configured to send the target search result to the display device.
- the processing module is specifically used for:
- For each search request generate a queue to calculate the search request, and obtain the search result of the search request;
- the processing module is specifically further used for:
- a plurality of preset different fields are respectively added to the search keywords to obtain a plurality of the search requests.
- the processing module is specifically further used for:
- multiple queues corresponding to the multiple retrieval requests are distributed in a tree structure.
- the processing module is specifically further used for:
- the search results calculated by the queues are merged layer by layer.
- the processing module is specifically further used for:
- the results calculated by the queues are combined.
- the processing module is specifically further used for:
- the business layer of the vertical search architecture is used to adjust the font in the search result and/or the size of the image in the search result to obtain the target search result.
- the embodiment of this application provides a search method and device. It is found that in the prior art, multiple different requests are initiated at the business layer and then integrated, because each request in the business layer returns fewer results to the business. , Resulting in a lot of valuable content being discarded, and the final result after integration is less and inaccurate. Therefore, in the embodiment of the present application, after the search keyword is obtained, if the search keyword is a keyword related to vertical search, the refinement layer of the vertical search architecture is used to obtain the search result of the search keyword; the business using the vertical search architecture The layer processes the display effect of the search results to obtain the target search results; and sends the target search results to the display device.
- the embodiment of the application can use the refined ranking layer of the vertical search architecture to obtain the search results of the search keywords.
- the refined ranking layer can generally search 10 times the magnitude of data, so it can obtain a more complete and accurate search. result.
- the search device provided in each embodiment of the present application can be used to execute the method shown in each corresponding embodiment described above, and its implementation manner and principle are the same, and will not be repeated.
- the present application also provides an electronic device and a readable storage medium.
- FIG. 7 it is a block diagram of an electronic device according to the search method of an embodiment of the present application.
- Electronic devices are intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers.
- Electronic devices can 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 merely examples, and are not intended to limit the implementation of the application described and/or required herein.
- the electronic device includes: one or more processors 701, a memory 702, and interfaces for connecting various components, including a high-speed interface and a low-speed interface.
- the various components are connected to each other using different buses, and can be installed on a common motherboard or installed in other ways as needed.
- the processor may process instructions executed in the electronic device, including instructions stored in or on the memory to display graphical information of the GUI on an external input/output device (such as a display device coupled to an interface).
- an external input/output device such as a display device coupled to an interface.
- multiple processors and/or multiple buses can be used with multiple memories and multiple memories.
- multiple electronic devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system).
- a processor 701 is taken as an example.
- the memory 702 is a non-transitory computer-readable storage medium provided by this application.
- the memory stores instructions executable by at least one processor, so that the at least one processor executes the search method provided in this application.
- the non-transitory computer-readable storage medium of the present application stores computer instructions, and the computer instructions are used to make a computer execute the search method provided in the present application.
- the memory 702 as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as program instructions/modules corresponding to the search method in the embodiment of the present application (for example, the accompanying drawings).
- the processor 701 executes various functional applications and data processing of the server by running non-transitory software programs, instructions, and modules stored in the memory 702, that is, implements the search method in the foregoing method embodiment.
- the memory 702 may include a storage program area and a storage data area.
- the storage program area may store an operating system and an application program required by at least one function; the storage data area may store data created according to the use of the search electronic device.
- the memory 702 may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices.
- the memory 702 may optionally include memories remotely provided with respect to the processor 701, and these remote memories may be connected to the search electronic device via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
- the electronic device of the search method may further include: an input device 703 and an output device 704.
- the processor 701, the memory 702, the input device 703, and the output device 704 may be connected by a bus or in other ways. In FIG. 7, the connection by a bus is taken as an example.
- the input device 703 can receive input digital or character information, and generate key signal input related to the user settings and function control of the search electronic device, such as touch screen, keypad, mouse, track pad, touch pad, indicator stick, one or more A mouse button, trackball, joystick and other input devices.
- the output device 704 may include a display device, an auxiliary lighting device (for example, LED), a tactile feedback device (for example, a vibration motor), and the like.
- 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 embodiments, the display device may be a touch screen.
- Various implementations of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, application specific ASICs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: being implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, the programmable processor It can be a dedicated or general-purpose programmable processor that can receive data and instructions from the storage system, at least one input device, and at least one output device, and transmit the data and instructions to the storage system, the at least one input device, and the at least one output device. An output device.
- the systems and techniques described here can be implemented on a computer that has: a display device for displaying information to the user (for example, a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) ); and a keyboard and a pointing device (for example, a mouse or a trackball) through which the user can provide input to the computer.
- a display device for displaying information to the user
- LCD liquid crystal display
- keyboard and a pointing device for example, a mouse or a trackball
- Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (for example, visual feedback, auditory feedback, or tactile feedback); and can be in any form (including Acoustic input, voice input, or tactile input) to receive input from the user.
- the systems and technologies described herein can be implemented in a computing system that includes back-end components (for example, as a data server), or a computing system that includes middleware components (for example, an application server), or a computing system that includes front-end components (for example, A user computer with a graphical user interface or a web browser through which the user can interact with the implementation of the system and technology described herein), or includes such back-end components, middleware components, Or any combination of front-end components in a computing system.
- the components of the system can be connected to each other through any form or medium of digital data communication (for example, a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), and the Internet.
- the computer system can include clients and servers.
- the client and server are generally far away from each other and usually interact through a communication network.
- the relationship between the client and the server is generated by computer programs that run on the corresponding computers and have a client-server relationship with each other.
- the technical solution of the embodiment of the present application it is found that because in the prior art, multiple different requests are initiated at the business layer and then integrated, because each request in the business layer returns fewer results to the business, resulting in a large amount of valuable The contents of are discarded, and the final result after integration is less and inaccurate. Therefore, in the embodiment of the present application, after the search keyword is obtained, if the search keyword is a keyword related to vertical search, the refinement layer of the vertical search architecture is used to obtain the search result of the search keyword; the business using the vertical search architecture The layer processes the display effect of the search results to obtain the target search results; and sends the target search results to the display device.
- the search keyword is a keyword related to vertical search
- the refinement layer of the vertical search architecture is used to obtain the search result of the search keyword
- the business using the vertical search architecture The layer processes the display effect of the search results to obtain the target search results; and sends the target search results to the display device.
- the embodiment of the application can use the refined ranking layer of the vertical search architecture to obtain the search results of the search keywords.
- the refined ranking layer can generally search 10 times the magnitude of data, so it can obtain a more complete and accurate search. result.
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computational Linguistics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
一种搜索方法及装置,涉及智能搜索技术领域,所述方法具体包括:获取搜索关键词(S101);在所述搜索关键词为与垂直搜索相关的关键词的情况下,利用垂直搜索架构的精排层获取所述搜索关键词的搜索结果(S102);利用垂直搜索架构的业务层处理所述搜索结果的显示效果,得到目标搜索结果(S103);向显示设备发送所述目标搜索结果(S104)。利用垂直搜索架构的精排层获取搜索关键词的搜索结果,精排层相比于业务层一般可以搜索到10倍量级的数据,因此能够得到较为完备、准确的搜索结果。
Description
本申请要求于2020年03月23日提交中国专利局、申请号为2020102059838、申请名称为“搜索方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及数据处理的智能搜索技术领域,尤其涉及一种搜索方法及装置。
垂直搜索是针对某一个行业的专业搜索,例如对网页库中的某类专门的信息进行整合,定向分字段抽取出需要的数据进行处理后再以某种形式返回给用户。相对于通用搜索引擎的信息量大、查询不准确、深度不够等,垂直搜索通过针对某一特定领域、某一特定人群或某一特定需求提供的有一定价值的信息和相关服务,实现更加精准高效的搜索。
现有技术中,垂直搜索的处理中,通常是基于搜索词发起多次不同的检索请求,检索请求所涉及的需求例如可以包括运营需求、相关性需求或泛化需求等,然后对不同检索请求的结果汇总作为最终的结果。
但是,现有技术中垂直搜索得到的结果较少且精确度不高。
发明内容
本申请实施例提供一种搜索方法及装置,以解决现有技术中垂直搜索得到的结果较少且精确度不高的技术问题。
本申请实施例第一方面提供一种搜索方法,包括:
获取搜索关键词;在所述搜索关键词为与垂直搜索相关的关键词的情况下,利用垂直搜索架构的精排层获取所述搜索关键词的搜索结果;利用垂直搜索架构的业务层处理所述搜索结果的显示效果,得到目标搜索结果;向显示设备发送所述目标搜索结果。即本申请实施例可以利用垂直搜索架构的精排层获取搜索关键词的搜索结果,精排层相比于业务层一般可以搜索到10倍量级的数据,因此能够得到较为完备、准确的搜索结果。
一种可能的实现方式中,所述利用垂直搜索架构的精排层获取所述搜索关键词的搜索结果,包括:在所述精排层利用所述搜索关键词得到多个检索请求;针对每个所述检索请求,生成一个队列计算所述检索请求,得到所述检索请求的搜索结果;合并多个所述检索请求的搜索结果,得到所述搜索关键词的搜索结果。这样,对于任一个检索请求采用一个队列进行计算,可以提升检索效率。
一种可能的实现方式中,所述利用所述搜索关键词得到多个检索请求,包括:分别为所述搜索关键词添加预设的多个不同字段,得到多个所述检索请求。
一种可能的实现方式中,所述利用所述搜索关键词得到多个检索请求,包括:按照预设的修改规则多次修改所述搜索关键词的字段,得到多个所述检索请求。
一种可能的实现方式中,所述多个检索请求对应的多个队列呈树状结构分布。通过树状的队列表示和灵活可选的精排方案,可以低成本的用于各种垂类业务的搜索场景,具有通用性,在效率上也好于现有方案。
一种可能的实现方式中,所述合并多个所述检索请求的搜索结果,包括:按照所述树状结构的顺序,逐层合并各所述队列计算得到的搜索结果。
一种可能的实现方式中,所述合并多个所述检索请求的结果,包括:按照所述多个检索请求对应的多个队列的优先级,合并各所述队列计算的结果。
一种可能的实现方式中,所述利用垂直搜索架构的业务层处理所述搜索结果的显示效果,得到目标搜索结果,包括:利用垂直搜索架构的业务层调整所述搜索结果中的字体和/或所述搜索结果中的图像的尺寸,得到目标搜索结果。这样,可以得到较好的显示效果,提升用户体验。
本申请实施例第二方面提供一种搜索装置,包括:
处理模块,用于获取搜索关键词;
所述处理模块,还用于在所述搜索关键词为与垂直搜索相关的关键词的情况下,利用垂直搜索架构的精排层获取所述搜索关键词的搜索结果;
所述处理模块,还用于利用垂直搜索架构的业务层处理所述搜索结果的显示效果,得到目标搜索结果;
发送模块,用于向显示设备发送所述目标搜索结果。
一种可能的实现方式中,所述处理模块,具体用于:
在所述精排层利用所述搜索关键词得到多个检索请求;
针对每个所述检索请求,生成一个队列计算所述检索请求,得到所述检索请求的搜索结果;
合并多个所述检索请求的搜索结果,得到所述搜索关键词的搜索结果。
一种可能的实现方式中,所述处理模块,具体还用于:
分别为所述搜索关键词添加预设的多个不同字段,得到多个所述检索请求。
一种可能的实现方式中,所述处理模块,具体还用于:
按照预设的修改规则多次修改所述搜索关键词的字段,得到多个所述检索请求。
一种可能的实现方式中,所述多个检索请求对应的多个队列呈树状结构分布。
一种可能的实现方式中,所述处理模块,具体还用于:
按照所述树状结构的顺序,逐层合并各所述队列计算得到的搜索结果。
一种可能的实现方式中,所述处理模块,具体还用于:
按照所述多个检索请求对应的多个队列的优先级,合并各所述队列计算的结果。
一种可能的实现方式中,所述处理模块,具体还用于:
利用垂直搜索架构的业务层调整所述搜索结果中的字体和/或所述搜索结果中的图像的尺寸,得到目标搜索结果。
本申请实施例第三方面提供一种电子设备,包括:至少一个处理器;以及与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如前述第一方面任一项所述的方法。
本申请实施例第四方面提供一种存储有计算机指令的非瞬时计算机可读存储介质,所述计算机指令用于使所述计算机执行如前述第一方面中任一项所述的方法。
综上所述,本申请实施例相对于现有技术的有益效果:
本申请实施例中提供了一种搜索方法及装置,发现由于现有技术中是在业务层发起多次不同的请求,然后进行整合,因为业务层中每个请求返回给业务的结果都比较少,导致大量有价值的内容都被丢弃,整合后的最终结果较少且不精确。因此本申请实施例中,在获取搜索关键词后,若搜索关键词为与垂直搜索相关的关键词,则利用垂直搜索架构的精排层获取搜索关键词的搜索结果;利用垂直搜索架构的业务层处理搜索结果的显示效果,得到目标搜索结果;向显示设备发送目标搜索结果。即本申请实施例可以利用垂直搜索架构的精排层获取搜索关键词的搜索结果,精排层相比于业务层一般可以搜索到10倍量级的数据,因此能够得到较为完备、准确的搜索结果。
应当理解,本部分所描述的内容并非旨在标识本公开的实施例的关键或重要特征,也不用于限制本公开的范围。本公开的其它特征将通过以下的说明书而变得容易理解。
附图用于更好地理解本方案,不构成对本申请的限定。其中:
图1为本申请实施例提供的垂直搜索架构的示意图;
图2为本申请实施例提供的搜索方法适用的系统架构示意图;
图3为本申请实施例提供的搜索方法的流程示意图;
图4为本申请实施例提供的一种利用队列计算检索请求的示意图;
图5为本申请实施例提供的一种树状多队列的工作流程示意图;
图6为本申请实施例提供的交通信号灯识别装置的结构示意图;
图7是用来实现本申请实施例的搜索方法的电子设备的框图。
以下结合附图对本申请的示范性实施例做出说明,其中包括本申请实施例的各种细节以助于理解,应当将它们认为仅仅是示范性的。因此,本领域普通技术人员应当认识到,可以对这里描述的实施例做出各种改变和修改,而不会背离本申请的范围和精神。同样,为了清楚和简明,以下的描述中省略了对公知功能和结构的描述。在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。
本申请实施例的方法可以应用于终端设备或服务器,终端设备可以包括:手机、平板电脑、笔记本电脑、或者台式电脑等电子设备。本申请实施例对应用的具体设备不作具体限定。
示例性的,终端或服务器中可以提供图形用户界面(graphical user interface,GUI),在图形用户界面中可以设置用于接收用户操作的控件、输入框等,使得用户可以在图形用户界面中输入搜索关键词,进而实现本申请实施例的搜索方法,可以理解,图形用户界面的具体内容可以根据实际的应用场景确定,本发明实施例对此不作具体限定。
本申请实施例中发现,通常的,垂直搜索架构中,是在业务层发起多次不同的请求,依据业务层中的数据信息获取到多个搜索结果,然后进行整合,得到最终显示的搜索结果。
示例性的,以用户输入关于疾病的搜索词后,用户可能希望搜索关于疾病介绍、药、医生、医院、医院挂号等方面的信息;其中,疾病介绍、药、医生、医院、医院挂号等不同方面对应的数据通常属于不同地方的数据源,在业务层中,需要向该不同地方的数据源发送请求,之后将在每个数据源中获取的搜索结果中各选择一定个数的搜索结果进行整合,在该选择过程中可能导致大量有价值的内容都被丢弃,且搜索架 构中业务层中的数据信息通常较少,业务层中每个请求返回给业务层的结果本身都比较少,整合后的最终结果较不精确,不能够较好满足用户需求。
基于此,本申请实施例提供了一种垂直搜索架构,垂直搜索架构可以包括:业务层和精排层等。可以利用垂直搜索架构的精排层获取搜索关键词的搜索结果,精排层的数据信息量大于业务层,例如精排层相比于业务层一般可以搜索到10倍量级的数据,因此能够得到较为完备、准确的搜索结果。
示例性的,图1示出了一种本申请实施例的垂直搜索架构示意图。
其中,流量入口可以用于输入搜索关键词。
精排层可以用于召回搜索关键词的多个搜索结果,以及用于将各个召回的搜索结果进行排序。
例如,精排层可以用于实现下述功能。精确召回:比如给定特定的搜索关键词(query),返回一组特定的结果集,一般是运营数据、个性化挖掘数据等。倒排:场景召回方式,比如使用请求里面的词项进行召回。向量召回:语义召回方式,比如将请求转换成向量通过模型的方式召回。预估:重要的排序信号,例如根据用户点击等训练的模型,供精排策略使用。正排:实现精排层使用的其他信息的存储。
业务层可以用于对精排层返回的结果做聚合、修饰等展现层面的操作,通常不会改变精排层返回结果的相对排序。例如,业务将精排层排序的逻辑做业务上的策略,比如展现样式的选择,字段的扩充等。
可能的实现方式中,本申请实施例的垂直搜索架构中还可以包括粗排层,粗排层可以是垂直搜索架构中的最上层,可以用于以性能相对较好的算法对候选集做快速筛选,一般是从万以上级别集合中筛选出千级别结果输入到精排层。适应的,精排层可以使用排序算法从粗排结果中筛选出和用户输入的搜索关键词最相关的结果,一般规模是从千级别筛选出百级别。
如图2所示,图2为本申请实施例提供的方法所适用的应用场景架构示意图。
一种可能的实现方式中,可以基于终端设备11与服务器12的交互,实现本申请实施例的搜索方法。例如,用户可以在终端设备11中输入搜索关键词,则终端设备11可以获取搜索关键词,终端设备11可以生成包含搜索关键词的搜索请求,以及向服务器12发送该包含搜索关键词的搜索请求;服务器12可以获取搜索关键词,服务器12可以判断该搜索关键词是否是与垂直搜索相关的关键词,在搜索关键词是与垂直搜索相关的关键词,则可以利用服务器中设置的垂直搜索架构的精排层获取搜索关键词的搜索结果;以及利用垂直搜索架构的业务层处理搜索结果的显示效果,得到目标 搜索结果;进而向显示设备(例如终端设备11)发送目标搜索结果。从而可以在终端设备11中显示该目标所搜结果。可以理解,具体应用中,服务器的数量可以为大于或等于1的任意值,本申请实施例对此不作具体限定。
一种可能的实现方式中,终端设备11中可以设置垂直搜索架构,则终端设备可以实现本申请实施例的搜索方法。例如,用户可以在终端设备11中输入搜索关键词,则终端设备11可以获取搜索关键词,终端设备11可以判断该搜索关键词是否是与垂直搜索相关的关键词,在搜索关键词是与垂直搜索相关的关键词,则可以利用垂直搜索架构的精排层获取搜索关键词的搜索结果;以及利用垂直搜索架构的业务层处理搜索结果的显示效果,得到目标搜索结果;进而向显示设备(例如终端设备11的显示设备)发送目标搜索结果。从而可以在终端设备11的显示设备中显示该目标所搜结果。
可以理解,本申请实施例的搜索方法也可以应用于其他的场景,本申请实施例对此不作具体限定。且,无论哪种应用场景中,因为利用垂直搜索架构的精排层获取搜索关键词的搜索结果,精排层相比于业务层一般可以搜索到10倍量级的数据,因此能够得到较为完备、准确的搜索结果。
如图3所示,图3为本申请实施例提供的搜索方法的流程示意图。该方法具体可以包括:
S101:获取搜索关键词。
本申请实施例中,搜索关键词可以是用户输入的任意内容。示例性的,用户可以在输入框中输入搜索关键词,或利用语音控件语音输入搜索关键词等,则可以获取搜索关键词。
S102:在所述搜索关键词为与垂直搜索相关的关键词的情况下,利用垂直搜索架构的精排层获取所述搜索关键词的搜索结果。
本申请实施例一种可能的实现方式中,与垂直搜索相关的关键词可以预先存储于数据库等存储位置,在获取搜索关键词后,可以在数据库等存储位置中查询是否包含该搜索关键词,如果数据库等存储位置中包含该搜索关键词,则可以判定该搜索词为与垂直搜索相关的关键词。如果数据库等存储位置中不包含该搜索关键词,则可以判定该搜索词不是与垂直搜索相关的关键词。
示例性的,与垂直搜索相关的关键词可以是医疗、小说、图片等相关的关键词,本申请实施例对与垂直搜索相关的关键词不作具体限定。
本申请实施例中,判断该搜索词是否为与垂直搜索相关的关键词的过程对用户可以是无感知的,即用户在输入搜索关键词时,可以不需要关注具体采用的是普通搜索 还是垂直搜索,用户根据实际需求输入搜索关键词,之后执行本申请实施例方法的执行主体可以自动判断用户输入的搜索关键词是否为与垂直搜索相关的关键词,以及执行后续的步骤。
本申请实施例中,可以利用垂直搜索架构的精排层采用任意方式获取搜索关键词的搜索结果。例如,可以在精排层召回搜索关键词的多个搜索结果,以及将各个召回的搜索结果进行排序,将排序靠前的多个搜索结果作为该搜索关键词的搜索结果,本申请实施例对此不作具体限定。
S103:利用垂直搜索架构的业务层处理所述搜索结果的显示效果,得到目标搜索结果。
本申请实施例中,在精排层中获取搜索关键词的搜索结果后,可以将搜索关键词的搜索结果发送给业务层,业务层可以处理搜索结果的显示效果,例如对精排层返回的结果做展现样式的选择,字段的扩充修饰等展现层面的操作,得到目标搜索结果。
S104:向显示设备发送所述目标搜索结果。
一种可能的实现方式中,S101-S103的执行主体为服务器,则S104中,显示设备可以是用户输入搜索关键词的终端设备,服务器可以向终端设备发送目标搜索结果,进而终端设备可以显示目标搜索结果。
一种可能的实现方式中,S101-S103的执行主体为用户输入搜索关键词的终端设备,则S104中,显示设备可以是终端设备的显示屏幕等,终端设备可以向显示设备发送目标搜索结果,显示设备可以显示目标搜索结果。
综上所述,本申请实施例中提供了一种搜索方法及装置,发现由于现有技术中是在业务层发起多次不同的请求,然后进行整合,因为业务层中每个请求返回给业务的结果都比较少,导致大量有价值的内容都被丢弃,整合后的最终结果较少且不精确。因此本申请实施例中,在获取搜索关键词后,若搜索关键词为与垂直搜索相关的关键词,则利用垂直搜索架构的精排层获取搜索关键词的搜索结果;利用垂直搜索架构的业务层处理搜索结果的显示效果,得到目标搜索结果;向显示设备发送目标搜索结果。即本申请实施例可以利用垂直搜索架构的精排层获取搜索关键词的搜索结果,精排层相比于业务层一般可以搜索到10倍量级的数据,因此能够得到较为完备、准确的搜索结果。
在图3对应的实施例的基础上,一种可能的实现方式中,所述利用垂直搜索架构的精排层获取所述搜索关键词的搜索结果,包括:在所述精排层利用所述搜索关键词 得到多个检索请求;针对每个所述检索请求,生成一个队列计算所述检索请求,得到所述检索请求的搜索结果;合并多个所述检索请求的搜索结果,得到所述搜索关键词的搜索结果。
本申请实施例中,在精排层中根据业务场景可以对搜索关键词处理得到多个检索请求,之后针对每个检索请求,生成一个队列计算得到该检索请求的检索结果,并合并多个检索请求的搜索结果,得到搜索关键词的搜索结果。
示例性的,图4示出了一种利用精排层中的多队列计算检索请求的示意图。其中,主请求可以为包含搜索关键字的请求,可以将主请求灵活的拆分为多个子请求,在拆分时,各子请求也可以进一步拆分为更细的子请求,拆分后的每个子请求对应生成一个队列单独计算,之后可以将各队列的计算结果组合得到该搜索关键词的搜索结果。
一种可能的实现方式中,在所述精排层利用所述搜索关键词得到多个检索请求可以为:分别为所述搜索关键词添加预设的多个不同字段,得到多个所述检索请求。例如,用户输入了搜索关键词“感冒”,可以分别为“感冒”添加字段得到“感冒药品”、“感冒挂号”“感冒饮食”等,从而得到多个不同子类目下的检索请求。
或者,示例性的,在所述精排层利用所述搜索关键词得到多个检索请求可以为:按照预设的修改规则多次修改所述搜索关键词的字段,得到多个所述检索请求。预设的修改规则可以是将搜索关键词中的无效词替换为不同子类目的关键词,例如,用户输入了搜索关键词“感冒了怎么办”,可以多次修改“感冒了怎么办”中的无效词“了怎么办”,得到“感冒药品”、“感冒挂号”“感冒饮食”等,从而得到多个不同子类目下的检索请求。
一种可能的实现方式中,多个检索请求对应的多个队列呈树状结构分布。
示例性的,图5示出了一种树状多队列的工作流程示意图,一个检索请求可以灵活地拆分成树状的队列。
例如,可以将每个多队列信息写入指定的字段,在精排层对搜索关键词添加各队列的指定的字段,生成各队列的检索请求。例如,也可以依据搜索关键词,复制后修改指定的请求字段构造出新的检索请求。例如,也可以在精排层通过请求旁路服务,自行生成请求信息构建新的检索请求,上述的生成检索请求的方法也可以交叉融合使用,可在各需求情景下灵活的生成多层子队列。
每个队列可以单独计算,之后再逐步组合各队列的计算结果得到最终的结果。
例如,合并各队列计算的结果时可以按照队列生成的树状结构顺序,逐层合并。例如,合并各队列计算的结果时,可以依据队列的优先级(各队列的优先级可以根据 实际的应用场景确定,本申请实施例对此不作具体限定),优先合并高优先队列结果。例如,合并各队列计算的结果时,也可以设置队列过滤条件,比如设置每个子队列的选择/弃用条件。
多个队列的结果合并回主队列后,可以在主队列进行合并结果的重排、打散、过滤、去重等操作。
以用户搜索“感冒了怎么办”为例,业务层将该“感冒了怎么办”的query下发,在精排层框架会调用业务自定义的拆分队列方法,拆分出不同子类目下的检索请求,比如“感冒药品”、“感冒挂号”、“感冒饮食”等检索请求,这些检索请求由各自独立的子队列并行下发到粗排层做召回、粗排,对于每个子队列的粗排返回结果可以进行自定义的精排,比如“感冒挂号”子队列,可以对返回的医疗信息结合医院等级、患者评分、就诊距离等因子自由组合综合排序。子队列精排结束后会和其它相关的子队列按照其它配置的规则做聚合,比如“药品”结果和“饮食”结果交替出现,精排层返回给业务层的是一个融合了各个子类目排序后的集合。进而可以利用垂直搜索架构的业务层调整精排层返回的搜索结果中的字体,和/或,调整精排层返回的搜索结果中的图像的尺寸,得到目标搜索结果。
综上,本申请实施例可以在精排层根据业务场景触发多次请求,多次请求以任意层次的树状图的形式表示,每个队列可以单独进行精排计算,随后整个树形的请求队列进行合并,将最终的结果返回。一方面在精排层进行搜索结果的计算,可以得到更多的信号和数据(相比于业务层一般可以得到10倍量级的数据),实践中,树状队列可以支持多种精排算法(如基于规则的文本相似度算法、紧密度算法、BM25算法,以及基于统计的点击率预估模型算法等),在效果上远远好于在业务层做的不同请求的整合。另一方面,通过树状的队列表示和灵活可选的精排方案,可以低成本的用于各种垂类业务的搜索场景,具有通用性,在效率上也好于现有方案。
图6为本申请提供的搜索装置一实施例的结构示意图。如图6所示,本实施例提供的搜索装置包括:
处理模块61,用于获取搜索关键词;
所述处理模块61,还用于在所述搜索关键词为与垂直搜索相关的关键词的情况下,利用垂直搜索架构的精排层获取所述搜索关键词的搜索结果;
所述处理模块61,还用于利用垂直搜索架构的业务层处理所述搜索结果的显示效果,得到目标搜索结果;
发送模块62,用于向显示设备发送所述目标搜索结果。
一种可能的实现方式中,所述处理模块,具体用于:
在所述精排层利用所述搜索关键词得到多个检索请求;
针对每个所述检索请求,生成一个队列计算所述检索请求,得到所述检索请求的搜索结果;
合并多个所述检索请求的搜索结果,得到所述搜索关键词的搜索结果。
一种可能的实现方式中,所述处理模块,具体还用于:
分别为所述搜索关键词添加预设的多个不同字段,得到多个所述检索请求。
一种可能的实现方式中,所述处理模块,具体还用于:
按照预设的修改规则多次修改所述搜索关键词的字段,得到多个所述检索请求。
一种可能的实现方式中,所述多个检索请求对应的多个队列呈树状结构分布。
一种可能的实现方式中,所述处理模块,具体还用于:
按照所述树状结构的顺序,逐层合并各所述队列计算得到的搜索结果。
一种可能的实现方式中,所述处理模块,具体还用于:
按照所述多个检索请求对应的多个队列的优先级,合并各所述队列计算的结果。
一种可能的实现方式中,所述处理模块,具体还用于:
利用垂直搜索架构的业务层调整所述搜索结果中的字体和/或所述搜索结果中的图像的尺寸,得到目标搜索结果。
本申请实施例中提供了一种搜索方法及装置,发现由于现有技术中是在业务层发起多次不同的请求,然后进行整合,因为业务层中每个请求返回给业务的结果都比较少,导致大量有价值的内容都被丢弃,整合后的最终结果较少且不精确。因此本申请实施例中,在获取搜索关键词后,若搜索关键词为与垂直搜索相关的关键词,则利用垂直搜索架构的精排层获取搜索关键词的搜索结果;利用垂直搜索架构的业务层处理搜索结果的显示效果,得到目标搜索结果;向显示设备发送目标搜索结果。即本申请实施例可以利用垂直搜索架构的精排层获取搜索关键词的搜索结果,精排层相比于业务层一般可以搜索到10倍量级的数据,因此能够得到较为完备、准确的搜索结果。
本申请各实施例提供的搜索装置可用于执行如前述各对应的实施例所示的方法,其实现方式与原理相同,不再赘述。
根据本申请的实施例,本申请还提供了一种电子设备和一种可读存储介质。
如图7所示,是根据本申请实施例的搜索方法的电子设备的框图。电子设备旨在表示各种形式的数字计算机,诸如,膝上型计算机、台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机、和其它适合的计算机。电子设备还可以 表示各种形式的移动装置,诸如,个人数字处理、蜂窝电话、智能电话、可穿戴设备和其它类似的计算装置。本文所示的部件、它们的连接和关系、以及它们的功能仅仅作为示例,并且不意在限制本文中描述的和/或者要求的本申请的实现。
如图7所示,该电子设备包括:一个或多个处理器701、存储器702,以及用于连接各部件的接口,包括高速接口和低速接口。各个部件利用不同的总线互相连接,并且可以被安装在公共主板上或者根据需要以其它方式安装。处理器可以对在电子设备内执行的指令进行处理,包括存储在存储器中或者存储器上以在外部输入/输出装置(诸如,耦合至接口的显示设备)上显示GUI的图形信息的指令。在其它实施方式中,若需要,可以将多个处理器和/或多条总线与多个存储器和多个存储器一起使用。同样,可以连接多个电子设备,各个设备提供部分必要的操作(例如,作为服务器阵列、一组刀片式服务器、或者多处理器系统)。图7中以一个处理器701为例。
存储器702即为本申请所提供的非瞬时计算机可读存储介质。其中,所述存储器存储有可由至少一个处理器执行的指令,以使所述至少一个处理器执行本申请所提供的搜索方法。本申请的非瞬时计算机可读存储介质存储计算机指令,该计算机指令用于使计算机执行本申请所提供的搜索方法。
存储器702作为一种非瞬时计算机可读存储介质,可用于存储非瞬时软件程序、非瞬时计算机可执行程序以及模块,如本申请实施例中的搜索方法对应的程序指令/模块(例如,附图6所示的处理模块61和发送模块62)。处理器701通过运行存储在存储器702中的非瞬时软件程序、指令以及模块,从而执行服务器的各种功能应用以及数据处理,即实现上述方法实施例中的搜索方法。
存储器702可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据搜索电子设备的使用所创建的数据等。此外,存储器702可以包括高速随机存取存储器,还可以包括非瞬时存储器,例如至少一个磁盘存储器件、闪存器件、或其他非瞬时固态存储器件。在一些实施例中,存储器702可选包括相对于处理器701远程设置的存储器,这些远程存储器可以通过网络连接至搜索电子设备。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
搜索方法的电子设备还可以包括:输入装置703和输出装置704。处理器701、存储器702、输入装置703和输出装置704可以通过总线或者其他方式连接,图7中以通过总线连接为例。
输入装置703可接收输入的数字或字符信息,以及产生与搜索电子设备的用户设 置以及功能控制有关的键信号输入,例如触摸屏、小键盘、鼠标、轨迹板、触摸板、指示杆、一个或者多个鼠标按钮、轨迹球、操纵杆等输入装置。输出装置704可以包括显示设备、辅助照明装置(例如,LED)和触觉反馈装置(例如,振动电机)等。该显示设备可以包括但不限于,液晶显示器(LCD)、发光二极管(LED)显示器和等离子体显示器。在一些实施方式中,显示设备可以是触摸屏。
此处描述的系统和技术的各种实施方式可以在数字电子电路系统、集成电路系统、专用ASIC(专用集成电路)、计算机硬件、固件、软件、和/或它们的组合中实现。这些各种实施方式可以包括:实施在一个或者多个计算机程序中,该一个或者多个计算机程序可在包括至少一个可编程处理器的可编程系统上执行和/或解释,该可编程处理器可以是专用或者通用可编程处理器,可以从存储系统、至少一个输入装置、和至少一个输出装置接收数据和指令,并且将数据和指令传输至该存储系统、该至少一个输入装置、和该至少一个输出装置。
这些计算程序(也称作程序、软件、软件应用、或者代码)包括可编程处理器的机器指令,并且可以利用高级过程和/或面向对象的编程语言、和/或汇编/机器语言来实施这些计算程序。如本文使用的,术语“机器可读介质”和“计算机可读介质”指的是用于将机器指令和/或数据提供给可编程处理器的任何计算机程序产品、设备、和/或装置(例如,磁盘、光盘、存储器、可编程逻辑装置(PLD)),包括,接收作为机器可读信号的机器指令的机器可读介质。术语“机器可读信号”指的是用于将机器指令和/或数据提供给可编程处理器的任何信号。
为了提供与用户的交互,可以在计算机上实施此处描述的系统和技术,该计算机具有:用于向用户显示信息的显示装置(例如,CRT(阴极射线管)或者LCD(液晶显示器)监视器);以及键盘和指向装置(例如,鼠标或者轨迹球),用户可以通过该键盘和该指向装置来将输入提供给计算机。其它种类的装置还可以用于提供与用户的交互;例如,提供给用户的反馈可以是任何形式的传感反馈(例如,视觉反馈、听觉反馈、或者触觉反馈);并且可以用任何形式(包括声输入、语音输入或者、触觉输入)来接收来自用户的输入。
可以将此处描述的系统和技术实施在包括后台部件的计算系统(例如,作为数据服务器)、或者包括中间件部件的计算系统(例如,应用服务器)、或者包括前端部件的计算系统(例如,具有图形用户界面或者网络浏览器的用户计算机,用户可以通过该图形用户界面或者该网络浏览器来与此处描述的系统和技术的实施方式交互)、或者包括这种后台部件、中间件部件、或者前端部件的任何组合的计算系统中。可以 通过任何形式或者介质的数字数据通信(例如,通信网络)来将系统的部件相互连接。通信网络的示例包括:局域网(LAN)、广域网(WAN)和互联网。
计算机系统可以包括客户端和服务器。客户端和服务器一般远离彼此并且通常通过通信网络进行交互。通过在相应的计算机上运行并且彼此具有客户端-服务器关系的计算机程序来产生客户端和服务器的关系。
根据本申请实施例的技术方案,发现由于现有技术中是在业务层发起多次不同的请求,然后进行整合,因为业务层中每个请求返回给业务的结果都比较少,导致大量有价值的内容都被丢弃,整合后的最终结果较少且不精确。因此本申请实施例中,在获取搜索关键词后,若搜索关键词为与垂直搜索相关的关键词,则利用垂直搜索架构的精排层获取搜索关键词的搜索结果;利用垂直搜索架构的业务层处理搜索结果的显示效果,得到目标搜索结果;向显示设备发送目标搜索结果。即本申请实施例可以利用垂直搜索架构的精排层获取搜索关键词的搜索结果,精排层相比于业务层一般可以搜索到10倍量级的数据,因此能够得到较为完备、准确的搜索结果。
应该理解,可以使用上面所示的各种形式的流程,重新排序、增加或删除步骤。例如,本申请中记载的各步骤可以并行地执行也可以顺序地执行也可以不同的次序执行,只要能够实现本申请公开的技术方案所期望的结果,本文在此不进行限制。
上述具体实施方式,并不构成对本申请保护范围的限制。本领域技术人员应该明白的是,根据设计要求和其他因素,可以进行各种修改、组合、子组合和替代。任何在本申请的精神和原则之内所作的修改、等同替换和改进等,均应包含在本申请保护范围之内。
Claims (18)
- 一种搜索方法,其特征在于,所述方法包括:获取搜索关键词;在所述搜索关键词为与垂直搜索相关的关键词的情况下,利用垂直搜索架构的精排层获取所述搜索关键词的搜索结果;利用垂直搜索架构的业务层处理所述搜索结果的显示效果,得到目标搜索结果;向显示设备发送所述目标搜索结果。
- 根据权利要求1所述的方法,其特征在于,所述利用垂直搜索架构的精排层获取所述搜索关键词的搜索结果,包括:在所述精排层利用所述搜索关键词得到多个检索请求;针对每个所述检索请求,生成一个队列计算所述检索请求,得到所述检索请求的搜索结果;合并多个所述检索请求的搜索结果,得到所述搜索关键词的搜索结果。
- 根据权利要求2所述的方法,其特征在于,所述利用所述搜索关键词得到多个检索请求,包括:分别为所述搜索关键词添加预设的多个不同字段,得到多个所述检索请求。
- 根据权利要求2所述的方法,其特征在于,所述利用所述搜索关键词得到多个检索请求,包括:按照预设的修改规则多次修改所述搜索关键词的字段,得到多个所述检索请求。
- 根据权利要求2-4任一项所述的方法,其特征在于,所述多个检索请求对应的多个队列呈树状结构分布。
- 根据权利要求5所述的方法,其特征在于,所述合并多个所述检索请求的搜索结果,包括:按照所述树状结构的顺序,逐层合并各所述队列计算得到的搜索结果。
- 根据权利要求2-4任一项所述的方法,其特征在于,所述合并多个所述检索请求的结果,包括:按照所述多个检索请求对应的多个队列的优先级,合并各所述队列计算的结果。
- 根据权利要求1-4任一项所述的方法,其特征在于,所述利用垂直搜索架构的业务层处理所述搜索结果的显示效果,得到目标搜索结果,包括:利用垂直搜索架构的业务层调整所述搜索结果中的字体和/或所述搜索结果中的图像 的尺寸,得到目标搜索结果。
- 一种搜索装置,其特征在于,包括:处理模块,用于获取搜索关键词;所述处理模块,还用于在所述搜索关键词为与垂直搜索相关的关键词的情况下,利用垂直搜索架构的精排层获取所述搜索关键词的搜索结果;所述处理模块,还用于利用垂直搜索架构的业务层处理所述搜索结果的显示效果,得到目标搜索结果;发送模块,用于向显示设备发送所述目标搜索结果。
- 根据权利要求9所述的装置,其特征在于,所述处理模块,具体用于:在所述精排层利用所述搜索关键词得到多个检索请求;针对每个所述检索请求,生成一个队列计算所述检索请求,得到所述检索请求的搜索结果;合并多个所述检索请求的搜索结果,得到所述搜索关键词的搜索结果。
- 根据权利要求10所述的装置,其特征在于,所述处理模块,具体还用于:分别为所述搜索关键词添加预设的多个不同字段,得到多个所述检索请求。
- 根据权利要求10所述的装置,其特征在于,所述处理模块,具体还用于:按照预设的修改规则多次修改所述搜索关键词的字段,得到多个所述检索请求。
- 根据权利要求10-12任一项所述的装置,其特征在于,所述多个检索请求对应的多个队列呈树状结构分布。
- 根据权利要求13所述的装置,其特征在于,所述处理模块,具体还用于:按照所述树状结构的顺序,逐层合并各所述队列计算得到的搜索结果。
- 根据权利要求10-12任一项所述的装置,其特征在于,所述处理模块,具体还用于:按照所述多个检索请求对应的多个队列的优先级,合并各所述队列计算的结果。
- 根据权利要求9-12任一项所述的装置,其特征在于,所述处理模块,具体还用于:利用垂直搜索架构的业务层调整所述搜索结果中的字体和/或所述搜索结果中的图像的尺寸,得到目标搜索结果。
- 一种电子设备,其特征在于,包括:至少一个处理器;以及与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使 所述至少一个处理器能够执行如权利要求1-8任一项所述的方法的指令。
- 一种存储有计算机指令的非瞬时计算机可读存储介质,其特征在于,计算机指令用于使所述计算机执行如权利要求1-8任一项所述的方法。
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
EP20862010.4A EP3913503A4 (en) | 2020-03-23 | 2020-08-06 | RESEARCH METHOD AND APPARATUS |
JP2021517834A JP7265619B2 (ja) | 2020-03-23 | 2020-08-06 | 検索方法及び装置 |
US17/207,899 US11500947B2 (en) | 2020-03-23 | 2021-03-22 | Search method and apparatus |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010205983.8A CN111368153B (zh) | 2020-03-23 | 2020-03-23 | 搜索方法及装置 |
CN202010205983.8 | 2020-03-23 |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US17/207,899 Continuation US11500947B2 (en) | 2020-03-23 | 2021-03-22 | Search method and apparatus |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021189752A1 true WO2021189752A1 (zh) | 2021-09-30 |
Family
ID=71209018
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/107418 WO2021189752A1 (zh) | 2020-03-23 | 2020-08-06 | 搜索方法及装置 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN111368153B (zh) |
WO (1) | WO2021189752A1 (zh) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114116758A (zh) * | 2021-11-16 | 2022-03-01 | 富途网络科技(深圳)有限公司 | 基于资源管理系统的字段搜索方法及相关设备 |
CN114416940A (zh) * | 2021-12-28 | 2022-04-29 | 北京百度网讯科技有限公司 | 表格问答中的短语泛化方法、装置、电子设备及存储介质 |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111368153B (zh) * | 2020-03-23 | 2023-08-29 | 百度在线网络技术(北京)有限公司 | 搜索方法及装置 |
EP3913503A4 (en) | 2020-03-23 | 2022-01-12 | Baidu Online Network Technology (Beijing) Co., Ltd. | RESEARCH METHOD AND APPARATUS |
CN113595874B (zh) * | 2021-07-09 | 2023-03-24 | 北京百度网讯科技有限公司 | 即时通讯群组的搜索方法、装置、电子设备和存储介质 |
CN116561438B (zh) * | 2023-07-11 | 2024-01-09 | 腾讯科技(深圳)有限公司 | 一种搜索方法和相关装置 |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110072045A1 (en) * | 2009-09-23 | 2011-03-24 | Yahoo! Inc. | Creating Vertical Search Engines for Individual Search Queries |
CN104778278A (zh) * | 2015-04-30 | 2015-07-15 | 亚信科技(南京)有限公司 | 一种基于solr的搜索方法及搜索应用服务器AUS |
CN104899268A (zh) * | 2015-05-25 | 2015-09-09 | 浪潮集团有限公司 | 一种分布式企业信息垂直搜索方法 |
CN107092639A (zh) * | 2017-02-23 | 2017-08-25 | 武汉智寻天下科技有限公司 | 一种搜索引擎系统 |
CN107526846A (zh) * | 2017-09-27 | 2017-12-29 | 百度在线网络技术(北京)有限公司 | 频道排序模型的生成、排序方法、装置、服务器和介质 |
CN111368153A (zh) * | 2020-03-23 | 2020-07-03 | 百度在线网络技术(北京)有限公司 | 搜索方法及装置 |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
FR2696852B1 (fr) * | 1992-10-12 | 1994-12-23 | Bull Sa | Procédé d'aide à l'optimisation d'une requête d'un système de gestion de base de données relationnel. |
US7805441B2 (en) * | 2006-03-06 | 2010-09-28 | Yahoo! Inc. | Vertical search expansion, disambiguation, and optimization of search queries |
KR101508583B1 (ko) * | 2013-09-16 | 2015-04-14 | 고려대학교 산학협력단 | 스마트 기기 내 시맨틱 검색 시스템 및 검색방법 |
CN103927342A (zh) * | 2014-03-28 | 2014-07-16 | 苏州中炎工贸有限公司 | 基于大数据的垂直搜索引擎系统 |
CN109255072B (zh) * | 2018-08-15 | 2023-04-14 | 腾讯科技(深圳)有限公司 | 信息召回方法及装置、计算机存储介质、电子设备 |
-
2020
- 2020-03-23 CN CN202010205983.8A patent/CN111368153B/zh active Active
- 2020-08-06 WO PCT/CN2020/107418 patent/WO2021189752A1/zh unknown
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110072045A1 (en) * | 2009-09-23 | 2011-03-24 | Yahoo! Inc. | Creating Vertical Search Engines for Individual Search Queries |
CN104778278A (zh) * | 2015-04-30 | 2015-07-15 | 亚信科技(南京)有限公司 | 一种基于solr的搜索方法及搜索应用服务器AUS |
CN104899268A (zh) * | 2015-05-25 | 2015-09-09 | 浪潮集团有限公司 | 一种分布式企业信息垂直搜索方法 |
CN107092639A (zh) * | 2017-02-23 | 2017-08-25 | 武汉智寻天下科技有限公司 | 一种搜索引擎系统 |
CN107526846A (zh) * | 2017-09-27 | 2017-12-29 | 百度在线网络技术(北京)有限公司 | 频道排序模型的生成、排序方法、装置、服务器和介质 |
CN111368153A (zh) * | 2020-03-23 | 2020-07-03 | 百度在线网络技术(北京)有限公司 | 搜索方法及装置 |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114116758A (zh) * | 2021-11-16 | 2022-03-01 | 富途网络科技(深圳)有限公司 | 基于资源管理系统的字段搜索方法及相关设备 |
CN114416940A (zh) * | 2021-12-28 | 2022-04-29 | 北京百度网讯科技有限公司 | 表格问答中的短语泛化方法、装置、电子设备及存储介质 |
CN114416940B (zh) * | 2021-12-28 | 2023-04-18 | 北京百度网讯科技有限公司 | 表格问答中的短语泛化方法、装置、电子设备及存储介质 |
Also Published As
Publication number | Publication date |
---|---|
CN111368153B (zh) | 2023-08-29 |
CN111368153A (zh) | 2020-07-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021189752A1 (zh) | 搜索方法及装置 | |
US11334583B2 (en) | Techniques for semantic searching | |
WO2020192534A1 (zh) | 搜索方法、终端及介质 | |
CN105474204B (zh) | 确定性的渐进式大数据分析 | |
US8204905B2 (en) | Use of data patterns for rapid search of complex rules in a rules-based search engine | |
US9361318B2 (en) | Adjacent search results exploration | |
CA2943713C (en) | Blending search results on online social networks | |
US20120166429A1 (en) | Using statistical language models for contextual lookup | |
US9721015B2 (en) | Providing a query results page | |
CN110517785A (zh) | 相似病例的查找方法、装置及设备 | |
US20150170333A1 (en) | Grouping And Presenting Images | |
CN106462613B (zh) | 基于用户属性来对建议进行排名 | |
US10970293B2 (en) | Ranking search result documents | |
RU2665302C2 (ru) | Интеллектуальное уточнение поиска | |
US10380124B2 (en) | Searching data sets | |
JP7163440B2 (ja) | テキストクエリ方法、装置、電子機器、記憶媒体及びコンピュータプログラム製品 | |
CN112579897B (zh) | 信息搜索方法和装置 | |
RU2643466C1 (ru) | Способ и система формирования результатов поисковой выдачи | |
US10733240B1 (en) | Predicting contract details using an unstructured data source | |
US10042934B2 (en) | Query generation system for an information retrieval system | |
US20180067986A1 (en) | Database model with improved storage and search string generation techniques | |
US20180349500A1 (en) | Search engine results for low-frequency queries | |
US20230073243A1 (en) | Systems and methods for term prevalance-volume based relevance | |
JP2022137281A (ja) | データ照会方法、装置、電子デバイス、記憶媒体、及びプログラム | |
US8868591B1 (en) | Modifying a user query to improve the results |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
ENP | Entry into the national phase |
Ref document number: 2020862010 Country of ref document: EP Effective date: 20210319 |
|
ENP | Entry into the national phase |
Ref document number: 2021517834 Country of ref document: JP Kind code of ref document: A |
|
NENP | Non-entry into the national phase |
Ref country code: DE |