WO2024174865A1 - Search method and apparatus, and device and storage medium - Google Patents
Search method and apparatus, and device and storage medium Download PDFInfo
- Publication number
- WO2024174865A1 WO2024174865A1 PCT/CN2024/076036 CN2024076036W WO2024174865A1 WO 2024174865 A1 WO2024174865 A1 WO 2024174865A1 CN 2024076036 W CN2024076036 W CN 2024076036W WO 2024174865 A1 WO2024174865 A1 WO 2024174865A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- result
- search
- query
- prediction result
- client device
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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 OR CALCULATING; 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/9032—Query formulation
Definitions
- Example embodiments of the present disclosure generally relate to the field of computers, and more particularly, to search methods, devices, apparatuses, and computer-readable storage media.
- a user can use a client device to send a query request to a server and receive the corresponding query results from the server.
- the server needs a certain amount of processing time to provide the corresponding search results after receiving the query request.
- the search results may take a long time to be provided from the server to the client device, resulting in a poor user experience.
- a search method includes: in response to receiving a current query from a client device at a server, determining a target area associated with the current query; generating a prediction result for the current query based at least on target area historical data corresponding to the target area; sending the prediction result to the client device; in response to a search engine generating search results for the current query, comparing the prediction result with the search results; and sending, based on the comparison result, a message to the client device related to subsequent processing of the prediction result. Additional information.
- a search method includes: sending a current query to a server at a client device; receiving a prediction result for the current query from the server, wherein the prediction result is generated based on target area historical data corresponding to a target area, and the target area is associated with the current query; receiving supplementary information related to subsequent processing of the prediction result from the server, the supplementary information being generated based on a comparison of the prediction result and a search result generated by a search engine; and performing an operation on the prediction result based on the supplementary information.
- a search device in a third aspect of the present disclosure, includes: a current region determination module configured to determine a target region associated with the current query in response to receiving a current query from a client device at a server; a prediction result generation module configured to generate a prediction result for the current query based on at least target region historical data corresponding to the target region; a prediction result sending module configured to send the prediction result to the client device; a comparison module configured to compare the prediction result with the search result in response to a search engine generating a search result for the current query; and a supplementary information sending module configured to send supplementary information related to subsequent processing of the prediction result to the client device based on the comparison result.
- a search device in a fourth aspect of the present disclosure, includes: a query sending module configured to send a current query to a server at a client device; a prediction result receiving module configured to receive a prediction result for the current query from the server, wherein the prediction result is generated based on target area historical data corresponding to a target area, and the target area is associated with the current query; a supplementary information receiving module configured to receive supplementary information related to subsequent processing of the prediction result from the server, wherein the supplementary information is generated based on a comparison between the prediction result and a search result generated by a search engine; and an operation execution module configured to execute an operation on the prediction result based on the supplementary information.
- an electronic device in a fifth aspect of the present disclosure, includes at least one processing unit; and at least one memory, the at least one memory is coupled to the at least one processing unit and stores instructions for execution by the at least one processing unit. When the instructions are executed by the at least one processing unit, the device executes the method of the first aspect or the second aspect.
- a computer-readable storage medium wherein a computer program is stored on the computer-readable storage medium, and the computer program can be executed by a processor to implement the method of the first aspect or the second aspect.
- FIG1 shows a schematic diagram of an example environment in which embodiments of the present disclosure can be implemented
- FIG2 shows an exemplary interaction diagram of a search process according to some embodiments of the present disclosure
- FIG3 is a schematic diagram showing a search process performed on a server side according to some embodiments of the present disclosure
- FIG4 shows a schematic diagram of providing supplementary information according to some embodiments of the present disclosure
- FIG5 shows a flow chart of a search method performed on a server side according to some embodiments of the present disclosure
- FIG6 shows a flow chart of a search method performed on a client device according to some embodiments of the present disclosure
- FIG7 shows a block diagram of a search device according to some embodiments of the present disclosure
- FIG8 shows a block diagram of a search device according to some other embodiments of the present disclosure.
- FIG. 9 shows a block diagram of a device capable of implementing various embodiments of the present disclosure.
- a prompt message is sent to the user.
- the user is clearly prompted that the operation requested by the user will require the acquisition and use of the user's personal information.
- the user can independently choose whether to provide personal information to the electronic device, application, server or storage medium or other software or hardware that executes the operation of the technical solution of the present disclosure according to the prompt information.
- the prompt information in response to receiving an active request from the user, may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form.
- the pop-up window may also carry a selection control for the user to choose "agree” or “disagree” to provide personal information to the electronic device.
- the term “including” and similar terms should be understood as open inclusion, that is, “including but not limited to”.
- the term “based on” should be understood as “based at least in part on”.
- the term “one embodiment” or “the embodiment” should be understood as “at least one embodiment”.
- the term “some embodiments” should be understood as “at least some embodiments”.
- Other explicit and implicit definitions may also be included below.
- the terms “first”, “second” and “third” should be understood as “at least some embodiments”. The following may also include other explicit and implicit definitions.
- search results may take a long time to be provided from the server to the client device.
- the server is located remotely or even overseas, the client device is usually far away from the server.
- the network infrastructure is poor, resulting in large network transmission delays.
- the number of equipment in the computer room where the server is located is insufficient and the service demand continues to grow, which will cause the transmission time to continue to deteriorate, for example, the time required for each query will increase by hundreds of milliseconds or even longer.
- a search solution is proposed according to the technical solution of the present disclosure.
- the predicted results for the query are first provided to the client device, and the predicted results are determined based on the historical data of the area associated with the query. Then, the client device is provided with supplementary information related to the subsequent processing of the predicted results, so as to improve the overall search results.
- the technical solution of the present disclosure can provide search results through multiple data transmissions (e.g., multiple data packets).
- the search engine time can be parallelized with the generation and issuance of the predicted results, thereby reducing service delays.
- the extracted and issued predicted results are determined based on the historical data related to the query. This is conducive to improving the accuracy of the predicted results, thereby reducing or even avoiding the issuance of subsequent supplementary information. In this way, it can further contribute to the reduction of service delays.
- FIG. 1 shows a schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented.
- a server 110 for providing a search service is shown in the environment 100, and a client device 120 using the search service is also shown.
- the client device 120 sends a search request 101 to the server 120 according to user input (e.g., a keyword typed or spoken), and receives search results 102 returned by the server 110.
- user input e.g., a keyword typed or spoken
- an application may be installed in the client device 120.
- the user may The client device 120 and/or an attached device of the client device 120 interact with the application to initiate the search request 101.
- the application may be a content sharing application, which can at least provide users with services related to media content, such as browsing, commenting, forwarding, and creating media content.
- media content may include multiple forms, including but not limited to images, videos, audio, and the like.
- the server 110 may be any type of server-side device with communication functions, which may include, for example, a computing system, such as a mainframe, an edge computing node, a computing device in a cloud environment, and the like.
- the server 110 may be a single server or a server cluster consisting of several servers.
- the server 110 may also be a cloud computing service center or a computing instance implemented by cloud computing resources. It should be understood that the above is merely an example of the server 110, not a limitation, and the server 110 may be a device of various forms or structures that can provide search services for the client device 120.
- the client device 120 may be any type of terminal device with communication functions.
- the terminal device may be any type of mobile terminal, fixed terminal or portable terminal, including a mobile phone, a desktop computer, a laptop computer, a notebook computer, a netbook computer, a tablet computer, a media computer, a multimedia tablet, a personal communication system (PCS) device, a personal navigation device, a personal digital assistant (PDA), an audio/video player, a digital camera/camcorder, a positioning device, a television receiver, a radio broadcast receiver, an electronic book device, a gaming device or any combination of the foregoing, including accessories and peripherals of these devices or any combination thereof.
- the client device 120 may communicate with the server 110 via a wireless network or a wired network.
- FIG. 2 shows an exemplary interaction diagram 200 of a search process according to some embodiments of the present disclosure.
- the search process 200 of FIG. 2 shows a process in which a server provides a search service to a client device.
- the process 200 is described below with reference to the server 110 and the client device 120 in FIG. 1. It should be understood that this is merely exemplary and is not intended to limit the present disclosure in any way.
- the server and the client device in the process 200 may be implemented as other Any appropriate equipment.
- the client device 120 sends ( 205 ) a query to the server 110 .
- the query is referred to as the “current query” below.
- the server 110 After receiving ( 210 ) the current query from the client device 120 , the server 110 generates ( 215 ) a prediction result for the current query.
- the prediction results may include one or more items predicted based on the current query.
- An item of the prediction results may be media content (e.g., video, audio, image), or other possible data predicted.
- the prediction results may include videos, audio, images related to the animal, and may also include information about social accounts related to the animal (e.g., animal science accounts), such as avatars, introductions, published media content, etc.
- the information included in the prediction results complies with relevant regulations. For example, the user may have granted access rights to the information, or the information returned to the client is processed.
- the prediction results may include all items predicted based on the current query, and there may be no limit on the total number of items. As an alternative, in some embodiments, certain restrictions may be placed on the predicted items. For example, the prediction results may include only a predetermined number of items (e.g., 4 items) for display on the first screen of the client device.
- a variety of data sources can be used. Examples of data sources include historical queries over a period of time in the past, candidate data created over a period of time in the past, and the profile of the user who initiated the current query. These data sources can be maintained by region. Accordingly, the server 110 determines the target area associated with the current query, and then considers the historical data of the target area to generate the prediction results. After describing the overall flow of process 200, an example embodiment of generating prediction results using these data sources will be described in detail below.
- the server 110 sends (220) the prediction result to the client device 120.
- the time taken to send the prediction result may include the time taken to package the data and the time taken to transmit the data.
- the client device 120 receives (225) the prediction result from the server 110. Additionally, in some embodiments, the client device 120 may perform presentation-related preprocessing on the prediction result in response to receiving (225) the prediction result. For example, the client device 110 may render each item in the prediction result but not display it. In this way, after receiving the supplementary information about the predicted structure, the client device 110 can quickly make adjustments and display them to the user. Therefore, it is helpful to further shorten the time spent on presenting the results to the user, thereby improving the user experience.
- the server 110 can generate search results for the current query through a local search engine or through a search engine that communicates with it.
- the search results can be generated using various known search engines, and the search engines will not be described in detail here.
- the search results may include one or more items determined by the search engine based on the current query, each item may be media content (e.g., video, audio, image), or other possible data predicted, and so on.
- media content e.g., video, audio, image
- the information included in the search results also complies with relevant regulations. For example, the user may have granted access rights to the information, or the information returned to the client is processed.
- the process of generating search results for the current query can be performed in parallel with the process of generating (215) and/or sending (220) the prediction results.
- the time sequence is not limited.
- the server 110 compares the prediction results with the search results (230). Then, based on the comparison result, the server 110 sends (235) supplementary information related to the subsequent processing of the prediction results to the client device 120. Accordingly, the client device 120 receives (240) the supplementary information from the server 110. Then, based on the supplementary information, the client device 120 performs (245) an operation on the prediction result.
- the supplemental information may include various suitable types of data and/or indications.
- the supplemental information may include update information generated based on the results of the comparison.
- the update information is used to update the predicted result to the search result.
- the client device 120 updates the previously received predicted result to the search result based on the update information. If the client device 120 has previously rendered the predicted result, the rendering update may be performed and displayed.
- the update result may indicate the data and operations required to adjust the search result to the predicted result.
- the update result may indicate the difference between the search result and the predicted result. In this case, the client device 120 may determine to update the predicted result based on the difference. The actions required to adjust the search results to the predicted results.
- the update information can indicate the required update operation to the client device 120 in a corresponding appropriate manner.
- the predicted results may include a first group of entries
- the search results may include a second group of entries.
- the update result may indicate that the first group of entries arranged in a first order is updated to a second group of entries arranged in a second order.
- the update information may include, for example, but not limited to, the deletion of entries, the addition of entries, and/or the replacement of entries, etc.
- the predicted results include entry 1, entry 2, entry 3, and entry 4, and the search results include entry 1, entry 5, entry 3, and entry 4.
- the update information may indicate that entry 2 is replaced with entry 5.
- the specific content of the items in the prediction results may not be the latest, so even for the same item, its specific content in the prediction results and the search results may be different.
- the same item may refer to items related to the same object or entity, for example, items related to the same video, items of the same user.
- the update information may further indicate an update to the object description in the item.
- the update information may indicate an object description element that the second entry has that is different from the first entry.
- the object description element may exist in the entry in the search results but not in the entry in the predicted result; or it may be different in the search results and the predicted result.
- the client device 120 may add an object description element to the previously received search results based on the supplementary information, or modify the object description element that originally existed in the search results.
- the object description element may be the latest published content related to object A, such as videos, photos, text, etc.
- the object description element may be the number of likes, comments, and reposts of media content B, etc.
- the supplemental information may include instructions on how to process the search results.
- the server 110 may determine, based on the result of the comparison (230), whether to process the predicted result.
- the number of operations required to update the prediction result to the search result may be, for example, the number of operations required to adjust the order of entries in the prediction result or update the content of the entry. If the number of operations is less than the first threshold number, a positive indication of the prediction result may be sent to the client device 120. Accordingly, the client device 120 may present the prediction result. If the client device 120 has previously rendered the prediction result, the client device 120 may directly display the rendered prediction result. It should be understood that the specific value of the first threshold number may depend on the requirements for aspects such as the accuracy of the query result.
- a positive indication may be sent only if the prediction result is consistent with the search result.
- a positive indication may be sent even if the prediction result is slightly different from the search result (for example, the entries included are the same but the order is different).
- the server 110 may send a negative indication of the prediction result to the client device 120. Accordingly, the client device 120 abandons presenting the prediction result. In this case, the server 110 may send the search result to the client device 120 for presentation.
- the second threshold number may depend on an estimate of the time required for the client device 120 to update the search result.
- search results are provided with only one data transmission (e.g., one data packet) corresponding to one query request.
- the search engine time can be parallelized with the generation and sending of prediction results, thereby reducing service delays.
- One data source can be data of historical queries.
- at least one historical query matching the current query can be determined from candidate historical queries, and a prediction result can be generated based on the matching historical queries.
- the historical query that matches the current query does not necessarily have to be completely consistent with the current query. For example, if the semantic difference between the current query and the historical query is small, the two can be considered to be matched. If the important features in the semantics of the previous query and the historical query are highly consistent, for example, if the difference between the terms that contribute most to the current query and the historical query is less than a predetermined threshold, then the current query and the historical query can be considered to be matched. The following will also describe in detail how to determine the matching historical query with reference to FIG. 3.
- the server 110 may pre-build an appropriate database to store and maintain information related to the candidate historical queries.
- the server 110 may store the most recent search result for each query. Then the server 110 may find the most recent query time that matches the current query, and determine the predicted result based on the search results of the query. For example, the server 110 may determine the predicted result for the current query based on the last search result of the query for a certain animal.
- the server 110 may pre-store information related to queries that appeared within a period of historical time (also referred to as a "second historical time period"). Such information may include the time distribution of query appearances, frequency, search results of each time, etc. For example, the time when each query appeared within a period of time (e.g., the past 24 hours), the items that appeared the most times in the search results, etc. may be calculated every hour.
- the server 110 can determine multiple historical queries that appear during this historical period and match the current query, and can generate prediction results based on these historical queries. By introducing historical queries over a period of time in the past, more candidate data can be obtained. In this way, it can be helpful to improve the hit rate of the prediction results, thereby reducing the update operation of the client device on the prediction results.
- the discreteness of the search results of these historical queries can be further considered. Specifically, the discreteness of multiple historical search results for these multiple historical queries can be determined, and the prediction results are determined based on these historical search results only when the discreteness is low. A low discreteness indicates that the historical search results are good, so they can be used as prediction results. In some embodiments, if it is determined that the discreteness is less than a threshold discreteness, the prediction results are determined based on multiple historical search results.
- historical queries may include queries within 24 hours from the current time point.
- the data source of the prediction results may include data that is newly created or newly released within a period of historical time (i.e., the first historical time period, such as the last 6 hours) close to the current time point, such as videos, images, text, etc., which are referred to as "candidate search data" below. Then, the prediction results can be generated based on these candidate search data. In this way, streaming data can be used to supplement relatively real-time data, and streaming data and offline statistical data can be merged together to determine the prediction results.
- data with a creation time within 6 hours from the request initiation time can be obtained from the offline data stream as candidate search data.
- the candidate search data can be stored in a database, for example, written to the same database as the historical query.
- the timestamp of data creation can be used as a score, and the count within 6 hours can be recorded under another key value.
- the server 110 can obtain the candidate search data from the database and determine the prediction result accordingly.
- whether to use such more real-time candidate search data can be determined based on a predetermined strategy. For example, if the number of historical queries that match the current query is less than a threshold number, the data that matches the current query can be determined from the candidate search data as at least a part of the predicted result. For another example, if the historical queries that match the current query appear in a concentrated time close to the current time point, the candidate search data can be used when generating the predicted result. A small number of matching historical queries or a recent concentrated appearance of matching historical queries may mean that the current query has a stronger real-time nature. Therefore, the candidate search data can be used in this case.
- Information related to candidate historical queries and/or candidate search data can be stored in a database as pre-stored data or historical data to be used as a data source for prediction.
- historical data can be stored and maintained separately according to different regions. Regions can be divided, for example, according to geographical location, language type, administrative divisions, etc. For example, different countries or regions located in the same continent can be divided into the same region, countries or regions with the same official language can be divided into the same region, and different regions can be distinguished according to the administrative divisions of countries and regions.
- the historical data may include the following data associated with a certain area, such as but not limited to, historical queries matching the current query, candidate search data created in the recent period, and the like.
- the region associated with the current user (hereinafter also referred to as the "first region") can be determined based on the profile of the current user.
- the first region may be the region indicated in the current user's registration information, or the region corresponding to the language used by the current user.
- the first region may be the region where the current user is located when initiating the current query.
- the prediction result can be determined based on the historical data corresponding to the first region, as described above.
- the first region can be regarded as the target region.
- cross-region prediction can be performed for the current query. For example, if no result for the current query is found in the historical data corresponding to the first region, the region corresponding to the historical query (e.g., the most recent query) matching the current query (hereinafter also referred to as the "second region") can be determined as the target region. Then, the prediction result can be determined based on the historical data corresponding to the second region.
- the region corresponding to the historical query e.g., the most recent query
- the prediction result can be determined based on the historical data corresponding to the second region.
- multiple historical queries matching the current query can be searched in the historical data corresponding to the second region, and predictions can be made based on these historical queries.
- predictions can be made based on more real-time candidate search data corresponding to the second region.
- the data source of the prediction result may include the profile of the current user who initiated the current query.
- the user's profile may include basic information about the user, such as which accounts the user follows, like information, comment content, forwarding status, etc.
- Server 110 may determine whether the current query indicates another user associated with the current user based on the profile. If so, information related to the current user may be determined as at least part of the prediction result. For example, server 110 may first determine that the current query "Zhang XX" has the intent of "searching for users". Then, based on the current user's profile, it may determine that Zhang XX is another user followed by the current user. Accordingly, the information of "Zhang XX" may be included in the prediction result. For example, identification information, introduction information, a list of published media contents, etc. are used as at least a part of the prediction result.
- the use of the user profile in the embodiments of the present disclosure has obtained the user's authorization in advance.
- the use of the user profile is intended to provide services to the user, but not intended to expose sensitive and private information.
- the technical solution of the present disclosure there are many data sources for determining the prediction results for the query, and the use strategies of these data sources can be flexibly adjusted/iterated, so that accurate prediction results can be obtained.
- the prediction results obtained in this way may only require a small number of update operations, or even no update operations.
- the technical solution of the present disclosure can quickly, flexibly and accurately provide search results for the user's search request, with few constraints, and is suitable for a wide range of applications.
- FIG3 shows a schematic diagram of performing a search process 300 according to some embodiments of the present disclosure.
- the process 300 can be implemented on the server side that provides the search service.
- the process 300 of FIG3 is described below with reference to the environment 100 of FIG1 , in particular the server 110. It should be understood that this is merely exemplary and is not intended to limit the embodiments of the present disclosure in any way.
- the server 110 receives a query from the client device 120.
- the server 110 may find and load information of the user who initiated the query at the client device 120.
- the server 110 may then perform two branches in parallel, one branch being the determination of regular search results and the other branch being the generation and transmission of predicted results.
- the process 300 enters box 320, where the server 110 determines the regular search results for the query. Specifically, the server 110 performs engine recall sorting, and uses the search engine to generate search results for the query from the client device 120. Recall is the process of obtaining a set of candidate content related to the query based on the input query. Sorting can be to sort the content in the candidate content set. If the relevant candidate content set cannot be recalled, even if the subsequent sorting method is very optimized, it cannot provide search results for the query. Therefore, recall is very important for the search engine, which determines the quality of the search engine. Recall can be achieved through a variety of existing algorithms, such as Such as traditional word-based recall, vector-based semantic recall, etc., which will not be elaborated here.
- the engine recall sorting process of frame 320 is usually time-consuming, for example, 600ms.
- the processing time can be reduced and the processing efficiency can be improved.
- process 300 enters block 330.
- server 110 generates prediction results.
- the prediction results can have a variety of data sources. For example, at least one historical query matching the current query, candidate search data created within a certain period of historical time, the profile of the user who initiated the current query, and so on.
- offline statistical data may be used to determine the prediction result.
- the offline statistical data may be, for example, data related to historical queries over a period of time in the past.
- Offline statistics can be classified by region, and the region can be divided, for example, by geographical location (e.g., by longitude, latitude, continent, etc.), language type, administrative division (e.g., by country, region, etc.), etc.
- the user's profile can include which region(s) the user is associated with. In this way, the region associated with the user making the query can be determined through the user's profile, so as to obtain offline statistics in the region, and then obtain one or more historical queries matching the current query.
- the offline statistics of another region can be searched.
- the second region can be determined, for example, in descending order of the number of queries with the same number as the first region.
- the second region can be determined from the top N countries (N is a positive integer, such as 8) with the largest number of queries with the first region.
- these N countries can be sorted in descending order according to the same number of queries, and if no historical queries matching the current query are found in the offline statistics of a certain region, the search can be continued in the region with a lower ranking.
- the area corresponding to each query can be recorded. If the same query is received later, the historical query matching the query can be directly determined from the offline statistical data in the recorded area. As an alternative, you can first search for historical queries matching the query in the offline statistics of the current area, and if no historical queries are found, then search in the recorded area.
- the historical queries matching the query received from the client device 120 can be determined from the offline statistics in a variety of ways. In some embodiments, this can be done by query standardization or normalization. Alternatively, in some embodiments, the historical queries matching the query can be determined by term matching.
- query normalization is used to determine matching historical queries, it is possible to determine whether two queries match based on semantics. For example, if one query is "hello, world” and the other query is "hello world", then the two queries are considered to match because they have the same semantics and differ only in the punctuation used for assistance.
- two-level processing can be performed.
- first rules can be used for standardization.
- Such rules include, for example, but are not limited to, converting multiple spaces into one space, removing punctuation marks, eliminating accent marks of certain languages (such as European languages), and so on. Since such accent marks usually indicate emphasis without separate semantics, they are eliminated here for standardization.
- the query can be analyzed first, and the terms in the query can be standardized according to the analysis results. This standardization may have a certain impact on semantics, and may also remove information such as tense, singular and plural. For example, the term "apples" contained in the query may be adjusted to "apple".
- each term after the query segmentation can be obtained after query analysis, and the contribution of each term to the entire query in terms of semantics, also known as term importance, can also be obtained.
- the intent of the query and/or other information can also be determined. Using this information, more matching historical queries can be obtained by removing a part of the semantics corresponding to the query, thereby improving the hit rate.
- streaming data can be used to provide relatively real-time results, that is, streaming data is applied to the process of determining the prediction results.
- candidate search data created within a certain period of time can be obtained from the offline data stream, such as the creation time is within 100 seconds of the request initiation time. Data within the historical time period (e.g., the 6 hours closest to the current time).
- the candidate search data can be stored in a database. The server 110 can obtain the candidate search data from the database and decide which part of the data to package through a certain strategy.
- the server 110 can determine the user's search intention based on the query received from the client device 120, such as searching for content or searching for people. If it is found that the user query involves a person and there is less data related to the person, such as the user is searching for an ordinary friend, it is possible that there are few or no historical queries or related candidate search data for the query. In this case, in order to avoid being unable to obtain the prediction data or obtaining inaccurate prediction data, for example, the query from the client device 120 may sometimes include the user's unique identifier, such as uniq_id. Through the user's unique identifier and the current user's profile, it can be determined whether the current user wants to query his or her friends or the object of concern. If so, the accuracy and hit rate of the prediction result can be improved. In this way, for the case where the user's intention is to obtain the prediction data and the prediction data cannot be obtained, the prediction data of better quality can be obtained by querying the user profile.
- the user's search intention is to obtain the prediction data and the prediction
- the server 110 packages the prediction results in block 340. Since packaging may also be a relatively time-consuming process, for example, 200 ms, this parallel processing method can effectively improve the processing efficiency of the server 110. Then, in block 350, the server 110 sends the packaged prediction data to the client device 120.
- the client device 120 can pre-process the prediction data, such as rendering. Since rendering is a relatively time-consuming process, for example, 200ms, before the client device 120 displays the final result for the query, the final result may be the prediction data or the result after the prediction data is adjusted using the update information.
- the client device 120 can complete the relatively time-consuming rendering operation in advance during the long time that the server 110 uses the search engine to determine the search results, and only needs to complete the display operation after receiving the positive confirmation or update information from the server 110. In this way, the display efficiency of the client device 120 for the final result can be effectively improved.
- the server 110 After obtaining the prediction result and the search result, the server 110 compares the two. For example, in block 360, the server 110 determines whether the prediction result hits the search result provided by the search engine after recall sorting. Based on the comparison result, the server 110 sends supplementary information related to subsequent processing of the prediction result to the client device 120.
- the supplementary information may include, but is not limited to, a positive indication, a negative indication, update information, etc. for the prediction result.
- the server 110 may send a positive indication of the predicted result to the client device 120 in box 370. After receiving the positive indication, the client device 120 may know that the predicted result is accurate and can be displayed without adjustment. If the predicted result does not hit, the server 110 may send a negative indication of the predicted result to the client device 120 in box 395. After receiving the negative indication, the client device 120 may know that the predicted result is inaccurate and may directly discard the predicted result. In the case where the predicted result is a partial hit, the server may generate update information for updating the predicted result to the search result based on the result of the comparison between the predicted result and the search result in box 380, and send the update information to the client device 120 in box 390. After receiving the update information, the client device 120 may update the previously received predicted result to the search result and present the search result.
- the time-consuming engine recall sorting is parallel to the prediction result generation, packaging, transmission, and optional client rendering.
- the engine recall sorting, search result packaging, transmission, and client rendering are completely serial. Therefore, in the embodiments of the present disclosure, it is beneficial to improve the search service speed.
- FIG. 4 shows a schematic diagram of a process 400 for providing supplemental information according to some embodiments of the present disclosure.
- the process 400 can be implemented on the server side.
- the process 400 of FIG. 4 is described below with reference to the environment 100 of FIG. 1 , particularly the server 110. It should be understood that this is merely exemplary and is not intended to limit the embodiments of the present disclosure in any way.
- the server 110 initializes the prediction results and search results.
- the prediction results may be obtained, for example, in block 215 or block 330, and may include ordered Multiple items (i.e., item sequence).
- the search results are, for example, a collection of multiple items for the current query obtained by a search engine, which can be implemented as an item sequence.
- the server 110 can sort the items in the prediction results and the search results respectively, thereby determining the order of the items in the prediction results and the order of the items in the search results.
- the server 110 reorders the prediction results. For example, the server 110 may reorder the items in the prediction results that are not in the same order according to the order of the items in the search results. In some embodiments, considering that the items displayed on the first screen need to be displayed to the user at an accelerated speed, only a portion of the prediction results may be reordered in block 415, for example, only the items in the prediction results that are used for first screen display (such as the first 6 items) are reordered.
- the minimum edit distance is calculated for the entries in the predicted results and the entries in the search results.
- the edit distance is a quantitative measure of the degree of difference between the entry sequences.
- the edit distance can be determined, for example, by determining how many times at least one sequence of entries is required to transform one sequence of entries into another sequence of entries.
- the edit distance can include, for example, the Levenshtein distance, which allows operations such as entry addition, entry deletion, and entry replacement, and can also include the Damerau-Levenshtein distance, etc.
- the Damerau-Levenshtein distance allows the exchange of two adjacent entries based on the Levenshtein distance.
- the calculation of the edit distance can be non-weighted or weighted.
- weights of the exchange, modification, addition, and deletion operations can be 0, 2, 1, and 3, respectively. It should be understood that the above examples of each operation and its weight are merely illustrative and not any limitation to the embodiments of the present disclosure.
- the embodiments of the present disclosure can set any appropriate weights for the operations in the process of determining the edit distance.
- each editing path includes one or more editing operations.
- the editing distance of each editing path may be different. Therefore, the minimum editing distance for converting the entry sequence of the prediction results into the editing sequence of the search results can be calculated in box 420. In this way, the load of editing the prediction results of the client device 120 can be reduced, thereby improving the display speed of the search results.
- an edit operation is generated.
- the minimum The edit distance derives one or more edit operations to be performed. Any suitable method may be used to derive the edit operation corresponding to the minimum edit distance. The scope of the present disclosure is not limited in this respect.
- an entry update package is generated.
- update information for adjusting the position of the entry in the prediction result may be generated, and the update information may be packaged into an update package.
- the order of the entries is verified.
- the order of the entries in the adjusted prediction results is compared with the order of the entries in the search results to determine whether the two are consistent.
- an update package for the entry sub-elements is generated.
- the entry sub-elements can be the object description elements described above.
- the entry sub-elements can include fields such as the number of likes, the number of comments, the number of forwardings, etc.
- the entry sub-elements can include a list of published videos related to the object, etc.
- a boundary condition check is performed. In this process, it can be checked whether the conditions for returning the update package are met. For example, the total number of replacement operations and addition operations cannot exceed 2.
- the boundary condition check succeeds, an additional update package for the entry is generated in block 450.
- the additional update package may include other information that needs to be notified to the client device 120, such as Easter eggs.
- the hit status is fed back based on the result of the boundary condition check. If the result of the check indicates that no editing operation is required, it means a complete hit.
- the server 110 may send a positive indication to the client device 120, for example, setting the ACK in the indication to a value of 0. It is understood that, in this case, the entry update package generated at block 430 may be empty, and the sub-element update package generated at block 440 may be empty or not empty.
- the server 110 may send a negative indication to the client device 120, for example, setting the ACK in the indication to a value of -1. It is understood that in this case, the entry update packet generated at block 430 and the entry update packet generated at block The sub-element update packages generated at 440 may all be empty.
- the server 110 can send update information to the client device 120, and the update information can be sent in the form of an update package, for example.
- the client device 120 can adjust the prediction result to the search result according to the entry editing operation indicated by the update information, so as to quickly obtain a more accurate search result in an efficient manner.
- the prediction results sent to the client device 120 include, for example, entries for first screen display, so the number of other entries to be provided to the client device 120 can be determined in block 460. For example, assuming that 6 entries can be displayed on the first screen at the client device 120, and the search results for home page display include a total of 10 entries, then in block 460 it can be determined that the number of entries that need to be provided to the client device 120 is 4 entries.
- the first sending of the prediction results to the client device 120 can be implemented in a variety of ways. In some embodiments, if the first screen requires 6 items, M items (M is an integer greater than or equal to 6) can be actually sent from the server 110 to the client device 120, and the client device 120 selects 6 items from the M items to be displayed on the first screen.
- only the entries that are most likely to appear on the first screen may be sent from the server 110 to the client device 120, without caring about the order of the entries.
- different prediction result sending strategies can be determined for different sessions based on the historical recall of the current query.
- the historical recall situation may include a lot of information, such as but not limited to, the frequency of the query in the past 24 hours, the discreteness of the search results, when was the last search for the query, the intent of the query, the timeliness, the region where the user who made the query is located (the region can be used to approximate the network infrastructure situation), the performance score of the client device, and so on.
- the prediction result sending strategy can be made based on the above historical recall situation and/or other information related to the current query. For example, for data with a relatively high hit rate, the number of entries sent from the server 110 to the client device 120 is reduced.
- the number of entries sent from the server 110 to the client device 120 is reduced.
- the number of entries sent from the server 110 to the client device 120 is reduced. It should be understood that in such an embodiment, the acquisition of the user's area and/or the client device performance score is authorized by the user in advance.
- FIG5 shows a flow chart of a search method 500 performed on a server side according to some embodiments of the present disclosure.
- the method 500 can be implemented on the server side.
- the method 500 of FIG5 is described below using the server 110 of FIG1 as an example. It should be understood that this is merely exemplary and is not intended to limit the embodiments of the present disclosure in any way.
- the server 110 determines a target area associated with the current query in response to receiving the current query from the client device 120.
- the server 110 generates a prediction result for the current query based on at least target area historical data corresponding to the target area.
- the target area historical data includes at least one of the following: data of at least one historical query matching the current query and associated with the target area, candidate search data associated with the target area created within the first historical time period, and the like.
- At least one historical query includes multiple historical queries that occurred within a second historical time period
- generating a predicted result includes: determining a degree of discreteness of multiple historical search results for the multiple historical queries; and in response to determining that the degree of discreteness is less than a threshold degree of discreteness, determining a predicted result based on the multiple historical search results.
- server 110 may determine data matching the current query from the candidate search data as at least a part of the prediction result in response to determining that the number of at least one historical query is less than a threshold number.
- the server 110 may determine whether the current query indicates another user associated with the current user based on the profile of the current user who initiated the current query; and in response to determining that the current query indicates another user, determine information related to the current user as at least part of the predicted result.
- the server 110 may initiate Based on the profile of the current user of the current query, determining a first area associated with the current user; searching for results for the current query in the first area historical data corresponding to the first area; and in response to not finding results for the current query in the first area historical data, determining a second area corresponding to the last query that matches the current query as a target area.
- the server 110 sends the predicted results to the client device 120.
- the server 110 compares the predicted results with the search results in response to the search engine generating search results for the current query.
- the server 110 transmits supplementary information related to subsequent processing of the prediction result to the client device 120 based on the result of the comparison.
- the server 110 may generate update information for updating the prediction result as the search result based on the comparison result, and send the update information to the client device 120 .
- the prediction result includes a first group of entries
- the search result includes a second group of entries
- the update information indicates that the first group of entries arranged in the first order are updated to the second group of entries arranged in the second order.
- the update information may include at least one of the following: deletion of an entry, addition of an entry, and replacement of an entry.
- the first entry in the predicted result and the second entry in the search result relate to the same object, and the update information indicates that the second entry has different object description elements from the first entry.
- the server 110 may send a positive indication of the predicted result to the client device 120.
- the server 110 may send a negative indication of the predicted result to the client device 120.
- FIG6 shows a flow chart of a search method 600 performed on a client device according to some embodiments of the present disclosure.
- the method 600 can be implemented on the client device side.
- the method 600 of FIG6 is described below using the client device 120 of FIG1 as an example. It should be understood that this is merely exemplary and is not intended to limit the embodiments of the present disclosure in any way.
- the client device 120 sends a current query to the server.
- the client device 120 receives a prediction result for the current query from the server.
- the prediction result is generated based on target area historical data corresponding to the target area, and the target area is associated with the current query.
- the client device 120 may perform pre-processing on the prediction result related to presentation.
- the client device 120 receives from the server supplemental information related to subsequent processing of the prediction result, the supplemental information being generated based on a comparison of the prediction result and the search results generated by the search engine.
- the client device 120 performs an operation on the prediction result based on the supplemental information.
- the client device 120 may update the predicted result into a search result based on the updated information included in the supplemental information, and present the search result.
- the prediction result includes a first group of entries
- the search result includes a second group of entries.
- the client device 120 may update the first group of entries arranged in the first order to a second group of entries arranged in the second order according to the entry editing operation indicated by the update information.
- the entry editing operation may include at least one of the following: deletion of an entry, addition of an entry, and replacement of an entry.
- the first item in the predicted result and the second item in the search result relate to the same object.
- the client device 120 may update the first item to have an object description element.
- client device 120 may present the predicted result in response to the supplemental information including a positive indication of the predicted result, or may forgo presenting the predicted result in response to the supplemental information including a negative indication of the predicted result.
- FIG. 7 shows a block diagram of a search apparatus 700 according to some embodiments of the present disclosure.
- the apparatus 700 may be implemented as or included in the server 110.
- Each module/component in the apparatus 700 may be implemented by hardware, software, firmware, or any combination thereof.
- the apparatus 700 includes: a target area determination module 705, configured to determine a target area associated with the current query in response to receiving a current query from a client device at a server; a prediction result generation module 710, configured to generate a prediction result based on at least The target area historical data corresponding to the domain is used to generate a prediction result for the current query; the prediction result sending module 720 is configured to send the prediction result to the client device; the comparison module 730 is configured to compare the prediction result with the search result in response to the search engine generating the search result for the current query; and the supplementary information sending module 740 is configured to send supplementary information related to the subsequent processing of the prediction result to the client device based on the comparison result.
- a target area determination module 705 configured to determine a target area associated with the current query in response to receiving a current query from a client device at a server
- a prediction result generation module 710 configured to generate a prediction result based on at least The target area historical data corresponding to the domain is used to generate a prediction result for
- the target area historical data includes at least one of the following: data of at least one historical query that matches the current query and is associated with the target area, or candidate search data associated with the target area created within a first historical time period.
- At least one historical query includes multiple historical queries that occurred within a second historical time period
- the prediction result generation module is also configured to: determine the degree of discreteness of multiple historical search results for the multiple historical queries; and in response to determining that the degree of discreteness is less than a threshold degree of discreteness, determine the prediction result based on the multiple historical search results.
- the prediction result generation module 710 is further configured to: in response to determining that the number of at least one historical query is less than a threshold number, determine data matching the current query from the candidate search data as at least a part of the prediction result.
- the prediction result generation module 710 is also configured to: determine whether the current query indicates another user associated with the current user based on the profile of the current user who initiated the current query; and in response to determining that the current query indicates another user, determine information related to the current user as part of the prediction result.
- the target area determination module 705 is also configured to: determine a first area associated with the current user based on the profile of the current user who initiated the current query; search for results for the current query in the first area historical data corresponding to the first area; and in response to not finding results for the current query in the first area historical data, determine a second area corresponding to a historical query that matches the current query as a target area.
- the supplementary information sending module 740 is further configured to: generate update information for updating the prediction result to the search result based on the comparison result; and send the update information to the client device.
- the predicted results include a first set of items and the search results include a second set of items.
- the update information indicates that the first group of entries arranged in the first order is updated to the second group of entries arranged in the second order.
- the update information may include at least one of the following: deletion of an entry, addition of an entry, and replacement of an entry.
- the first entry in the predicted result and the second entry in the search result relate to the same object, and the update information indicates that the second entry has different object description elements from the first entry.
- the supplemental information sending module 740 is also configured to: in response to the comparison result indicating that the number of operations required to update the predicted result to the search result is less than a first threshold number, send a positive indication of the predicted result to the client device; or, in response to the comparison result indicating that the number of operations required to update the predicted result to the search result is greater than a second threshold number, send a negative indication of the predicted result to the client device.
- FIG. 8 shows a block diagram of a search apparatus 800 according to some other embodiments of the present disclosure.
- the apparatus 800 may be implemented as or included in the client device 120.
- Each module/component in the apparatus 800 may be implemented by hardware, software, firmware, or any combination thereof.
- the apparatus 800 includes a query sending module 810, which is configured to send a current query to a server at a client device; a prediction result receiving module 820, which is configured to receive a prediction result for the current query from the server, wherein the prediction result is generated based on target area historical data corresponding to the target area, and the target area is associated with the current query; a supplementary information receiving module 830, which is configured to receive supplementary information related to subsequent processing of the prediction result from the server, wherein the supplementary information is generated based on a comparison between the prediction result and a search result generated by a search engine; and an operation execution module 840, which is configured to perform an operation on the prediction result based on the supplementary information.
- a query sending module 810 which is configured to send a current query to a server at a client device
- a prediction result receiving module 820 which is configured to receive a prediction result for the current query from the server, wherein the prediction result is generated based on target area historical data corresponding to the target area, and the target
- the apparatus 800 may further include a preprocessing module configured to perform presentation-related preprocessing on the prediction result in response to receiving the prediction result.
- the operation execution module 840 is further configured to: update the predicted result to a search result based on the updated information included in the supplemental information; and present the search result.
- the prediction results include a first group of entries
- the search results include a second group of entries
- the operation execution module 840 is further configured to: update the first group of entries arranged in the first order to the second group of entries arranged in the second order according to the entry editing operation indicated by the update information; A second group of entries in the column, wherein the entry editing operation includes at least one of the following: deletion of an entry, addition of an entry, and replacement of an entry.
- the operation execution module 840 is also configured to: in response to the update information indicating that the second result has an object description element different from that of the first entry, update the first entry to have an object description element.
- the operation execution module 840 is further configured to present the prediction result in response to the supplemental information including a positive indication of the prediction result, or is configured to give up presenting the prediction result in response to the supplemental information including a negative indication of the prediction result.
- FIG9 shows a block diagram of an electronic device 900 in which one or more embodiments of the present disclosure may be implemented. It should be understood that the electronic device 900 shown in FIG9 is merely exemplary and should not constitute any limitation on the functionality and scope of the embodiments described herein. The electronic device 900 shown in FIG9 may be used to implement the server 110 and/or the client device 120 of FIG1 .
- the electronic device 900 is in the form of a general electronic device.
- the components of the electronic device 900 may include, but are not limited to, one or more processors or processing units 910, a memory 920, a storage device 930, one or more communication units 940, one or more input devices 950, and one or more output devices 960.
- the processing unit 910 may be an actual or virtual processor and is capable of performing various processes according to a program stored in the memory 920. In a multi-processor system, multiple processing units execute computer executable instructions in parallel to improve the parallel processing capability of the electronic device 900.
- the electronic device 900 typically includes a plurality of computer storage media. Such media may be any retrievable media accessible to the electronic device 900, including but not limited to volatile and nonvolatile media, removable and non-removable media.
- the memory 920 may be a volatile memory (e.g., registers, cache, random access memory (RAM)), a nonvolatile memory (e.g., read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof.
- the storage device 930 may be a removable or non-removable medium and may include a machine-readable medium such as a flash drive, a disk, or any other medium that may be capable of being used to store information and/or data (e.g., using training data for training) and can be accessed within the electronic device 900.
- a machine-readable medium such as a flash drive, a disk, or any other medium that may be capable of being used to store information and/or data (e.g., using training data for training) and can be accessed within the electronic device 900.
- the electronic device 900 may further include additional removable/non-removable, volatile/non-volatile storage media.
- a disk drive for reading or writing from a removable, non-volatile disk e.g., a “floppy disk”
- an optical drive for reading or writing from a removable, non-volatile optical disk may be provided.
- each drive may be connected to a bus (not shown) by one or more data media interfaces.
- the memory 920 may include a computer program product 925 having one or more program modules configured to perform various methods or actions of various embodiments of the present disclosure.
- the communication unit 940 implements communication with other electronic devices through a communication medium. Additionally, the functions of the components of the electronic device 900 can be implemented with a single computing cluster or multiple computing machines that can communicate through a communication connection. Therefore, the electronic device 900 can operate in a networked environment using a logical connection with one or more other servers, a network personal computer (PC), or another network node.
- PC network personal computer
- the input device 950 may be one or more input devices, such as a mouse, a keyboard, a tracking ball, etc.
- the output device 960 may be one or more output devices, such as a display, a speaker, a printer, etc.
- the electronic device 900 may also communicate with one or more external devices (not shown) through the communication unit 940 as needed, such as a storage device, a display device, etc., communicate with one or more devices that allow a user to interact with the electronic device 900, or communicate with any device that allows the electronic device 900 to communicate with one or more other electronic devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input/output (I/O) interface (not shown).
- I/O input/output
- a computer-readable storage medium on which computer-executable instructions are stored, wherein the computer-executable instructions are executed by a processor to implement the method described above.
- a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the method described above.
- These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions/actions specified in one or more boxes in the flowchart and/or block diagram is generated.
- These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and/or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions/actions specified in one or more boxes in the flowchart and/or block diagram.
- Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, so that the instructions executed on the computer, other programmable data processing apparatus, or other device implement the functions/actions specified in one or more boxes in the flowchart and/or block diagram.
- each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of a module, program segment or instruction includes one or more executable instructions for realizing the logical function of the specification.
- the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved.
- each square box in the block diagram and/or flow chart, and the combination of the square boxes in the block diagram and/or flow chart can be realized by a special hardware-based system that performs the function or action of the specification, or can be realized by a combination of special hardware and computer instructions.
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
本申请要求2023年2月22日递交的申请号为202310152761.8、标题为“搜索方法、装置、设备和存储介质”的中国发明专利申请的优先权,该申请的全部内容通过引用结合在本申请中。This application claims priority to the Chinese invention patent application with application number 202310152761.8 filed on February 22, 2023 and titled “Search method, apparatus, device and storage medium”, the entire contents of which are incorporated by reference into this application.
本公开的示例实施例总体涉及计算机领域,特别地涉及搜索方法、装置、设备和计算机可读存储介质。Example embodiments of the present disclosure generally relate to the field of computers, and more particularly, to search methods, devices, apparatuses, and computer-readable storage media.
随着信息技术的发展,多样化且海量的数据资源不断地产生。为了从海量的数据中找到需要的信息,用户通常通过查询的方式来搜索所需的信息。例如,用户可以利用客户端设备向服务器发送查询请求,并从服务器接收相应的查询结果。通常,服务器在接收到查询请求后需要一定的处理时间来提供相应的搜索结果。然而,在服务器的传输资源、计算资源等较不充足和/或网络基础建设较不完善的情况下,搜索结果可能需要耗费较长时间才能从服务器提供至客户端设备,导致用户体验较差。With the development of information technology, diverse and massive data resources are constantly generated. In order to find the required information from the massive data, users usually search for the required information by querying. For example, a user can use a client device to send a query request to a server and receive the corresponding query results from the server. Usually, the server needs a certain amount of processing time to provide the corresponding search results after receiving the query request. However, when the server's transmission resources, computing resources, etc. are insufficient and/or the network infrastructure is imperfect, the search results may take a long time to be provided from the server to the client device, resulting in a poor user experience.
发明内容Summary of the invention
在本公开的第一方面,提供了一种搜索方法。该方法包括:响应于在服务器处从客户端设备接收到当前查询,确定与当前查询相关联的目标区域;至少基于与目标区域相对应的目标区域历史数据,生成针对当前查询的预测结果;向客户端设备发送预测结果;响应于搜索引擎生成针对当前查询的搜索结果,将预测结果与搜索结果进行比较;以及基于比较的结果,向客户端设备发送与预测结果的后续处理有关 的补充信息。In a first aspect of the present disclosure, a search method is provided. The method includes: in response to receiving a current query from a client device at a server, determining a target area associated with the current query; generating a prediction result for the current query based at least on target area historical data corresponding to the target area; sending the prediction result to the client device; in response to a search engine generating search results for the current query, comparing the prediction result with the search results; and sending, based on the comparison result, a message to the client device related to subsequent processing of the prediction result. Additional information.
在本公开的第二方面,提供了一种搜索方法。该方法包括:在客户端设备处向服务器发送当前查询;从服务器接收针对当前查询的预测结果,其中预测结果是基于与目标区域相对应的目标区域历史数据生成的,并且目标区域与当前查询相关联;从服务器接收与预测结果的后续处理有关的补充信息,补充信息是基于预测结果和搜索引擎生成的搜索结果的比较生成的;以及基于补充信息,对预测结果执行操作。In a second aspect of the present disclosure, a search method is provided. The method includes: sending a current query to a server at a client device; receiving a prediction result for the current query from the server, wherein the prediction result is generated based on target area historical data corresponding to a target area, and the target area is associated with the current query; receiving supplementary information related to subsequent processing of the prediction result from the server, the supplementary information being generated based on a comparison of the prediction result and a search result generated by a search engine; and performing an operation on the prediction result based on the supplementary information.
在本公开的第三方面,提供了一种搜索装置。该装置包括:目前区域确定模块,被配置为响应于在服务器处从客户端设备接收到当前查询,确定与当前查询相关联的目标区域;预测结果生成模块,被配置为至少基于与目标区域相对应的目标区域历史数据,生成针对当前查询的预测结果;预测结果发送模块,被配置为向客户端设备发送预测结果;比较模块,被配置为响应于搜索引擎生成针对当前查询的搜索结果,将预测结果与搜索结果进行比较;以及补充信息发送模块,被配置为基于比较的结果,向客户端设备发送与预测结果的后续处理有关的补充信息。In a third aspect of the present disclosure, a search device is provided. The device includes: a current region determination module configured to determine a target region associated with the current query in response to receiving a current query from a client device at a server; a prediction result generation module configured to generate a prediction result for the current query based on at least target region historical data corresponding to the target region; a prediction result sending module configured to send the prediction result to the client device; a comparison module configured to compare the prediction result with the search result in response to a search engine generating a search result for the current query; and a supplementary information sending module configured to send supplementary information related to subsequent processing of the prediction result to the client device based on the comparison result.
在本公开的第四方面,提供了一种搜索装置。该装置包括:查询发送模块,被配置为在客户端设备处向服务器发送当前查询;预测结果接收模块,被配置为从服务器接收针对当前查询的预测结果,其中预测结果是基于与目标区域相对应的目标区域历史数据生成的,并且目标区域与当前查询相关联;补充信息接收模块,被配置为从服务器接收与预测结果的后续处理有关的补充信息,补充信息是基于预测结果和搜索引擎生成的搜索结果的比较生成的;以及操作执行模块,被配置为基于补充信息,对预测结果执行操作。In a fourth aspect of the present disclosure, a search device is provided. The device includes: a query sending module configured to send a current query to a server at a client device; a prediction result receiving module configured to receive a prediction result for the current query from the server, wherein the prediction result is generated based on target area historical data corresponding to a target area, and the target area is associated with the current query; a supplementary information receiving module configured to receive supplementary information related to subsequent processing of the prediction result from the server, wherein the supplementary information is generated based on a comparison between the prediction result and a search result generated by a search engine; and an operation execution module configured to execute an operation on the prediction result based on the supplementary information.
在本公开的第五方面,提供了一种电子设备。该设备包括至少一个处理单元;以及至少一个存储器,至少一个存储器被耦合到至少一个处理单元并且存储用于由至少一个处理单元执行的指令。指令在由至少一个处理单元执行时使设备执行第一方面或者第二方面的方法。 In a fifth aspect of the present disclosure, an electronic device is provided. The device includes at least one processing unit; and at least one memory, the at least one memory is coupled to the at least one processing unit and stores instructions for execution by the at least one processing unit. When the instructions are executed by the at least one processing unit, the device executes the method of the first aspect or the second aspect.
在本公开的第六方面,提供了一种计算机可读存储介质。该计算机可读存储介质上存储有计算机程序,计算机程序可由处理器执行以实现第一方面或者第二方面的方法。In a sixth aspect of the present disclosure, a computer-readable storage medium is provided, wherein a computer program is stored on the computer-readable storage medium, and the computer program can be executed by a processor to implement the method of the first aspect or the second aspect.
应当理解,本发明内容部分中所描述的内容并非旨在限定本公开的实施例的关键特征或重要特征,也不用于限制本公开的范围。本公开的其它特征将通过以下的描述而变得容易理解。It should be understood that the contents described in the summary of the present invention are not intended to limit the key features or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description.
结合附图并参考以下详细说明,本公开各实施例的上述和其他特征、优点及方面将变得更加明显。在附图中,相同或相似的附图标记表示相同或相似的元素,其中:The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:
图1示出了本公开的实施例能够在其中实现的示例环境的示意图;FIG1 shows a schematic diagram of an example environment in which embodiments of the present disclosure can be implemented;
图2示出了根据本公开的一些实施例的搜索过程的示例性交互图;FIG2 shows an exemplary interaction diagram of a search process according to some embodiments of the present disclosure;
图3示出了根据本公开的一些实施例的在服务器侧执行搜索过程的示意图;FIG3 is a schematic diagram showing a search process performed on a server side according to some embodiments of the present disclosure;
图4示出了根据本公开的一些实施例的提供补充信息的示意图;FIG4 shows a schematic diagram of providing supplementary information according to some embodiments of the present disclosure;
图5示出了根据本公开的一些实施例的在服务器侧执行的搜索方法的流程图;FIG5 shows a flow chart of a search method performed on a server side according to some embodiments of the present disclosure;
图6示出了根据本公开的一些实施例的在客户端设备执行的搜索方法的流程图;FIG6 shows a flow chart of a search method performed on a client device according to some embodiments of the present disclosure;
图7示出了根据本公开的一些实施例的搜索装置的框图;FIG7 shows a block diagram of a search device according to some embodiments of the present disclosure;
图8示出了根据本公开的另一些实施例的搜索装置的框图;以及FIG8 shows a block diagram of a search device according to some other embodiments of the present disclosure; and
图9示出了能够实施本公开的多个实施例的设备的框图。FIG. 9 shows a block diagram of a device capable of implementing various embodiments of the present disclosure.
可以理解的是,在使用本公开各实施例公开的技术方案之前,均应当依据相关法律法规通过恰当的方式对本公开所涉及个人信息的类型、使用范围、使用场景等告知用户并获得用户的授权。It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
例如,在响应于接收到用户的主动请求时,向用户发送提示信息, 以明确地提示用户,其请求执行的操作将需要获取和使用到用户的个人信息。从而,使得用户可以根据提示信息来自主地选择是否向执行本公开技术方案的操作的电子设备、应用程序、服务器或存储介质等软件或硬件提供个人信息。For example, in response to receiving an active request from a user, a prompt message is sent to the user. The user is clearly prompted that the operation requested by the user will require the acquisition and use of the user's personal information. Thus, the user can independently choose whether to provide personal information to the electronic device, application, server or storage medium or other software or hardware that executes the operation of the technical solution of the present disclosure according to the prompt information.
作为一种可选的但非限定性的实现方式,响应于接收到用户的主动请求,向用户发送提示信息的方式例如可以是弹窗的方式,弹窗中可以以文字的方式呈现提示信息。此外,弹窗中还可以承载供用户选择“同意”或者“不同意”向电子设备提供个人信息的选择控件。As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
可以理解的是,上述通知和获取用户授权过程仅是示意性的,不对本公开的实现方式构成限定,其它满足相关法律法规的方式也可应用于本公开的实现方式中。It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.
可以理解的是,本技术方案所涉及的数据(包括但不限于数据本身、数据的获取或使用)应当遵循相应法律法规及相关规定的要求。It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
下面将参照附图更详细地描述本公开的实施例。虽然附图中示出了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例,相反,提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
需要注意的是,本文中所提供的任何节/子节的标题并不是限制性的。本文通篇描述了各种实施例,并且任何类型的实施例都可以包括在任何节/子节下。此外,在任一节/子节中描述的实施例可以以任何方式与同一节/子节和/或不同节/子节中描述的任何其他实施例相结合。It should be noted that the titles of any sections/subsections provided herein are not restrictive. Various embodiments are described throughout this article, and any type of embodiment may be included under any section/subsection. In addition, the embodiments described in any section/subsection may be combined in any manner with any other embodiments described in the same section/subsection and/or different sections/subsections.
在本公开的实施例的描述中,术语“包括”及其类似用语应当理解为开放性包含,即“包括但不限于”。术语“基于”应当理解为“至少部分地基于”。术语“一个实施例”或“该实施例”应当理解为“至少一个实施例”。术语“一些实施例”应当理解为“至少一些实施例”。下文还可能包括其他明确的和隐含的定义。术语“第一”、“第二” 等可以指代不同的或相同的对象。下文还可能包括其他明确的和隐含的定义。In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may also be included below. The terms "first", "second" and "third" should be understood as "at least some embodiments". The following may also include other explicit and implicit definitions.
如前文所简要提及的,在服务器的传输资源、计算资源等较不充足和/或网络基础建设较不完善的情况下,搜索结果可能需要耗费较长时间才能从服务器提供至客户端设备。例如,在服务器设置在远程甚至海外的情况下,客户端设备通常距服务器有着较远的距离。特别是在某些区域网络基础建设较差,导致网络传输延迟较大。在某些情况下,服务器所在机房设备数目不足并且服务需求持续增长,会导致传输耗时持续劣化,例如每次查询的耗时增加几百毫秒甚至更长。As briefly mentioned above, when the server's transmission resources, computing resources, etc. are insufficient and/or the network infrastructure is imperfect, search results may take a long time to be provided from the server to the client device. For example, when the server is located remotely or even overseas, the client device is usually far away from the server. In particular, in some areas, the network infrastructure is poor, resulting in large network transmission delays. In some cases, the number of equipment in the computer room where the server is located is insufficient and the service demand continues to grow, which will cause the transmission time to continue to deteriorate, for example, the time required for each query will increase by hundreds of milliseconds or even longer.
为了解决上述以及其他潜在的问题,根据本公开的技术方案提出一种搜索方案。在该方案中,首先向客户端设备提供针对查询的预测结果,预测结果是基于与查询相关联的区域的历史数据确定的。然后再向客户端设备提供与对预测结果的后续处理有关的补充信息,从而完善整体搜索结果。与传统上针对一个查询请求仅对应地以一次数据传输(例如一个数据包)提供搜索结果的方案相比,根据本公开的技术方案可以通过多次数据传输(例如多个数据包)来提供搜索结果。这样,通过在搜索引擎提供搜索结果之前生成预测数据并做提前下发,从而能够把搜索引擎耗时与预测结果的生成和下发并行起来,降低服务延迟。进一步地,提取下发的预测结果是基于查询相关的历史数据确定的。这有利于提高预测结果的准确性,进而减少甚至避免后续补充信息的下发。以此方式,可以进一步有利于服务延迟的降低。In order to solve the above and other potential problems, a search solution is proposed according to the technical solution of the present disclosure. In this solution, the predicted results for the query are first provided to the client device, and the predicted results are determined based on the historical data of the area associated with the query. Then, the client device is provided with supplementary information related to the subsequent processing of the predicted results, so as to improve the overall search results. Compared with the traditional solution of providing search results only with one data transmission (e.g., one data packet) for one query request, the technical solution of the present disclosure can provide search results through multiple data transmissions (e.g., multiple data packets). In this way, by generating the predicted data and issuing it in advance before the search engine provides the search results, the search engine time can be parallelized with the generation and issuance of the predicted results, thereby reducing service delays. Furthermore, the extracted and issued predicted results are determined based on the historical data related to the query. This is conducive to improving the accuracy of the predicted results, thereby reducing or even avoiding the issuance of subsequent supplementary information. In this way, it can further contribute to the reduction of service delays.
示例环境和交互过程Example environment and interactive process
图1示出了本公开的实施例能够在其中实现的示例环境100的示意图。在环境100中示出了用于提供搜索服务的服务器110,还示出了使用该搜索服务的客户端设备120。客户端设备120根据用户输入(例如,键入或说出的关键字)向服务器120发送搜索请求101,并接收服务器110返回的搜索结果102。1 shows a schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented. A server 110 for providing a search service is shown in the environment 100, and a client device 120 using the search service is also shown. The client device 120 sends a search request 101 to the server 120 according to user input (e.g., a keyword typed or spoken), and receives search results 102 returned by the server 110.
在一些实施例中,客户端设备120中可以安装有应用。用户可以 经由客户端设备120和/或客户端设备120的附接设备来与应用进行交互,从而发起搜索请求101。作为示例,应用可以是内容共享应用,其至少能够向用户提供与媒体内容相关的服务,例如媒体内容的浏览、评论、转发、创作等等。在本文中,“媒体内容”可以包括多种形式,包括但不限于图像、视频、音频等等。In some embodiments, an application may be installed in the client device 120. The user may The client device 120 and/or an attached device of the client device 120 interact with the application to initiate the search request 101. As an example, the application may be a content sharing application, which can at least provide users with services related to media content, such as browsing, commenting, forwarding, and creating media content. In this article, "media content" may include multiple forms, including but not limited to images, videos, audio, and the like.
服务器110可以是任意类型的具有通信功能的服务端设备,其例如可以包括计算系统,诸如大型机、边缘计算节点、云环境中的计算设备,等等。服务器110可以是一台单独的服务器,也可以是由若干台服务器组成的服务器集群。服务器110还可以是一个云计算服务中心或者由云计算资源实现的计算实例。应当理解,以上仅仅是服务器110的示例,而不是限制,服务器110可以是具有各种形式或结构的、可以为客户端设备120提供搜索服务的设备。The server 110 may be any type of server-side device with communication functions, which may include, for example, a computing system, such as a mainframe, an edge computing node, a computing device in a cloud environment, and the like. The server 110 may be a single server or a server cluster consisting of several servers. The server 110 may also be a cloud computing service center or a computing instance implemented by cloud computing resources. It should be understood that the above is merely an example of the server 110, not a limitation, and the server 110 may be a device of various forms or structures that can provide search services for the client device 120.
客户端设备120可以是任意类型的具有通信功能的终端设备。终端设备可以是任意类型的移动终端、固定终端或便携式终端,包括移动手机、台式计算机、膝上型计算机、笔记本计算机、上网本计算机、平板计算机、媒体计算机、多媒体平板、个人通信系统(PCS)设备、个人导航设备、个人数字助理(PDA)、音频/视频播放器、数码相机/摄像机、定位设备、电视接收器、无线电广播接收器、电子书设备、游戏设备或者前述各项的任意组合,包括这些设备的配件和外设或者其任意组合。客户端设备120与服务器110之间可以通过无线网络或者有线网络进行通信。The client device 120 may be any type of terminal device with communication functions. The terminal device may be any type of mobile terminal, fixed terminal or portable terminal, including a mobile phone, a desktop computer, a laptop computer, a notebook computer, a netbook computer, a tablet computer, a media computer, a multimedia tablet, a personal communication system (PCS) device, a personal navigation device, a personal digital assistant (PDA), an audio/video player, a digital camera/camcorder, a positioning device, a television receiver, a radio broadcast receiver, an electronic book device, a gaming device or any combination of the foregoing, including accessories and peripherals of these devices or any combination thereof. The client device 120 may communicate with the server 110 via a wireless network or a wired network.
应当理解,以上仅出于示例性的目的描述环境100的结构和功能,而不暗示对于本公开的范围的任何限制。以下将继续参考图2至9描述本公开的一些示例实施例。It should be understood that the above description of the structure and function of the environment 100 is only for exemplary purposes, and does not imply any limitation on the scope of the present disclosure. Some exemplary embodiments of the present disclosure will be described below with reference to FIGS.
图2示出了根据本公开的一些实施例的搜索过程的示例性交互图200。图2的搜索过程200示出了服务器为客户端设备提供搜索服务的过程。为了便于讨论,下面参考图1中的服务器110和客户端设备120来描述过程200。应当理解,这仅仅是示例性的,而无意对本公开进行任何限制。过程200中的服务器和客户端设备可以实现为其他 任何适当的设备。FIG. 2 shows an exemplary interaction diagram 200 of a search process according to some embodiments of the present disclosure. The search process 200 of FIG. 2 shows a process in which a server provides a search service to a client device. For ease of discussion, the process 200 is described below with reference to the server 110 and the client device 120 in FIG. 1. It should be understood that this is merely exemplary and is not intended to limit the present disclosure in any way. The server and the client device in the process 200 may be implemented as other Any appropriate equipment.
如图2所示,客户端设备120向服务器110发送(205)一个查询。为了便于讨论,下文将该查询称为“当前查询”。服务器110接收(210)到来自客户端设备120的当前查询后,生成(215)针对当前查询的预测结果。As shown in FIG2 , the client device 120 sends ( 205 ) a query to the server 110 . For ease of discussion, the query is referred to as the “current query” below. After receiving ( 210 ) the current query from the client device 120 , the server 110 generates ( 215 ) a prediction result for the current query.
预测结果可以包括根据当前查询所预测出的一个或多个条目。预测结果的一个条目可以是媒体内容(例如,视频、音频、图像),还可以是预测出来的其他可能数据。例如,如果当前查询涉及某一动物,预测结果可以包括与该动物有关的视频、音频、图像,也可以包括与该动物有关的社交账号(例如,动物科普账号)的信息,例如头像、简介、发布的媒体内容等。应当理解,预测结果中所包括的信息是符合相关规定的。例如,用户可以已经授予对信息的访问权限,或者返回到客户端的信息是经过处理的。The prediction results may include one or more items predicted based on the current query. An item of the prediction results may be media content (e.g., video, audio, image), or other possible data predicted. For example, if the current query involves an animal, the prediction results may include videos, audio, images related to the animal, and may also include information about social accounts related to the animal (e.g., animal science accounts), such as avatars, introductions, published media content, etc. It should be understood that the information included in the prediction results complies with relevant regulations. For example, the user may have granted access rights to the information, or the information returned to the client is processed.
在一些实施例中,预测结果可以包括根据当前查询所预测出的所有条目,对条目的总数目可以不做限制。作为备选方式,在一些实施例中,可以对预测出的条目进行一定限制。例如,预测结果可以仅包括预定数目的条目(例如4个条目),以用于客户端设备首屏展示。In some embodiments, the prediction results may include all items predicted based on the current query, and there may be no limit on the total number of items. As an alternative, in some embodiments, certain restrictions may be placed on the predicted items. For example, the prediction results may include only a predetermined number of items (e.g., 4 items) for display on the first screen of the client device.
为了获得预测结果,可以使用多种数据来源。数据来源的示例包括在过去一段时间内的历史查询、在过去一段时间内创建的候选数据和发起当前查询的用户的简档。这些数据来源可以是按区域维护的。相应地,服务器110确定与当前查询相关联的目标区域,然后考虑该目标区域的历史数据来生成预测结果。在描述了过程200的整体流程后,下文将详细描述使用这些数据来源生成预测结果的示例实施例。In order to obtain the prediction results, a variety of data sources can be used. Examples of data sources include historical queries over a period of time in the past, candidate data created over a period of time in the past, and the profile of the user who initiated the current query. These data sources can be maintained by region. Accordingly, the server 110 determines the target area associated with the current query, and then considers the historical data of the target area to generate the prediction results. After describing the overall flow of process 200, an example embodiment of generating prediction results using these data sources will be described in detail below.
在生成预测结果后,服务器110向客户端设备120发送(220)该预测结果。在本文的描述中,发送预测结果的耗时可以包括数据打包的耗时和数据传输的耗时。客户端设备120从服务器110接收(225)预测结果。附加地,在一些实施例中,客户端设备120可以响应于接收(225)到预测结果,对预测结果进行与呈现有关的预处理。例如,客户端设备110可以对预测结果中的各个条目进行渲染但不进行展 示。以此方式,后续在接收到关于预测结构的补充信息后,客户端设备110可以快速地进行调整并展示给用户。因此,有利于进一步缩短向用户呈现结果的耗时,从而提高用户体验。After generating the prediction result, the server 110 sends (220) the prediction result to the client device 120. In the description herein, the time taken to send the prediction result may include the time taken to package the data and the time taken to transmit the data. The client device 120 receives (225) the prediction result from the server 110. Additionally, in some embodiments, the client device 120 may perform presentation-related preprocessing on the prediction result in response to receiving (225) the prediction result. For example, the client device 110 may render each item in the prediction result but not display it. In this way, after receiving the supplementary information about the predicted structure, the client device 110 can quickly make adjustments and display them to the user. Therefore, it is helpful to further shorten the time spent on presenting the results to the user, thereby improving the user experience.
继续描述服务器侧。在接收(210)到当前查询后,服务器110可以通过本地的搜索引擎或者通过与之通信的搜索引擎来生成针对当前查询的搜索结果。搜索结果可以利用已知的各种搜索引擎生成,在此不再对搜索引擎进行赘述。与预测结果的内容类似,搜索结果可以包括搜索引擎根据当前查询所确定出的一个或多个条目,每个条目可以是媒体内容(例如,视频、音频、图像),还可以是预测出来的其他可能数据,等等。应当理解,搜索结果中所包括的信息也是符合相关规定的。例如,用户可以已经授予对信息的访问权限,或者返回到客户端的信息是经过处理的。Continue to describe the server side. After receiving (210) the current query, the server 110 can generate search results for the current query through a local search engine or through a search engine that communicates with it. The search results can be generated using various known search engines, and the search engines will not be described in detail here. Similar to the content of the predicted results, the search results may include one or more items determined by the search engine based on the current query, each item may be media content (e.g., video, audio, image), or other possible data predicted, and so on. It should be understood that the information included in the search results also complies with relevant regulations. For example, the user may have granted access rights to the information, or the information returned to the client is processed.
生成针对当前查询的搜索结果的过程可以与生成(215)和/或发送(220)预测结果的过程并行执行,在本公开的实施例中,并不限制其时间先后关系。服务器110响应于搜索引擎生成针对当前查询的搜索结果,将预测结果与搜索结果进行比较(230)。然后,服务器110基于比较的结果,向客户端设备120发送(235)与预测结果的后续处理有关的补充信息。相应地,客户端设备120从服务器110接收(240)补充信息。然后,客户端设备120基于补充信息,对预测结果执行(245)操作。The process of generating search results for the current query can be performed in parallel with the process of generating (215) and/or sending (220) the prediction results. In the embodiments of the present disclosure, the time sequence is not limited. In response to the search engine generating search results for the current query, the server 110 compares the prediction results with the search results (230). Then, based on the comparison result, the server 110 sends (235) supplementary information related to the subsequent processing of the prediction results to the client device 120. Accordingly, the client device 120 receives (240) the supplementary information from the server 110. Then, based on the supplementary information, the client device 120 performs (245) an operation on the prediction result.
取决于比较的结果,补充信息可以包括各种合适类型的数据和/或指示。Depending on the results of the comparison, the supplemental information may include various suitable types of data and/or indications.
在一些实施例中,补充信息可以包括基于比较的结果而生成的更新信息。更新信息用于将预测结果更新为搜索结果。相应地,客户端设备120基于更新信息,将先前接收到的预测结果更新为搜索结果。如果客户端设备120先前已经渲染了预测结果,则可以进行渲染更新,并且展示。举例而言,更新结果可以指示将搜索结果调整为预测结果所需的数据和操作。备选地,更新结果可以指示搜索结果与预测结果之间的差异。在这种情况下,客户端设备120可以基于差异来确定将 搜索结果调整为预测结果所需的操作。In some embodiments, the supplemental information may include update information generated based on the results of the comparison. The update information is used to update the predicted result to the search result. Accordingly, the client device 120 updates the previously received predicted result to the search result based on the update information. If the client device 120 has previously rendered the predicted result, the rendering update may be performed and displayed. For example, the update result may indicate the data and operations required to adjust the search result to the predicted result. Alternatively, the update result may indicate the difference between the search result and the predicted result. In this case, the client device 120 may determine to update the predicted result based on the difference. The actions required to adjust the search results to the predicted results.
取决于搜索结果和预测结果的具体实现方式,更新信息可以以相应的合适方式来向客户端设备120指示所需的更新操作。在一些实施例中,预测结果可以包括第一组条目,搜索结果可以包括第二组条目。在这种实施例中,更新结果可以指示将以第一顺序排列的第一组条目更新为以第二顺序排列的第二组条目。在此情况下,更新信息例如可以包括,但不限于,条目的删除、条目的添加和/或条目的替换,等等。举例而言,预测结果包括条目1、条目2、条目3和条目4,而搜索结果包括条目1、条目5、条目3和条目4。更新信息可以指示用条目5替换条目2。Depending on the specific implementation of the search results and the predicted results, the update information can indicate the required update operation to the client device 120 in a corresponding appropriate manner. In some embodiments, the predicted results may include a first group of entries, and the search results may include a second group of entries. In such an embodiment, the update result may indicate that the first group of entries arranged in a first order is updated to a second group of entries arranged in a second order. In this case, the update information may include, for example, but not limited to, the deletion of entries, the addition of entries, and/or the replacement of entries, etc. For example, the predicted results include entry 1, entry 2, entry 3, and entry 4, and the search results include entry 1, entry 5, entry 3, and entry 4. The update information may indicate that entry 2 is replaced with entry 5.
由于预测结果可能来自历史查询,这导致预测结果中的条目的具体内容可能不是最新的,因而即使对于相同条目,其在预测结果和搜索结果中的具体内容也可能不同。在本文中,相同条目可以指代涉及同一对象或实体的条目,例如,涉及同一个视频的条目、同一个用户的条目。有鉴于此,在一些实施例中,更新信息可以进一步指示对条目中的对象描述的更新。Since the prediction results may come from historical queries, the specific content of the items in the prediction results may not be the latest, so even for the same item, its specific content in the prediction results and the search results may be different. In this article, the same item may refer to items related to the same object or entity, for example, items related to the same video, items of the same user. In view of this, in some embodiments, the update information may further indicate an update to the object description in the item.
具体地,如果预测结果中的条目(也称为第一条目)和搜索结果中的条目(也称为第二条目)涉及同一对象,更新信息可以指示第二条目所具有的与第一条目不同的对象描述元素。该对象描述元素可以在搜索结果中的条目中存在,而在预测结果中的条目中不存在;或者可以在搜索结果和预测结果中不同。相应地,客户端设备120可以基于补充信息,来向先前接收到的搜索结果中添加对象描述元素,或修改搜索结果中原本存在的对象描述元素。作为示例,如果预测结果和搜索结果中的条目都是对象A的信息,对象描述元素可以是与对象A有关的最新发布的内容,例如视频、照片、文本等。作为另一示例,如果预测结果和搜索结构中的条目都涉及媒体内容B,对象描述元素可以是媒体内容B的点赞数、评论、转发数等。Specifically, if the entry in the predicted result (also referred to as the first entry) and the entry in the search result (also referred to as the second entry) involve the same object, the update information may indicate an object description element that the second entry has that is different from the first entry. The object description element may exist in the entry in the search results but not in the entry in the predicted result; or it may be different in the search results and the predicted result. Accordingly, the client device 120 may add an object description element to the previously received search results based on the supplementary information, or modify the object description element that originally existed in the search results. As an example, if the entries in the predicted result and the search results are both information about object A, the object description element may be the latest published content related to object A, such as videos, photos, text, etc. As another example, if the entries in the predicted result and the search structure both involve media content B, the object description element may be the number of likes, comments, and reposts of media content B, etc.
在一些实施例中,补充信息可以包括关于如何处理搜索结果的指示。具体地,服务器110可以根据比较(230)的结果而确定将预测结 果更新为搜索结果所需的操作数目。该操作数目例如可以是调整预测结果中的条目顺序或者更新条目内容所需的操作数目。如果该操作数目小于第一阈值数目,则可以向客户端设备120发送对预测结果的肯定指示。相应地,客户端设备120可以呈现预测结果。如果客户端设备120先前已经渲染了预测结果,则客户端设备120可以直接展示已渲染的预测结果。应当理解,第一阈值数目的具体值可以取决于对查询结果精度等方面的要求。例如,如果要求比较严苛,可以仅在预测结果与搜索结果一致的情况下,才发送肯定指示。又如,如果要求比较宽松,即使预测结果与搜索结果略有不同(例如,包括的条目相同但排序不同),也可以发送肯定指示。In some embodiments, the supplemental information may include instructions on how to process the search results. Specifically, the server 110 may determine, based on the result of the comparison (230), whether to process the predicted result. The number of operations required to update the prediction result to the search result. The number of operations may be, for example, the number of operations required to adjust the order of entries in the prediction result or update the content of the entry. If the number of operations is less than the first threshold number, a positive indication of the prediction result may be sent to the client device 120. Accordingly, the client device 120 may present the prediction result. If the client device 120 has previously rendered the prediction result, the client device 120 may directly display the rendered prediction result. It should be understood that the specific value of the first threshold number may depend on the requirements for aspects such as the accuracy of the query result. For example, if the requirements are more stringent, a positive indication may be sent only if the prediction result is consistent with the search result. For another example, if the requirements are more relaxed, a positive indication may be sent even if the prediction result is slightly different from the search result (for example, the entries included are the same but the order is different).
如果将预测结果更新为搜索结果所需的操作数目大于第二阈值数目,则服务器110可以向客户端设备120发送对预测结果的否定指示。相应地,客户端设备120放弃呈现预测结果。在这种情况下,服务器110可以将搜索结果发送给客户端设备120以供呈现。应当理解,第二阈值数目可以取决于对客户端设备120更新搜索结果所需的时间的估计。If the number of operations required to update the prediction result to the search result is greater than the second threshold number, the server 110 may send a negative indication of the prediction result to the client device 120. Accordingly, the client device 120 abandons presenting the prediction result. In this case, the server 110 may send the search result to the client device 120 for presentation. It should be understood that the second threshold number may depend on an estimate of the time required for the client device 120 to update the search result.
传统上,针对一个查询请求仅对应地以一次数据传输(例如一个数据包)提供搜索结果。在示例过程200中,通过在搜索引擎提供搜索结果之前生成预测数据并做提前下发,从而能够把搜索引擎耗时与预测结果的生成和下发并行起来,降低服务延迟。Traditionally, search results are provided with only one data transmission (e.g., one data packet) corresponding to one query request. In the example process 200, by generating and sending prediction data in advance before the search engine provides search results, the search engine time can be parallelized with the generation and sending of prediction results, thereby reducing service delays.
预测结果的生成Generation of prediction results
如上文参考图2所提及的,可以使用多种数据来源来生成预测结果。一种数据来源可以是历史查询的数据。例如,可以从候选历史查询中确定与当前查询匹配的至少一个历史查询,并且基于匹配的历史查询来生成预测结果。As mentioned above with reference to Figure 2, a variety of data sources can be used to generate prediction results. One data source can be data of historical queries. For example, at least one historical query matching the current query can be determined from candidate historical queries, and a prediction result can be generated based on the matching historical queries.
在一些实施例中,为了获得用于预测结果的更多候选条目,与当前查询匹配的历史查询不一定与当前查询完全一致。例如,如果当前查询和历史查询语义差别较小,则可以认为二者是匹配的。又如,当 前查询和历史查询语义中的重要特征一致性较高,例如对当前查询和历史查询做出贡献较大的术语之间的差异小于预定阈值,则可以认为当前查询和历史查询是匹配的。下文还将参考图3详细描述如何确定匹配的历史查询。In some embodiments, in order to obtain more candidate items for predicting results, the historical query that matches the current query does not necessarily have to be completely consistent with the current query. For example, if the semantic difference between the current query and the historical query is small, the two can be considered to be matched. If the important features in the semantics of the previous query and the historical query are highly consistent, for example, if the difference between the terms that contribute most to the current query and the historical query is less than a predetermined threshold, then the current query and the historical query can be considered to be matched. The following will also describe in detail how to determine the matching historical query with reference to FIG. 3.
为了预测针对当前查询的结果,服务器110可以预先构建适当的数据库,以存储和维护与候选历史查询有关的信息。在一些实施例中,服务器110可以存储每个查询最近一次的检索结果。进而服务器110可以找出与当前查询匹配的最近一次查询时间,并且基于该查询的搜索结果确定预测结果。例如,服务器110可以基于某一动物这一查询的上一次搜索结果来确定针对当前查询的预测结果。In order to predict the result for the current query, the server 110 may pre-build an appropriate database to store and maintain information related to the candidate historical queries. In some embodiments, the server 110 may store the most recent search result for each query. Then the server 110 may find the most recent query time that matches the current query, and determine the predicted result based on the search results of the query. For example, the server 110 may determine the predicted result for the current query based on the last search result of the query for a certain animal.
备选地或附加地,在一些实施例中,服务器110可以预先存储与一段历史时间(也称为“第二历史时间段”)内出现的查询有关的信息。这样的信息可以包括查询出现的时间分布、频次、每次的搜索结果等。例如,可以每个小时计算过去一段时间(例如过去24小时)内每个查询出现的时间、搜索结果中出现次数多的条目等。Alternatively or additionally, in some embodiments, the server 110 may pre-store information related to queries that appeared within a period of historical time (also referred to as a "second historical time period"). Such information may include the time distribution of query appearances, frequency, search results of each time, etc. For example, the time when each query appeared within a period of time (e.g., the past 24 hours), the items that appeared the most times in the search results, etc. may be calculated every hour.
在这种实施例中,在接收到当前查询后,服务器110可以确定在这段历史时间内出现的与当前查询匹配的多个历史查询,并且可以基于这些历史查询来生成预测结果。通过引入过去一段时间的历史查询,可以获得更多候选数据。以此方式,可以有利于提高预测结果的命中率,从而减小客户端设备对预测结果的更新操作。In this embodiment, after receiving the current query, the server 110 can determine multiple historical queries that appear during this historical period and match the current query, and can generate prediction results based on these historical queries. By introducing historical queries over a period of time in the past, more candidate data can be obtained. In this way, it can be helpful to improve the hit rate of the prediction results, thereby reducing the update operation of the client device on the prediction results.
在一些实施例中,在利用相匹配的历史查询时可以进一步考虑这些历史查询(也可以视为同一查询的多次搜索)的搜索结果的离散程度。具体地,可以确定针对这多个历史查询的多个历史搜索结果的离散程度,并且在离散程度较低的情况下才根据这些历史搜索结果确定预测结果。离散程度较低,则说明历史搜索结果较好,所以可以用作预测结果。在一些实施例中,如果确定离散程度小于阈值离散程度,则基于多个历史搜索结果确定预测结果。In some embodiments, when using matched historical queries, the discreteness of the search results of these historical queries (which can also be regarded as multiple searches of the same query) can be further considered. Specifically, the discreteness of multiple historical search results for these multiple historical queries can be determined, and the prediction results are determined based on these historical search results only when the discreteness is low. A low discreteness indicates that the historical search results are good, so they can be used as prediction results. In some embodiments, if it is determined that the discreteness is less than a threshold discreteness, the prediction results are determined based on multiple historical search results.
有时历史查询可能实时性较差,例如历史查询可能包括从当前时间点往前推24小时以内的查询。有鉴于此,除了历史查询之外或者 作为对历史查询的替代,在一些实施例中,预测结果的数据来源可以包括在距当前时间点较近的一段历史时间(即,第一历史时间段,例如最近6小时)内新创建或者新发布的数据,比如视频、图像、文字等,下文将其称为“候选搜索数据”。然后,可以基于这些候选搜索数据来生成预测结果。通过这种方式,可以使用流式的数据来补充相对实时的数据,将流式的数据和离线统计的数据融合在一起来确定预测结果。Sometimes historical queries may not be real-time enough. For example, historical queries may include queries within 24 hours from the current time point. As an alternative to historical queries, in some embodiments, the data source of the prediction results may include data that is newly created or newly released within a period of historical time (i.e., the first historical time period, such as the last 6 hours) close to the current time point, such as videos, images, text, etc., which are referred to as "candidate search data" below. Then, the prediction results can be generated based on these candidate search data. In this way, streaming data can be used to supplement relatively real-time data, and streaming data and offline statistical data can be merged together to determine the prediction results.
举例而言,可以从离线数据流来获取创建时间距离请求发起时间在6小时以内的数据,作为候选搜索数据。在一些实施例中,可以将候选搜索数据存储到数据库中,例如写入到与历史查询相同的数据库中。例如,可以将数据创建的时间戳作为分数(score),并且在另外一个键值(key)下记录6小时内的计数。服务器110可以从该数据库中获取候选搜索数据并据此确定预测结果。For example, data with a creation time within 6 hours from the request initiation time can be obtained from the offline data stream as candidate search data. In some embodiments, the candidate search data can be stored in a database, for example, written to the same database as the historical query. For example, the timestamp of data creation can be used as a score, and the count within 6 hours can be recorded under another key value. The server 110 can obtain the candidate search data from the database and determine the prediction result accordingly.
在一些实施例中,可以基于预定策略来确定是否使用这种实时性更强的候选搜索数据。例如,如果与当前查询匹配的历史查询的数目小于阈值数目,则可以从候选搜索数据中确定与当前查询匹配的数据作为预测结果的至少一部分。又如,如果与当前查询匹配的历史查询集中出现在靠近当前时间点的时间,则在生成预测结果时可以使用候选搜索数据。匹配的历史查询数目少或匹配的历史查询最近集中出现,可能意味着当前查询具有较强的实时性。因此,这种情况下可以使用候选搜索数据。In some embodiments, whether to use such more real-time candidate search data can be determined based on a predetermined strategy. For example, if the number of historical queries that match the current query is less than a threshold number, the data that matches the current query can be determined from the candidate search data as at least a part of the predicted result. For another example, if the historical queries that match the current query appear in a concentrated time close to the current time point, the candidate search data can be used when generating the predicted result. A small number of matching historical queries or a recent concentrated appearance of matching historical queries may mean that the current query has a stronger real-time nature. Therefore, the candidate search data can be used in this case.
与候选历史查询有关的信息和/或候选搜索数据可以存储在数据库中作为预存数据或称为历史数据,以用作预测的数据来源。如前文所简要提及的,历史数据可以按照不同区域来分别进行存储和维护。区域例如可以按照地理位置、语言类型、行政区划等来划分。举例而言,可以将位于同一大洲的不同国家或地区划分到同一区域中,也可以将官方语言相同的国家或地区划分到同一区域中,还可以按照国家和地区的行政区划来区分不同区域。应当理解,上述对于区域的描述仅仅是示例性的,而不是限制性的,本公开的实施例可以通过多种适 当的方式来进行区域划分。历史数据可以包括与某一区域相关联的如下数据,例如但不限于,与当前查询相匹配的历史查询,最近一段时间创建的候选搜索数据,等等。Information related to candidate historical queries and/or candidate search data can be stored in a database as pre-stored data or historical data to be used as a data source for prediction. As briefly mentioned above, historical data can be stored and maintained separately according to different regions. Regions can be divided, for example, according to geographical location, language type, administrative divisions, etc. For example, different countries or regions located in the same continent can be divided into the same region, countries or regions with the same official language can be divided into the same region, and different regions can be distinguished according to the administrative divisions of countries and regions. It should be understood that the above description of regions is merely exemplary and not restrictive, and the embodiments of the present disclosure can be implemented through a variety of suitable The historical data may include the following data associated with a certain area, such as but not limited to, historical queries matching the current query, candidate search data created in the recent period, and the like.
利用这种按区域维护的历史数据,可以进行按区域的预测。具体来说,可以基于当前用户的简档,确定与当前用户相关联的区域(下文也称为“第一区域”)。例如,第一区域可以是当前用户注册信息中指示的区域,或者当前用户所使用的语言所对应的区域。又如,第一区域可以是当前用户在发起当前查询时所处于的区域。但应当理解,无论以何种方案确定第一区域,都应当获得用户的授权或许可。而后,可以基于与第一区域相对应的历史数据,确定预测结果,如上文所描述的那样。在这种实施例中,第一区域可以视为目标区域。By utilizing this historical data maintained by region, predictions by region can be performed. Specifically, the region associated with the current user (hereinafter also referred to as the "first region") can be determined based on the profile of the current user. For example, the first region may be the region indicated in the current user's registration information, or the region corresponding to the language used by the current user. As another example, the first region may be the region where the current user is located when initiating the current query. However, it should be understood that no matter what scheme is used to determine the first region, the user's authorization or permission should be obtained. Then, the prediction result can be determined based on the historical data corresponding to the first region, as described above. In this embodiment, the first region can be regarded as the target region.
在一些实施例中,可以针对当前查询进行跨区域预测。例如,如果在与第一区域相对应的历史数据中未查找到针对当前查询的结果,则可以确定与当前查询匹配的历史查询(例如,最近一次查询)所对应的区域(下文也称为“第二区域”),作为目标区域。而后,可以基于与第二区域相对应的历史数据确定预测结果。In some embodiments, cross-region prediction can be performed for the current query. For example, if no result for the current query is found in the historical data corresponding to the first region, the region corresponding to the historical query (e.g., the most recent query) matching the current query (hereinafter also referred to as the "second region") can be determined as the target region. Then, the prediction result can be determined based on the historical data corresponding to the second region.
例如,可以在与第二区域相对应的历史数据中查找与当前查询匹配的多个历史查询,并且基于这些历史查询来进行预测。又如,可以基于与第二区域相对应的实时性更强的候选搜索数据进行预测。通过跨区域进行预测,可以进一步扩大预测的数据来源,从而提高预测结果的命中率。For example, multiple historical queries matching the current query can be searched in the historical data corresponding to the second region, and predictions can be made based on these historical queries. For another example, predictions can be made based on more real-time candidate search data corresponding to the second region. By making predictions across regions, the data sources for predictions can be further expanded, thereby improving the hit rate of prediction results.
备选地或附加地,在一些实施例中,预测结果的数据来源可以包括发起当前查询的当前用户的简档。用户的简档可以包括用户的基本信息,例如用户关注了哪些账号、点赞信息、评论内容、转发情况等。服务器110可以基于简档来确定当前查询是否指示与当前用户相关联的另一用户。如果指示,则可以将与当前用户有关的信息确定为预测结果的至少一部分。举例而言,服务器110可以首先确定当前查询“张XX”具有“搜用户”意图。而后可以根据当前用户的简档确定张XX是当前用户所关注的另一用户。相应地,可以将“张XX”的信息, 例如标识信息、介绍信息、所发布的媒体内容列表等作为预测结果的至少一部分。Alternatively or additionally, in some embodiments, the data source of the prediction result may include the profile of the current user who initiated the current query. The user's profile may include basic information about the user, such as which accounts the user follows, like information, comment content, forwarding status, etc. Server 110 may determine whether the current query indicates another user associated with the current user based on the profile. If so, information related to the current user may be determined as at least part of the prediction result. For example, server 110 may first determine that the current query "Zhang XX" has the intent of "searching for users". Then, based on the current user's profile, it may determine that Zhang XX is another user followed by the current user. Accordingly, the information of "Zhang XX" may be included in the prediction result. For example, identification information, introduction information, a list of published media contents, etc. are used as at least a part of the prediction result.
应当理解,本公开的实施例中对用户简档的使用已经事先获得了用户的授权。此外,用户简档的使用旨在于向用户提供服务,而不旨在于暴露敏感和隐私信息。It should be understood that the use of the user profile in the embodiments of the present disclosure has obtained the user's authorization in advance. In addition, the use of the user profile is intended to provide services to the user, but not intended to expose sensitive and private information.
根据本公开的技术方案,有诸多数据来源用于确定针对查询的预测结果,这些数据来源的使用策略可以灵活调整/迭代,从得能够得到准确的预测结果。以此方式得到的预测结果可能仅需少量的更新操作,甚至无需更新操作。此外,本公开的技术方案能够快速灵活准确地为用户的搜索请求提供搜索结果,同时约束条件少,适用于广泛应用。According to the technical solution of the present disclosure, there are many data sources for determining the prediction results for the query, and the use strategies of these data sources can be flexibly adjusted/iterated, so that accurate prediction results can be obtained. The prediction results obtained in this way may only require a small number of update operations, or even no update operations. In addition, the technical solution of the present disclosure can quickly, flexibly and accurately provide search results for the user's search request, with few constraints, and is suitable for a wide range of applications.
服务器处的示例搜索过程Example search process at the server
图3示出了根据本公开的一些实施例的执行搜索过程300的示意图。过程300可以在提供搜索服务的服务器侧实现。为了便于讨论,以下借助于图1的环境100,特别是服务器110,来描述图3的过程300。应当理解,这仅仅是示例性的,无意对本公开的实施例进行任何限制。FIG3 shows a schematic diagram of performing a search process 300 according to some embodiments of the present disclosure. The process 300 can be implemented on the server side that provides the search service. For ease of discussion, the process 300 of FIG3 is described below with reference to the environment 100 of FIG1 , in particular the server 110. It should be understood that this is merely exemplary and is not intended to limit the embodiments of the present disclosure in any way.
在框310,服务器110接收来自客户端设备120的查询。响应于该查询,服务器110可以查找并加载在客户端设备120发起该查询的用户的信息。然后,服务器110可以并行执行两个分支,一个分支是常规搜索结果的确定,另一分支是预测结果的生成和传输。At block 310, the server 110 receives a query from the client device 120. In response to the query, the server 110 may find and load information of the user who initiated the query at the client device 120. The server 110 may then perform two branches in parallel, one branch being the determination of regular search results and the other branch being the generation and transmission of predicted results.
如图3所示,在常规搜索结果的确定分支,过程300进入框320,服务器110在此确定针对该查询的常规搜索结果。具体地,服务器110进行引擎召回排序,利用搜索引擎生成针对来自客户端设备120的查询的搜索结果。召回是根据输入的查询,获取与查询相关的候选内容集合的过程。排序则可以是对候选内容集合中的内容进行排序。相关的候选内容集合如果不能被召回,即使后续排序方法非常优化,也无法提供针对查询的搜索结果。因此,召回对于搜索引擎是非常重要的,其决定了搜索引擎的质量。召回可以通过多种已有的算法来实现,例 如基于词的传统召回、基于向量的语义召回,等等,在此不再赘述。As shown in FIG3 , in the determination branch of the regular search results, the process 300 enters box 320, where the server 110 determines the regular search results for the query. Specifically, the server 110 performs engine recall sorting, and uses the search engine to generate search results for the query from the client device 120. Recall is the process of obtaining a set of candidate content related to the query based on the input query. Sorting can be to sort the content in the candidate content set. If the relevant candidate content set cannot be recalled, even if the subsequent sorting method is very optimized, it cannot provide search results for the query. Therefore, recall is very important for the search engine, which determines the quality of the search engine. Recall can be achieved through a variety of existing algorithms, such as Such as traditional word-based recall, vector-based semantic recall, etc., which will not be elaborated here.
框320的引擎召回排序过程通常较为耗时,例如600ms。在根据本公开的实施例中,通过并行执行搜索引擎的召回排序(框320)和预测数据的相关处理(框330至框350),可以减少处理耗时,提高处理效率。The engine recall sorting process of frame 320 is usually time-consuming, for example, 600ms. In an embodiment according to the present disclosure, by executing the recall sorting of the search engine (frame 320) and the related processing of the prediction data (frames 330 to 350) in parallel, the processing time can be reduced and the processing efficiency can be improved.
与框320的引擎召回排序相并行地,在预测结果的生成和传输分支,过程300进入框330。在框330,服务器110生成预测结果。如前所述,预测结果可以具有多种数据来源。例如,与当前查询匹配的至少一个历史查询、在某段历史时间内创建的候选搜索数据、发起当前查询的用户的简档,等等。In parallel with the engine recall ranking of block 320, in the prediction result generation and transmission branch, process 300 enters block 330. In block 330, server 110 generates prediction results. As mentioned above, the prediction results can have a variety of data sources. For example, at least one historical query matching the current query, candidate search data created within a certain period of historical time, the profile of the user who initiated the current query, and so on.
在一些实施例中,可以利用离线统计数据来确定预测结果。离线统计数据例如是与过去一段时间的历史查询相关的数据。In some embodiments, offline statistical data may be used to determine the prediction result. The offline statistical data may be, for example, data related to historical queries over a period of time in the past.
离线统计数据可以按照区域进行分类,区域例如可以按照地理位置(例如按照经度、纬度、大洲等)、语言类型、行政区划(例如按照国家、地区等)等来划分。用户的简档可以包括用户与哪个/哪些区域相关联。这样,通过用户的简档,可以确定与进行查询的用户相关联的区域,从而获得该区域中的离线统计数据,进而得到与当前查询匹配的一个或多个历史查询。Offline statistics can be classified by region, and the region can be divided, for example, by geographical location (e.g., by longitude, latitude, continent, etc.), language type, administrative division (e.g., by country, region, etc.), etc. The user's profile can include which region(s) the user is associated with. In this way, the region associated with the user making the query can be determined through the user's profile, so as to obtain offline statistics in the region, and then obtain one or more historical queries matching the current query.
如果在上述区域(也称为第一区域)的离线统计数据中没有找到与当前查询匹配的一个或多个历史查询,则可以去查找另一区域(也称为第二区域)的离线统计数据。第二区域例如可以按照与第一区域具有相同查询数目的降序来确定。例如,可以从与第一区域具有相同查询数目最多的前N个国家(N为正整数,例如8)中来确定第二区域。例如,可以对这N个国家按照相同查询数目进行降序排列,在其中某个区域中的离线统计数据中得不到当前查询匹配的历史查询,则可以转到排序靠后的区域继续查找。If one or more historical queries matching the current query are not found in the offline statistics of the above region (also referred to as the first region), the offline statistics of another region (also referred to as the second region) can be searched. The second region can be determined, for example, in descending order of the number of queries with the same number as the first region. For example, the second region can be determined from the top N countries (N is a positive integer, such as 8) with the largest number of queries with the first region. For example, these N countries can be sorted in descending order according to the same number of queries, and if no historical queries matching the current query are found in the offline statistics of a certain region, the search can be continued in the region with a lower ranking.
在一些实施例中,为了提升命中率和可维护性,可以针对每次查询,把该查询对应的区域记录下来,如果后续收到相同查询,可以直接在所记录的区域中的离线统计数据中确定与该查询匹配的历史查 询。作为替代方案,可以首先在当前区域的离线统计数据中查找与该查询匹配的历史查询,在查找不到的情况下,再去查找在所记录的区域。In some embodiments, in order to improve the hit rate and maintainability, the area corresponding to each query can be recorded. If the same query is received later, the historical query matching the query can be directly determined from the offline statistical data in the recorded area. As an alternative, you can first search for historical queries matching the query in the offline statistics of the current area, and if no historical queries are found, then search in the recorded area.
可以通过多种方式从离线统计数据中确定与从客户端设备120接收到的查询相匹配的历史查询。在一些实施例中,可以通过查询标准化或归一化的方式进行。作为替代方案,在一些实施例中,可以通过术语匹配的方式来确定查询相匹配的历史查询。The historical queries matching the query received from the client device 120 can be determined from the offline statistics in a variety of ways. In some embodiments, this can be done by query standardization or normalization. Alternatively, in some embodiments, the historical queries matching the query can be determined by term matching.
在采用查询标准化确定匹配的历史查询的实施例中,可以根据语义判断两个查询是否匹配。例如,如果一个查询为“hello,world”,而另一查询为“hello world”,则由于这两个查询的语义相同,区别仅在于用于辅助的标点,因此可以认为这两个查询是匹配的。In an embodiment where query normalization is used to determine matching historical queries, it is possible to determine whether two queries match based on semantics. For example, if one query is "hello, world" and the other query is "hello world", then the two queries are considered to match because they have the same semantics and differ only in the punctuation used for assistance.
在一些实施例中,考虑到部分语种的特殊性,可以进行两级处理。在第一级处理中,首先可以利用规则做标准化。这样的规则例如包括但不限于,多个空格转换成一个空格,去除标点符号,消除某些语系(例如欧洲语系)的重音符号,等等。由于通常这类重音符号表示强调,而无单独语义,因此在此予以消除以进行标准化。在第二级处理中,可以首先对查询进行分析,并根据分析结果对查询中的术语进行标准化。这种标准化可能会对语义具有一定影响,也可能会去掉时态、单复数等信息。例如,查询中包含的术语“apples”可能被调整为“apple”。作为备选方案,在采用术语匹配方式来确定匹配的历史查询的实施例中,可以在进行查询分析后得到是对查询分词以后的每个术语,还可以得到每个术语对整个查询在语义方面的贡献度,也称为术语重要性,此外还可以确定查询的意图,和/或其他信息。利用这些信息,可以通过去掉查询对应的一部分语义,来换取到更多的匹配历史查询,从而提升命中率。In some embodiments, considering the particularity of some languages, two-level processing can be performed. In the first level of processing, first, rules can be used for standardization. Such rules include, for example, but are not limited to, converting multiple spaces into one space, removing punctuation marks, eliminating accent marks of certain languages (such as European languages), and so on. Since such accent marks usually indicate emphasis without separate semantics, they are eliminated here for standardization. In the second level of processing, the query can be analyzed first, and the terms in the query can be standardized according to the analysis results. This standardization may have a certain impact on semantics, and may also remove information such as tense, singular and plural. For example, the term "apples" contained in the query may be adjusted to "apple". As an alternative, in an embodiment of a historical query that uses a term matching method to determine matching, each term after the query segmentation can be obtained after query analysis, and the contribution of each term to the entire query in terms of semantics, also known as term importance, can also be obtained. In addition, the intent of the query and/or other information can also be determined. Using this information, more matching historical queries can be obtained by removing a part of the semantics corresponding to the query, thereby improving the hit rate.
作为对离线统计数据的补充,在一些备选或附加实施例中,可以使用流式的数据来提供相对实时的结果,也即,将流式的数据应用于预测结果的确定过程中。举例而言,可以从离线数据流来获取在某段历史时间内创建的候选搜索数据,例如创建时间距离请求发起时间在 该历史时间段(例如距当前时间最近的6小时)以内的数据。在一些实施例中,可以候选搜索数据存储到数据库中。服务器110可以从该数据库中获取候选搜索数据并通过一定策略决定对哪部分数据进行打包。As a supplement to offline statistical data, in some alternative or additional embodiments, streaming data can be used to provide relatively real-time results, that is, streaming data is applied to the process of determining the prediction results. For example, candidate search data created within a certain period of time can be obtained from the offline data stream, such as the creation time is within 100 seconds of the request initiation time. Data within the historical time period (e.g., the 6 hours closest to the current time). In some embodiments, the candidate search data can be stored in a database. The server 110 can obtain the candidate search data from the database and decide which part of the data to package through a certain strategy.
作为用于确定预测结果的另一备选方案,在一些情况下,服务器110可以根据从客户端设备120接收到的查询来判断用户的搜索意图,例如搜索内容还是搜索人物等。如果发现用户查询中涉及的是人物并且与该人物有关的数据较少,比如用户搜索的是一个普通朋友,则有可能针对该查询的历史查询或者相关候选搜索数据量很少或不存在。这种情况下,为了避免无法得到预测数据或者得到的预测数据不准确,例如,来自客户端设备120的查询有时可能包括用户的唯一标识,例如uniq_id。通过用户的唯一标识和当前用户的简档,可以确定当前用户想要查询的是不是自己的好友或者关注的对象。如果是,则可以提高预测结果的准确率和命中率。以此方式,对于属于用户意图并且无法获取到预测数据的情况,可以通过查询用户简档的方式来得到质量更好的预测数据。As another alternative for determining the prediction result, in some cases, the server 110 can determine the user's search intention based on the query received from the client device 120, such as searching for content or searching for people. If it is found that the user query involves a person and there is less data related to the person, such as the user is searching for an ordinary friend, it is possible that there are few or no historical queries or related candidate search data for the query. In this case, in order to avoid being unable to obtain the prediction data or obtaining inaccurate prediction data, for example, the query from the client device 120 may sometimes include the user's unique identifier, such as uniq_id. Through the user's unique identifier and the current user's profile, it can be determined whether the current user wants to query his or her friends or the object of concern. If so, the accuracy and hit rate of the prediction result can be improved. In this way, for the case where the user's intention is to obtain the prediction data and the prediction data cannot be obtained, the prediction data of better quality can be obtained by querying the user profile.
在得到预测结果后,服务器110在框340对预测结果进行打包。由于打包也可能是一个较为耗时的过程,例如200ms,通过这种并行处理的方式,可以有效提高服务器110的处理效率。然后,在框350,服务器110将打包后的预测数据发送给客户端设备120。After obtaining the prediction results, the server 110 packages the prediction results in block 340. Since packaging may also be a relatively time-consuming process, for example, 200 ms, this parallel processing method can effectively improve the processing efficiency of the server 110. Then, in block 350, the server 110 sends the packaged prediction data to the client device 120.
客户端设备120接收到预测数据后可以对预测数据进行预处理,比如进行渲染。由于渲染是一个较为耗时的过程,例如200ms,因此在客户端设备120展示针对查询的最终结果之前,这个最终结果有可能是预测数据也有可能是预测数据利用更新信息调整之后的结果,客户端设备120可以在服务器110利用搜索引擎确定搜索结果的较长时间期间提前完成较为耗时的渲染操作,仅需在收到服务器110的肯定确认或更新信息后完成展示操作。以此方式,可以有效提高客户端设备120的对于最终结果的展示效率。After receiving the prediction data, the client device 120 can pre-process the prediction data, such as rendering. Since rendering is a relatively time-consuming process, for example, 200ms, before the client device 120 displays the final result for the query, the final result may be the prediction data or the result after the prediction data is adjusted using the update information. The client device 120 can complete the relatively time-consuming rendering operation in advance during the long time that the server 110 uses the search engine to determine the search results, and only needs to complete the display operation after receiving the positive confirmation or update information from the server 110. In this way, the display efficiency of the client device 120 for the final result can be effectively improved.
在获得预测结果与搜索结果之后,服务器110将二者进行比较, 例如,在框360,服务器110判断预测结果是否命中搜索引擎在进行召回排序后所提供的搜索结果。基于比较的结果,服务器110向客户端设备120发送与预测结果的后续处理有关的补充信息。补充信息例如可以包括但不限于,针对预测结果的肯定指示、否定指示、更新信息,等等。After obtaining the prediction result and the search result, the server 110 compares the two. For example, in block 360, the server 110 determines whether the prediction result hits the search result provided by the search engine after recall sorting. Based on the comparison result, the server 110 sends supplementary information related to subsequent processing of the prediction result to the client device 120. The supplementary information may include, but is not limited to, a positive indication, a negative indication, update information, etc. for the prediction result.
具体而言,如果在框360判断预测结果命中,则服务器110可以在框370向客户端设备120发送针对预测结果的肯定指示。客户端设备120在接收到该肯定指示后,则可以知道预测结果是准确的,无需调整即可展示。如果预测结果未命中,则服务器110可以在框395向客户端设备120发送针对预测结果的否定指示。客户端设备120收到否定指示后,可知预测结果是不准确的,并可以直接抛弃该预测结果。在预测结果是部分命中的情况下,服务器可以在框380基于预测结果和搜索结果二者比较的结果,生成用于将预测结果更新为搜索结果的更新信息,并在框390将该更新信息发送给客户端设备120。客户端设备120接收到更新信息后可以将之前接收到的预测结果更新为搜索结果,并呈现搜索结果。Specifically, if it is determined in box 360 that the predicted result hits, the server 110 may send a positive indication of the predicted result to the client device 120 in box 370. After receiving the positive indication, the client device 120 may know that the predicted result is accurate and can be displayed without adjustment. If the predicted result does not hit, the server 110 may send a negative indication of the predicted result to the client device 120 in box 395. After receiving the negative indication, the client device 120 may know that the predicted result is inaccurate and may directly discard the predicted result. In the case where the predicted result is a partial hit, the server may generate update information for updating the predicted result to the search result based on the result of the comparison between the predicted result and the search result in box 380, and send the update information to the client device 120 in box 390. After receiving the update information, the client device 120 may update the previously received predicted result to the search result and present the search result.
从图3所描述的示例过程中,从时间维度上看,耗时较长的引擎召回排序与预测结果生成、打包、传输以及可选的客户端渲染并行。与之相比,在传统方案中,引擎召回排序、搜索结果打包、传输和客户端渲染是完全串行的。因此,在本公开的实施例中,有利于提高搜索服务速度。From the example process described in FIG. 3 , from the perspective of time dimension, the time-consuming engine recall sorting is parallel to the prediction result generation, packaging, transmission, and optional client rendering. In contrast, in the traditional solution, the engine recall sorting, search result packaging, transmission, and client rendering are completely serial. Therefore, in the embodiments of the present disclosure, it is beneficial to improve the search service speed.
生成补充信息的示例过程Example procedure for generating supplementary information
图4示出了根据本公开的一些实施例的提供补充信息的过程400的示意图。过程400可以在服务器侧实现。为了便于讨论,以下借助于图1的环境100,特别是服务器110,来描述图4的过程400。应当理解,这仅仅是示例性的,无意对本公开的实施例进行任何限制。FIG. 4 shows a schematic diagram of a process 400 for providing supplemental information according to some embodiments of the present disclosure. The process 400 can be implemented on the server side. For ease of discussion, the process 400 of FIG. 4 is described below with reference to the environment 100 of FIG. 1 , particularly the server 110. It should be understood that this is merely exemplary and is not intended to limit the embodiments of the present disclosure in any way.
在框410,服务器110对预测结果和搜索结果进行初始化。预测结果例如可以是在框215或框330得到的,并且可以包括有序排列的 多个条目(即,条目序列)。搜索结果例如是通过搜索引擎得到的针对当前查询的多个条目的集合,其可以被实现为条目序列。服务器110可以对预测结果和搜索结果中的各条目分别进行排序,从而确定出预测结果中各个条目的顺序以及搜索结果中各个条目的顺序。In block 410, the server 110 initializes the prediction results and search results. The prediction results may be obtained, for example, in block 215 or block 330, and may include ordered Multiple items (i.e., item sequence). The search results are, for example, a collection of multiple items for the current query obtained by a search engine, which can be implemented as an item sequence. The server 110 can sort the items in the prediction results and the search results respectively, thereby determining the order of the items in the prediction results and the order of the items in the search results.
在框415,服务器110对预测结果进行重排。例如,服务器110可以根据搜索结果中各个条目的顺序,对预测结果中顺序不对应的条目进行重新排序。在一些实施例中,考虑到需要加速展示给用户的是展示在首屏的条目,所以在框415可以只对一部分预测结果进行重新排序,例如,只对预测结果中的用于首屏展示的条目(诸如前6个条目)进行重新排序。In block 415, the server 110 reorders the prediction results. For example, the server 110 may reorder the items in the prediction results that are not in the same order according to the order of the items in the search results. In some embodiments, considering that the items displayed on the first screen need to be displayed to the user at an accelerated speed, only a portion of the prediction results may be reordered in block 415, for example, only the items in the prediction results that are used for first screen display (such as the first 6 items) are reordered.
在框420,针对预测结果中的条目和搜索结果中的条目计算最小编辑距离。在本公开的实施例中,编辑距离是针对条目序列的差异程度的量化量测。编辑距离的确定方式例如可以是确定至少需要多少次的处理才能将一个条目序列变成另一个条目序列。编辑距离例如可以包括莱文斯坦(Levenshtein)距离,其允许条目添加、条目删除和条目替换等操作,也可以包括Damerau-Levenshtein距离等。Damerau-Levenshtein距离是在莱文斯坦距离的基础上,允许交换相邻的两个条目。对于编辑距离的计算可以采用非加权或加权的方式。可以为编辑距离涉及的每个操作都赋予不同的权重。例如,交换、修改、添加和删除操作的权重可以分别是0、2、1和3。应当理解,每种操作及其权重的以上示例仅仅是说明性的,而不是对本公开的实施例的任何限制。本公开的实施例在编辑距离的确定过程中可以为操作设置任何适当的权重。In box 420, the minimum edit distance is calculated for the entries in the predicted results and the entries in the search results. In an embodiment of the present disclosure, the edit distance is a quantitative measure of the degree of difference between the entry sequences. The edit distance can be determined, for example, by determining how many times at least one sequence of entries is required to transform one sequence of entries into another sequence of entries. The edit distance can include, for example, the Levenshtein distance, which allows operations such as entry addition, entry deletion, and entry replacement, and can also include the Damerau-Levenshtein distance, etc. The Damerau-Levenshtein distance allows the exchange of two adjacent entries based on the Levenshtein distance. The calculation of the edit distance can be non-weighted or weighted. Different weights can be assigned to each operation involved in the edit distance. For example, the weights of the exchange, modification, addition, and deletion operations can be 0, 2, 1, and 3, respectively. It should be understood that the above examples of each operation and its weight are merely illustrative and not any limitation to the embodiments of the present disclosure. The embodiments of the present disclosure can set any appropriate weights for the operations in the process of determining the edit distance.
将预测结果的条目序列编辑为搜索结果的条目序列可能存在多个编辑路径,每个编辑路径包括一个或多个编辑操作。每个编辑路径的编辑距离可能不同。因此,可以在框420计算将预测结果的条目序列转换为搜索结果的编辑序列的最小编辑距离。以此方式,可以降低客户端设备120编辑预测结果的负荷,从而提高搜索结果的展示速度。There may be multiple editing paths for editing the entry sequence of the prediction results into the entry sequence of the search results, and each editing path includes one or more editing operations. The editing distance of each editing path may be different. Therefore, the minimum editing distance for converting the entry sequence of the prediction results into the editing sequence of the search results can be calculated in box 420. In this way, the load of editing the prediction results of the client device 120 can be reduced, thereby improving the display speed of the search results.
在框425,生成编辑操作。例如,可以根据在框420得到的最小 编辑距离推出要执行的一个或多个编辑操作。在此可以利用任何合适的方式来得出与最小编辑距离对应的编辑操作。本公开的范围在此方面不受限制。At block 425, an edit operation is generated. For example, the minimum The edit distance derives one or more edit operations to be performed. Any suitable method may be used to derive the edit operation corresponding to the minimum edit distance. The scope of the present disclosure is not limited in this respect.
在框430,生成条目更新包。根据框425得到的编辑操作,可以生成用于调整预测结果中的条目位置的更新信息,并将该更新信息打包为更新包。In block 430, an entry update package is generated. According to the editing operation obtained in block 425, update information for adjusting the position of the entry in the prediction result may be generated, and the update information may be packaged into an update package.
在框435,校验条目顺序。在此对于调整后的预测结果中的条目顺序和与搜索结果中的条目顺序进行比较,以确定二者是否一致。校验完成以后,在框440,生成针对条目子元素的更新包。条目子元素可以是上文所描述的对象描述元素。例如,对于涉及媒体内容的条目,条目子元素可以包括字段,诸如点赞数、评论数、转达数等。又如,对于涉及对象信息的条目,条目子元素可以包括与对象相关的所发布的视频的列表等。In box 435, the order of the entries is verified. Here, the order of the entries in the adjusted prediction results is compared with the order of the entries in the search results to determine whether the two are consistent. After the verification is completed, in box 440, an update package for the entry sub-elements is generated. The entry sub-elements can be the object description elements described above. For example, for entries involving media content, the entry sub-elements can include fields such as the number of likes, the number of comments, the number of forwardings, etc. For another example, for entries involving object information, the entry sub-elements can include a list of published videos related to the object, etc.
在框445,执行边界条件校验。在此过程中,可以校验是否满足返回更新包的条件。例如,替换操作和添加操作的总数目不能超过2个。In block 445, a boundary condition check is performed. In this process, it can be checked whether the conditions for returning the update package are met. For example, the total number of replacement operations and addition operations cannot exceed 2.
如果边界条件校验成功,在框450,生成针对条目的额外更新包。额外更新包例如可以包括需要告知客户端设备120的其他信息,比如彩蛋等。If the boundary condition check succeeds, an additional update package for the entry is generated in block 450. The additional update package may include other information that needs to be notified to the client device 120, such as Easter eggs.
在框455,根据边界条件校验的结果,反馈命中情况。如果校验的结果指示无需编辑操作,则意味着完全命中。在这种情况下,服务器110可以向客户端设备120发送肯定指示,例如将指示中的ACK设置为值0。可以理解的是,在这种情况下,在框430处生成的条目更新包可以为空,在框440处生成的子元素更新包可以为空也可以不为空。At block 455, the hit status is fed back based on the result of the boundary condition check. If the result of the check indicates that no editing operation is required, it means a complete hit. In this case, the server 110 may send a positive indication to the client device 120, for example, setting the ACK in the indication to a value of 0. It is understood that, in this case, the entry update package generated at block 430 may be empty, and the sub-element update package generated at block 440 may be empty or not empty.
如果不满足返回更新包的条件,例如替换操作和添加操作的总数目超过2个,则意味着不命中。在这种情况下,服务器110可以向客户端设备120发送否定指示,例如将指示中的ACK设置为值-1。可以理解的是,在这种情况下,在框430处生成的条目更新包以及在框 440处生成的子元素更新包可以均为空。If the condition for returning the update packet is not met, for example, the total number of replacement operations and addition operations exceeds 2, it means a miss. In this case, the server 110 may send a negative indication to the client device 120, for example, setting the ACK in the indication to a value of -1. It is understood that in this case, the entry update packet generated at block 430 and the entry update packet generated at block The sub-element update packages generated at 440 may all be empty.
如果满足返回更新包的条件,例如替换操作和添加操作的总数目不超过2个,则意味着可以将预测结果更新为搜索结果。在这种情况下,服务器110可以向客户端设备120发送更新信息,更新信息例如可以以更新包的方式来发送。客户端设备120可以按照更新信息所指示的条目编辑操作来将预测结果调整为搜索结果,从而以高效方式快速得到较为准确的搜索结果。If the condition for returning the update package is met, for example, the total number of replacement operations and addition operations does not exceed 2, it means that the prediction result can be updated to the search result. In this case, the server 110 can send update information to the client device 120, and the update information can be sent in the form of an update package, for example. The client device 120 can adjust the prediction result to the search result according to the entry editing operation indicated by the update information, so as to quickly obtain a more accurate search result in an efficient manner.
在一些实施例中,发送给客户端设备120的预测结果例如包括用于首屏展示的条目,因此后续可以在框460确定要提供给客户端设备120的其他条目的个数。例如,假设在客户端设备120处首屏可以展示6个条目,而搜索结果中用于首页展示的总共包括10个条目,则在框460可以确定还需要提供给客户端设备120的条目数,也即,4个条目。In some embodiments, the prediction results sent to the client device 120 include, for example, entries for first screen display, so the number of other entries to be provided to the client device 120 can be determined in block 460. For example, assuming that 6 entries can be displayed on the first screen at the client device 120, and the search results for home page display include a total of 10 entries, then in block 460 it can be determined that the number of entries that need to be provided to the client device 120 is 4 entries.
关于预测结果向客户端设备120的首次发送,可以通过多种方式来实现。在一些实施例中,如果首屏需要6条,则可以从服务器110向客户端设备120实际发送M条(M是大于或等6的整数),在客户端设备120从这M个条目中选6条在首屏展示。The first sending of the prediction results to the client device 120 can be implemented in a variety of ways. In some embodiments, if the first screen requires 6 items, M items (M is an integer greater than or equal to 6) can be actually sent from the server 110 to the client device 120, and the client device 120 selects 6 items from the M items to be displayed on the first screen.
在一些备选实施例中,首次发送时可以仅从服务器110向客户端设备120发送最可能出现在首屏的条目,不需要关心条目的顺序。In some alternative embodiments, when sending for the first time, only the entries that are most likely to appear on the first screen may be sent from the server 110 to the client device 120, without caring about the order of the entries.
在另一些备选实施例中,可以根据当前查询的历史召回情况,针对不同的会话来确定不同的预测结果发送策略。历史召回情况可以包括诸多信息,例如但不限于,该查询在过去24小时的频次,搜索结果的离散程度,针对该查询的最近一次搜索是什么时候,查询的意图,时效性,做出查询的用户所在的区域(区域可以用来近似拟合网络基建情况),客户端设备的性能得分,等等。预测结果发送策略可以根据以上历史召回情况和/或与当前查询有关的其他信息来做出。例如,对于命中率把握比较高的数据,减少从服务器110向客户端设备120发送的条目的数目。又例如,对于服务器性能比较差的情况,或者网络基建比较差的情况,减少从服务器110向客户端设备120发送的条 目的数目。再例如,对于命中率把握特别低的数据,减少从服务器110向客户端设备120发送的条目的数目。应当理解,在这样的实施例中,对用户所在区域和/或客户端设备性能得分的获取是事先获得用户授权的。In other alternative embodiments, different prediction result sending strategies can be determined for different sessions based on the historical recall of the current query. The historical recall situation may include a lot of information, such as but not limited to, the frequency of the query in the past 24 hours, the discreteness of the search results, when was the last search for the query, the intent of the query, the timeliness, the region where the user who made the query is located (the region can be used to approximate the network infrastructure situation), the performance score of the client device, and so on. The prediction result sending strategy can be made based on the above historical recall situation and/or other information related to the current query. For example, for data with a relatively high hit rate, the number of entries sent from the server 110 to the client device 120 is reduced. For another example, in the case of poor server performance or poor network infrastructure, the number of entries sent from the server 110 to the client device 120 is reduced. For another example, for data with a particularly low hit rate, the number of entries sent from the server 110 to the client device 120 is reduced. It should be understood that in such an embodiment, the acquisition of the user's area and/or the client device performance score is authorized by the user in advance.
示例方法和装置Example methods and apparatus
图5示出了根据本公开的一些实施例的在服务器侧执行的搜索方法500的流程图。方法500可以在服务器侧实现。为了便于讨论,以下以图1的服务器110为例来描述图5的方法500。应当理解,这仅仅是示例性的,无意对本公开的实施例进行任何限制。FIG5 shows a flow chart of a search method 500 performed on a server side according to some embodiments of the present disclosure. The method 500 can be implemented on the server side. For ease of discussion, the method 500 of FIG5 is described below using the server 110 of FIG1 as an example. It should be understood that this is merely exemplary and is not intended to limit the embodiments of the present disclosure in any way.
在框505,服务器110响应于从客户端设备120接收到当前查询,确定与所述当前查询相关联的目标区域。在框510,服务器110至少基于与目标区域相对应的目标区域历史数据,生成针对当前查询的预测结果。At block 505, the server 110 determines a target area associated with the current query in response to receiving the current query from the client device 120. At block 510, the server 110 generates a prediction result for the current query based on at least target area historical data corresponding to the target area.
在一些实施例中,目标区域历史数据包括以下至少一项:与当前查询匹配并且与目标区域相关联的至少一个历史查询的数据,在第一历史时间段内创建的与目标区域相关联的候选搜索数据等。In some embodiments, the target area historical data includes at least one of the following: data of at least one historical query matching the current query and associated with the target area, candidate search data associated with the target area created within the first historical time period, and the like.
在一些实施例中,至少一个历史查询包括在第二历史时间段内出现的多个历史查询,并且生成预测结果包括:确定针对多个历史查询的多个历史搜索结果的离散程度;以及响应于确定离散程度小于阈值离散程度,基于多个历史搜索结果确定预测结果。In some embodiments, at least one historical query includes multiple historical queries that occurred within a second historical time period, and generating a predicted result includes: determining a degree of discreteness of multiple historical search results for the multiple historical queries; and in response to determining that the degree of discreteness is less than a threshold degree of discreteness, determining a predicted result based on the multiple historical search results.
在一些实施例中,为了生成预测结果,服务器110可以响应于确定至少一个历史查询的数目小于阈值数目,从候选搜索数据中确定与当前查询匹配的数据作为预测结果的至少一部分。In some embodiments, to generate a prediction result, server 110 may determine data matching the current query from the candidate search data as at least a part of the prediction result in response to determining that the number of at least one historical query is less than a threshold number.
在一些实施例中,为了生成预测结果,服务器110可以基于发起当前查询的当前用户的简档,确定当前查询是否指示与当前用户相关联的另一用户;以及响应于确定当前查询指示另一用户,将与当前用户有关的信息确定为预测结果的至少一部分。In some embodiments, in order to generate a predicted result, the server 110 may determine whether the current query indicates another user associated with the current user based on the profile of the current user who initiated the current query; and in response to determining that the current query indicates another user, determine information related to the current user as at least part of the predicted result.
在一些实施例中,为了确定目标区域,服务器110可以基于发起 当前查询的当前用户的简档,确定与当前用户相关联的第一区域;在与第一区域相对应的第一区域历史数据中,查找针对当前查询的结果;以及响应于在第一区域历史数据中未查找到针对当前查询的结果,确定与当前查询匹配的最次一次查询所对应的第二区域作为目标区域。In some embodiments, to determine the target area, the server 110 may initiate Based on the profile of the current user of the current query, determining a first area associated with the current user; searching for results for the current query in the first area historical data corresponding to the first area; and in response to not finding results for the current query in the first area historical data, determining a second area corresponding to the last query that matches the current query as a target area.
在框520,服务器110向客户端设备120发送预测结果。在框530,服务器110响应于搜索引擎生成针对当前查询的搜索结果,将预测结果与搜索结果进行比较。At block 520, the server 110 sends the predicted results to the client device 120. At block 530, the server 110 compares the predicted results with the search results in response to the search engine generating search results for the current query.
在框540,服务器110基于比较的结果,向客户端设备120发送与预测结果的后续处理有关的补充信息。At block 540 , the server 110 transmits supplementary information related to subsequent processing of the prediction result to the client device 120 based on the result of the comparison.
在一些实施例中,为了发送补充信息,服务器110可以基于比较的结果,生成用于将预测结果更新为搜索结果的更新信息,并向客户端设备120发送更新信息。In some embodiments, in order to send the supplementary information, the server 110 may generate update information for updating the prediction result as the search result based on the comparison result, and send the update information to the client device 120 .
在一些实施例中,预测结果包括第一组条目,搜索结果包括第二组条目,并且更新信息指示:将以第一顺序排列的第一组条目更新为以第二顺序排列的第二组条目。更新信息可以包括以下至少一项:条目的删除、条目的添加和条目的替换。In some embodiments, the prediction result includes a first group of entries, the search result includes a second group of entries, and the update information indicates that the first group of entries arranged in the first order are updated to the second group of entries arranged in the second order. The update information may include at least one of the following: deletion of an entry, addition of an entry, and replacement of an entry.
在一些实施例中,预测结果中的第一条目和搜索结果中的第二条目涉及同一对象,并且更新信息指示:第二条目所具有的与第一条目不同的对象描述元素。In some embodiments, the first entry in the predicted result and the second entry in the search result relate to the same object, and the update information indicates that the second entry has different object description elements from the first entry.
在一些实施例中,响应于比较的结果指示将预测结果更新为搜索结果所需的操作数目小于第一阈值数目,服务器110可以向客户端设备120发送对预测结果的肯定指示。或者,响应于比较的结果指示将预测结果更新为搜索结果所需的操作数目大于第二阈值数目,服务器110可以向客户端设备120发送对预测结果的否定指示。In some embodiments, in response to the comparison result indicating that the number of operations required to update the predicted result to the search result is less than the first threshold number, the server 110 may send a positive indication of the predicted result to the client device 120. Alternatively, in response to the comparison result indicating that the number of operations required to update the predicted result to the search result is greater than the second threshold number, the server 110 may send a negative indication of the predicted result to the client device 120.
图6示出了根据本公开的一些实施例的在客户端设备执行的搜索方法600的流程图。方法600可以在客户端设备侧实现。为了便于讨论,以下以图1的客户端设备120为例来描述图6的方法600。应当理解,这仅仅是示例性的,无意对本公开的实施例进行任何限制。FIG6 shows a flow chart of a search method 600 performed on a client device according to some embodiments of the present disclosure. The method 600 can be implemented on the client device side. For ease of discussion, the method 600 of FIG6 is described below using the client device 120 of FIG1 as an example. It should be understood that this is merely exemplary and is not intended to limit the embodiments of the present disclosure in any way.
在框610,客户端设备120向服务器发送当前查询。 At block 610 , the client device 120 sends a current query to the server.
在框620,客户端设备120从服务器接收针对当前查询的预测结果。预测结果是基于与目标区域相对应的目标区域历史数据生成的,并且目标区域与所述当前查询相关联。在一些实施例中,响应于接收到预测结果,客户端设备120可以对预测结果进行与呈现有关的预处理。At block 620, the client device 120 receives a prediction result for the current query from the server. The prediction result is generated based on target area historical data corresponding to the target area, and the target area is associated with the current query. In some embodiments, in response to receiving the prediction result, the client device 120 may perform pre-processing on the prediction result related to presentation.
在框630,客户端设备120从服务器接收与预测结果的后续处理有关的补充信息,补充信息是基于预测结果和搜索引擎生成的搜索结果的比较生成的。At block 630 , the client device 120 receives from the server supplemental information related to subsequent processing of the prediction result, the supplemental information being generated based on a comparison of the prediction result and the search results generated by the search engine.
在框640,客户端设备120基于补充信息,对预测结果执行操作。At block 640 , the client device 120 performs an operation on the prediction result based on the supplemental information.
在一些实施例中,客户端设备120可以基于补充信息所包括的更新信息,将预测结果更新为搜索结果,并呈现搜索结果。In some embodiments, the client device 120 may update the predicted result into a search result based on the updated information included in the supplemental information, and present the search result.
在一些实施例中,预测结果包括第一组条目,搜索结果包括第二组条目。客户端设备120可以按照更新信息所指示的条目编辑操作,将以第一顺序排列的第一组条目更新为以第二顺序排列的第二组条目。条目编辑操作可以包括以下至少一项:条目的删除、条目的添加和条目的替换。In some embodiments, the prediction result includes a first group of entries, and the search result includes a second group of entries. The client device 120 may update the first group of entries arranged in the first order to a second group of entries arranged in the second order according to the entry editing operation indicated by the update information. The entry editing operation may include at least one of the following: deletion of an entry, addition of an entry, and replacement of an entry.
在一些实施例中,预测结果中的第一条目和搜索结果中的第二条目涉及同一对象。客户端设备120可以响应于更新信息指示第二结果所具有的与第一条目不同的对象描述元素,将第一条目更新为具有对象描述元素。In some embodiments, the first item in the predicted result and the second item in the search result relate to the same object. In response to the update information indicating that the second result has an object description element different from the first item, the client device 120 may update the first item to have an object description element.
在一些实施例中,客户端设备120可以响应于补充信息包括对预测结果的肯定指示,呈现预测结果,或者,可以响应于补充信息包括对预测结果的否定指示,放弃呈现预测结果。In some embodiments, client device 120 may present the predicted result in response to the supplemental information including a positive indication of the predicted result, or may forgo presenting the predicted result in response to the supplemental information including a negative indication of the predicted result.
图7示出了根据本公开的一些实施例的搜索装置700的框图。装置700可以被实现为或者被包括在服务器110中。装置700中的各个模块/组件可以由硬件、软件、固件或者它们的任意组合来实现。7 shows a block diagram of a search apparatus 700 according to some embodiments of the present disclosure. The apparatus 700 may be implemented as or included in the server 110. Each module/component in the apparatus 700 may be implemented by hardware, software, firmware, or any combination thereof.
如图所示,装置700包括:目标区域确定模块705,被配置为响应于在服务器处从客户端设备接收到当前查询,确定与当前查询相关联的目标区域;预测结果生成模块710,被配置为至少基于与目标区 域相对应的目标区域历史数据,生成针对当前查询的预测结果;预测结果发送模块720,被配置为向客户端设备发送预测结果;比较模块730,被配置为响应于搜索引擎生成针对当前查询的搜索结果,将预测结果与搜索结果进行比较;以及补充信息发送模块740,被配置为基于比较的结果,向客户端设备发送与预测结果的后续处理有关的补充信息。As shown in the figure, the apparatus 700 includes: a target area determination module 705, configured to determine a target area associated with the current query in response to receiving a current query from a client device at a server; a prediction result generation module 710, configured to generate a prediction result based on at least The target area historical data corresponding to the domain is used to generate a prediction result for the current query; the prediction result sending module 720 is configured to send the prediction result to the client device; the comparison module 730 is configured to compare the prediction result with the search result in response to the search engine generating the search result for the current query; and the supplementary information sending module 740 is configured to send supplementary information related to the subsequent processing of the prediction result to the client device based on the comparison result.
在一些实施例中,目标区域历史数据包括以下至少一项:与当前查询匹配并且与目标区域相关联的至少一个历史查询的数据,或在第一历史时间段内创建的与目标区域相关联的候选搜索数据。In some embodiments, the target area historical data includes at least one of the following: data of at least one historical query that matches the current query and is associated with the target area, or candidate search data associated with the target area created within a first historical time period.
在一些实施例中,至少一个历史查询包括在第二历史时间段内出现的多个历史查询,并且预测结果生成模块还被配置为:确定针对多个历史查询的多个历史搜索结果的离散程度;以及响应于确定离散程度小于阈值离散程度,基于多个历史搜索结果确定预测结果。In some embodiments, at least one historical query includes multiple historical queries that occurred within a second historical time period, and the prediction result generation module is also configured to: determine the degree of discreteness of multiple historical search results for the multiple historical queries; and in response to determining that the degree of discreteness is less than a threshold degree of discreteness, determine the prediction result based on the multiple historical search results.
在一些实施例中,预测结果生成模块710还被配置为:响应于确定至少一个历史查询的数目小于阈值数目,从候选搜索数据中确定与当前查询匹配的数据作为预测结果的至少一部分。In some embodiments, the prediction result generation module 710 is further configured to: in response to determining that the number of at least one historical query is less than a threshold number, determine data matching the current query from the candidate search data as at least a part of the prediction result.
在一些实施例中,预测结果生成模块710还被配置为:基于发起当前查询的当前用户的简档,确定当前查询是否指示与当前用户相关联的另一用户;以及响应于确定当前查询指示另一用户,将与当前用户有关的信息确定为预测结果的一部分。In some embodiments, the prediction result generation module 710 is also configured to: determine whether the current query indicates another user associated with the current user based on the profile of the current user who initiated the current query; and in response to determining that the current query indicates another user, determine information related to the current user as part of the prediction result.
在一些实施例中,目标区域确定模块705还被配置为:基于发起当前查询的当前用户的简档,确定与当前用户相关联的第一区域;在与第一区域相对应的第一区域历史数据中,查找针对当前查询的结果;以及响应于在第一区域历史数据中未查找到针对当前查询的结果,确定与当前查询匹配的历史查询所对应的第二区域作为目标区域。In some embodiments, the target area determination module 705 is also configured to: determine a first area associated with the current user based on the profile of the current user who initiated the current query; search for results for the current query in the first area historical data corresponding to the first area; and in response to not finding results for the current query in the first area historical data, determine a second area corresponding to a historical query that matches the current query as a target area.
在一些实施例中,补充信息发送模块740还被配置为:基于比较的结果,生成用于将预测结果更新为搜索结果的更新信息;以及向客户端设备发送更新信息。In some embodiments, the supplementary information sending module 740 is further configured to: generate update information for updating the prediction result to the search result based on the comparison result; and send the update information to the client device.
在一些实施例中,预测结果包括第一组条目,搜索结果包括第二 组条目,并且更新信息指示:将以第一顺序排列的第一组条目更新为以第二顺序排列的第二组条目。更新信息可以包括以下至少一项:条目的删除、条目的添加和条目的替换。In some embodiments, the predicted results include a first set of items and the search results include a second set of items. The update information indicates that the first group of entries arranged in the first order is updated to the second group of entries arranged in the second order. The update information may include at least one of the following: deletion of an entry, addition of an entry, and replacement of an entry.
在一些实施例中,预测结果中的第一条目和搜索结果中的第二条目涉及同一对象,并且更新信息指示:第二条目所具有的与第一条目不同的对象描述元素。In some embodiments, the first entry in the predicted result and the second entry in the search result relate to the same object, and the update information indicates that the second entry has different object description elements from the first entry.
在一些实施例中,补充信息发送模块740还被配置为:响应于比较的结果指示将预测结果更新为搜索结果所需的操作数目小于第一阈值数目,向客户端设备发送对预测结果的肯定指示,或者,响应于比较的结果指示将预测结果更新为搜索结果所需的操作数目大于第二阈值数目,向客户端设备发送对预测结果的否定指示。In some embodiments, the supplemental information sending module 740 is also configured to: in response to the comparison result indicating that the number of operations required to update the predicted result to the search result is less than a first threshold number, send a positive indication of the predicted result to the client device; or, in response to the comparison result indicating that the number of operations required to update the predicted result to the search result is greater than a second threshold number, send a negative indication of the predicted result to the client device.
图8示出了根据本公开的另一些实施例的搜索装置800的框图。装置800可以被实现为或者被包括在客户端设备120中。装置800中的各个模块/组件可以由硬件、软件、固件或者它们的任意组合来实现。8 shows a block diagram of a search apparatus 800 according to some other embodiments of the present disclosure. The apparatus 800 may be implemented as or included in the client device 120. Each module/component in the apparatus 800 may be implemented by hardware, software, firmware, or any combination thereof.
如图所示,装置800包括查询发送模块810,被配置为在客户端设备处向服务器发送当前查询;预测结果接收模块820,被配置为从服务器接收针对当前查询的预测结果,其中预测结果是基于与目标区域相对应的目标区域历史数据生成的,并且目标区域与当前查询相关联;补充信息接收模块830,被配置为从服务器接收与预测结果的后续处理有关的补充信息,补充信息是基于预测结果和搜索引擎生成的搜索结果的比较生成的;以及操作执行模块840,被配置为基于补充信息,对预测结果执行操作。As shown in the figure, the apparatus 800 includes a query sending module 810, which is configured to send a current query to a server at a client device; a prediction result receiving module 820, which is configured to receive a prediction result for the current query from the server, wherein the prediction result is generated based on target area historical data corresponding to the target area, and the target area is associated with the current query; a supplementary information receiving module 830, which is configured to receive supplementary information related to subsequent processing of the prediction result from the server, wherein the supplementary information is generated based on a comparison between the prediction result and a search result generated by a search engine; and an operation execution module 840, which is configured to perform an operation on the prediction result based on the supplementary information.
在一些实施例中,装置800还可以包括预处理模块,被配置为响应于接收到预测结果,对预测结果进行与呈现有关的预处理。In some embodiments, the apparatus 800 may further include a preprocessing module configured to perform presentation-related preprocessing on the prediction result in response to receiving the prediction result.
在一些实施例中,操作执行模块840还被配置为:基于补充信息所包括的更新信息,将预测结果更新为搜索结果;以及呈现搜索结果。In some embodiments, the operation execution module 840 is further configured to: update the predicted result to a search result based on the updated information included in the supplemental information; and present the search result.
在一些实施例中,预测结果包括第一组条目,搜索结果包括第二组条目,并且操作执行模块840还被配置为:按照更新信息所指示的条目编辑操作,将以第一顺序排列的第一组条目更新为以第二顺序排 列的第二组条目,其中条目编辑操作包括以下至少一项:条目的删除、条目的添加和条目的替换。In some embodiments, the prediction results include a first group of entries, the search results include a second group of entries, and the operation execution module 840 is further configured to: update the first group of entries arranged in the first order to the second group of entries arranged in the second order according to the entry editing operation indicated by the update information; A second group of entries in the column, wherein the entry editing operation includes at least one of the following: deletion of an entry, addition of an entry, and replacement of an entry.
在一些实施例中,预测结果中的第一条目和搜索结果中的第二条目涉及同一对象,并且其中操作执行模块840还被配置为:响应于更新信息指示第二结果所具有的与第一条目不同的对象描述元素,将第一条目更新为具有对象描述元素。In some embodiments, the first entry in the predicted result and the second entry in the search result relate to the same object, and the operation execution module 840 is also configured to: in response to the update information indicating that the second result has an object description element different from that of the first entry, update the first entry to have an object description element.
在一些实施例中,操作执行模块840还被配置为:响应于补充信息包括对预测结果的肯定指示,呈现预测结果,或者被配置为响应于补充信息包括对预测结果的否定指示,放弃呈现预测结果。In some embodiments, the operation execution module 840 is further configured to present the prediction result in response to the supplemental information including a positive indication of the prediction result, or is configured to give up presenting the prediction result in response to the supplemental information including a negative indication of the prediction result.
图9示出了示出了其中可以实施本公开的一个或多个实施例的电子设备900的框图。应当理解,图9所示出的电子设备900仅仅是示例性的,而不应当构成对本文所描述的实施例的功能和范围的任何限制。图9所示出的电子设备900可以用于实现图1的服务器110和/或客户端设备120。FIG9 shows a block diagram of an electronic device 900 in which one or more embodiments of the present disclosure may be implemented. It should be understood that the electronic device 900 shown in FIG9 is merely exemplary and should not constitute any limitation on the functionality and scope of the embodiments described herein. The electronic device 900 shown in FIG9 may be used to implement the server 110 and/or the client device 120 of FIG1 .
如图9所示,电子设备900是通用电子设备的形式。电子设备900的组件可以包括但不限于一个或多个处理器或处理单元910、存储器920、存储设备930、一个或多个通信单元940、一个或多个输入设备950以及一个或多个输出设备960。处理单元910可以是实际或虚拟处理器并且能够根据存储器920中存储的程序来执行各种处理。在多处理器系统中,多个处理单元并行执行计算机可执行指令,以提高电子设备900的并行处理能力。As shown in FIG9 , the electronic device 900 is in the form of a general electronic device. The components of the electronic device 900 may include, but are not limited to, one or more processors or processing units 910, a memory 920, a storage device 930, one or more communication units 940, one or more input devices 950, and one or more output devices 960. The processing unit 910 may be an actual or virtual processor and is capable of performing various processes according to a program stored in the memory 920. In a multi-processor system, multiple processing units execute computer executable instructions in parallel to improve the parallel processing capability of the electronic device 900.
电子设备900通常包括多个计算机存储介质。这样的介质可以是电子设备900可访问的任何可以获取的介质,包括但不限于易失性和非易失性介质、可拆卸和不可拆卸介质。存储器920可以是易失性存储器(例如寄存器、高速缓存、随机访问存储器(RAM))、非易失性存储器(例如,只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、闪存)或它们的某种组合。存储设备930可以是可拆卸或不可拆卸的介质,并且可以包括机器可读介质,诸如闪存驱动、磁盘或者任何其他介质,其可以能够用于存储信息和/或数据(例如用 于训练的训练数据)并且可以在电子设备900内被访问。The electronic device 900 typically includes a plurality of computer storage media. Such media may be any retrievable media accessible to the electronic device 900, including but not limited to volatile and nonvolatile media, removable and non-removable media. The memory 920 may be a volatile memory (e.g., registers, cache, random access memory (RAM)), a nonvolatile memory (e.g., read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. The storage device 930 may be a removable or non-removable medium and may include a machine-readable medium such as a flash drive, a disk, or any other medium that may be capable of being used to store information and/or data (e.g., using training data for training) and can be accessed within the electronic device 900.
电子设备900可以进一步包括另外的可拆卸/不可拆卸、易失性/非易失性存储介质。尽管未在图9中示出,可以提供用于从可拆卸、非易失性磁盘(例如“软盘”)进行读取或写入的磁盘驱动和用于从可拆卸、非易失性光盘进行读取或写入的光盘驱动。在这些情况中,每个驱动可以由一个或多个数据介质接口被连接至总线(未示出)。存储器920可以包括计算机程序产品925,其具有一个或多个程序模块,这些程序模块被配置为执行本公开的各种实施例的各种方法或动作。The electronic device 900 may further include additional removable/non-removable, volatile/non-volatile storage media. Although not shown in FIG. 9 , a disk drive for reading or writing from a removable, non-volatile disk (e.g., a “floppy disk”) and an optical drive for reading or writing from a removable, non-volatile optical disk may be provided. In these cases, each drive may be connected to a bus (not shown) by one or more data media interfaces. The memory 920 may include a computer program product 925 having one or more program modules configured to perform various methods or actions of various embodiments of the present disclosure.
通信单元940实现通过通信介质与其他电子设备进行通信。附加地,电子设备900的组件的功能可以以单个计算集群或多个计算机器来实现,这些计算机器能够通过通信连接进行通信。因此,电子设备900可以使用与一个或多个其他服务器、网络个人计算机(PC)或者另一个网络节点的逻辑连接来在联网环境中进行操作。The communication unit 940 implements communication with other electronic devices through a communication medium. Additionally, the functions of the components of the electronic device 900 can be implemented with a single computing cluster or multiple computing machines that can communicate through a communication connection. Therefore, the electronic device 900 can operate in a networked environment using a logical connection with one or more other servers, a network personal computer (PC), or another network node.
输入设备950可以是一个或多个输入设备,例如鼠标、键盘、追踪球等。输出设备960可以是一个或多个输出设备,例如显示器、扬声器、打印机等。电子设备900还可以根据需要通过通信单元940与一个或多个外部设备(未示出)进行通信,外部设备诸如存储设备、显示设备等,与一个或多个使得用户与电子设备900交互的设备进行通信,或者与使得电子设备900与一个或多个其他电子设备通信的任何设备(例如,网卡、调制解调器等)进行通信。这样的通信可以经由输入/输出(I/O)接口(未示出)来执行。The input device 950 may be one or more input devices, such as a mouse, a keyboard, a tracking ball, etc. The output device 960 may be one or more output devices, such as a display, a speaker, a printer, etc. The electronic device 900 may also communicate with one or more external devices (not shown) through the communication unit 940 as needed, such as a storage device, a display device, etc., communicate with one or more devices that allow a user to interact with the electronic device 900, or communicate with any device that allows the electronic device 900 to communicate with one or more other electronic devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input/output (I/O) interface (not shown).
根据本公开的示例性实现方式,提供了一种计算机可读存储介质,其上存储有计算机可执行指令,其中计算机可执行指令被处理器执行以实现上文描述的方法。根据本公开的示例性实现方式,还提供了一种计算机程序产品,计算机程序产品被有形地存储在非瞬态计算机可读介质上并且包括计算机可执行指令,而计算机可执行指令被处理器执行以实现上文描述的方法。According to an exemplary implementation of the present disclosure, a computer-readable storage medium is provided, on which computer-executable instructions are stored, wherein the computer-executable instructions are executed by a processor to implement the method described above. According to an exemplary implementation of the present disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the method described above.
这里参照根据本公开实现的方法、装置、设备和计算机程序产品 的流程图和/或框图描述了本公开的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。Reference is made here to methods, apparatuses, devices and computer program products implemented according to the present disclosure The flowcharts and/or block diagrams of the present disclosure are described in detail. It should be understood that each block of the flowcharts and/or block diagrams and the combination of each block in the flowcharts and/or block diagrams can be implemented by computer-readable program instructions.
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其他可编程数据处理装置的处理单元,从而生产出一种机器,使得这些指令在通过计算机或其他可编程数据处理装置的处理单元执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions/actions specified in one or more boxes in the flowchart and/or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and/or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions/actions specified in one or more boxes in the flowchart and/or block diagram.
可以把计算机可读程序指令加载到计算机、其他可编程数据处理装置、或其他设备上,使得在计算机、其他可编程数据处理装置或其他设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其他可编程数据处理装置、或其他设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, so that the instructions executed on the computer, other programmable data processing apparatus, or other device implement the functions/actions specified in one or more boxes in the flowchart and/or block diagram.
附图中的流程图和框图显示了根据本公开的多个实现的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple implementations of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of a module, program segment or instruction includes one or more executable instructions for realizing the logical function of the specification. In some implementations as replacements, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and/or flow chart, and the combination of the square boxes in the block diagram and/or flow chart can be realized by a special hardware-based system that performs the function or action of the specification, or can be realized by a combination of special hardware and computer instructions.
以上已经描述了本公开的各实现,上述说明是示例性的,并非穷 尽性的,并且也不限于所公开的各实现。在不偏离所说明的各实现的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实现的原理、实际应用或对市场中的技术的改进,或者使本技术领域的其他普通技术人员能理解本文公开的各个实现方式。 The above descriptions are intended to be illustrative and not exhaustive. The present invention is not intended to be exhaustive and is not limited to the disclosed implementations. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described implementations. The terminology used herein is selected to best explain the principles of the implementations, practical applications, or improvements to the technology in the marketplace, or to enable other persons of ordinary skill in the art to understand the various implementations disclosed herein.
Claims (20)
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310152761.8A CN116136879A (en) | 2023-02-22 | 2023-02-22 | Searching method, searching device, searching equipment and storage medium |
| CN202310152761.8 | 2023-02-22 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2024174865A1 true WO2024174865A1 (en) | 2024-08-29 |
Family
ID=86333468
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2024/076036 Ceased WO2024174865A1 (en) | 2023-02-22 | 2024-02-05 | Search method and apparatus, and device and storage medium |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN116136879A (en) |
| WO (1) | WO2024174865A1 (en) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116136879A (en) * | 2023-02-22 | 2023-05-19 | 抖音视界有限公司 | Searching method, searching device, searching equipment and storage medium |
| CN116680455A (en) * | 2023-05-22 | 2023-09-01 | 北京百度网讯科技有限公司 | Information display method, device, electronic device and storage medium |
| US12405950B2 (en) * | 2023-10-03 | 2025-09-02 | Huawei Cloud Computing Technologies Co., Ltd. | Data query method and apparatus for adjusting data loading to reduce query latency |
| CN119312393A (en) * | 2024-09-27 | 2025-01-14 | 北京字跳网络技术有限公司 | Data processing method, device, equipment, storage medium and program product |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103617253A (en) * | 2013-11-29 | 2014-03-05 | 百度在线网络技术(北京)有限公司 | Searching method, client terminal and server |
| CN109101658A (en) * | 2018-08-31 | 2018-12-28 | 优视科技新加坡有限公司 | Information search method, device and equipment/terminal/server |
| CN112579897A (en) * | 2020-12-16 | 2021-03-30 | 北京百度网讯科技有限公司 | Information search method and device |
| CN112905927A (en) * | 2021-03-19 | 2021-06-04 | 北京字节跳动网络技术有限公司 | Searching method, device, equipment and medium |
| CN113094604A (en) * | 2021-04-15 | 2021-07-09 | 支付宝(杭州)信息技术有限公司 | Search result ordering method, search method and device |
| CN115438166A (en) * | 2022-09-29 | 2022-12-06 | 招商局金融科技有限公司 | Keyword and semantic-based searching method, device, equipment and storage medium |
| CN116136879A (en) * | 2023-02-22 | 2023-05-19 | 抖音视界有限公司 | Searching method, searching device, searching equipment and storage medium |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8396888B2 (en) * | 2009-12-04 | 2013-03-12 | Google Inc. | Location-based searching using a search area that corresponds to a geographical location of a computing device |
| CN114238729B (en) * | 2021-11-19 | 2025-09-26 | 中国建设银行股份有限公司 | Method, device, equipment, medium and program product for determining geographic location information |
| CN114691961A (en) * | 2022-03-30 | 2022-07-01 | 北京三快在线科技有限公司 | Query word processing method and device, electronic equipment and storage medium |
| CN115168752A (en) * | 2022-08-03 | 2022-10-11 | 中国平安财产保险股份有限公司 | Big data query method and device, electronic equipment and storage medium |
-
2023
- 2023-02-22 CN CN202310152761.8A patent/CN116136879A/en active Pending
-
2024
- 2024-02-05 WO PCT/CN2024/076036 patent/WO2024174865A1/en not_active Ceased
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103617253A (en) * | 2013-11-29 | 2014-03-05 | 百度在线网络技术(北京)有限公司 | Searching method, client terminal and server |
| CN109101658A (en) * | 2018-08-31 | 2018-12-28 | 优视科技新加坡有限公司 | Information search method, device and equipment/terminal/server |
| CN112579897A (en) * | 2020-12-16 | 2021-03-30 | 北京百度网讯科技有限公司 | Information search method and device |
| CN112905927A (en) * | 2021-03-19 | 2021-06-04 | 北京字节跳动网络技术有限公司 | Searching method, device, equipment and medium |
| CN113094604A (en) * | 2021-04-15 | 2021-07-09 | 支付宝(杭州)信息技术有限公司 | Search result ordering method, search method and device |
| CN115438166A (en) * | 2022-09-29 | 2022-12-06 | 招商局金融科技有限公司 | Keyword and semantic-based searching method, device, equipment and storage medium |
| CN116136879A (en) * | 2023-02-22 | 2023-05-19 | 抖音视界有限公司 | Searching method, searching device, searching equipment and storage medium |
Also Published As
| Publication number | Publication date |
|---|---|
| CN116136879A (en) | 2023-05-19 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US12166835B2 (en) | Push notification delivery system with feedback analysis | |
| WO2024174865A1 (en) | Search method and apparatus, and device and storage medium | |
| US11122333B2 (en) | User feature generation method and apparatus, device, and computer-readable storage medium | |
| US11315546B2 (en) | Computerized system and method for formatted transcription of multimedia content | |
| US20210168442A1 (en) | Computerized system and method for automatically detecting and rendering highlights from streaming videos | |
| US10885076B2 (en) | Computerized system and method for search query auto-completion | |
| JP5736469B2 (en) | Search keyword recommendation based on user intention | |
| US9531827B1 (en) | Push notification delivery system with feedback analysis | |
| RU2743932C2 (en) | Method and server for repeated training of machine learning algorithm | |
| US20200394448A1 (en) | Methods for more effectively moderating one or more images and devices thereof | |
| CN114491093A (en) | Multimedia resource recommendation and object representation network generation method and device | |
| US12265561B2 (en) | Machine learning for similarity scores between different document schemas | |
| CN114581116B (en) | Push information screening method, push information screening device, computer equipment and storage medium | |
| US20250252121A1 (en) | Leveraging external summaries with llms | |
| CN111797765B (en) | Image processing method, device, server and storage medium | |
| CN110705251B (en) | Text analysis method and device executed by computer | |
| CN113177162A (en) | Search result sorting method and device, electronic equipment and storage medium | |
| CN113688295B (en) | Data determination method and device, electronic equipment and storage medium | |
| CN115964556B (en) | Content recommendation method, device, computer equipment and computer-readable storage medium | |
| CN114925108B (en) | Determination method, device, equipment and storage medium of sorting model | |
| CN119884216A (en) | Method, device, equipment and storage medium for content presentation | |
| HK40065976A (en) | Resource recommendation method and apparatus, computer device and storage medium | |
| HK40065976B (en) | Resource recommendation method and apparatus, computer device and storage medium | |
| CN120640098A (en) | Content generation method, device, equipment and storage medium | |
| CN120030215A (en) | Method, device, equipment and storage medium for information retrieval |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 24759542 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |