Search method and device, electronic equipment and storage medium
By unifying the configuration of the index library through the management platform, the maintenance problems of vertical search engines have been solved, enabling rapid migration of search functions across scenarios and improving user experience and efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BAIDU ONLINE NETWORK TECH (BEIJIBG) CO LTD
- Filing Date
- 2022-12-20
- Publication Date
- 2026-04-24
AI Technical Summary
The separate implementation and maintenance of search suggestion services by each vertical search engine leads to wasted development resources and delays in feature migration, impacting user experience.
By uniformly configuring the index database corresponding to different scenario identifiers through the management platform, the system can match the target index database according to the target scenario identifier after receiving the search request, and output the search results, thus realizing the migration of search functions across scenarios.
Save development and management resources, speed up the migration of search functions, and improve user experience and work efficiency.
Smart Images

Figure CN115809255B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and more particularly to the field of intelligent search. Background Technology
[0002] With the rapid development of information technology, searching for information through search engines has become one of the important means for users to obtain information. Users can enter the search terms they want to query in the search input interface provided by the search engine, and the search engine can collect information based on the search terms. After processing the search results, such as deduplicating the search results, the final information can be displayed to the user. Summary of the Invention
[0003] This disclosure provides a search method, apparatus, electronic device, storage medium, and program product.
[0004] According to one aspect of this disclosure, a search method is provided, comprising:
[0005] Receive a search request, wherein the search request includes a target search content and a target scene identifier, wherein the target scene identifier is used to characterize the search scene involved in the search request;
[0006] In response to the above search request, a target index library matching the above target scene identifier is determined, wherein different scene identifiers have their own corresponding index libraries pre-configured through the management platform;
[0007] Based on the target search content and the target index, output the search results.
[0008] According to another aspect of this disclosure, a search apparatus is provided, comprising:
[0009] The first receiving module is used to receive a search request, wherein the search request includes target search content and target scene identifier, wherein the target scene identifier is used to characterize the search scene involved in the search request.
[0010] The first determining module is used to determine the target index library that matches the target scene identifier in response to the above search request, wherein different scene identifiers are pre-configured with their own corresponding index libraries through the management platform;
[0011] The output module is used to output search results based on the target search content and the target index.
[0012] According to another aspect of this disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the search method as described above.
[0013] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are used to cause the computer to perform the search method described above.
[0014] According to another aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the search method described above.
[0015] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0016] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:
[0017] Figure 1 This illustration schematically shows an exemplary system architecture to which search methods and apparatus can be applied according to embodiments of the present disclosure;
[0018] Figure 2 A flowchart illustrating a search method according to an embodiment of the present disclosure is shown schematically;
[0019] Figure 3 A schematic diagram of a management platform according to an embodiment of the present disclosure is shown;
[0020] Figure 4 This illustration schematically shows a flowchart of a configuration policy audit based on a management platform according to an embodiment of the present disclosure;
[0021] Figure 5 This illustration schematically depicts an online query service according to an embodiment of the present disclosure;
[0022] Figure 6 A flowchart illustrating the construction of an index library according to an embodiment of this disclosure is shown schematically;
[0023] Figure 7 This schematically illustrates a flowchart of offline indexing for each scene according to an embodiment of the present disclosure;
[0024] Figure 8A block diagram of a search apparatus according to an embodiment of the present disclosure is schematically shown; and
[0025] Figure 9 A block diagram of an electronic device suitable for implementing a search method according to an embodiment of the present disclosure is shown schematically. Detailed Implementation
[0026] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0027] Search engines provide a search input interface, allowing users to enter their desired search terms. During the search process, as the user inputs, the search engine continuously suggests keywords prefixed with their input, enabling users to see accurate descriptions of their needs even before completing all input. Users can then directly select relevant keywords to form a search, saving them input time.
[0028] Taking the search input interface as an example, as the user types, keywords prefixed with the user's input can be continuously suggested. This allows the user to see the correct expression of their needs even before completing all the input, and the user can directly select the corresponding keywords from the drop-down box to form a search. Visually, the user's selection cost increases from top to bottom in the search box; the further down the search bar is located, the higher the selection cost.
[0029] Since the number of keywords that can be recommended to users is limited, sorting the keywords suggested to users according to certain characteristics (such as popularity or relevance) ensures that keywords that meet the user's needs are ranked first, further reducing the user's selection cost. In some vertical search engines and niche products, there are scenarios where users are provided with input boxes. Researching multiple vertical scenarios to improve user input efficiency has become a research problem that needs to be addressed.
[0030] Vertical search engines refer to search engines that cater to different search scenarios. For example, image search and video search scenarios correspond to different vertical search engines, as do web browser search and mobile page search.
[0031] In related technologies, each vertical search engine establishes its own search suggestion service corresponding to its search scenario, builds an index for each search scenario, and then provides it to users of that search scenario to improve the query efficiency of vertical search.
[0032] However, in the process of implementing this disclosure, it was found that each vertical search engine implements and maintains a search suggestion service with very similar functions. A new function of one vertical search engine cannot be quickly implemented in other vertical search engines through technical migration. This not only wastes development and management resources, but also delays the launch time of new product functions and affects the user experience.
[0033] In view of the above, embodiments of this disclosure provide a search method, including: receiving a search request, wherein the search request includes target search content and a target scene identifier, wherein the target scene identifier is used to characterize the search scene involved in the search request; in response to the search request, determining a target index library that matches the target scene identifier, wherein an index library corresponding to each different scene identifier is pre-configured through a management platform; and outputting search results based on the target search content and the target index library.
[0034] Figure 1 The illustration schematically depicts an exemplary system architecture to which search methods and apparatus can be applied according to embodiments of the present disclosure.
[0035] It is important to note that Figure 1 The examples shown are merely examples of system architectures that can be applied to the embodiments of this disclosure, to help those skilled in the art understand the technical content of this disclosure, but do not mean that the embodiments of this disclosure cannot be used in other devices, systems, environments, or scenarios. For example, in another embodiment, an exemplary system architecture to which the search methods and apparatus can be applied may include a terminal device, but the terminal device can implement the search methods and apparatus provided by the embodiments of this disclosure without interacting with the server.
[0036] like Figure 1 As shown, the system architecture 100 according to this embodiment may include terminal devices 101, 102, and 103, a network 104, and a server 105. The network 104 serves as a medium for providing a communication link between the terminal devices 101, 102, and 103 and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.
[0037] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as search applications, knowledge reading applications, web browser applications, instant messaging tools, email clients, and / or social media platform software (for example only).
[0038] Terminal devices 101, 102, and 103 can be various electronic devices with displays and web browsing capabilities, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0039] Server 105 can be a server that provides various services, such as a backend management server that supports the content browsed by users using terminal devices 101, 102, and 103 (for example only). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.
[0040] It should be noted that the search method provided in this embodiment can generally be executed by terminal devices 101, 102, or 103. Accordingly, the search device provided in this embodiment can also be disposed in terminal devices 101, 102, or 103.
[0041] Alternatively, the search method provided in this embodiment can generally be executed by server 105. Correspondingly, the search device provided in this embodiment can generally be located in server 105. The search method provided in this embodiment can also be executed by a server or server cluster that is different from server 105 and capable of communicating with terminal devices 101, 102, 103 and / or server 105. Correspondingly, the search device provided in this embodiment can also be located in a server or server cluster that is different from server 105 and capable of communicating with terminal devices 101, 102, 103 and / or server 105.
[0042] For example, when a user searches, terminal devices 101, 102, and 103 can obtain the search terms entered by the user and then send the obtained search terms to server 105. Server 105 then collects information based on the search terms and determines the final search results. Alternatively, a server or server cluster capable of communicating with terminal devices 101, 102, 103, and / or server 105 can collect information based on the search terms and determine the final search results.
[0043] It should be understood that Figure 1The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0044] In the technical solutions disclosed herein, the collection, storage, use, processing, transmission, provision, disclosure, and application of data (including but not limited to user personal information) comply with the provisions of relevant laws and regulations, necessary confidentiality measures have been taken, and they do not violate public order and good morals.
[0045] In the technical solution disclosed herein, the user's authorization or consent is obtained before acquiring or collecting the user's personal information.
[0046] Figure 2 A flowchart illustrating a search method according to an embodiment of the present disclosure is shown schematically.
[0047] like Figure 2 As shown, the method includes operations S210 to S230.
[0048] In operation S210, a search request is received, wherein the search request includes the target search content and the target scene identifier, wherein the target scene identifier is used to characterize the search scene involved in the search request.
[0049] In operation S220, in response to the search request, the target index library that matches the target scene identifier is determined. The management platform pre-configures index libraries corresponding to different scene identifiers.
[0050] In operation S230, the search results are output based on the target search content and the target index.
[0051] According to embodiments of this disclosure, the method of generating search requests is not limited. For example, a search request may be automatically generated after the user voice-inputs the search terms to be queried in the search box of the search input interface. Alternatively, a search request may be triggered by the user manually inputting part of the search terms to be queried in the search box of the search interface, and then clicking on a keyword prefixed with the user's input in the drop-down menu of the search box.
[0052] According to embodiments of this disclosure, the search request includes the target search content and the target scene identifier. The target scene identifier can be generated based on the scene involved in the user's search. For example, when a user searches for images using a search engine, the target scene identifier can be an image search scene identifier; when a user searches for audio using a search engine, the target scene identifier can be an audio search scene identifier.
[0053] According to embodiments of this disclosure, the target search content can be Chinese characters or other symbols such as pinyin, for example: peach blossom, taohua. Target scene identifiers can correspond to the search scene through numerical labels, English labels, or special commands, for example: target scene identifier a corresponds to an image search scene, and target scene identifier b corresponds to a video search scene.
[0054] According to embodiments of this disclosure, different scene identifiers correspond to different search scenes. These search scenes may include, but are not limited to, at least one of the following: video search scene, image search scene, audio search scene, document library search scene, web browser search scene, and smart mobile terminal software search scene.
[0055] According to embodiments of this disclosure, the management platform is pre-configured with index libraries corresponding to different scene identifiers. When determining a target index library that matches a target scene identifier, the target scene identifier can be matched with the index libraries sequentially according to the order of the index library identifiers to obtain the target index library. Alternatively, the target scene identifier can be matched with multiple index library identifiers simultaneously to achieve a parallel matching effect.
[0056] According to embodiments of this disclosure, a search engine can be used to search for information from the Internet or local storage based on the target search content and the target index library. After determining the search results, the search results are output. The format in which the search results are displayed is not limited.
[0057] According to embodiments of this disclosure, a management platform can pre-configure corresponding index libraries for different scenario identifiers. Upon receiving a search request, it can determine the target index library matching the target scenario identifier based on the target scenario identifier carried in the search request, and then output search results based on the target search content and target index library carried in the search request. The management platform can uniformly configure the index libraries for different search scenarios, which accelerates the ability to quickly migrate search functions across different search scenarios compared to each business department implementing and maintaining its own index services for its respective search scenarios. By parsing the target scenario identifier carried in the search request and matching it to the target index library, the migration of general search functions across different vertical searches and different product applications is realized.
[0058] Figure 3 A schematic diagram of a management platform according to an embodiment of the present disclosure is shown.
[0059] like Figure 3 As shown, the management platform 300 may include an access application module 310, an approval and activation module 320, a policy configuration and distribution module 330, and a quality filtering module 340.
[0060] According to embodiments of this disclosure, the management platform 300 can be a business-oriented management platform that can uniformly manage the overall access scenarios. The management content can include information such as the search suggestion status and offline database creation history of each access scenario.
[0061] According to embodiments of this disclosure, scenario service access providers can submit access applications on the management platform 300, and administrators can review these applications using the access application module 310. The access application module 310 can maintain the associated information of the scenario access provider. For example, it can maintain the access provider's contact information, access type, access status, application time, and operation time.
[0062] According to embodiments of this disclosure, the approval module 320 can approve configuration policies associated with scenario service access parties. Before the scenario service access party submits its configuration policy, a requirements assessment can be conducted with the scenario service access party to determine policy on / off states and configurations.
[0063] According to embodiments of this disclosure, for approved configuration policies, the policy configuration distribution module 330 can generate configurations for the approved policy configurations and distribute them to online services and offline indexing services.
[0064] According to embodiments of this disclosure, the quality filtering module 340 can be used to configure quality filtering for search suggestions, thereby improving the processing capabilities of the search suggestion service.
[0065] Figure 4 A flowchart illustrating the review of configuration policies based on a management platform according to an embodiment of the present disclosure is shown.
[0066] like Figure 4 As shown, the method includes operations S410 to S430.
[0067] When operating S410, the management platform receives policy configuration requests from the scenario business access party.
[0068] When operating S420, in response to a policy configuration request, the configuration policy associated with the scenario service access party is reviewed.
[0069] When operating S430, once the configuration policy has been approved, make the configuration policy effective.
[0070] According to embodiments of this disclosure, the management platform can maintain relevant information about the scenario access party, such as detailed descriptions and effective status of the access party. Scenario access parties can submit access applications on the platform. Upon receiving a policy configuration request, the administrator reviews the configuration policy associated with the scenario service access party. After the platform approves the policy, it generates and distributes the approved configuration policy to the online service and offline indexing service. According to embodiments of this disclosure, the configuration policy includes search policies and index configuration policies associated with the scenario service access party.
[0071] According to embodiments of this disclosure, more index configuration strategies and search strategies can be selected using strategy switches. For example, enabling the pinyin conversion strategy will add pinyin conversion to the query prefix key, thus adding a new pinyin query prefix key.
[0072] According to embodiments of this disclosure, different search strategies or index configuration strategies are used via strategy switches, achieving hot-swappable strategies. One or more switches can be set for each vertical search engine, controlling whether to upgrade the functionality of other vertical search engines. This allows multiple vertical search engines and other application scenarios to deploy a unified online search suggestion service, saving the manpower costs of maintaining each vertical scenario individually, further promoting the application of search suggestions across multiple sites, enhancing technical output capabilities, and improving work efficiency.
[0073] According to embodiments of this disclosure, the user can enter a search request in the input box of the search interface, and then the search engine sends a search request for search suggestions to the online query service. In one implementation, the search request can be an online network request.
[0074] The online query service can transform the query index based on the target scene identifier and different strategy algorithms configured for the scene, preparing for the pre-processing of the query index. The online query service can first locate the scene index module based on the target scene identifier, then initiate a query request to a specific index database based on the scene index module, and obtain the index query result data returned by the index; based on the index query result data, it returns the recommended information to be displayed to the vertical search module.
[0075] Figure 5 A schematic diagram illustrating an online query service according to an embodiment of the present disclosure is shown.
[0076] like Figure 5 As shown, the online query service may include an entry gateway module 510, a filtering module 520, a search suggestion query module 530, and an index module 540.
[0077] For example, when a user enters the word "peach blossom" in the input box, an online network request for search suggestions is initiated. This request reaches the entry gateway module 510, which then queries the filtering module 520 to determine if the content meets the quality filtering criteria. If it does, content recommendations for the search suggestion term can be made. Afterward, the request proceeds to the search suggestion query module 530, which mainly involves three steps:
[0078] First, the system receives online network requests. It then processes the query term "wd" and the scene identifier "prod" carried in the request. The scene identifier is a context identifier found on the search page and can be included in the online network request. The system normalizes the query term "wd" by performing operations such as full-width character conversion (e.g., deleting garbled characters or traditional Chinese characters and converting them to simplified characters), converting full-width characters to half-width characters to standardize the font format of copied text, or performing case conversion. The specific normalization type is not limited, providing a unified font format for backend queries, improving query efficiency and accuracy. This is equivalent to preprocessing the user's input keywords.
[0079] According to embodiments of this disclosure, the search method provided in these embodiments further includes the following operations: performing quality filtering on the target search content to obtain quality filtering results; and determining the final search results from the search results based on the quality filtering results. According to embodiments of this disclosure, the quality filtering process and the response to search suggestion requests can be processed in parallel, and the final search suggestion results can be determined based on the quality filtering results. Specifically, in embodiments of this disclosure, the filtering module 520, the search suggestion query module 530, and the indexing module 540 can be processed in parallel, and the final search suggestion results can be determined based on the quality filtering results.
[0080] Secondly, the search suggestion query module 530 can transform the query index according to different strategy algorithms based on scene identifiers and scene configurations. Examples of different index query strategies include: text, text + pinyin, etc.; examples of keyword transformation and pre-processing include: transforming peach blossom into taohua, splitting and combining peach blossom, etc., which can be understood as various expansions of keywords; and pre-processing to prepare the query index.
[0081] The index module 540 can locate the index database to be queried based on the target scene identifier, initiate an index query request to the scene index in the target index database, and obtain the index results returned by the index database. According to the embodiments of this disclosure, the index databases managed by the management platform include, but are not limited to, index database 1 to index database 4.
[0082] Finally, based on the index results, the retrieved and search suggestion content is sorted. The sorted results are then truncated (e.g., generally no more than 10 results) and assembled into the final result, which is returned to the user, displaying the search suggestion content in the user's search interface. According to embodiments of this disclosure, the final search results can be determined from the search results based on the search content that meets the quality standards in the quality filtering results.
[0083] According to embodiments of this disclosure, the quality filtering module queries the search content to determine search content that meets quality standards. It then determines the final search results from the search results to ensure that the final search results do not contain prohibited words and are more closely related to the search content, and recommends the final search results to the user.
[0084] According to embodiments of this disclosure, outputting search results based on the target search content and the target index may include the following operations.
[0085] The index results are retrieved from the target index based on the target search terms; the search results are then determined based on the index results.
[0086] According to embodiments of this disclosure, when querying from a target index based on target search content, pre-processing of the query index is performed first, transforming the query index. For example, "peach blossom" in the index is transformed into "taohua," and the "peach blossom" is split, combined, and expanded in various ways. The query index module is located based on the scene identifier, and an index query request is initiated to the specific scene index to obtain the query result data returned by the index, thereby determining the search result.
[0087] According to embodiments of this disclosure, determining search results based on index results may include the following operations.
[0088] The index results are used to recall the results; the recall results are then sorted by search suggestions to obtain the sorted results; and the sorted results are then filtered to obtain the search results.
[0089] According to embodiments of this disclosure, result recall is performed based on the index results to obtain recall results. The recall results are then sorted by search suggestion content, and the number of sorted results is controlled and truncated. Finally, the search suggestion content is displayed in the user's search box. During the sorting process, the search suggestion content can be sorted based on relevance or popularity; no limitation is made here.
[0090] According to embodiments of this disclosure, the search method further includes the following operations.
[0091] The target search content is filtered for quality to obtain search content that meets the quality standards; the output search results include those based on the target search content and the target index.
[0092] According to embodiments of this disclosure, the quality filtering module queries the target search content, determines whether the target search content meets the quality filtering criteria, and recommends content based on search suggestions if it meets the criteria. The quality filtering criteria are standards for filtering out illegal search content such as sensitive words or special symbols.
[0093] According to embodiments of this disclosure, the search method further includes the following operations.
[0094] In response to a search request, a target search strategy matching the target scenario identifier is determined. Different scenario identifiers have their own corresponding search strategies pre-configured through the management platform. The target search content is expanded with keywords according to the target search strategy to obtain expanded results. The search results are output based on the target search content and the target index library, including the search results based on the expanded results and the target index library.
[0095] According to embodiments of this disclosure, different search strategies can be configured for different scenarios through a management platform. These search strategies include at least one or a combination of the following: Chinese character search strategy, Pinyin search strategy, abbreviated Pinyin search strategy, prefix search strategy, suffix search strategy, historical input search strategy, hotspot search strategy, and implicit semantic search strategy. Examples include: text, text + Pinyin, etc.
[0096] According to embodiments of this disclosure, the target search content is expanded using keywords based on a target search strategy to obtain expanded results. Based on the expanded results and the target index, the search results are output. As shown in Table 1, it is assumed that the target search strategy includes a Chinese character search strategy, a hotspot search strategy, and an implicit semantic search strategy. When the search term "peach blossom" is entered, keywords related to "peach blossom" can be expanded based on the Chinese character search strategy, the hotspot search strategy, and the implicit semantic search strategy.
[0097] Table 1 Extended Results
[0098]
[0099]
[0100]
[0101] According to embodiments of this disclosure, before expanding the target search content with keywords according to the target search strategy to obtain the expanded results, the following operations are also included.
[0102] The target search content is normalized so that keywords can be expanded on the normalized search content according to the target search strategy.
[0103] According to embodiments of this disclosure, the target search content is normalized, for example, by performing operations such as full-width character conversion. If the user inputs garbled text or traditional Chinese characters, the garbled text can be deleted and the traditional characters converted to simplified Chinese; or full-width characters can be converted to half-width characters to unify the font format of the copied text; or case conversion can be performed, etc. The specific type of normalization is not limited, which can provide a unified font format for backend queries, improving query efficiency and accuracy, essentially preprocessing the user-input target search content.
[0104] Figure 6 A flowchart illustrating the construction of an index library according to an embodiment of this disclosure is shown.
[0105] like Figure 6 As shown, the method includes operations S610 to S620.
[0106] When operating the S610, the raw data is processed through the offline database building system to obtain target data that meets the construction conditions. The raw data is matched with the scene corresponding to the scene identifier.
[0107] During operation of S620, an index library corresponding to the scene identifier is constructed based on the target data that meets the construction conditions.
[0108] According to embodiments of this disclosure, the offline database building system can process and manipulate raw data from vertical search and application scenarios to generate an index library required by the search engine. The offline database building system can acquire public data based on access requests and records from scenario access platforms, and then process and manipulate the raw data according to the scenario name, data address, and policy selection switches provided for each scenario. The policy selection switches include determining the retention time, whether to enable prefix policy, whether to enable suffix policy, and the maximum number of results. According to embodiments of this disclosure, offline indexing can be performed on search suggestions for each scenario to obtain target data that meets the construction conditions, such as data formats recognizable during offline database building and data meeting quality relevance standards. The raw data is matched with the scenario corresponding to the scenario identifier.
[0109] Specifically, Figure 7 The flowchart illustrating offline indexing for each scene according to an embodiment of the present disclosure is shown schematically.
[0110] like Figure 7 As shown, the method includes operations S710 to S750.
[0111] In operation S710, public data is acquired. According to embodiments of this disclosure, the public data comes from a public dataset, and the acquisition method and content comply with relevant laws and regulations, and necessary confidentiality measures are taken.
[0112] During operation S720, raw data is downloaded. According to embodiments of this disclosure, raw data required for different scenarios can be obtained from public data.
[0113] For example, in the business application scenario of video search, the raw data of video search can be downloaded offline; in the business application scenario of document search, the raw data of document search can be downloaded offline.
[0114] When operating the S730, the acquired raw data is processed, for example, the raw data is formatted and converted into a unified data format that can be recognized during offline database construction.
[0115] In operation S740, the processed data undergoes a quality relevance assessment. For example, for video data, a quality relevance strategy for video search data is implemented to control relevance and identify abnormal or erroneous data. Finally, data that meets the quality relevance standards is sent to operation S750 to build the indexing environment. During index building, according to the strategy configuration, prefix and suffix indexes are built separately for each scenario. Finally, these are merged into the index required for the search scenario. Figure 7 As shown, the indices required for different scenarios are obtained respectively.
[0116] According to embodiments of this disclosure, the constructed index can be applied to an online query service. The index is placed within the scenario index used by the online query service, ensuring that users receive the latest index data results when requesting a query.
[0117] According to embodiments of this disclosure, constructing an index library corresponding to a scene identifier based on target data that meets the construction conditions may include the following operations.
[0118] For each scene identifier, an index library corresponding to the scene identifier is constructed based on the index configuration strategy corresponding to the scene identifier and the target data that meets the construction conditions.
[0119] According to embodiments of this disclosure, when building an index, index data content such as prefix indexes and suffix indexes are built for each scenario based on the strategy configuration.
[0120] As shown in Table 2, the index configuration is performed for the candidate "Peach Blossom Spring".
[0121] Table 2 Index Configuration
[0122]
[0123] According to embodiments of this disclosure, the index prefix can also be reversed during the index building process. The query prefix and candidate terms are reversed, and the candidate terms are sorted according to their weights, as shown in Table 3. The candidate terms include "Peach Blossom Spring" and "Peach Blossom Fan". In actual index building, many candidates may cluster under the same query prefix. Therefore, it is necessary to control the number of candidates, retaining a certain number, such as 50.
[0124] Table 3 Reverse Index Building
[0125]
[0126] According to the embodiments of this disclosure, the method for building an index library described above can quickly support search suggestion requirements for new scenarios, thereby improving system efficiency and access efficiency.
[0127] Figure 8 A block diagram of a search apparatus according to an embodiment of the present disclosure is shown schematically.
[0128] like Figure 8 As shown, a search device in this embodiment includes a first receiving module 810, a first determining module 820, and an output module 830.
[0129] The first receiving module 810 is configured to receive a search request, wherein the search request includes target search content and a target scene identifier, wherein the target scene identifier is used to characterize the search scene involved in the search request. In one embodiment, the first receiving module 810 may be used to perform the operation S210 described above, which will not be repeated here.
[0130] The first determining module 820 is used to determine a target index library that matches the target scene identifier in response to a search request. The management platform pre-configures index libraries corresponding to different scene identifiers. In one embodiment, the first determining module 820 can be used to perform the operation S220 described above, which will not be repeated here.
[0131] The output module 830 is used to output search results based on the target search content and the target index. In one embodiment, the output module 830 can be used to perform the operation S230 described above, which will not be repeated here.
[0132] According to embodiments of this disclosure, a management platform can pre-configure corresponding index libraries for different scenario identifiers. Upon receiving a search request, the platform can determine the target index library matching the target scenario identifier based on the target scenario identifier carried in the search request, and output search results based on the target search content and the target index library carried in the search request. Since the management platform can uniformly configure the index libraries for different scenarios, compared to each business department implementing and maintaining its own index services for its respective scenarios, it can accelerate the rapid migration of search functions across different scenarios. By parsing the target scenario identifier carried in the search request and matching it to the target index library, the migration of general search functions across different vertical searches and different product applications is realized.
[0133] According to embodiments of this disclosure, the output module 830 includes a query submodule and a first determination submodule.
[0134] The query submodule is used to retrieve index results from the target index based on the target search content.
[0135] The first determining submodule is used to determine the search results based on the index results.
[0136] According to embodiments of this disclosure, the first determining submodule includes a recall unit, a sorting unit, and a filtering unit.
[0137] The recall unit is used to recall results based on the index results and obtain the recall results.
[0138] The sorting unit is used to sort the recall results by search suggestion content to obtain the sorted results.
[0139] The filtering unit is used to filter the sorted results to obtain the search results.
[0140] According to embodiments of this disclosure, the search device further includes a first filtering module.
[0141] The first filtering module is used to perform quality filtering on the target search content to obtain search content that meets the quality standards.
[0142] The output module 830 also includes a first output submodule.
[0143] The first output submodule is used to output search results based on search content that meets quality standards and the target index.
[0144] According to embodiments of this disclosure, the search device further includes a second filtering module and a second determining module.
[0145] The second filtering module is used to perform quality filtering on the target search content and obtain the quality filtering results.
[0146] The second determining module is used to determine the final search results from the search results based on the quality filtering results.
[0147] According to embodiments of this disclosure, the second determining module includes a second determining submodule.
[0148] The second determining submodule is used to determine the final search results from the search results based on the search content that meets the quality standards in the quality filtering results.
[0149] According to embodiments of this disclosure, the search device further includes a third determining module and an extension module.
[0150] The third determination module is used to determine the target search strategy that matches the target scene identifier in response to the search request. Different scene identifiers are pre-configured with their own corresponding search strategies through the management platform.
[0151] The extension module is used to expand the target search content with keywords according to the target search strategy, and obtain expanded results.
[0152] The output module 830 includes a second output submodule.
[0153] The second output submodule is used to output search results based on the expanded results and the target index.
[0154] According to embodiments of this disclosure, the search device further includes a normalization module.
[0155] The normalization module is used to normalize the target search content before expanding the keywords according to the target search strategy and obtaining the expanded results, so that the normalized search content can be expanded according to the target search strategy.
[0156] According to embodiments of this disclosure, the search strategy includes at least one of the following strategies or a combination of the following strategies: Chinese character search strategy, Pinyin search strategy, abbreviated Pinyin search strategy, prefix search strategy, suffix search strategy, historical input search strategy, hotspot search strategy, and implicit semantic search strategy.
[0157] According to embodiments of this disclosure, the search scenarios include at least one of the following: video search scenario, image search scenario, audio search scenario, and document search scenario.
[0158] According to embodiments of this disclosure, the search device further includes a second receiving module, an auditing module, and an activation module.
[0159] The second receiving module is used to receive policy configuration requests from scenario business access parties through the management platform;
[0160] The review module is used to review the configuration policies associated with the scenario business access parties in response to policy configuration requests.
[0161] The activation module is used to make the configuration policy take effect after the configuration policy has been approved.
[0162] According to embodiments of this disclosure, the configuration strategy includes a search strategy and an index configuration strategy associated with the scenario service access party.
[0163] According to embodiments of this disclosure, the search device further includes a processing module and a construction module.
[0164] The processing module is used to process the raw data for each scene identifier through an offline database building system to obtain target data that meets the construction conditions. The raw data is matched with the scene corresponding to the scene identifier.
[0165] The building module is used to construct an index library corresponding to the scene identifier based on the target data that meets the building conditions.
[0166] According to embodiments of this disclosure, the construction module includes a construction submodule.
[0167] The construction submodule is used to build an index library corresponding to each scene identifier based on the index configuration strategy corresponding to the scene identifier and the target data that meets the construction conditions.
[0168] Any one or more of the modules, submodules, units, and subunits according to embodiments of the present disclosure, or at least part of the functions of any one or more of them, can be implemented in one module. Any one or more of the modules, submodules, units, and subunits according to embodiments of the present disclosure can be implemented by dividing them into multiple modules. Any one or more of the modules, submodules, units, and subunits according to embodiments of the present disclosure can be at least partially implemented as hardware circuits, such as Field Programmable Gate Arrays (FPGAs), Programmable Logic Arrays (PLAs), Systems-on-Chip, Systems-on-Substrate, Systems-on-Package, Application-Specific Integrated Circuits (ASICs), or implemented by hardware or firmware through any other reasonable means of integrating or packaging circuits, or implemented in software, hardware, or firmware, or in a suitable combination of any one or more of these three implementation methods. Alternatively, one or more of the modules, submodules, units, and subunits according to embodiments of the present disclosure can be at least partially implemented as computer program modules, which, when run, can perform corresponding functions.
[0169] According to embodiments of this disclosure, any plurality of the first receiving module 810, the first determining module 820, and the output module 830 can be combined into one module / unit / subunit, or any one of these modules / units / subunits can be split into multiple modules / units / subunits. Alternatively, at least part of the functionality of one or more of these modules / units / subunits can be combined with at least part of the functionality of other modules / units / subunits and implemented in one module / unit / subunit. According to embodiments of this disclosure, at least one of the first receiving module 810, the first determining module 820, and the output module 830 can be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or implemented in hardware or firmware by any other reasonable means of integrating or packaging the circuitry, or implemented in any one of software, hardware, and firmware methods, or in a suitable combination of any of these methods. Alternatively, at least one of the first receiving module 810, the first determining module 820, and the output module 830 may be implemented at least partially as a computer program module, which can perform corresponding functions when the computer program module is run.
[0170] It should be noted that the search device part in the embodiments of this disclosure corresponds to the search method part in the embodiments of this disclosure. The specific description of the search device part is referred to in the search method part, and will not be repeated here.
[0171] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0172] According to an embodiment of the present disclosure, an electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method described above.
[0173] According to embodiments of the present disclosure, a non-transitory computer-readable storage medium stores computer instructions, wherein the computer instructions are used to cause a computer to perform the method described above.
[0174] According to an embodiment of this disclosure, a computer program product includes a computer program that, when executed by a processor, implements the method described above.
[0175] Figure 9A schematic block diagram of an example electronic device 900 that can be used to implement embodiments of the present disclosure is shown. The electronic device is 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. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0176] like Figure 9 As shown, device 900 includes a computing unit 901, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 902 or a computer program loaded from storage unit 908 into random access memory (RAM) 903. RAM 903 may also store various programs and data required for the operation of device 900. The computing unit 901, ROM 902, and RAM 903 are interconnected via bus 904. Input / output (I / O) interface 905 is also connected to bus 904.
[0177] Multiple components in device 900 are connected to I / O interface 905, including: input unit 906, such as keyboard, mouse, etc.; output unit 907, such as various types of monitors, speakers, etc.; storage unit 908, such as disk, optical disk, etc.; and communication unit 909, such as network card, modem, wireless transceiver, etc. Communication unit 909 allows device 900 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0178] The computing unit 901 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 901 performs the various methods and processes described above, such as the search method. For example, in some embodiments, the search method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 908. In some embodiments, part or all of the computer program may be loaded and / or installed on device 900 via ROM 902 and / or communication unit 909. When the computer program is loaded into RAM 903 and executed by the computing unit 901, one or more steps of the search method described above may be performed. Alternatively, in other embodiments, the computing unit 901 may be configured to perform the search method by any other suitable means (e.g., by means of firmware).
[0179] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0180] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0181] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0182] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the 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 can be received in any form (including sound input, voice input, or tactile input).
[0183] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0184] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, distributed system servers, or servers incorporating blockchain technology.
[0185] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0186] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A search method, comprising: Receive a search request, wherein the search request includes target search content and target scene identifier, wherein the target scene identifier is used to characterize the search scene involved in the search request, and different search scenes correspond to different vertical search engines; In response to the search request, a target index library and a target search strategy that match the target scene identifier are determined, wherein the management platform pre-configures index libraries and search strategies corresponding to different scene identifiers. The target search content is expanded with keywords according to the target search strategy to obtain expanded results; Based on the expanded results and the target index, output the search results. The method further includes: For each scene identifier, the raw data is processed through an offline database building system to obtain target data that meets the construction conditions, wherein the raw data is matched with the scene corresponding to the scene identifier; Based on the index configuration strategy corresponding to the scene identifier and the target data that meets the construction conditions, an index library corresponding to the scene identifier is constructed. The method further includes: The management platform receives policy configuration requests from scenario service access parties. In response to the policy configuration request, the configuration policy associated with the service access party in the scenario is reviewed; If the configuration policy is approved, the configuration policy will be made effective. The configuration policy includes the search policy and the index configuration policy associated with the scenario service access party. The search strategy and the index configuration strategy are used through a strategy switch.
2. The method according to claim 1, wherein, The step of outputting search results based on the target search content and the target index includes: The index results are obtained by querying the target index database based on the target search content; The search results are determined based on the index results.
3. The method according to claim 2, wherein, Determining the search results based on the index results includes: Based on the index results, a result recall is performed to obtain the recall results; The recall results are sorted by search suggestion content to obtain the sorted results; The sorting results are filtered to obtain the search results.
4. The method according to claim 1 or 2, further comprising: The target search content is subjected to quality filtering to obtain search content that meets the quality standards; The step of outputting search results based on the target search content and the target index includes: The search results are output based on the search content that meets the quality standards and the target index.
5. The method according to claim 1 or 2, further comprising: The target search content is subjected to quality filtering to obtain the quality filtering results; The final search results are determined from the search results based on the quality filtering results.
6. The method according to claim 5, wherein, The step of determining the final search results from the search results based on the quality filtering results includes: Based on the search content that meets the quality standards in the quality filtering results, the final search results are determined from the search results.
7. The method according to claim 1, wherein, Before expanding the target search content with keywords according to the target search strategy to obtain the expanded results, the method further includes: The target search content is normalized so that keywords can be expanded on the normalized search content according to the target search strategy.
8. The method according to claim 1, wherein, The search strategy includes at least one of the following strategies or a combination of the following strategies: Chinese character search strategy, Pinyin search strategy, abbreviated Pinyin search strategy, prefix search strategy, suffix search strategy, historical input search strategy, hotspot search strategy, and implicit semantic search strategy.
9. The method according to claim 1, wherein, The search scenarios include at least one of the following: video search scenario, image search scenario, audio search scenario, and document search scenario.
10. A search device, comprising: The first receiving module is used to receive a search request, wherein the search request includes target search content and target scene identifier, wherein the target scene identifier is used to characterize the search scene involved in the search request, and different search scenes correspond to different vertical search engines; The first determining module is used to determine the target index library that matches the target scene identifier in response to the search request, wherein the management platform pre-configures index libraries corresponding to different scene identifiers. The output module is used to output search results based on the target search content and the target index library; The third determining module is used to determine a target search strategy that matches the target scene identifier in response to the search request, wherein different scene identifiers are pre-configured with their own corresponding search strategies through the management platform; The extension module is used to expand the target search content with keywords according to the target search strategy to obtain the expanded results; The processing module is used to process the raw data through an offline database building system for each scene identifier to obtain target data that meets the construction conditions, wherein the raw data is matched with the scene corresponding to the scene identifier; The construction module is used to construct an index library corresponding to the scene identifier based on the target data that meets the construction conditions; The output module includes: The second output submodule is used to output search results based on the extended results and the target index library; The building module includes: A construction submodule is used to construct an index library corresponding to each scene identifier based on the index configuration strategy corresponding to the scene identifier and the target data that meets the construction conditions. The search device further includes: The second receiving module is used to receive policy configuration requests from the scenario service access party through the management platform; The review module is used to review the configuration policies associated with the scenario service access party in response to the policy configuration request. The activation module is used to activate the configuration policy upon its approval. The configuration policy includes a search policy and an index configuration policy associated with the service access party in the scenario. The search strategy and the index configuration strategy are used through a strategy switch.
11. The apparatus according to claim 10, wherein, The output module includes: The query submodule is used to retrieve index results from the target index database based on the target search content; The first determining submodule is used to determine the search results based on the index results.
12. The apparatus according to claim 11, wherein, The first determining submodule includes: The recall unit is used to recall results based on the index results and obtain recall results. A sorting unit is used to sort the recall results by search suggestion content to obtain a sorting result; A filtering unit is used to filter the sorting results to obtain the search results.
13. The apparatus according to claim 10 or 11, further comprising: The first filtering module is used to perform quality filtering on the target search content to obtain search content that meets the quality standards. The output module includes: The first output submodule is used to output the search results based on the search content that meets the quality standards and the target index library.
14. The apparatus according to claim 10 or 11, further comprising: The second filtering module is used to perform quality filtering on the target search content to obtain the quality filtering result. The second determining module is used to determine the final search results from the search results based on the quality filtering results.
15. The apparatus according to claim 14, wherein, The second determining module includes: The second determining submodule is used to determine the final search results from the search results based on the search content that meets the quality standards in the quality filtering results.
16. The apparatus of claim 10, further comprising: The normalization module is used to normalize the target search content before expanding the target search content with keywords according to the target search strategy and obtaining the expanded results, so that the normalized search content can be expanded with keywords according to the target search strategy.
17. The apparatus according to claim 10, wherein, The search strategy includes at least one of the following strategies or a combination of the following strategies: Chinese character search strategy, Pinyin search strategy, abbreviated Pinyin search strategy, prefix search strategy, suffix search strategy, historical input search strategy, hotspot search strategy, and implicit semantic search strategy.
18. The apparatus according to claim 10, wherein, The search scenarios include at least one of the following: video search scenario, image search scenario, audio search scenario, and document search scenario.
19. An electronic device comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-9.
20. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-9.
21. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-9.
Citation Information
Patent Citations
Prompt word recommendation method and device, storage medium and processor
CN110543484A