Data search method and device, electronic equipment, storage medium and program product
By generating a first search request and canceling redundant requests, the method optimizes data search efficiency by prioritizing the most recent search request, reducing resource wastage and improving search speed.
Patent Information
- Application Number
- CN202411178490.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-26
- Publication Date
- 2024-12-17
AI Technical Summary
Existing data search methods on clients trigger multiple search requests as keywords change, leading to inefficient loading of previously searched data and resource wastage.
Generate a first search request based on the input of a search character, cancel redundant search requests, and prioritize processing of the first search request to optimize resource allocation and improve efficiency.
Reduces invalid computing resource occupation and enhances data search efficiency by centralizing processing on the most recent search request, ensuring timely and relevant search results.
Smart Images

Figure CN119149565A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, and in particular to a data search method, device, electronic device, storage medium and program product. Background Art
[0002] When users search for data on the client, the client will detect changes in the keywords in the input box locally. As the keywords entered by the user are added, the client will trigger new data search requests to the server multiple times as the keywords change. Although the previously searched data is unlikely to be displayed, it is still being loaded in parallel, which seriously affects the search efficiency. Summary of the invention
[0003] In view of this, the present disclosure provides a data search method, device, electronic device, storage medium and program product to solve the problem of low data search efficiency.
[0004] In a first aspect, the present disclosure provides a data search method, the method comprising:
[0005] Display the data search page;
[0006] In response to an input operation of a first search character in a search control of the data search page, a first search request is generated, wherein a search term is displayed in the search control, and the search term includes the first search character and at least one second search character, and the at least one second search character is located before the first search character;
[0007] If there is a second search request in a processing state among the search requests corresponding to the second search character, determining and canceling a third search request in the second search requests based on the request order of the second search requests;
[0008] Performing a data search based on the first search request to obtain a target search result;
[0009] The target search results are displayed on the search results page.
[0010] In a second aspect, the present disclosure provides a data search device, the device comprising:
[0011] A page display module, used to display a data search page;
[0012] A first processing module, configured to generate a first search request in response to an input operation of a first search character in a search control of the data search page, wherein a search term is displayed in the search control, and the search term includes the first search character and at least one second search character, wherein the at least one second search character is located before the first search character;
[0013] a second processing module, configured to determine and cancel a third search request in the second search request based on a request order of the second search request if there is a second search request in a processing state in the search request corresponding to the second search character;
[0014] A third processing module, configured to perform a data search based on the first search request to obtain a target search result;
[0015] The result display module is used to display the target search results on the search result page.
[0016] In a third aspect, the present disclosure provides an electronic device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the data search method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0017] In a fourth aspect, the present disclosure provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the data search method of the first aspect or any corresponding embodiment thereof.
[0018] In a fifth aspect, the present disclosure provides a computer program product, including computer instructions, which are used to enable a computer to execute the data search method of the first aspect or any corresponding embodiment thereof.
[0019] The data search method provided by the embodiment of the present disclosure generates a first search request in response to the input operation of the first search character in the search control of the data search page. Among them, a search term is displayed in the search control, and the search term includes a first search character and at least one second search character, and at least one second search character is located before the first search character. If there is a second search request in a processing state in the search request corresponding to the second search character, then based on the request order of the second search request, the third search request is determined and canceled in the second search request. Therefore, the processing of invalid search requests can be reduced, thereby reducing the invalid computing resource occupation. And based on the first search request, data search is performed to obtain the target search result. Then, the target search result is displayed on the search result page. Therefore, the computing resources allocated to the client can be utilized to the greatest extent, and the first search request can be processed centrally to improve the data search efficiency and reduce the time-consuming data search. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the specific embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0021] Figure 1 is a flowchart of a data search method according to an embodiment of the present disclosure;
[0022] Figure 2 is a schematic diagram of an instant search page according to an embodiment of the present disclosure;
[0023] Figure 3 is a schematic diagram of another instant search page according to an embodiment of the present disclosure;
[0024] Figure 4 is a flowchart of another data search method according to an embodiment of the present disclosure;
[0025] Figure 5 is a structural block diagram of a data search device according to an embodiment of the present disclosure;
[0026] Figure 6 is a structural block diagram of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.
[0028] 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.
[0029] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
[0030] 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.
[0031] 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.
[0032] 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.
[0033] In the related art, in order to improve the user search experience, an instant search service is provided. When the user searches for data in the client of the business application, the client will detect the changes of the keywords in the input box locally. Every time a new keyword is entered, a data search request will be triggered. With the superposition of keywords entered by the user, the client will trigger new data search requests to the server multiple times as the keywords change. Although the previously searched data is unlikely to be displayed, it is still being loaded in parallel, which seriously affects the search efficiency and search time.
[0034] In view of this, according to an embodiment of the present disclosure, a data search method embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0035] In this embodiment, a data search method is provided, which can be used in a client of a business application, wherein the business application is used to provide a data search service. Figure 1 is a flow chart of a data search method according to an embodiment of the present disclosure, such as Figure 1 As shown, the process includes the following steps:
[0036] Step S101, displaying a data search page.
[0037] Specifically, the data search page may be displayed when the client is started, or a search service control may be deployed on the homepage of the client, and the client may display the data search page in response to the interactive operation of the search service control.
[0038] Step S102, in response to the input operation of the first search character in the search control of the data search page, a first search request is generated, the search control displays a search term, the search term includes the first search character and at least one second search character, and the at least one second search character is located before the first search character.
[0039] Optionally, the search control is a search box.
[0040] Specifically, the client performs keyword recognition on the user's input data, and updates the first search character to the search control in real time according to the user's input data. Then, the client generates a first search request based on the search term in the search control to generate cross-process data interaction with the service application server.
[0041] It should be noted that the first search request is generated based on a search term consisting of a first search character and at least one second search character. The first search character represents the most recently input or currently input search character. The second search character represents a historically input search character. It should be noted that the first search character and the second search character include one or more characters, and the search characters can be input into the search control character by character, or multiple search characters can be input into the search control at one time, and there is no limitation here.
[0042] For example, assuming that the user needs to search for the data corresponding to "ABCD", the user can enter "A", "B", "C", "D" character by character in the search control. Or, enter "ABC" first and then "D" to form the search term "ABCD". For ease of understanding, the following example takes the case where the user enters "A", "B", "C", "D" character by character in the search control to obtain the search term "ABCD". When the user enters the search character "B" in the search control, the first search character is "B", and the second search character includes: "A". When the user enters the search character "C" in the search control, the first search character is "C", and the second search character includes: "A" and "B". When the user enters the search character "D" in the search control, the first search character is "D", and the second search character includes: "A", "B", "C".
[0043] Step S103: If there is a second search request in a processing state in the search requests corresponding to the second search character, a third search request is determined and cancelled in the second search requests based on the request order of the second search requests.
[0044] Optionally, all the second search requests may be used as the third search request. Alternatively, the second search requests are sorted based on the request order, starting from the second search request with the earliest request order, and a preset proportion of the second search requests are selected as the third search request. Alternatively, the second search requests are sorted based on the request order, starting from the second search request with the latest request order, and a preset number of second search requests are selected as the fourth search request, and the remaining second search requests are used as the third search request.
[0045] In this embodiment, the third search request to be canceled may be determined by selecting a preset number of second search requests as the fourth search request and the remaining second search requests as the third search request. Meanwhile, the fourth search request continues to be processed.
[0046] Optionally, the preset number of requests is 2.
[0047] Exemplarily, a user enters "A", "B", "C", "D" character by character in the search control to obtain the search term "ABCD". When the user enters the first search character "A" in the search control, a search request is generated based on "A" to search for the relevant data of "A" from the server of the business application. When the user enters the search character "B" in the search control, a search request is generated based on "AB" to search for the relevant data of "AB" from the server of the business application. When the user enters the search character "C" in the search control, a search request is generated based on "ABC" to search for the relevant data of "ABC" from the server of the business application. When the user enters the search character "D" in the search control, a search request is generated based on "ABCD" to search for the relevant data of "ABCD" from the server of the business application. In this example, assuming that the first search character currently entered is "D", the corresponding first search request is a search request based on "ABCD", and the second search request is a search request based on "A", a search request based on "AB", and a search request based on "ABC". Assuming that in actual processing, only the latest three search requests are processed, the search request based on "A" will be interrupted at this time, and resources will be concentrated on processing the search requests based on "AB", "ABC" and "ABCD".
[0048] Understandably, if a relatively long search term is input based on the search control, each search character of the search term will trigger a search request during the input of the search term, which means that if the search term to be input is relatively long, then for the search results of the complete search term, the search results based on the previously input search characters are likely to be invalid. Therefore, in order to reduce the computing resource usage of invalid search requests, some search requests in the processing state can be canceled, thereby increasing the priority of the most recently triggered search request, concentrating resources on processing the most recently triggered search request, and improving search efficiency.
[0049] Step S104: perform data search based on the first search request to obtain target search results.
[0050] Specifically, based on the first search request, the server is searched for relevant data. If the data corresponding to the first search request is successfully searched, the data corresponding to the first search request is determined as the target search result. If the first search request fails, a fourth search request other than the third search request in the second search request is determined, and the data successfully searched based on the fourth search request is determined as the target search result.
[0051] Step S105: display the target search results on the search results page.
[0052] Specifically, the target search results may be rendered in real time to the search result page in the form of a data list.
[0053] Exemplarily, it is assumed that the target search result based on the search term "ABCD" includes the first text data and the first target data which is non-text data. Figure 2 As shown, if there is no direct correspondence between the first text data and the first target data, the first text data and the first target data can be displayed in different display areas of the search result page in the form of a data list. Figure 3 As shown, if the first text data corresponds to the first target data, the first text data and the first target data may constitute a display item, and the display item is displayed on the search result page.
[0054] The data search method provided in this embodiment generates a first search request in response to an input operation of a first search character in a search control of a data search page. A search term is displayed in the search control, and the search term includes a first search character and at least one second search character, and at least one second search character is located before the first search character. If there is a second search request in a processing state in the search request corresponding to the second search character, then based on the request order of the second search request, the third search request is determined and canceled in the second search request. Therefore, the processing of invalid search requests can be reduced, thereby reducing the invalid computing resource occupation. And data search is performed based on the first search request to obtain the target search result. Then, the target search result is displayed on the search result page. Therefore, the computing resources allocated to the client can be utilized to the greatest extent, and the first search request can be processed centrally to improve the data search efficiency and reduce the time-consuming data search.
[0055] This embodiment also provides another data search method, which can be used in a client of a business application, wherein the business application is used to provide data search services for users. Figure 4 is a flow chart of another data search method according to an embodiment of the present disclosure, such as Figure 4 As shown, the process includes the following steps:
[0056] Step S401, displaying a data search page, see the above step S101 for details, which will not be repeated here.
[0057] Step S402, in response to the input operation of the first search character in the search control of the data search page, a first search request is generated, the search control displays a search term, the search term includes the first search character and at least one second search character, and the at least one second search character is located before the first search character. See the above step S102 for details, which will not be repeated here.
[0058] Step S403: If there is a second search request in a processing state in the search requests corresponding to the second search character, a third search request is determined and cancelled in the second search requests based on the request order of the second search requests.
[0059] In some optional embodiments, determining and canceling the third search request in the second search request based on the request order of the second search request in the above step S403 includes: determining and canceling the third search request in the second search request based on a preset request quantity and the request order of the second search request.
[0060] Specifically, the above-mentioned determining and canceling the third search request in the second search request based on the preset request quantity and the request order of the second search request includes: sorting the second search requests based on the request order, starting from the second search request with the latest request order, selecting the second search request with a preset request quantity as the fourth search request, and the remaining second search requests as the third search requests.
[0061] Optionally, the preset number of requests is 2.
[0062] It can be understood that if the preset number of requests is 2, only the latest 3 search requests are processed.
[0063] Step S404: perform data search based on the first search request to obtain target search results.
[0064] In some optional implementations, the step S404 of performing a data search based on the first search request to obtain a target search result includes:
[0065] Step S4041: perform data search based on the first search request to obtain a first search result.
[0066] Specifically, based on the first search request, the server is searched for related data to obtain a first search result.
[0067] Step S4042: If the first search result indicates that the search is successful, the first search result is determined as the target search result.
[0068] Specifically, if the server does not search for data related to the first search request, it feeds back a prompt word indicating search failure as the first search result to the client. Alternatively, if the client does not receive feedback information from the server, it determines that the first search result is a search failure.
[0069] Step S4043: If the first search result indicates a search failure, obtain the second search result corresponding to the fourth search request, and determine the target search result based on the second search result. The fourth search request includes search requests in the second search request except the third search request, and the request order of the fourth search request is later than the request order of the third search request.
[0070] It should be noted that when searching for data based on the first search request, the fourth search request is still in the processing state, and the client processes the first search request and the fourth search request in parallel. The client searches for relevant data from the server based on the fourth search request. If the first search result indicates that the search failed, the second search result successfully searched based on the fourth search request is obtained, and the second search result of the most recent search is used as the target search result.
[0071] It is worth noting that in an actual data search scenario, if all second search requests triggered by the second search character are canceled, only the latest first search request is processed. Then, when the data search based on the first search request is slow, or the first search result of the first search request is slow to load, or the first search result of the first search request is not ideal (such as a search failure), the latest search results may not be successfully loaded on the search results page. Therefore, in this embodiment, only the third search request in the second search request is canceled, and the fourth search request continues to be processed, so that when the first search result indicates a search failure, the second search result of the fourth search request can still be displayed on the search results page, which helps the user to determine whether the required search results exist through the second search results while waiting for the latest search results, so as to ensure the continuity of the display of the search results page, thereby improving the search service quality and user experience.
[0072] Step S405: Display the target search results on the search results page. See the above step S105 for details, which will not be repeated here.
[0073] The data search method provided in this embodiment retains the processing of the fourth search request in the second search request while canceling the third search request. If the first search result obtained based on the first search request indicates a search failure, the second search result corresponding to the fourth search request is obtained, and the target search result is determined based on the second search result. Therefore, in the case where the data search of the first search request is slow or the data search fails, the search results of some search terms can be displayed to ensure the continuity of the search data display.
[0074] In some optional implementations, performing data search based on the first search request to obtain the first search result in step S4041 above includes:
[0075] Step a1: perform data search based on a first search request to obtain first text data and a first link to non-text data.
[0076] Optionally, the non-text data includes picture data. Alternatively, the non-text data includes at least one of picture data, audio data and video data.
[0077] Specifically, the client may render the first text data and the first link into a data list to be displayed to obtain a first data list.
[0078] Step a2: loading the first target data based on the first link.
[0079] Specifically, a first data request is generated based on the first link, and corresponding first target data is loaded from the server based on the first data request.
[0080] Specifically, the first link in the first data list will request the first target data from the server again, and load the first target data into the first data list to obtain the second data list.
[0081] It should be noted that the first target data is non-text data.
[0082] Specifically, if the non-text data is image data, the first link is an image link. Based on the first link, the corresponding first target image (ie, first target data) can be loaded.
[0083] Step a3: determining the first text data and the first target data as the first search result.
[0084] It should be noted that the first search result can be represented by the second data list mentioned above, and the client can render the second data list on the screen of the terminal device where the client is located to display the first text data and the first target data.
[0085] The data search method provided in this embodiment, when performing data search based on the first search request, first obtains the first text data corresponding to the first search request and the first link of the non-text data. Then, the first target data is loaded based on the first link. Therefore, the loading of invalid non-text data can be avoided in the instant search, so as to improve the data search efficiency.
[0086] In some optional embodiments, the data search method of the present invention also includes: in the process of performing data search based on the first search request, pausing loading of the second target data of the second link corresponding to the fourth search request, the second link being obtained by performing data search based on the fourth search request, and the second target data being non-text data.
[0087] Specifically, during the processing of the fourth search request, the client performs a data search based on the fourth search request to obtain the second text data and the second link of the non-text data. The corresponding second target data is loaded based on the second link. Considering that non-text data often takes a long time to load, during the data search based on the first search request, the loading of the second target data of the second link corresponding to the fourth search request can be suspended, thereby releasing the computing resources required to load the second target data, so as to further improve the processing efficiency of the first search request.
[0088] The data search method provided in this embodiment pauses loading the data of the second link corresponding to the fourth search request during the data search based on the first search request, thereby further avoiding the loading of redundant non-text data and further improving the data search efficiency.
[0089] In some optional implementations, the step of obtaining the second search result corresponding to the fourth search request in step S4043 includes:
[0090] Step b1, obtaining second text data and a second link of non-text data corresponding to a fourth search request, wherein the second text data and the second link are obtained by searching based on the fourth search request.
[0091] Specifically, the second text data and the second link are obtained by searching the server based on the fourth search request.
[0092] Step b2: loading the second target data based on the second link.
[0093] Specifically, a second data request is generated based on the second link, and corresponding second target data is loaded from the server based on the second data request.
[0094] It is worth noting that compared to text data, loading non-text data often takes longer. Therefore, in order to optimize the time consumption of loading non-text data, whenever the latest first search request is triggered, it is necessary to pause loading all the second search requests triggered by the history, or the non-text data corresponding to the fourth search request, so as to release the computing resources occupied by loading this part of the data, so as to further improve the efficiency of data search. If the first search result indicates that the search failed, the data loading operation of the last second link is awakened, and the second target data corresponding to the second link is continued to be loaded.
[0095] It should be noted that, if part of the data of the second target data has been loaded before pausing the loading of the second target data of the second link, it is only necessary to continue loading the remaining unloaded data of the second target data.
[0096] Step b3: determining the second text data and the second target data as the second search result.
[0097] It should be noted that the second text data and the second target data may be rendered on the screen of the terminal device where the client is located in the form of a data list to display the second text data and the second target data.
[0098] The data search method provided in this embodiment can perform data search on the first search request and the fourth search request in parallel because the fourth search request is in the processing state. In the case where the first search request fails, the second text data corresponding to the fourth search request and the second link of the non-text data are obtained. Then, the second target data is loaded based on the second link. Therefore, while avoiding the loading of redundant non-text data, it is possible to quickly respond to the failure of the latest search term search, thereby improving the quality of data search service.
[0099] In some optional embodiments, obtaining the second text data and the second link of the non-text data corresponding to the fourth search request in the above step b1 includes: in the case where there are multiple fourth search requests, based on the request order of the fourth search requests, obtaining the second text data and the second link corresponding to the fourth search request.
[0100] Specifically, in the case of multiple fourth search requests, based on the request order of the fourth search requests, starting from the fourth search request with the latest request order, the second text data and the second link of the non-text data corresponding to the fourth search request are obtained, and if the second text data and the second link of the non-text data corresponding to the fourth search request are successfully obtained, the second target data is loaded based on the second link. If the second text data and the second link of the non-text data corresponding to the fourth search request are not successfully obtained, or the loading of the second target data corresponding to the fourth search request fails, the second text data and the second link of the non-text data corresponding to the next fourth search request are obtained.
[0101] Exemplarily, if the latest search request (ie, the first search request) fails, the text data and the link to the non-text data of the last successful search request are obtained, so as to load the corresponding non-text data according to the link of the last successful search.
[0102] In addition, if the fourth search request fails, the text data and corresponding non-text data of the last successful search request may be obtained as the target search result.
[0103] The data search method provided in this embodiment obtains the second text data and the second link of the non-text data corresponding to the fourth search request based on the request order of the fourth search request. Therefore, it is possible to improve the relevance of the displayed target search results to the input search terms and the timeliness of the target search results while ensuring the continuity of the search result display of the instant search.
[0104] In some optional implementations, the data search method of the present disclosure further includes: if the first search result indicates that the search is successful, canceling the fourth search request.
[0105] In the data search method provided by this embodiment, if the first search result indicates that the search is successful, the fourth search request is cancelled. Therefore, when a new search character is subsequently input, the judgment process of redundant historical search requests can be reduced to further improve the data search efficiency.
[0106] For ease of understanding, the data search method disclosed herein is described below using a specific application example, which includes the following process:
[0107] Process 1: The client performs keyword recognition on the user input data and updates the recognized search characters to the search box on the data search page in real time.
[0108] Process 2: The client generates a search request based on the search term composed of search characters in the current search box to interact with the server across processes.
[0109] Process 3: The client renders the links of the text data and non-text data (such as image data) read from the server in real time into the data list on the screen of the terminal device.
[0110] Process 4: The client requests the server again based on the link and loads the non-text data corresponding to the link into the local memory.
[0111] Process 5: As the user continues to input data, a search request is triggered each time a search character is recognized. Whenever the latest search request is triggered, the search requests before the latest three search requests are canceled, and the previously triggered process of loading non-text data is suspended.
[0112] Process 6: If the latest search request fails, the last loading of text data and non-text data is activated. If the latest search request succeeds, the searched text data and non-text data are rendered to the screen of the terminal device where the client is located or the data result page.
[0113] As another specific application example, a client of a business application is installed on a mobile phone, and the business application is used to provide a data search service. When a user uses the client to search for data, the client displays a data search page. The user can enter search characters through the search control of the search page to form a search term. The client uses the data search method disclosed in the present invention to instantly respond to the input operation of the search characters in the search control, and instantly displays the relevant search results of the search term in the current search control on the search results page.
[0114] It is worth noting that, compared with the related art which only focuses on the optimization of the server-side search strategy, the data search method disclosed in the present invention focuses on the optimization of the client-side search strategy. In the data search method disclosed in the present invention, the client can optimize the client's local search strategy by canceling the previously triggered search request and pausing the previously triggered processing of loading non-text data. Therefore, the processing priority of the client's search request can be adjusted to reallocate the client's computing resources, thereby making the most of the client's limited computing resources, maximizing the search benefit in the shortest time, and effectively improving the search efficiency.
[0115] In the present embodiment, a data search device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0116] This embodiment provides a data search device, such as Figure 5 As shown, including:
[0117] The page display module 501 is used to display the data search page;
[0118] A first processing module 502 is configured to generate a first search request in response to an input operation of a first search character in a search control of a data search page, wherein a search term is displayed in the search control, and the search term includes the first search character and at least one second search character, wherein the at least one second search character is located before the first search character;
[0119] A second processing module 503 is configured to determine and cancel a third search request in the second search requests based on a request order of the second search requests if there is a second search request in a processing state in the search requests corresponding to the second search character;
[0120] A third processing module 504 is used to perform data search based on the first search request to obtain target search results;
[0121] The result display module 505 is used to display the target search results on the search result page.
[0122] In some optional implementations, the third processing module 504 includes:
[0123] A first search unit, configured to search for data based on a first search request to obtain a first search result;
[0124] a data processing unit, configured to determine the first search result as a target search result if the first search result indicates that the search is successful;
[0125] The second search unit is used to obtain a second search result corresponding to a fourth search request if the first search result indicates a search failure, and determine a target search result based on the second search result, the fourth search request including search requests in the second search request except the third search request, and the request order of the fourth search request is later than the request order of the third search request.
[0126] In some optional implementations, the first search unit includes:
[0127] A first search subunit, configured to perform a data search based on a first search request to obtain first text data and a first link to non-text data;
[0128] A first loading subunit, configured to load first target data based on a first link;
[0129] The first processing subunit is used to determine the first text data and the first target data as a first search result.
[0130] In some optional implementations, the data search device of the present disclosure further includes:
[0131] The fourth processing module is used to pause loading the second target data of the second link corresponding to the fourth search request during the data search based on the first search request, the second link is obtained based on the data search of the fourth search request, and the second target data is non-text data.
[0132] In some optional implementations, the second search unit includes:
[0133] A data acquisition subunit, configured to acquire second text data and a second link of non-text data corresponding to a fourth search request, wherein the second text data and the second link are obtained by searching based on the fourth search request;
[0134] A second loading subunit, configured to load second target data based on a second link;
[0135] The second processing subunit is used to determine the second text data and the second target data as the second search result.
[0136] In some optional implementations, the data acquisition subunit is specifically used to: when there are multiple fourth search requests, based on the request order of the fourth search requests, acquire the second text data and the second link corresponding to the fourth search requests.
[0137] In some optional implementations, the data search device of the present disclosure further includes:
[0138] The fifth processing module is configured to cancel the fourth search request if the first search result indicates that the search is successful.
[0139] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0140] The data search device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0141] The present disclosure also provides an electronic device having the above Figure 5 The data search device shown.
[0142] See also Figure 6 , Figure 6 is a structural block diagram of an electronic device provided by an optional embodiment of the present disclosure, such as Figure 6 As shown, the electronic device includes: one or more processors 601, memory 602, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 6 A processor 601 is taken as an example.
[0143] The processor 601 may be a central processing unit, a network processor or a combination thereof. The processor 601 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0144] The memory 602 stores instructions executable by at least one processor 601 , so that the at least one processor 601 executes the method shown in the above embodiment.
[0145] The memory 602 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 602 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 602 may optionally include a memory remotely arranged relative to the processor 601, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0146] The memory 602 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 602 may also include a combination of the above types of memory.
[0147] The electronic device also includes an input device 603 and an output device 604. The processor 601, the memory 602, the input device 603 and the output device 604 may be connected via a bus or other means. Figure 6 The example of connecting through bus is taken in the following.
[0148] The input device 603 can receive input digital or character information, and generate key signal input related to the user settings and function control of the electronic device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator rod, one or more mouse buttons, a trackball, a joystick, etc. The output device 604 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device can be a touch screen.
[0149] The embodiments of the present disclosure also provide a computer-readable storage medium. The above-mentioned method according to the embodiments of the present disclosure can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium and downloaded through a network, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0150] A part of the present disclosure may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present disclosure through the operation of the computer. Those skilled in the art should understand that the existence of computer program instructions in computer-readable media includes, but is not limited to, source files, executable files, installation package files, etc., and accordingly, the way in which computer program instructions are executed by a computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.
[0151] Although the embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A data search method, characterized in that: The method comprises: Display the data search page; In response to an input operation of a first search character in a search control of the data search page, a first search request is generated, wherein a search term is displayed in the search control, and the search term includes the first search character and at least one second search character, and the at least one second search character is located before the first search character; If there is a second search request in a processing state among the search requests corresponding to the second search character, determining and canceling a third search request in the second search requests based on the request order of the second search requests; Performing a data search based on the first search request to obtain a target search result; The target search results are displayed on the search results page.
2. The data search method according to claim 1, characterized in that: The performing data search based on the first search request to obtain target search results includes: Performing a data search based on the first search request to obtain a first search result; If the first search result indicates that the search is successful, determining the first search result as the target search result; If the first search result indicates a search failure, obtain the second search result corresponding to the fourth search request, and determine the target search result based on the second search result, the fourth search request includes search requests in the second search request except the third search request, and the request order of the fourth search request is later than the request order of the third search request.
3. The data search method according to claim 2, characterized in that: The performing of data search based on the first search request to obtain a first search result includes: Performing a data search based on the first search request to obtain first text data and a first link to non-text data; loading first target data based on the first link; The first text data and the first target data are determined as the first search result.
4. The data search method according to claim 3, characterized in that: The method comprises: During the data search based on the first search request, loading of the second target data of the second link corresponding to the fourth search request is paused, the second link is obtained by searching the data based on the fourth search request, and the second target data is non-text data.
5. The data search method according to claim 3, characterized in that: The obtaining the second search result corresponding to the fourth search request includes: Acquire second text data and a second link of non-text data corresponding to the fourth search request, where the second text data and the second link are obtained by searching based on the fourth search request; loading second target data based on the second link; The second text data and the second target data are determined as the second search result.
6. The data search method according to claim 5, characterized in that: The obtaining the second text data and the second link of the non-text data corresponding to the fourth search request includes: In the case that there are multiple fourth search requests, the second text data and the second link corresponding to the fourth search requests are acquired based on the request order of the fourth search requests.
7. The data search method according to claim 2, characterized in that: The method further comprises: If the first search result indicates that the search is successful, the fourth search request is canceled.
8. A data search device, characterized in that: The device comprises: A page display module, used to display a data search page; A first processing module, configured to generate a first search request in response to an input operation of a first search character in a search control of the data search page, wherein a search term is displayed in the search control, and the search term includes the first search character and at least one second search character, wherein the at least one second search character is located before the first search character; a second processing module, configured to determine and cancel a third search request in the second search request based on a request order of the second search request if there is a second search request in a processing state in the search request corresponding to the second search character; A third processing module, configured to perform a data search based on the first search request to obtain a target search result; The result display module is used to display the target search results on the search result page.
9. An electronic device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the data search method according to any one of claims 1 to 7 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the data search method according to any one of claims 1 to 7.
11. A computer program product, characterized in that The method comprises computer instructions for causing a computer to execute the data search method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Instant search method and device
CN106649640A
Address matching method and device, server and computer readable storage medium
CN117150152A
