Search methods, apparatus, devices and storage media

By identifying a second search term associated with the first search term and retrieving results from the cache component when the search system malfunctions, the problem of information retrieval obstacles caused by search system failures is solved, improving the user's search experience and efficiency.

CN122309828APending Publication Date: 2026-06-30BEIJING ZITIAO NETWORK TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING ZITIAO NETWORK TECH CO LTD
Filing Date
2024-12-31
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

When the search system of an electronic device malfunctions, users are unable to obtain search results corresponding to their search content, resulting in information retrieval being hindered and affecting the user's search experience.

Method used

When the search system is determined to be in a fault state, at least one second search term associated with the first search term is identified, and the search result is retrieved from the cache component corresponding to the search system and output.

Benefits of technology

When the search system malfunctions, it provides search results corresponding to the search content, improving the user's search experience, reducing information access barriers, and increasing search efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122309828A_ABST
    Figure CN122309828A_ABST
Patent Text Reader

Abstract

This application provides a search method, apparatus, device, and storage medium. The search method is applied to a terminal device, which includes a search system. The method includes: responding to a first search term input by a user, determining the operating state of the search system; when the operating state of the search system is a fault state, determining at least one second search term associated with the first search term; retrieving search results from a cache component based on the first and second search terms, the cache component corresponding to the search system; and outputting the search results. This application can provide users with search results corresponding to the search content even when the search system malfunctions, ensuring unimpeded information access and thus improving the user search experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a search method, apparatus, device, and storage medium. Background Technology

[0002] With the continuous development of computer and internet technology, people can use electronic devices to search for information they need.

[0003] Currently, when users perform searches on electronic devices, they typically enter their search terms into the search box provided by the device. The search system running on the device then retrieves and outputs the corresponding search results based on the user's input. However, when the search system on an electronic device malfunctions, users may not be able to obtain search results corresponding to their search terms, resulting in information retrieval obstruction and impacting the user's search experience. Summary of the Invention

[0004] This application provides a search method, apparatus, device, and storage medium that can provide users with search results corresponding to the search content when the search system malfunctions, thereby ensuring unimpeded information access and improving the user's search experience.

[0005] In a first aspect, embodiments of this application provide a search method using a terminal device, the terminal device including a search system, the method comprising:

[0006] The operating status of the search system is determined in response to the first search term entered by the user;

[0007] When the search system is in a fault state, at least one second search term associated with the first search term is determined;

[0008] Based on the first search term and the second search term, search results are obtained from a cache component, which corresponds to the search system;

[0009] Output the search results.

[0010] Secondly, embodiments of this application provide a search device configured in a terminal device, the terminal device including a search system, comprising:

[0011] The first determining module is used to determine the operating status of the search system in response to the first search term input by the user;

[0012] The second determining module is used to determine at least one second search term associated with the first search term when the operating state of the search system is a fault state.

[0013] The result acquisition module is used to acquire search results from a cache component based on the first search term and the second search term, wherein the cache component corresponds to the search system;

[0014] The results output module is used to output the search results.

[0015] Thirdly, embodiments of this application provide an electronic device, including:

[0016] A processor and a memory, the memory being used to store a computer program, and the processor being used to invoke and run the computer program stored in the memory to perform the search method as described in the foregoing first aspect embodiment and various implementations.

[0017] Fourthly, embodiments of this application provide a computer-readable storage medium for storing a computer program that causes a computer to perform the search method as described in the foregoing first aspect embodiments and various implementations.

[0018] Fifthly, embodiments of this application provide a computer program product containing program instructions that, when executed on an electronic device, cause the electronic device to perform the search method as described in the first aspect embodiment and its various implementations.

[0019] The technical solution disclosed in this application determines the operating status of the search system in response to a first search term input by the user. When the operating status of the search system is determined to be a fault state, at least one second search term associated with the first search term is determined. Then, based on the first and second search terms, search results are obtained from the cache component corresponding to the search system and output. In this way, when the search system fails, search results corresponding to the search content can be provided to the user, so that information can be obtained without obstacles, thereby improving the user's search experience. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 A flowchart illustrating a search method provided in an embodiment of this application;

[0022] Figure 2 A flowchart illustrating another search method provided in an embodiment of this application;

[0023] Figure 3A schematic diagram illustrating different moments in an embodiment of this application;

[0024] Figure 4 A flowchart illustrating another search method provided in an embodiment of this application;

[0025] Figure 5 A schematic block diagram of a search device provided in an embodiment of this application;

[0026] Figure 6 This is a schematic block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0027] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0028] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or server that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.

[0029] In this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or solution described as "exemplary" or "for example" in this application should not be construed as being better or more advantageous than other embodiments or solutions. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0030] In the description of the embodiments in this application, unless otherwise stated, "multiple" means two or more, that is, at least two. "At least one" means one or more. "Any" means any one or any several.

[0031] As mentioned earlier, when users perform a search on an electronic device, they typically enter their search terms into the search box provided by the device. The search system on the device then retrieves and outputs the corresponding search results based on the user's input. However, when the search system on an electronic device malfunctions, users may not be able to obtain search results corresponding to their search terms, resulting in information retrieval being hindered and thus affecting the user's search experience.

[0032] To address the aforementioned technical problems, this application provides a search method, apparatus, device, and storage medium to solve the problem that when a search system malfunctions, users may be unable to obtain search results corresponding to the search content, resulting in obstructed information acquisition.

[0033] The technical solutions provided by the embodiments of this application will be described in detail below through some examples. The embodiments described below can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.

[0034] Figure 1 This is a flowchart illustrating a search method provided in an embodiment of this application. The search method of this embodiment can be executed by a search device, which can consist of hardware and / or software and can be integrated into an electronic device with search functionality. That is, the electronic device includes a search system. In this application, the electronic device can be, but is not limited to, smartphones, tablets, handheld computers, netbooks, personal digital assistants (PDAs), and wearable devices. Wearable devices can include smart glasses, smartwatches, smart bracelets, and head-mounted devices, etc. No limitation is placed on the type of electronic device here. It is understood that the aforementioned electronic devices can also be referred to as terminal devices or user equipment (UE), etc.

[0035] like Figure 1 As shown, the method may include the following steps:

[0036] S101, in response to the first search term entered by the user, determines the operating status of the search system.

[0037] In this application, the search system described above can be any platform or tool that supports search operations and outputs search results; no specific form of the search system is limited here.

[0038] Furthermore, the aforementioned search system may include a retrieval module and a packaging module. The retrieval module can be understood as a recall module. It is used to quickly find search results relevant to the user's search query from a large amount of data. The packaging module is used to perform content population and filtering on the search results found by the retrieval module, and then output the processed search results to the user.

[0039] The packaging module populates the search results found by the retrieval module with content. This can involve filling in fields within the search results to obtain richer content. For example, if the search result is a card containing card identification information, card type, and card summary, the packaging module determines it to be a content card based on its card type. Then, it can obtain the content to be filled based on the content card's identification information, such as the content title, detailed content information, content source information, and content illustrations. This content card identification information can be understood as information that uniquely identifies the content card; that is, the uniqueness information of the content card.

[0040] In addition, the packaging module filters the search results found by the retrieval module. This can include security filtering, visibility filtering, and time filtering, etc., but no specific restrictions are imposed here.

[0041] The aforementioned security filtering refers to screening and filtering the search results found by the search module to remove unsafe results, including those containing harmful information, viruses, and sensitive information. The aforementioned visibility filtering refers to selecting results from the search results found by the search module that can be displayed normally. The aforementioned time filtering refers to selecting results from the search results found by the search module that fall within a specified time period.

[0042] Optionally, when a user needs to obtain the required content information through a search, they can send a search operation by entering the search content in the search box on the corresponding interface of the terminal device and triggering the search control on that interface.

[0043] Typically, users can enter search terms in various forms. Optional search terms can be a short phrase or sentence, such as "What are the benefits of drinking tea regularly?"; or they can be one or more keywords, such as pencil or kitten.

[0044] Furthermore, since short phrases or sentences may contain redundant information that is not needed for the search operation, when the user's search input is received, it can be determined whether the search content is a keyword or a short phrase or sentence. If the search content is determined to be a sentence or short phrase, it is processed through word segmentation or syntactic analysis to extract keywords, which are then used as the user's first search term. If the search content is determined to be a keyword, that keyword is used as the user's first search term.

[0045] For example, suppose a user's search query is the short phrase "What are the benefits of drinking tea regularly?" This phrase can be segmented into multiple words: "regularly," "drink tea," "have," "which," and "benefits." Then, redundant words are removed from these segments, eliminating irrelevant terms like "have" and "which," retaining only the core words "regularly," "drink tea," and "benefits" as keywords. These retained keywords are then used as the user's first search term.

[0046] For example, if the user enters the keyword "fireworks", then "fireworks" will be used as the first search term entered by the user.

[0047] Considering that the search system in a terminal device may malfunction at any time during operation, this application can determine the operating status of the search system after obtaining the first search term entered by the user. Then, based on the operating status of the search system, different search strategies can be adopted to obtain corresponding search results based on the first search term, ensuring that the user can obtain the required content information through the search system on the terminal device at any time, thereby improving the user search experience.

[0048] In this application, the operating states of the search system include: fault state and normal state.

[0049] In some alternative embodiments, the present application determines the operating status of the search system through the following steps:

[0050] Step S1: Obtain the operating metrics of the search system.

[0051] The operational metrics of the search system include at least one of the following: system availability, system empty result rate, and system latency information.

[0052] Optionally, when obtaining the system availability (Service-Level Agreement, SLA) of the search system, the number of unavailable page views (PV) and the total number of page views of the search system can be obtained. Then, the system availability of the search system can be determined based on the number of unavailable page views and the total number of page views of the search system using the following formula (1).

[0053]

[0054] It should be understood that the unavailable pageviews of the search system mentioned above refer to the number of times users accessed the search system but failed to retrieve the page when the system malfunctioned. The total pageviews of the search system mentioned above refer to the total number of times all pages were requested and fully loaded within a certain time frame. This time frame can be flexibly set according to actual needs, and no restrictions are imposed here. For example, it could be 1 hour or 5 hours.

[0055] Furthermore, when obtaining the empty result ratio of the search system, it can be obtained by acquiring the number of times the search system returned empty results and the total number of requests to the search system. Then, the empty result ratio of the search system is determined by the following formula (2) based on the number of times the search system returned empty results and the total number of requests to the search system.

[0056]

[0057] Furthermore, when obtaining the system latency information of the search system, it can be done by obtaining the time when the search system returns the results and the time when the search system is requested. Then, the system latency information of the search system is determined according to the following formula (3) based on the time when the search system returns the results and the time when the search system is requested.

[0058] latency = Time it takes for the search system to return results - Time it takes to request the search system................(3)

[0059] Step S2: Determine the operating status of the search system based on its operating metrics.

[0060] Optionally, this application may compare each obtained operating indicator with a corresponding threshold, and determine whether the operating status of the search system is normal or faulty based on the comparison result.

[0061] In some embodiments, the system availability of the search system can be compared with an availability threshold, the system empty result rate of the search system can be compared with an empty result rate threshold, and the system latency information of the search system can be compared with a latency threshold. If the system availability of the search system is less than the availability threshold, the system empty result rate is greater than or equal to the empty result rate threshold, and / or the system latency information is greater than or equal to the latency threshold, then the operating state of the search system is determined to be a fault state. If the system availability of the search system is greater than or equal to the availability threshold, the system empty result rate is less than the empty result rate threshold, and the system latency information is less than the latency threshold, then the operating state of the search system is determined to be a normal state.

[0062] The availability threshold, empty result rate threshold, and latency threshold can be flexibly set according to the performance of the search system and the type of hardware device; no specific restrictions are imposed here. For example, the availability threshold can be set to 95% or 99%, the empty result rate threshold can be set to 0.9% or 1%, and the latency threshold can be set to 1000 milliseconds.

[0063] In other words, when at least one of the following information regarding the search system's availability, empty result rate, and latency does not meet normal operating conditions, the search system can be determined to be in a fault state.

[0064] It should be understood that, since the retrieval module in a search system is primarily used to retrieve results related to the user's search content from a large amount of data, determining the operating status of the search system in this application specifically refers to determining the operating status of the retrieval module within the search system. Correspondingly, the aforementioned acquisition of the search system's operating indicators and determination of the search system's operating status based on these indicators specifically refers to acquiring the operating indicators of the retrieval module within the search system, and then determining the operating status of the retrieval system based on these indicators. The operating status of the retrieval module includes: normal status and fault status.

[0065] S102, when the search system is in a fault state, determine at least one second search term associated with the first search term.

[0066] S103, based on the first search term and the second search term, retrieve the search results from the cache component, which corresponds to the search system.

[0067] The search results may include at least one of documents, images, videos, audio, and links; there are no restrictions on the format of the search results.

[0068] Considering that a search system malfunction might prevent users from accessing the information they need, thus hindering their access to content, a caching component can be configured for the search system. This component stores the search results obtained during normal operation, along with the corresponding search terms. Therefore, even if the search system malfunctions, when a user enters a search term, the corresponding search result can still be retrieved from the cached component based on that first search term. This provides disaster recovery capabilities, ensuring that search services can continue to be provided to users even during system failures.

[0069] Optionally, storing the search results obtained by the search system during normal operation, along with the corresponding search terms, in the cache component can be implemented in a key-value pair format. Specifically, each historically searched term and its corresponding search result can be stored in the cache component, with the search term as the key and the corresponding search result as the value.

[0070] It should be understood that the aforementioned cache component corresponding to the search system can be any device or module with data caching function, such as storage medium or memory, and there are no specific restrictions on the type of cache component here.

[0071] In some optional embodiments, considering that some search terms may have a low search frequency or usage frequency, or even that some search terms may never be searched (i.e., zero search frequency or usage frequency), the search system's cache component may not store these search terms and their corresponding search results. Consequently, when the search system malfunctions, the first search term entered by the user may not be able to retrieve the corresponding search results from the cache component. In other words, when the search system malfunctions, the first search term entered by the user may not be able to retrieve the corresponding search results from the cache component, resulting in a low hit rate for retrieving search results from the cache component.

[0072] Therefore, when the search system is determined to be in a fault state (i.e., the search system is malfunctioning), this application can expand upon the first search term entered by the user to generate at least one second search term related to the first search term. Then, based on the first search term and at least one second search term, the corresponding search results can be retrieved from the cache component of the search system. Thus, the hit rate of retrieving search results from the cache component based on the first search term and at least one second search term is higher than the hit rate of retrieving search results from the cache component based solely on the first search term. This improves the hit rate of retrieving search results from the cache component when the search system is malfunctioning, making it easier for users to obtain the information they need, thereby improving the user's search experience.

[0073] In some alternative embodiments, expanding at least one second search term related to the first search term entered by the user can be achieved in the following way:

[0074] The first method involves invoking a search term extension service to obtain at least one second search term that is associated with the first search term.

[0075] Optionally, the search term expansion service can be used to automatically recommend at least one word based on the first search term and use that word as the second search term.

[0076] It should be understood that the aforementioned search term expansion service can refer to any service that has the function of automatically expanding search terms.

[0077] For example, assuming the user's first search term is "down jacket", the search term expansion service can obtain second search terms such as "Chanel-style down jacket", "trendy down jacket", "winter coat", "20XX new down jacket", etc.

[0078] For example, if a user's first search term is "Xi'an specialty products", then the search term expansion service can obtain second search terms such as "Xi'an souvenirs", "Xi'an gifts", "Xi'an cuisine", "Shaanxi souvenirs", etc.

[0079] The second approach involves inputting the first search term entered by the user into a search term expansion model. The search term expansion model then outputs scores for other search terms that are related to the first search term, and at least one second search term is selected based on the scores of the other search terms.

[0080] In this application, the search term expansion model can be any network model that supports calculating scores of other search terms that are related to the search term. This network model can be a network model specifically trained for this application, or it can be an existing network model. This application does not impose any restrictions on it.

[0081] Optionally, the similarity between the user-input first search term and each word in a preset database is calculated using a search term expansion model. Then, words with similarity scores greater than a similarity threshold are identified as other search terms associated with the first search term, and their similarity scores are used as their scores. Finally, a preset number of other search terms are selected as the second search term in descending order of their scores.

[0082] The aforementioned preset database can store all historical search terms that have undergone search operations.

[0083] Furthermore, the aforementioned similarity threshold and preset quantity are all adjustable parameters, which can be flexibly set according to actual application needs. No specific restrictions are imposed on them here.

[0084] It should be noted that the two methods of obtaining the second search term described above are merely illustrative examples and are not intended to limit the scope of this application. Other methods may also be used to obtain at least one second search term.

[0085] In some optional embodiments, this application retrieves corresponding search results from the cache component corresponding to the search system based on a first search term and at least one second search term. Optionally, using the first search term and at least one second search term as keys, it queries the cache component corresponding to the search system for a target key that matches these keys. Then, it determines the target value based on the target key and identifies the search result corresponding to the target value as the search result to be retrieved.

[0086] S104, when the search system is in normal operation, obtain the search results based on the first search term.

[0087] Optionally, when it is determined that the search system is operating normally, i.e., the search system is operating normally, this application can obtain the corresponding search results based on the first search term entered by the user, according to the search link when the search system is operating normally.

[0088] It should be understood that the process of obtaining corresponding search results based on the first search term entered by the user when the search system is running normally is a conventional technology, which will not be elaborated on here. For details, please refer to the existing technology.

[0089] Furthermore, after obtaining the search results, this application may also store the first search term and the search results corresponding to the first search term in a cache component, so that when the search system fails in the future, the search results corresponding to the first search term can be obtained from the cache component.

[0090] S105, output the search results.

[0091] Optionally, after obtaining the search results through different methods, this application may output the search results so that users can obtain the content information they need.

[0092] In some alternative embodiments, search results can be displayed through the search response interface of the terminal device and at least one of the search results can be played through the speaker of the terminal device to output search results to the user, thus meeting the personalized search needs of different users.

[0093] The technical solution disclosed in this application determines the operating status of the search system in response to a first search term input by the user. When the operating status of the search system is determined to be a fault state, at least one second search term associated with the first search term is determined. Then, based on the first and second search terms, search results are obtained from the cache component corresponding to the search system and output. In this way, when the search system fails, search results corresponding to the search content can be provided to the user, so that information can be obtained without obstacles, thereby improving the user's search experience.

[0094] In some optional embodiments, considering that the cache component corresponding to the search system may store the first search term entered by the user and the search results corresponding to the first search term, when the operating state of the search system is determined to be in a fault state, this application may optionally first retrieve the search results from the cache component based on the first search term. If a search result is retrieved, the search operation is stopped and the search result is output to the user. If a search result cannot be retrieved from the cache component based on the first search term, at least one second search term is retrieved based on the first search term, and then the search results are retrieved from the cache component based on at least one second search term. This can quickly respond to the user's query request, reduce the user's waiting time, and also reduce the number of accesses to the cache component, reduce the load on the cache component, and improve the resource utilization of the search system. In addition, when a search result cannot be retrieved from the cache component using the first search term, retrieving the corresponding search result from the cache component based on at least one second search term associated with the first search term can provide more search results related to the user's query intent, thereby increasing the possibility of the user obtaining the required information.

[0095] The following is combined with Figure 2 The following provides a further explanation of step S102 in the aforementioned embodiments, which determines at least one second search term associated with the first search term. For example... Figure 2 As shown, step S102 above may include the following steps S102-1 to S102-2:

[0096] S102-1, Get the request error rate of the caching component at the first moment.

[0097] In some optional embodiments, during operation, the cache component corresponding to the search system can proactively send to the terminal device the total number of result retrieval requests received at the first moment, as well as the response status for each result retrieval request. Alternatively, the terminal device can send to the cache component corresponding to the search system the total number of retrieval requests received at the first moment, as well as the response status for each search result retrieval request, at preset time intervals. The aforementioned result retrieval request can be understood as a search result retrieval request, and this request may carry a first search term or a second search term.

[0098] In this application, the total number of requests may include a first number of requests and a second number of requests, wherein the first number of requests is the number of requests to obtain search results from the cache component based on the second search term at a first moment; and the second number of requests is the number of requests to obtain search results from the cache component based on the first search term at a first moment.

[0099] Furthermore, the aforementioned response status refers to whether the caching component is processing the search result retrieval request normally, and may include normal status and error status.

[0100] This normal state means that the caching component can process the search result retrieval request normally. That is, the caching component can obtain the corresponding search result based on the first or second search term carried in the search result retrieval request. At this time, the caching component can send a response status code with the first value for the search result retrieval request.

[0101] This error status indicates that the caching component cannot properly process the search result retrieval request. In other words, the caching component cannot retrieve the corresponding search result based on the first or second search term carried in the search result retrieval request, or the retrieved search result contains an error. In this case, the caching component can send a response status with the second value for the search result retrieval request.

[0102] In this application, the first value can be selected as 1, and the second value can be selected as 0. That is, when it is determined that the response status sent by the caching component is 1, the response status of the caching component to the search result retrieval request is determined to be a normal status; when it is determined that the response status sent by the caching component is 0, the response status of the caching component to the search result retrieval request is determined to be an error status.

[0103] Optionally, after obtaining the total number of requests sent by the caching component at the first moment and the response status of the search result retrieval request, this application can determine the number of response errors of the caching component at the first moment based on the response status of the caching component to the search result retrieval request, that is, determine the number of error statuses of the caching component to the search result retrieval request at the first moment.

[0104] Then, based on the total number of requests and the number of response errors of the caching component at the first moment, the request error rate of the caching component at the first moment is obtained.

[0105] In some embodiments, the request error rate of the caching component at the first moment can be obtained by the following formula (4):

[0106] Request error rate = Number of response errors / Total number of requests................(4)

[0107] In other words, this application obtains the request error rate of the caching component at the first moment, which may include obtaining the total number of requests and the number of response errors of the caching component at the first moment; and obtaining the request error rate of the caching component at the first moment based on the total number of requests and the number of response errors.

[0108] S102-2, Based on the request error rate and the first search term, determine at least one second search term associated with the first search term at the second time.

[0109] In this application, the second moment is located after the first moment, and there is a preset time interval between the second moment and the first moment. This preset time interval can be flexibly set according to actual needs, and no restrictions are imposed here; for example, the preset time interval can be 30 seconds or 1 minute.

[0110] In some alternative embodiments, determining at least one second search term associated with the first search term at a second time point can be achieved through the following steps:

[0111] The first step is to determine whether the request error rate of the caching component at the first moment is greater than a preset threshold. If it is less than or equal to the threshold, proceed to the second step; if it is greater, proceed to the third step.

[0112] The preset threshold is an adjustable parameter, which can be flexibly set according to the performance of the caching component.

[0113] Optionally, the request error rate of the caching component at the first moment can be compared with a preset threshold to determine whether the request error rate is greater than, less than or equal to, the preset threshold.

[0114] The second step is to obtain a first number of second search terms based on the first search term, and to determine the second search term as the second search term associated with the first search term at the second time, where the first number is the number of second search terms at the first time.

[0115] The number of second search terms in the first moment can be understood as the number of second search terms that the caching component can process in the first moment.

[0116] Optionally, if the request error rate is determined to be less than or equal to a preset threshold, it indicates that the cache component corresponding to the search system is currently performing well, has low data processing pressure, and has sufficient resources to handle a large number of search result retrieval requests. In this case, based on the first search term entered by the user, a second search term with the same number as the second search term at the first moment can be obtained, and the obtained second search term can be used as the second search term associated with the first search term at the second moment.

[0117] For example, if a user enters "thermos cup" as their first search term, and there are 9 second search terms at the first moment, then based on "thermos cup", 9 second search terms can be obtained, specifically "large capacity thermos cup", "high-value thermos cup", "women's thermos cup", "men's thermos cup", "high-value cup", "children's thermos cup", "thermos cup in winter", "316 thermos cup", and "compact thermos cup".

[0118] The third step is to determine the second quantity if the request error rate is greater than the preset threshold. Then, based on the first search term, obtain the second search term with the second quantity, and determine the second search term as the second search term associated with the first search term at the second time. The second quantity is the number of second search terms at the second time.

[0119] Optionally, if the request error rate is determined to be greater than a preset threshold, it indicates that the caching component corresponding to the search system is currently experiencing poor performance and high data processing pressure, lacking sufficient resources to handle a large number of search result retrieval requests. In this case, the number of second search terms that the caching component can process at the second moment can be calculated based on its processing pressure and performance; this is the second quantity. Then, based on the first search term entered by the user, the second quantity of second search terms is obtained, and these obtained second search terms are identified as the second search terms associated with the first search term at the second moment.

[0120] In some alternative embodiments, calculating the number of second search terms for the cache component at a second time step based on the processing pressure and performance of the cache component may include the following steps:

[0121] Step A1: Obtain the request change rate of the caching component at the first moment.

[0122] In this application, the request conversion rate of the caching component at the first moment can be understood as the percentage increase in requests to the caching component at the first moment.

[0123] In some optional embodiments, the request change rate of the caching component at the first time point can be obtained by obtaining the first request count of the caching component at the first time point and the first request count of the caching component at the third time point. Then, the request change rate of the caching component at the first time point is obtained based on the first request count of the caching component at the first time point and the first request count of the caching component at the third time point.

[0124] The third time point mentioned above is earlier than the first time point, and the first request number at the first time point is the number of requests to retrieve search results from the cache component based on the second search term at the first time point; the first request number at the third time point is the number of requests to retrieve search results from the cache component based on the second search term at the third time point.

[0125] Optionally, this application obtains the request change rate of the cache component at the first moment based on the number of first requests of the cache component at the first moment and the number of first requests of the cache component at the third moment, which can be achieved by the following formula (5):

[0126]

[0127] Where, incr_ratio is the request change rate of the caching component at the first moment, th i Let th be the number of requests made by the caching component at time i. i This can represent the number of requests made by the caching component at the first moment; th i-1 Let th be the number of requests made by the caching component at time i-1. i-1 This can represent the number of requests made by the caching component at the third moment.

[0128] For example, such as Figure 3 As shown, Figure 3 The sequence of the first, second, and third time points is shown. Furthermore, the number of second search terms K_i that the caching component can process at the first time point, the number of second search terms K_i+1 that the caching component can process at the second time point, and the number of second search terms K_i-1 that the caching component can process at the third time point are also shown.

[0129] Step A2: Determine the second quantity based on the first quantity and the requested rate of change.

[0130] In some alternative embodiments, when determining the second quantity, the number of second search terms to be reduced by the caching component at the second time can be determined first based on the first quantity and the request change rate; then, the second quantity is obtained by subtracting the number of second search terms to be reduced by the caching component at the second time from the first quantity.

[0131] Optionally, the determination of the number of second search terms to be reduced by the cache component at the second time step based on the first quantity and the request change rate can be achieved by the following formula (6):

[0132] cntN i+1 =k i *incr_ratio i .......................(6)

[0133] Among them, cntN i+1 To reduce the number of second search terms processed by the caching component at time i+1, in this application, cntN i+1 This can represent the number of second search terms that the cache needs to reduce in the second time step, i.e., the number of second search terms that the cache component needs to reduce in the second time step; k i In this application, k represents the number of second search terms that the caching component can process at time i. i This can represent the number of second search terms that the caching component can process at the first moment, i.e., the first number; incr_ratio i In this application, incr_ratio represents the request change rate of the caching component at time i. i This can be represented as the request change rate of the caching component at the first moment.

[0134] For example, assuming the request error rate of the caching component is greater than a preset threshold at the first moment, the request change rate at the first moment will be used as a basis for calculation. Given the first quantity of 10, the number of second search terms to be reduced by the cache component at the second time step can be calculated using the formula (6) above as 10 * 0.25 = 2.5. Since the number of second search terms cannot be a decimal, the number of second search terms to be reduced by the cache component at the second time step can be determined to be 3. Then, subtracting the number of second search terms to be reduced by the cache component at the second time step from the number of second search terms that the cache component can process at the first time step, i.e., the first quantity of 10, yields a second quantity of 10 - 3 = 7.

[0135] After obtaining the second quantity, this application can obtain a second search term with the second quantity based on the search term, and determine the obtained second search term as the second search term associated with the first search term at the second time. For example, assuming the user's first search term is "children's picture book" and the second quantity is 7, then 7 second search terms can be obtained based on "children's picture book", specifically "children's 3D pop-up book", "children's early education book", "children's comic book", "children's storybook", "pop-up book", "children's book", and "comic".

[0136] The technical solution disclosed in this application determines the operating status of the search system in response to a first search term input by the user. When the operating status of the search system is determined to be faulty, at least one second search term associated with the first search term is identified. Then, based on the first and second search terms, search results are retrieved from the corresponding cache component of the search system and output. This allows the user to receive search results corresponding to the search content even when the search system malfunctions, ensuring unimpeded information retrieval and improving the user search experience. Furthermore, this application can dynamically determine the number of second search terms generated based on the first search term input by the user, according to the performance of the cache component and the data processing pressure. When retrieving search results from the cache component based on the first and second search terms, on the one hand, it can improve the hit rate of search results retrieved from the cache component when the search system malfunctions, making it easier for users to obtain the information they need. On the other hand, it can reduce the data processing pressure on the cache component, increase the speed of search result retrieval, and thus improve user satisfaction and search efficiency in obtaining the required information.

[0137] In some alternative embodiments, considering that the number of second search terms obtained based on the first search term can be multiple, the following is combined with... Figure 4 The following is a further explanation of the content described in step S103 of the foregoing embodiments. For example... Figure 4 As shown, step S103 above may include the following steps S103-1 to S103-3:

[0138] S103-1, determine the edit distance between each second search term and the first search term.

[0139] S103-2, sort multiple second search terms according to edit distance to obtain the first sorting result.

[0140] Optionally, this application may determine the edit distance between each second search term and the first search term based on an edit distance algorithm. Here, the first search term is the search term entered by the user, and the second search terms are related search terms expanded from the first search term entered by the user.

[0141] It should be understood that the edit distance algorithm refers to the minimum number of single-character edit operations required to transform one string into another. These edit operations can include inserting a character, deleting a character, or replacing a character.

[0142] Furthermore, the smaller the edit distance between two strings, the more similar the two strings are; conversely, the larger the edit distance between two strings, the less similar the two strings are.

[0143] In some embodiments, after determining the edit distance between each second search term and the first search term, this application may sort the acquired multiple second search terms in ascending order of edit distance to obtain a first sort.

[0144] In other words, the multiple second search terms are sorted in ascending order of edit distance, so that the second search terms that are most similar to the first search term entered by the user are ranked first. Then, when retrieving search results from the corresponding cache component of the search system based on the ranking results, the search results needed by the user can be obtained as accurately as possible.

[0145] S103-3, retrieve search results from the cache component based on the first search term and the first ranking result.

[0146] Considering that the first search term entered by the user can more accurately express the user's true search intent, this application can place the first search term before the first ranking result to obtain the second ranking result based on the first search term and the first ranking result. That is, the first search term and the first ranking result are combined in the form of first search term + first ranking result to obtain the second ranking result.

[0147] Then, based on the second ranking result, search results are retrieved from the cache component. This allows for prioritizing the retrieval of search results from the cache component based on the user's first input search term, ensuring that the user receives search results from the cache component that better match their needs.

[0148] In some embodiments, the present application may obtain search results from a cache component based on a second sorting result, which may include the following steps:

[0149] Step B11: Take the first position in the second sorting result as the current position, and take the search term located at the first position as the current search term.

[0150] Step B12, perform the search result retrieval step: retrieve the search results from the cache component based on the current search term.

[0151] Step B13: If no search result is obtained, the next position adjacent to the current position is taken as the new current position, and the search term located at the new current position is taken as the new current search term. The above search result retrieval steps are continued until the search result is obtained from the cache component.

[0152] Considering that the search term in the first position of the second sorting result is the first search term entered by the user, we can first query the cache component for the same target key using the first search term as the key. If the target key is found in the cache component, the target value corresponding to the target key can be used as the search result, and the search result retrieval operation can be stopped to output the search result to the user. If the target key is not found in the cache component, it means that the cache component does not store the search result corresponding to the first search term. At this time, we retrieve the second position adjacent to the first position, use the second position as the new current position, and use the second search term of the new current position as the new search term.

[0153] Then, using the new search term as the key, the system queries the cache component for the same target key. If the target key is found in the cache component, the target value corresponding to the target key is used as the search result, and the search result retrieval operation stops, so the search result is displayed to the user. If the target key is still not found in the cache component, it means that the cache component does not store the search result corresponding to the new search term. At this time, the system retrieves the third position adjacent to the second position and uses the third position as the new current position. The second search term located at the new current position is then used as the new current search term, and the above search result retrieval steps continue to be executed until the search result is retrieved from the cache component.

[0154] For example, assuming the second sorting result is "Children's Picture Books", "Children's Storybooks", "Children's Early Education Books", "Children's Comic Books", "Children's 3D Pop-up Books", "Pop-up Books", and "Comics", then firstly, using "Children's Picture Books" as the key in the first position, the cache component can be searched for the target key "Children's Picture Books". If the target key "Children's Picture Books" is not found in the cache component, then using "Children's Storybooks" as the key in the second position, the cache component can be searched for the target key "Children's Storybooks". If the target key "Children's Storybooks" is not found in the cache component, then using "Children's Early Education Books" as the key, the cache component can be searched for the target key "Children's Early Education Books". If the target key "Children's Early Education Books" is found in the cache component, then the target value corresponding to the target key "Children's Early Education Books" is used as the search result, and this search result is output to the user.

[0155] The technical solution disclosed in this application determines the operating status of the search system in response to a first search term entered by the user. When the operating status of the search system is determined to be faulty, at least one second search term associated with the first search term is identified. Then, based on the first and second search terms, search results are retrieved from the corresponding cache component of the search system and output. This allows the user to be provided with search results corresponding to the search content even when the search system malfunctions, ensuring unimpeded information access and improving the user search experience. Furthermore, this application can retrieve corresponding search results from the cache component sequentially, first the first search term and then the second search term. This prioritizes retrieving search results from the cache component based on the first search term entered by the user, ensuring that the user obtains search results from the cache component that better suit their needs.

[0156] The following is a reference to the appendix. Figure 5 This application describes a search device proposed in an embodiment. The search device in this embodiment is configured on a terminal device, which includes a search system. Figure 5 As shown, the search device 500 includes: a first determination module 510, a second determination module 520, a result acquisition module 530, and a result output module 540.

[0157] The first determining module 510 is used to determine the operating status of the search system in response to the first search term input by the user.

[0158] The second determining module 520 is used to determine at least one second search term associated with the first search term when the operating state of the search system is a fault state.

[0159] The result acquisition module 530 is used to acquire search results from a cache component based on the first search term and the second search term, wherein the cache component corresponds to the search system;

[0160] Result output module 540 is used to output the search results.

[0161] In one optional implementation of this application embodiment, when the number of the second search terms is multiple, the result acquisition module 530 includes:

[0162] A distance determination unit is used to determine the edit distance between each of the second search terms and the first search term;

[0163] A sorting unit is used to sort multiple second search terms according to the edit distance to obtain a first sorting result;

[0164] The result acquisition unit is used to acquire search results from the cache component based on the first search term and the first sorting result.

[0165] In one optional implementation of this application embodiment, the result acquisition unit is specifically used for:

[0166] Based on the first search term and the first sorting result, a second sorting result is obtained;

[0167] Based on the second sorting result, the search results are obtained from the cache component.

[0168] In an optional implementation of this application embodiment, the result acquisition unit is further configured to:

[0169] Take the first position in the second sorting result as the current position, and take the search term located at the first position as the current search term;

[0170] Perform the search result retrieval step: retrieve the search result from the cache component based on the current search term;

[0171] If no search result is obtained, the next position adjacent to the current position is taken as the new current position, and the search term located at the new current position is taken as the new current search term. The above search result retrieval steps are continued until a search result is obtained from the cache component.

[0172] In one optional implementation of this application embodiment, the second determining module 520 includes:

[0173] An information acquisition unit is used to acquire the request error rate of the cache component at the first moment;

[0174] The search term determination unit is configured to determine at least one second search term associated with the first search term at a second time based on the request error rate and the first search term.

[0175] In one optional implementation of this application embodiment, the search term determination unit is specifically used for:

[0176] If the request error rate is less than or equal to a preset threshold, then a second search term of a first quantity is obtained based on the first search term, and the second search term is determined as the second search term associated with the first search term at a second time, where the first quantity is the number of second search terms at the first time.

[0177] If the request error rate is greater than a preset threshold, a second quantity is determined, and a second search term of the second quantity is obtained based on the first search term. The second search term is then determined as the second search term associated with the first search term at a second time, and the second quantity is the number of second search terms at the second time.

[0178] In an optional implementation of this application embodiment, the search term determination unit is further configured to:

[0179] Obtain the request change rate of the cache component at the first moment;

[0180] The second quantity is determined based on the first quantity and the requested rate of change.

[0181] In an optional implementation of this application embodiment, the search term determination unit is further configured to:

[0182] The first request count of the cache component at the first time point and the first request count of the cache component at the third time point are obtained, wherein the third time point is earlier than the first time point, the first request count at the first time point is the number of requests to obtain search results from the cache component based on the second search term at the first time point, and the first request count at the third time point is the number of requests to obtain search results from the cache component based on the second search term at the third time point.

[0183] The request change rate of the cache component at the first time is obtained based on the first request count of the cache component at the first time and the first request count of the cache component at the third time.

[0184] In one optional implementation of this application embodiment, the information acquisition unit is specifically used for:

[0185] Obtain the total number of requests and the number of response errors for the caching component at the first moment;

[0186] The request error rate of the caching component at the first moment is obtained based on the total number of requests and the number of response errors.

[0187] In one optional implementation of this application, the total number of requests includes a first number of requests and a second number of requests. The first number of requests is the number of requests that retrieve search results from the cache component based on the second search term at the first moment. The second number of requests is the number of requests that retrieve search results from the cache component based on the first search term at the first moment.

[0188] In one optional implementation of this application embodiment, the first determining module 510 is specifically used for:

[0189] Obtain the operational metrics of the search system;

[0190] The operating status of the search system is determined based on its operating metrics.

[0191] It should be understood that the device embodiments and the foregoing method embodiments can correspond to each other, and similar descriptions can be referred to the method embodiments. To avoid repetition, further details will not be provided here. Specifically, Figure 5 The device 500 shown can perform Figure 1 The corresponding method embodiments, and the foregoing and other operations and / or functions of each module in device 500 are respectively implemented to achieve Figure 1 For the sake of brevity, the corresponding processes in each method are not described in detail here.

[0192] The apparatus 500 of this application embodiment has been described above from the perspective of functional modules in conjunction with the accompanying drawings. It should be understood that this functional module can be implemented in hardware, in software instructions, or in a combination of hardware and software modules. Specifically, the steps of the first aspect method embodiment in this application can be completed by integrated logic circuits in the processor's hardware and / or by software instructions. The steps of the first aspect method disclosed in this application embodiment can be directly embodied as being executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. Optionally, the software module can be located in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the first aspect method embodiment described above.

[0193] Figure 6 This is a schematic block diagram of an electronic device provided as an embodiment of this application. Figure 6 As shown, the electronic device 600 may include a memory 610 and a processor 620. The memory 610 stores computer programs and transmits the program code to the processor 620. In other words, the processor 620 can call and run the computer program from the memory 610 to implement the search method described in the first aspect of the embodiments of this application.

[0194] For example, the processor 620 can be used to execute the search method described above according to instructions in the computer program.

[0195] In some alternative embodiments, the above search method applies a terminal device, the terminal device including a search system, and the method includes:

[0196] The operating status of the search system is determined in response to the first search term entered by the user;

[0197] When the search system is in a fault state, at least one second search term associated with the first search term is determined;

[0198] Based on the first search term and the second search term, search results are obtained from a cache component, which corresponds to the search system;

[0199] Output the search results.

[0200] In some optional embodiments, when there are multiple second search terms, obtaining search results from the cache component based on the first search term and the second search term includes:

[0201] Determine the edit distance between each of the second search terms and the first search term;

[0202] The second search terms are sorted according to the edit distance to obtain a first sorting result;

[0203] Based on the first search term and the first sorting result, retrieve the search results from the cache component.

[0204] In some optional embodiments, obtaining the search results from the cache component based on the first search term and the first sorting result includes:

[0205] Based on the first search term and the first sorting result, a second sorting result is obtained;

[0206] Based on the second sorting result, the search results are obtained from the cache component.

[0207] In some alternative embodiments, obtaining the search results from the cache component based on the second sorting result includes:

[0208] Take the first position in the second sorting result as the current position, and take the search term located at the first position as the current search term;

[0209] Perform the search result retrieval step: retrieve the search result from the cache component based on the current search term;

[0210] If no search result is obtained, the next position adjacent to the current position is taken as the new current position, and the search term located at the new current position is taken as the new current search term. The above search result retrieval steps are continued until a search result is obtained from the cache component.

[0211] In some alternative embodiments, determining at least one second search term associated with the first search term includes:

[0212] Obtain the request error rate of the cache component at the first moment;

[0213] Based on the request error rate and the first search term, at least one second search term associated with the first search term is determined at a second time.

[0214] In some alternative embodiments, determining at least one second search term associated with the first search term at a second time point based on the request error rate and the first search term includes:

[0215] If the request error rate is less than or equal to a preset threshold, then a second search term of a first quantity is obtained based on the first search term, and the second search term is determined as the second search term associated with the first search term at a second time, where the first quantity is the number of second search terms at the first time.

[0216] If the request error rate is greater than a preset threshold, a second quantity is determined, and a second search term of the second quantity is obtained based on the first search term. The second search term is then determined as the second search term associated with the first search term at a second time, and the second quantity is the number of second search terms at the second time.

[0217] In some alternative embodiments, determining the second quantity includes:

[0218] Obtain the request change rate of the cache component at the first moment;

[0219] The second quantity is determined based on the first quantity and the requested rate of change.

[0220] In some optional embodiments, obtaining the request change rate of the cache component at the first time moment includes:

[0221] The first request count of the cache component at the first time point and the first request count of the cache component at the third time point are obtained, wherein the third time point is earlier than the first time point, the first request count at the first time point is the number of requests to obtain search results from the cache component based on the second search term at the first time point, and the first request count at the third time point is the number of requests to obtain search results from the cache component based on the second search term at the third time point.

[0222] The request change rate of the cache component at the first time is obtained based on the first request count of the cache component at the first time and the first request count of the cache component at the third time.

[0223] In some optional embodiments, obtaining the request error rate of the caching component at a first moment includes:

[0224] Obtain the total number of requests and the number of response errors for the caching component at the first moment;

[0225] The request error rate of the caching component at the first moment is obtained based on the total number of requests and the number of response errors.

[0226] In some optional embodiments, the total number of requests includes a first number of requests and a second number of requests, wherein the first number of requests is the number of requests that retrieve search results from the cache component based on the second search term at the first time; and the second number of requests is the number of requests that retrieve search results from the cache component based on the first search term at the first time.

[0227] In some alternative embodiments, determining the operating status of the search system includes:

[0228] Obtain the operational metrics of the search system;

[0229] The operating status of the search system is determined based on its operating metrics.

[0230] In some embodiments of this application, the processor 620 may include, but is not limited to:

[0231] General-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0232] In some embodiments of this application, the memory 610 includes, but is not limited to:

[0233] Volatile memory and / or non-volatile memory. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DR RAM).

[0234] In some embodiments of this application, the computer program may be divided into one or more modules, which are stored in the memory 610 and executed by the processor 620 to complete the search method provided in this application. The one or more modules may be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program in the electronic device.

[0235] like Figure 6 As shown, the electronic device 600 may further include:

[0236] Transceiver 630, which can be connected to processor 620 or memory 610.

[0237] The processor 620 can control the transceiver 630 to communicate with other devices; specifically, it can send information or data to other devices or receive information or data sent by other devices. The transceiver 630 may include a transmitter and a receiver. The transceiver 630 may further include antennas, and the number of antennas may be one or more.

[0238] It should be understood that the various components in the electronic device are connected through a bus system, which includes a data bus, a power bus, a control bus, and a status signal bus.

[0239] This application also provides a computer storage medium having a computer program stored thereon, which, when executed by a computer, enables the computer to perform the search method described in the first aspect above.

[0240] In some alternative embodiments, the above search method applies a terminal device, the terminal device including a search system, and the method includes:

[0241] The operating status of the search system is determined in response to the first search term entered by the user;

[0242] When the search system is in a fault state, at least one second search term associated with the first search term is determined;

[0243] Based on the first search term and the second search term, search results are obtained from a cache component, which corresponds to the search system;

[0244] Output the search results.

[0245] In some optional embodiments, when there are multiple second search terms, obtaining search results from the cache component based on the first search term and the second search term includes:

[0246] Determine the edit distance between each of the second search terms and the first search term;

[0247] The second search terms are sorted according to the edit distance to obtain a first sorting result;

[0248] Based on the first search term and the first sorting result, retrieve the search results from the cache component.

[0249] In some optional embodiments, obtaining the search results from the cache component based on the first search term and the first sorting result includes:

[0250] Based on the first search term and the first sorting result, a second sorting result is obtained;

[0251] Based on the second sorting result, the search results are obtained from the cache component.

[0252] In some alternative embodiments, obtaining the search results from the cache component based on the second sorting result includes:

[0253] Take the first position in the second sorting result as the current position, and take the search term located at the first position as the current search term;

[0254] Perform the search result retrieval step: retrieve the search result from the cache component based on the current search term;

[0255] If no search result is obtained, the next position adjacent to the current position is taken as the new current position, and the search term located at the new current position is taken as the new current search term. The above search result retrieval steps are continued until a search result is obtained from the cache component.

[0256] In some alternative embodiments, determining at least one second search term associated with the first search term includes:

[0257] Obtain the request error rate of the cache component at the first moment;

[0258] Based on the request error rate and the first search term, at least one second search term associated with the first search term is determined at a second time.

[0259] In some alternative embodiments, determining at least one second search term associated with the first search term at a second time point based on the request error rate and the first search term includes:

[0260] If the request error rate is less than or equal to a preset threshold, then a second search term of a first quantity is obtained based on the first search term, and the second search term is determined as the second search term associated with the first search term at a second time, where the first quantity is the number of second search terms at the first time.

[0261] If the request error rate is greater than a preset threshold, a second quantity is determined, and a second search term of the second quantity is obtained based on the first search term. The second search term is then determined as the second search term associated with the first search term at a second time, and the second quantity is the number of second search terms at the second time.

[0262] In some alternative embodiments, determining the second quantity includes:

[0263] Obtain the request change rate of the cache component at the first moment;

[0264] The second quantity is determined based on the first quantity and the requested rate of change.

[0265] In some optional embodiments, obtaining the request change rate of the cache component at the first time moment includes:

[0266] The first request count of the cache component at the first time point and the first request count of the cache component at the third time point are obtained, wherein the third time point is earlier than the first time point, the first request count at the first time point is the number of requests to obtain search results from the cache component based on the second search term at the first time point, and the first request count at the third time point is the number of requests to obtain search results from the cache component based on the second search term at the third time point.

[0267] The request change rate of the cache component at the first time is obtained based on the first request count of the cache component at the first time and the first request count of the cache component at the third time.

[0268] In some optional embodiments, obtaining the request error rate of the caching component at a first moment includes:

[0269] Obtain the total number of requests and the number of response errors for the caching component at the first moment;

[0270] The request error rate of the caching component at the first moment is obtained based on the total number of requests and the number of response errors.

[0271] In some optional embodiments, the total number of requests includes a first number of requests and a second number of requests, wherein the first number of requests is the number of requests that retrieve search results from the cache component based on the second search term at the first time; and the second number of requests is the number of requests that retrieve search results from the cache component based on the first search term at the first time.

[0272] In some alternative embodiments, determining the operating status of the search system includes:

[0273] Obtain the operational metrics of the search system;

[0274] The operating status of the search system is determined based on its operating metrics.

[0275] This application also provides a computer program product containing program instructions that, when executed on an electronic device, cause the electronic device to perform the search method described in the first aspect above.

[0276] In some alternative embodiments, the above search method applies a terminal device, the terminal device including a search system, and the method includes:

[0277] The operating status of the search system is determined in response to the first search term entered by the user;

[0278] When the search system is in a fault state, at least one second search term associated with the first search term is determined;

[0279] Based on the first search term and the second search term, search results are obtained from a cache component, which corresponds to the search system;

[0280] Output the search results.

[0281] In some optional embodiments, when there are multiple second search terms, obtaining search results from the cache component based on the first search term and the second search term includes:

[0282] Determine the edit distance between each of the second search terms and the first search term;

[0283] The second search terms are sorted according to the edit distance to obtain a first sorting result;

[0284] Based on the first search term and the first sorting result, retrieve the search results from the cache component.

[0285] In some optional embodiments, obtaining the search results from the cache component based on the first search term and the first sorting result includes:

[0286] Based on the first search term and the first sorting result, a second sorting result is obtained;

[0287] Based on the second sorting result, the search results are obtained from the cache component.

[0288] In some alternative embodiments, obtaining the search results from the cache component based on the second sorting result includes:

[0289] Take the first position in the second sorting result as the current position, and take the search term located at the first position as the current search term;

[0290] Perform the search result retrieval step: retrieve the search result from the cache component based on the current search term;

[0291] If no search result is obtained, the next position adjacent to the current position is taken as the new current position, and the search term located at the new current position is taken as the new current search term. The above search result retrieval steps are continued until a search result is obtained from the cache component.

[0292] In some alternative embodiments, determining at least one second search term associated with the first search term includes:

[0293] Obtain the request error rate of the cache component at the first moment;

[0294] Based on the request error rate and the first search term, at least one second search term associated with the first search term is determined at a second time.

[0295] In some alternative embodiments, determining at least one second search term associated with the first search term at a second time point based on the request error rate and the first search term includes:

[0296] If the request error rate is less than or equal to a preset threshold, then a second search term of a first quantity is obtained based on the first search term, and the second search term is determined as the second search term associated with the first search term at a second time, where the first quantity is the number of second search terms at the first time.

[0297] If the request error rate is greater than a preset threshold, a second quantity is determined, and a second search term of the second quantity is obtained based on the first search term. The second search term is then determined as the second search term associated with the first search term at a second time, and the second quantity is the number of second search terms at the second time.

[0298] In some alternative embodiments, determining the second quantity includes:

[0299] Obtain the request change rate of the cache component at the first moment;

[0300] The second quantity is determined based on the first quantity and the requested rate of change.

[0301] In some optional embodiments, obtaining the request change rate of the cache component at the first time moment includes:

[0302] The first request count of the cache component at the first time point and the first request count of the cache component at the third time point are obtained, wherein the third time point is earlier than the first time point, the first request count at the first time point is the number of requests to obtain search results from the cache component based on the second search term at the first time point, and the first request count at the third time point is the number of requests to obtain search results from the cache component based on the second search term at the third time point.

[0303] The request change rate of the cache component at the first time is obtained based on the first request count of the cache component at the first time and the first request count of the cache component at the third time.

[0304] In some optional embodiments, obtaining the request error rate of the caching component at a first moment includes:

[0305] Obtain the total number of requests and the number of response errors for the caching component at the first moment;

[0306] The request error rate of the caching component at the first moment is obtained based on the total number of requests and the number of response errors.

[0307] In some optional embodiments, the total number of requests includes a first number of requests and a second number of requests, wherein the first number of requests is the number of requests that retrieve search results from the cache component based on the second search term at the first time; and the second number of requests is the number of requests that retrieve search results from the cache component based on the first search term at the first time.

[0308] In some alternative embodiments, determining the operating status of the search system includes:

[0309] Obtain the operational metrics of the search system;

[0310] The operating status of the search system is determined based on its operating metrics.

[0311] When implemented using software, it can be implemented entirely or partially as a computer program product. This computer program product includes one or more computer instructions. When these computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital video disc (DVD)), or a semiconductor medium (e.g., solid-state disk (SSD)).

[0312] Those skilled in the art will recognize that the modules and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0313] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.

[0314] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. For example, the functional modules in the various embodiments of this application may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.

[0315] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.

[0316] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A search method characterized by, The application terminal device includes a search system, and the method includes: The operating status of the search system is determined in response to the first search term entered by the user; When the search system is in a fault state, at least one second search term associated with the first search term is determined; Based on the first search term and the second search term, search results are obtained from a cache component, which corresponds to the search system; Output the search results.

2. The method of claim 1, wherein, When there are multiple second search terms, the step of retrieving search results from the cache component based on the first search term and the second search term includes: Determine the edit distance between each of the second search terms and the first search term; The second search terms are sorted according to the edit distance to obtain a first sorting result; Based on the first search term and the first sorting result, retrieve the search results from the cache component.

3. The method of claim 2, wherein, The step of retrieving search results from the cache component based on the first search term and the first sorting result includes: Based on the first search term and the first sorting result, a second sorting result is obtained; Based on the second sorting result, the search results are obtained from the cache component.

4. The method of claim 3, wherein, The step of obtaining search results from the cache component based on the second sorting result includes: Take the first position in the second sorting result as the current position, and take the search term located at the first position as the current search term; Perform the search result retrieval step: retrieve the search result from the cache component based on the current search term; If no search result is obtained, the next position adjacent to the current position is taken as the new current position, and the search term located at the new current position is taken as the new current search term. The above search result retrieval steps are continued until a search result is obtained from the cache component.

5. The method of claim 1, wherein, The determination of at least one second search term associated with the first search term includes: Obtain the request error rate of the cache component at the first moment; Based on the request error rate and the first search term, at least one second search term associated with the first search term is determined at a second time.

6. The method of claim 5, wherein, The step of determining at least one second search term associated with the first search term at a second time point based on the request error rate and the first search term includes: If the request error rate is less than or equal to a preset threshold, then a first number of second search terms are obtained based on the first search term, and the second search terms are determined as second search terms associated with the first search term at a second time, where the first number is the number of second search terms at the first time. If the request error rate is greater than a preset threshold, a second quantity is determined, and a second search term of the second quantity is obtained based on the first search term. The second search term is then determined as the second search term associated with the first search term at a second time, and the second quantity is the number of second search terms at the second time.

7. The method of claim 6, wherein, Determining the second quantity includes: Obtain the request change rate of the cache component at the first moment; The second quantity is determined based on the first quantity and the requested rate of change.

8. The method of claim 7, wherein, The step of obtaining the request change rate of the cache component at the first moment includes: The first request count of the cache component at the first time point and the first request count of the cache component at the third time point are obtained, wherein the third time point is earlier than the first time point, the first request count at the first time point is the number of requests to obtain search results from the cache component based on the second search term at the first time point, and the first request count at the third time point is the number of requests to obtain search results from the cache component based on the second search term at the third time point. The request change rate of the cache component at the first time is obtained based on the first request count of the cache component at the first time and the first request count of the cache component at the third time.

9. The method of claim 5, wherein, The step of obtaining the request error rate of the caching component at the first moment includes: Obtain the total number of requests and the number of response errors for the caching component at the first moment; The request error rate of the caching component at the first moment is obtained based on the total number of requests and the number of response errors.

10. The method of claim 9, wherein, The total number of requests includes a first number of requests and a second number of requests. The first number of requests is the number of requests that retrieve search results from the cache component based on the second search term at the first time. The second number of requests is the number of requests that retrieve search results from the cache component based on the first search term at the first time.

11. The method of claim 1, wherein, Determining the operating status of the search system includes: Obtain the operational metrics of the search system; The operating status of the search system is determined based on its operating metrics.

12. A search apparatus characterized by comprising: Configured in a terminal device, the terminal device including a search system, comprising: The first determining module is used to determine the operating status of the search system in response to the first search term input by the user; The second determining module is used to determine at least one second search term associated with the first search term when the operating state of the search system is a fault state. The result acquisition module is used to acquire search results from a cache component based on the first search term and the second search term, wherein the cache component corresponds to the search system; The results output module is used to output the search results.

13. An electronic device, characterized in that, include: A processor and a memory, the memory being used to store a computer program, the processor being used to invoke and run the computer program stored in the memory to perform the method as described in any one of claims 1 to 11.

14. A computer-readable storage medium, characterized in that, Used to store a computer program that causes a computer to perform the method as described in any one of claims 1 to 11.

15. A computer program product containing program instructions, characterized in that, When the program instructions are executed on the electronic device, the electronic device causes the electronic device to perform the method as described in any one of claims 1 to 11.