Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
Fig. 1 is a flowchart of a searching method provided by an embodiment of the present disclosure, where the method may be executed by a searching apparatus, where the apparatus may be implemented by software and/or hardware, and may be generally integrated in an electronic device. As shown in fig. 1, the method is applied to a server, and includes:
step 101, receiving a search request of a client, and sending the search request to a search engine and a prediction result server.
The search request refers to a request sent by the client based on the operation of the user for searching or detecting, the search request includes search information, and the search information refers to a search text input by the user in the client, and may specifically be a search word or word. A search engine, also called a search engine, refers to a system that collects information from the internet by using a specific computer program according to a certain policy, organizes and processes the information, provides a search service for a user, and displays the searched related information to the user. The predicted result server is a server for storing predicted search result data, the predicted search result data may be determined according to data such as historical search result data of the user and feature data of the user, and the specific determination manner and number are not limited.
In the embodiment of the disclosure, the server side can obtain the search request sent by the client side, and send the search request to the search engine and the prediction result server, so that the search engine can search in real time based on the search information, and the prediction result server can perform subsequent processing based on the search information.
And 102, obtaining predicted search result data determined by the predicted result server based on the search request, and sending the predicted search result data to the client for prerendering to obtain prerendered data.
The predicted search result data refers to a predicted result determined by the predicted result server based on the search information, and the predicted search result data may include a plurality of predicted search results. In the embodiment of the disclosure, the predicted search result data is historical search result data within a preset time period determined by the predicted result server according to the search information in the search request, wherein the preset time period is determined according to the type of the search information. The type of the search information may include various types, for example, the type of the search information may include a game type, a learning type, a movie type, and the like, and is not limited in particular. Different preset time periods may be set for different types of search information. The predicted result server may determine historical search result data for the search information within a preset time period before the current time as the predicted search result data.
Prerendering refers to rendering operations performed in advance by the client, but not exposed. The prerender data refers to data which can be displayed after the client performs rendering operation on the prediction result data.
In the embodiment of the present disclosure, after the server sends the search request to the predicted result server, the predicted result server may determine predicted search result data based on the search information, and then the predicted result server may return the predicted search result data to the server. After the server side obtains the predicted search result data, the server side can return the predicted search result data to the client side, so that the client side can obtain pre-rendering data after pre-rendering the predicted search result data.
And 103, acquiring real-time search result data obtained by the search engine based on the search request.
The real-time search result data refers to result data obtained by a search engine conducting a search in real time based on search information, and the real-time search result data may include a plurality of real-time search results.
The server can obtain real-time search result data obtained by the search engine based on the search information in the search request through real-time search.
And 104, matching the real-time search result data with the predicted search result data to obtain a matching result.
In the embodiment of the present disclosure, matching the real-time search result data with the predicted search result data to obtain a matching result may include: determining data fingerprints corresponding to each predicted search result in the predicted search result data and each real-time search result in the real-time search result data; the predicted search result data comprises at least two predicted search results, and the real-time search result data comprises at least two real-time search results; if the data fingerprints of the predicted search result and the real-time search result are the same, determining that the matching result is successful; otherwise, determining the matching result as matching failure.
The data fingerprint can be understood as a data key obtained by adopting a hash algorithm for the search result, and is used for ensuring the integrity and the correctness of data, and the data fingerprints of different search results are different. For example, assuming that the search result is a web page, a hash algorithm may be used to obtain a corresponding data fingerprint based on the body of the web page.
In the embodiment of the disclosure, after the server acquires the predicted search result data sent by the predicted result server and the real-time search result data sent by the search engine, the server may first determine a data fingerprint corresponding to each predicted search result in the predicted search result data and a data fingerprint corresponding to each real-time search result in the real-time search result data, determine the predicted search result and the real-time search result with the same data fingerprint as a group of data that is successfully matched, and determine the predicted search result and the real-time search result with different data fingerprints as a group of data that is failed to be matched. If the matching is successful, the predicted search result is accurate, otherwise, the predicted result is inaccurate.
And 105, indicating the client to display the prerendering data corresponding to the successfully matched predicted search result data according to the matching result.
After the server determines the matching result of the real-time search result data and the predicted search result data, matching success information can be sent to the client, so that the client can directly display the pre-rendering data corresponding to the successfully matched predicted search result. The matching success information may be information that characterizes that the matching result is a matching success. In the embodiment of the present disclosure, the matching success information may be represented by an Acknowledgement Character (ACK) and is used to represent that the received data has no error, that is, the matching result is a matching success. The embodiment of the disclosure can design the confirmation character as an integer, maximally reduce the time consumption of the confirmation character transmission, and improve the transmission efficiency. In the embodiment of the disclosure, since the pre-rendering data is rendered in advance, the client can directly display the pre-rendering data, so that the time for rendering the data is saved, and the display efficiency of the search result is improved.
In some embodiments, the search method may further include: and sending the target search result data with the matching result of failed matching in the real-time search result data to the client so that the client renders and displays the target search result data after deleting the data corresponding to the target search result data in the pre-rendered data.
In the embodiment of the disclosure, after the server determines the matching result, the target search result data which is failed to match in the real-time search result data may be returned to the client, and after the client receives the target search result data, the client may delete or discard the corresponding erroneous pre-rendering data, and render and display the target search result data in real time. In the scheme, the search results which are failed to predict can be rendered and displayed in real time, and the display of the complete search results is realized on the basis of improving the search performance.
According to the search scheme provided by the embodiment of the disclosure, the server side can receive the search request of the client side and send the search request to the search engine and the prediction result server; obtaining predicted search result data determined by a predicted result server based on the search request, and sending the predicted search result data to a client for prerendering to obtain prerendered data; acquiring real-time search result data obtained by a search engine based on search request search; matching the real-time search result data with the predicted search result data to obtain a matching result; and indicating the client to display the prerendering data corresponding to the successfully matched predicted search result data according to the matching result. By adopting the technical scheme, the server side can obtain the predicted search result data determined aiming at the search request and return the predicted search result data to the client side in advance for rendering, after the search engine returns the real-time search result data, the server side can indicate the client side to directly display the rendered predicted search result data which is successfully matched according to the matching result through matching, the predicted result can be transmitted and rendered in advance by utilizing the search time consumption of the search engine, the rendering time of the successfully predicted search result data is saved, the search efficiency is improved, and the search performance is greatly improved.
In some embodiments, the search method may further include: and sending the real-time search result data to a prediction result server so that the prediction result server updates the prediction search result data according to the real-time search result data. In the embodiment of the disclosure, the server may send the real-time search result data to the predicted result server, and the predicted result server may store the real-time search result data in association with the search information to update the stored data, and when the search request is received again, a new predicted search result is returned based on the updated data. The accuracy of subsequent search prediction is improved by updating the prediction data stored in the prediction result server.
Fig. 2 is a flowchart of another searching method provided by the embodiment of the present disclosure, which may be executed by a searching apparatus, wherein the apparatus may be implemented by software and/or hardware, and may be generally integrated in an electronic device. As shown in fig. 2, the method is applied to a client, and includes:
step 201, responding to a search request of a user, and sending the search request to a server.
The search request includes search information, where the search information refers to a search text input by a user in the client, and may specifically be a search word or word.
In the embodiment of the disclosure, the client may detect the operation of the user, and if the trigger operation on the setting key is detected, the search information input by the user may be added to the search request and the search request may be sent to the server. The setting key is a key for representing searching or retrieving, and may be set by hardware or software, and is not limited specifically.
Step 202, receiving the predicted search result data determined based on the search request, and performing pre-rendering on the predicted search result data to obtain pre-rendering data.
The predicted search result data refers to a predicted result determined by the predicted result server based on the search information, and the predicted search result data may include a plurality of predicted search results. Prerendering refers to rendering operations performed in advance by the client, but not exposed. The prerender data refers to data which can be displayed after the client performs rendering operation on the prediction result data.
In the embodiment of the disclosure, the client may receive the predicted search result data returned by the server, and pre-render the predicted search result data by using a preset rendering algorithm to obtain pre-render data, and at this time, the pre-render data is not displayed.
And 203, receiving a matching result returned by the server, wherein the matching result is obtained by matching the predicted search result data with real-time search result data obtained by the search engine based on the search information.
The real-time search result data refers to result data obtained by a search engine conducting a search in real time based on search information, and the real-time search result data may include a plurality of real-time search results. The matching success information may be information that characterizes the matching result as a matching success.
The server side matches the real-time search result data with the predicted search result data, and after the matching result is determined, the matching result can be returned to the client side. The client can receive the matching result sent by the server.
And 204, displaying the prerendering data corresponding to the successfully matched predicted search result data in the predicted search result data based on the matching result.
In the embodiment of the disclosure, after receiving the matching result, the client may determine, in the prediction result data, a target prediction search result corresponding to the matching success information for the matching success information in the matching result data, where the target prediction search result is a search result that is predicted successfully, and may directly display prerendering data corresponding to the target prediction search result. The matching success information may be information that characterizes that the matching result is a matching success. In the embodiment of the present disclosure, the matching success information may be represented by a confirmation character. In the embodiment of the disclosure, since the pre-rendering data is rendered in advance, the client can directly display the pre-rendering data, so that the time for rendering the data is saved, and the display efficiency of the search result is improved.
In some embodiments, the search method may further include: receiving target search result data with matching results of failed matching in the real-time search result data; and rendering and displaying the target search result data after deleting the data corresponding to the target search result data in the pre-rendering data.
After the server determines the matching result, the server may return the target search result data that fails to be matched in the real-time search result data to the client, and after receiving the target search result data, the client may delete or discard the corresponding erroneous pre-rendering data, and render and display the target search result data in real time. In the scheme, the search results which are failed to predict can be rendered and displayed in real time, and the display of the complete search results is realized on the basis of improving the search performance.
According to the search scheme provided by the embodiment of the disclosure, the client can respond to the search request of the user and send the search request to the server; receiving predicted search result data determined based on the search request, and performing pre-rendering on the predicted search result data to obtain pre-rendering data; receiving a matching result returned by the server, wherein the matching result is obtained by matching the predicted search result data with real-time search result data obtained by a search engine based on search information; and displaying the prerendering data corresponding to the successfully matched predicted search result data in the predicted search result data based on the matching result. By adopting the technical scheme, the client can obtain the predicted search result data and render the predicted search result data, the rendered predicted search result data which is successfully matched is directly displayed, the predicted result can be rendered in advance by utilizing the search time-consuming client of the search engine, the rendering time of the subsequent successfully predicted search result data is saved, the search efficiency is improved, and the search performance is greatly improved.
The search method in the embodiment of the present disclosure is further explained by a specific example. Exemplarily, fig. 3 is a timing diagram of a search provided by an embodiment of the present disclosure, fig. 4 is a schematic flowchart of another search method provided by an embodiment of the present disclosure, and referring to fig. 3 and fig. 4, the step of searching may include: 1. and the server receives the request of the client and requests the prediction result server to generate prediction data. 2. The server side requests the downstream search engines in parallel. 3. And the server side returns the prediction data to the front-end rendering. 4. And the server judges whether the predicted data is accurate or not according to the data returned by the downstream search engine, specifically, the real data and the predicted data can be compared, if the fingerprints are the same, the predicted data is determined to be accurate, and if not, the predicted data is determined to be inaccurate. 5. If the server determines that part of the predicted data is accurate and part of the predicted data is inaccurate, the server sends ACK to the front end for the accurate predicted data to confirm hit; the front end finishes displaying the pre-rendering data; and for inaccurate predicted data, the server returns real data to the front end. 6. If the server side predicts all the inaccurate data, the server side returns ACK miss to the front end; the front end discards the pre-rendering data; the server returns all real data to the front end; and the front end completes rendering. 7. And asynchronously writing the search result data into a prediction result server. In which, the response of ACK needs to be very fast, and the embodiment of the present disclosure may design the ACK field as an integer, thereby maximally reducing the time consumption for ACK transmission.
According to the searching method, when a search engine is requested, the returned content of the request is predicted by utilizing a result data caching technology, and the content is returned to the terminal in advance for rendering; after the search engine returns, the server side sends an ack signal to the server side to directly display if the prediction is successful, and real data is directly returned if the prediction is not successful. The method and the device can utilize the search engine to consume time, transmit and render the search result in advance, and can improve the search performance optimization by hundreds of milliseconds.
Fig. 5 is a schematic structural diagram of a search apparatus provided in an embodiment of the present disclosure, where the search apparatus may be implemented by software and/or hardware, and may be generally integrated in an electronic device. As shown in fig. 5, the apparatus is disposed in a server, and includes:
arequest receiving module 501, configured to receive a search request of a client, and send the search request to a search engine and a prediction result server;
a predictedresult module 502, configured to obtain predicted search result data determined by the predicted result server based on the search request, and send the predicted search result data to the client for prerendering to obtain prerendered data;
a real-time result module 503, configured to obtain real-time search result data obtained by the search engine based on the search request;
amatching module 504, configured to match the real-time search result data with the predicted search result data to obtain a matching result;
and aninformation sending module 505, configured to instruct, according to the matching result, the client to display prerender data corresponding to the prediction search result data that is successfully matched.
Optionally, thematching module 503 is specifically configured to:
determining data fingerprints corresponding to each predicted search result in the predicted search result data and each real-time search result in the real-time search result data; the predicted search result data comprises at least two predicted search results, and the real-time search result data comprises at least two real-time search results;
if the data fingerprints of the predicted search result and the real-time search result are the same, determining that the matching result is successful; otherwise, determining the matching result as matching failure.
Optionally, the apparatus further includes a matching failure module, configured to:
and sending the target search result data with the matching result of failure in matching in the real-time search result data to the client, so that the client renders and displays the target search result data after deleting the data corresponding to the target search result data in the pre-rendered data.
Optionally, the apparatus further includes a real-time data sending module, configured to:
and sending the real-time search result data to the prediction result server so that the prediction result server updates the prediction search result data according to the real-time search result data.
Optionally, the predicted search result data is historical search result data within a preset time period determined by the predicted result server according to search information in the search request, where the preset time period is determined according to the type of the search information.
The search device provided by the embodiment of the disclosure can execute the search method executed by the server side provided by any embodiment of the disclosure, and has corresponding functional modules and beneficial effects of the execution method.
Fig. 6 is a schematic structural diagram of another search apparatus provided in the embodiment of the present disclosure; the apparatus may be implemented by software and/or hardware, and may be generally integrated in an electronic device. As shown in fig. 6, the apparatus, provided in the client, includes:
arequest sending module 601, configured to respond to a search request of a user and send the search request to a server;
aprediction receiving module 602, configured to receive predicted search result data determined based on the search request, and perform pre-rendering on the predicted search result data to obtain pre-rendering data;
amatching receiving module 603, configured to receive a matching result returned by the server, where the matching result is obtained by matching the predicted search result data with real-time search result data obtained by a search engine based on the search information;
a displayingmodule 604, configured to display, based on the matching result, pre-rendering data corresponding to the predicted search result data that is successfully matched in the predicted search result data.
Optionally, the apparatus further includes a matching failure display module, configured to:
receiving target search result data with matching results of failed matching in the real-time search result data;
and rendering and displaying the target search result data after deleting the data corresponding to the target search result data in the prerendered data.
The searching device provided by the embodiment of the disclosure can execute the searching method executed by the client terminal provided by any embodiment of the disclosure, and has corresponding functional modules and beneficial effects of the executing method.
Embodiments of the present disclosure also provide a computer program product, which includes a computer program/instruction, and when executed by a processor, the computer program/instruction implements the search method executed by the client provided in any embodiment of the present disclosure.
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. Referring now specifically to fig. 7, a schematic diagram of anelectronic device 700 suitable for use in implementing embodiments of the present disclosure is shown. Theelectronic device 700 in the disclosed embodiment may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 7,electronic device 700 may include a processing means (e.g., central processing unit, graphics processor, etc.) 701 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)702 or a program loaded fromstorage 708 into a Random Access Memory (RAM) 703. In the RAM703, various programs and data necessary for the operation of theelectronic apparatus 700 are also stored. Theprocessing device 701, theROM 702, and the RAM703 are connected to each other by abus 704. An input/output (I/O)interface 705 is also connected tobus 704.
Generally, the following devices may be connected to the I/O interface 705:input devices 706 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; anoutput device 707 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like;storage 708 including, for example, magnetic tape, hard disk, etc.; and acommunication device 709. The communication means 709 may allow theelectronic device 700 to communicate wirelessly or by wire with other devices to exchange data. While fig. 7 illustrates anelectronic device 700 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such embodiments, the computer program may be downloaded and installed from a network via the communication means 709, or may be installed from the storage means 708, or may be installed from theROM 702. The computer program, when executed by theprocessing device 701, performs the above-described functions defined in the search method of the embodiment of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: receiving a search request of a client, and sending the search request to a search engine and a prediction result server; obtaining predicted search result data determined by the predicted result server based on the search request, and sending the predicted search result data to the client for prerendering to obtain prerendered data; acquiring real-time search result data obtained by the search engine based on the search request; matching the real-time search result data with the predicted search result data to obtain a matching result; and according to the matching result, indicating the client to display pre-rendering data corresponding to the prediction search result data successfully matched.
Alternatively, the computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: responding to a search request of a user, and sending the search request to a server; receiving predicted search result data determined based on the search request, and performing pre-rendering on the predicted search result data to obtain pre-rendering data; receiving a matching result returned by the server, wherein the matching result is obtained by matching the predicted search result data with real-time search result data obtained by a search engine based on the search information; and displaying the prerendering data corresponding to the successfully matched predicted search result data in the predicted search result data based on the matching result.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of an element does not in some cases constitute a limitation on the element itself.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
According to one or more embodiments of the present disclosure, the present disclosure provides a search method, applied to a server, including:
receiving a search request of a client, and sending the search request to a search engine and a prediction result server;
obtaining predicted search result data determined by the predicted result server based on the search request, and sending the predicted search result data to the client for prerendering to obtain prerendered data;
acquiring real-time search result data obtained by the search engine based on the search request;
matching the real-time search result data with the predicted search result data to obtain a matching result;
and according to the matching result, indicating the client to display pre-rendering data corresponding to the prediction search result data successfully matched.
According to one or more embodiments of the present disclosure, in the search method provided by the present disclosure, matching the real-time search result data with the predicted search result data to obtain a matching result includes:
determining data fingerprints corresponding to each predicted search result in the predicted search result data and each real-time search result in the real-time search result data; the predicted search result data comprises at least two predicted search results, and the real-time search result data comprises at least two real-time search results;
if the data fingerprints of the predicted search result and the real-time search result are the same, determining that the matching result is successful; otherwise, determining the matching result as matching failure.
According to one or more embodiments of the present disclosure, the search method further includes:
and sending the target search result data with the matching result of failure in matching in the real-time search result data to the client, so that the client renders and displays the target search result data after deleting the data corresponding to the target search result data in the pre-rendered data.
According to one or more embodiments of the present disclosure, the search method further includes:
and sending the real-time search result data to the prediction result server so that the prediction result server updates the prediction search result data according to the real-time search result data.
According to one or more embodiments of the present disclosure, in the search method provided by the present disclosure, the predicted search result data is historical search result data within a preset time period determined by the predicted result server according to search information in the search request, where the preset time period is determined according to a type of the search information.
According to one or more embodiments of the present disclosure, the present disclosure provides a search method, applied to a client, including:
responding to a search request of a user, and sending the search request to a server;
receiving predicted search result data determined based on the search request, and performing pre-rendering on the predicted search result data to obtain pre-rendering data;
receiving a matching result returned by the server, wherein the matching result is obtained by matching the predicted search result data with real-time search result data obtained by a search engine based on the search information;
and displaying the prerendering data corresponding to the successfully matched predicted search result data in the predicted search result data based on the matching result.
According to one or more embodiments of the present disclosure, the search method further includes:
receiving target search result data with matching results of failed matching in the real-time search result data;
and rendering and displaying the target search result data after deleting the data corresponding to the target search result data in the prerendered data.
According to one or more embodiments of the present disclosure, the present disclosure provides a search apparatus configured at a server, including:
the device comprises a request receiving module, a search engine and a prediction result server, wherein the request receiving module is used for receiving a search request of a client and sending the search request to the search engine and the prediction result server;
the prediction result module is used for acquiring prediction search result data determined by the prediction result server based on the search request and sending the prediction search result data to the client for prerendering to obtain prerendered data;
the real-time result module is used for acquiring real-time search result data obtained by the search engine based on the search request;
the matching module is used for matching the real-time search result data with the predicted search result data to obtain a matching result;
and the information sending module is used for indicating the client to display prerender data corresponding to the prediction search result data successfully matched according to the matching result.
According to one or more embodiments of the present disclosure, in the search apparatus provided by the present disclosure, the matching module is specifically configured to:
determining data fingerprints corresponding to each predicted search result in the predicted search result data and each real-time search result in the real-time search result data; the predicted search result data comprises at least two predicted search results, and the real-time search result data comprises at least two real-time search results;
if the data fingerprints of the predicted search result and the real-time search result are the same, determining that the matching result is successful; otherwise, determining the matching result as matching failure.
According to one or more embodiments of the present disclosure, in a search apparatus provided by the present disclosure, the apparatus further includes a matching failure module configured to:
and sending the target search result data with the matching result of failure in matching in the real-time search result data to the client, so that the client renders and displays the target search result data after deleting the data corresponding to the target search result data in the pre-rendered data.
According to one or more embodiments of the present disclosure, in a search apparatus provided in the present disclosure, the apparatus further includes a real-time data transmission module, configured to:
and sending the real-time search result data to the prediction result server so that the prediction result server updates the prediction search result data according to the real-time search result data.
According to one or more embodiments of the present disclosure, in the search apparatus provided by the present disclosure, the predicted search result data is historical search result data within a preset time period determined by the predicted result server according to search information in the search request, where the preset time period is determined according to a type of the search information.
According to one or more embodiments of the present disclosure, there is provided a search apparatus configured at a client, including:
the request sending module is used for responding to a search request of a user and sending the search request to a server;
the prediction receiving module is used for receiving prediction search result data determined based on the search request and prerendering the prediction search result data to obtain prerendered data;
the matching receiving module is used for receiving a matching result returned by the server, wherein the matching result is obtained by matching the predicted search result data with real-time search result data obtained by a search engine based on the search information;
and the display module is used for displaying the prerendering data corresponding to the prediction search result data which is successfully matched in the prediction search result data based on the matching result.
According to one or more embodiments of the present disclosure, in a search apparatus provided by the present disclosure, the apparatus further includes a matching failure presentation module, configured to:
receiving target search result data with matching results of failed matching in the real-time search result data;
and rendering and displaying the target search result data after deleting the data corresponding to the target search result data in the prerendered data.
In accordance with one or more embodiments of the present disclosure, there is provided an electronic device including:
a processor;
a memory for storing the processor-executable instructions;
the processor is used for reading the executable instructions from the memory and executing the instructions to realize any one of the searching methods provided by the disclosure.
According to one or more embodiments of the present disclosure, there is provided a computer-readable storage medium storing a computer program for executing the search method according to any one of the methods provided in the present disclosure.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.