[go: up one dir, main page]

CN116150459A - Searching method, searching device, electronic equipment and storage medium - Google Patents

Searching method, searching device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116150459A
CN116150459A CN202111396649.6A CN202111396649A CN116150459A CN 116150459 A CN116150459 A CN 116150459A CN 202111396649 A CN202111396649 A CN 202111396649A CN 116150459 A CN116150459 A CN 116150459A
Authority
CN
China
Prior art keywords
search
target service
target
result
engine system
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111396649.6A
Other languages
Chinese (zh)
Inventor
姚创沐
赵航
房翊翔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202111396649.6A priority Critical patent/CN116150459A/en
Publication of CN116150459A publication Critical patent/CN116150459A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application discloses a searching method, a searching device, electronic equipment and a storage medium; according to the method and the device, the non-target service search volume of the search engine system in the historical time period can be obtained; determining a target traffic reserve in the current time period based on the non-target traffic search; counting the target service searching amount in the current time period in real time, and acquiring the searching result of the search engine system in real time when the target service searching amount is smaller than the target service reserved amount; when the target service searching amount is larger than or equal to the target service reserved amount and smaller than the searching capacity of the target service subsystem, acquiring a searching result of the target service subsystem, and updating a preset bypass cache result by utilizing the searching result of the target service subsystem; and when the target service search amount is larger than or equal to the target service reserve amount and larger than or equal to the search capacity of the target service subsystem, acquiring a preset bypass cache result of the search engine system. The scheme can effectively improve the flexibility of searching.

Description

Searching method, searching device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a search method, apparatus, electronic device, and storage medium.
Background
With the rapid development of the current internet, in order to improve the activity of users, some product operation activities are often held, for example, users perform a certain operation in a period of time, and can obtain an activity reward corresponding to the operation, etc. Generally, during an activity, the access flow of the operation activity of the search product is relatively high, and particularly, at the moment when the activity starts, a large number of users operate simultaneously, and a generated request is sent to a server, so that a large flow impact is brought to a search engine system.
In order to ensure the stability of the search server for operation activities and ensure the normal response of the activities, the search results corresponding to the operation activity words are generally cached in advance, and the corresponding search results can be directly obtained from the cache and returned to the user in the peak period of the activity flow, so that the flexibility of the search is poor.
Disclosure of Invention
The embodiment of the application provides a searching method, a searching device, electronic equipment and a storage medium, which can effectively improve the searching flexibility.
The embodiment of the application provides a searching method, which comprises the following steps:
acquiring non-target service search volume of a search engine system in a historical time period, wherein the search engine system comprises at least one target service subsystem;
Determining a target traffic reserve in the current time period based on the non-target traffic search in the historical time period;
counting target service searching quantity in a current time period in real time, and acquiring a searching result of the search engine system in real time when the target service searching quantity is smaller than the target service reserved quantity;
when the target service search amount is larger than or equal to the target service reserve amount and smaller than the search capacity of a target service subsystem, acquiring a search result of the target service subsystem, and updating a preset bypass cache result by utilizing the search result of the target service subsystem, wherein the preset bypass cache result is a search result of a bypass system which is searched based on target service and is cached in a search engine system in advance;
and when the target service search volume is larger than or equal to the target service reserve volume and larger than or equal to the search capacity of the target service subsystem, acquiring a preset bypass cache result of the search engine system.
Correspondingly, the embodiment of the application also provides a searching device, which comprises:
the acquisition unit is used for acquiring non-target service search volume of a search engine system in a historical time period, wherein the search engine system comprises at least one target service subsystem;
A determining unit for determining a target traffic reserve in a current time period based on the non-target traffic search amount in the history time period;
the first search unit is used for counting the target service search amount in the current time period in real time, and acquiring the search result of the search engine system in real time when the target service search amount is smaller than the target service reserve amount;
the second search unit is used for acquiring the search result of the target service subsystem and updating a preset bypass cache result by utilizing the search result of the target service subsystem when the target service search amount is larger than or equal to the target service reserve amount and smaller than the search capacity of the target service subsystem, wherein the preset bypass cache result is a search result which is searched based on target service and is cached in a bypass system of a search engine system in advance;
and the third searching unit is used for acquiring a preset bypass cache result of the search engine system when the target service searching amount is larger than or equal to the target service reserved amount and larger than or equal to the searching capacity of the target service subsystem.
Optionally, in some embodiments, the determining unit may be specifically configured to determine a non-target traffic reserve in the current period based on the non-target traffic search in the historical period; and determining the target service reservation amount of the current time period according to the search capacity of the search engine system and the non-target service reservation amount.
Optionally, in some embodiments, the determining unit may be specifically configured to obtain an upper search capacity limit of each service type subsystem in the search engine system; and determining the minimum value of the upper limit of the search capacity in the service type subsystem as the search capacity of the search engine system.
Optionally, in some embodiments, the first search unit may be specifically configured to, when the search engine system receives a search query request, obtain a query keyword corresponding to the search query request; if the query keyword is a target service keyword, updating the target service search volume in the current time period based on the search query request; if the query keyword is not the target service keyword, updating the non-target service search volume in the current time period based on the search query request, and acquiring a search result corresponding to the search query request from the search engine system.
Optionally, in some embodiments, the first search unit may be specifically configured to obtain a preset bypass cache result corresponding to the target service when the search result obtained by the search engine system in real time fails.
Optionally, in some embodiments, the second search unit may be specifically configured to obtain a search capacity of a target service subsystem corresponding to the target service when the target service search amount is greater than or equal to the target service reservation amount; if the target service search volume is smaller than the search capacity of the target service subsystem, acquiring search results corresponding to the target service from the target service subsystem in real time through the search engine system; and acquiring a preset bypass cache result corresponding to the target service, and updating the preset bypass cache result corresponding to the target service by utilizing the search result corresponding to the target service acquired by the search engine system in real time to acquire an updated bypass cache result.
Optionally, in some embodiments, the second search unit may be specifically configured to fuse a search result corresponding to the target service obtained in real time by the search engine system with the updated bypass cache result to obtain a fused search result; taking the fused search result as a target search result of the target service; and if the search engine system fails to acquire the search result corresponding to the target service in real time, taking the preset bypass cache result as the target search result of the target service.
Optionally, in some embodiments, the third search unit may be specifically configured to obtain a search capacity of a target service subsystem corresponding to the target service when the target service search amount is greater than or equal to the target service reservation amount; and if the target service search volume is greater than or equal to the search capacity of the target service subsystem, acquiring a preset bypass cache result corresponding to the target service.
Optionally, in some embodiments, the searching device may further include a buffer unit, where the buffer unit may be specifically configured to take a target preheating task from the first preheating task queue, where the target preheating task carries service information of the target service; executing the target preheating task according to the service information of the target service to obtain a first preheating result corresponding to the target service; storing the first preheating result and the service information to a bypass system correspondingly, and adding the target preheating task to a task circulation queue; when the target preheating task is taken out from the task circulation queue, executing the target preheating task according to the service information of the target service to obtain a second preheating result corresponding to the target service; and storing the second preheating result and the service information to a bypass system correspondingly to obtain a preset bypass caching result.
In addition, the embodiment of the application further provides a computer readable storage medium, wherein the computer readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps in any of the searching methods provided by the embodiment of the application.
In addition, the embodiment of the application also provides an electronic device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the steps in any searching method provided by the embodiment of the application when executing the program.
According to one aspect of the present application, there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium, the computer instructions being read from the computer readable storage medium by a processor of a computer device, the computer instructions being executed by the processor to cause the computer device to perform the methods provided in the various alternative implementations of the above-described searching aspect.
The embodiment can acquire non-target service search quantity of a search engine system in a historical time period, wherein the search engine system comprises at least one target service subsystem; then, determining a target traffic reserve in the current time period based on the non-target traffic search in the historical time period; then, counting the target service searching amount in the current time period in real time, and acquiring the searching result of the search engine system in real time when the target service searching amount is smaller than the target service reserved amount; when the target service search amount is larger than or equal to the target service reserve amount and smaller than the search capacity of a target service subsystem, acquiring a search result of the target service subsystem, and updating a preset bypass cache result by utilizing the search result of the target service subsystem, wherein the preset bypass cache result is a search result of a bypass system which is searched based on target service and is cached in a search engine system in advance; and when the target service search volume is larger than or equal to the target service reserve volume and larger than or equal to the search capacity of the target service subsystem, acquiring a preset bypass cache result of the search engine system. The scheme can effectively improve the flexibility of searching.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1a is a schematic view of a search method according to an embodiment of the present application;
FIG. 1b is a first flowchart of a search method provided by an embodiment of the present application;
FIG. 2a is a second flowchart of a search method provided by an embodiment of the present application;
FIG. 2b is a schematic diagram of active and inactive traffic statistics provided by embodiments of the present application;
FIG. 2c is a third flowchart of a search method provided by an embodiment of the present application;
FIG. 2d is a search schematic provided by an embodiment of the present application;
fig. 3 is a schematic structural diagram of a search device provided in an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
The principles of the present application are illustrated as implemented in a suitable computing environment. In the following description, specific embodiments of the present application will be described with reference to steps and symbols performed by one or more computers, unless otherwise indicated. Thus, these steps and operations will be referred to in several instances as being performed by a computer, which as referred to herein performs operations that include processing units by the computer that represent electronic signals that represent data in a structured form. This operation transforms the data or maintains it in place in the computer's memory system, which may reconfigure or otherwise alter the computer's operation in a manner well known to those skilled in the art. The data structure maintained by the data is the physical location of the memory, which has specific characteristics defined by the data format. However, the principles of the present application are described in the foregoing text and are not meant to be limiting, and one skilled in the art will recognize that various steps and operations described below may also be implemented in hardware.
The term "unit" as used herein may be regarded as a software object executing on the computing system. The various components, units, engines, and services described herein may be viewed as implementing objects on the computing system. The apparatus and method may be implemented in software, but may also be implemented in hardware, which is within the scope of the present application.
The terms "first," "second," and "third," etc. in this application are used for distinguishing between different objects and not for describing a particular sequential order. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to the list of steps or elements but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the present application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
The embodiment of the application provides a search method, a search device, electronic equipment and a storage medium. The search device may be integrated in an electronic device, which may be a server or a device such as a terminal.
For example, as shown in fig. 1a, first, the electronic device integrated with the search apparatus may acquire a non-target traffic search amount of a search engine system over a history period, the search engine system including at least one target traffic subsystem; then, determining a target traffic reserve in the current time period based on the non-target traffic search in the historical time period; then, counting the target service searching amount in the current time period in real time, and acquiring the searching result of the search engine system in real time when the target service searching amount is smaller than the target service reserved amount; when the target service search amount is larger than or equal to the target service reserve amount and smaller than the search capacity of a target service subsystem, acquiring a search result of the target service subsystem, and updating a preset bypass cache result by utilizing the search result of the target service subsystem, wherein the preset bypass cache result is a search result of a bypass system which is searched based on target service and is cached in a search engine system in advance; and when the target service search volume is larger than or equal to the target service reserve volume and larger than or equal to the search capacity of the target service subsystem, acquiring a preset bypass cache result of the search engine system. According to the scheme, a preset bypass cache result can be flexibly used according to the actual search volume, real-time search volumes of target services and non-target services are counted through time period sliding, the non-target service search volume in the previous time period is taken as a reference, the non-target service search volume is reserved for the current time period, and the request of the non-target service search volume is protected; meanwhile, according to the comparison situation of the target service search volume and the target service capacity upper limit and the comparison situation of the overall search volume and the search engine normal capacity upper limit, the automatic switching is automatically performed among several search result acquisition modes of full service real-time search, target service real-time search and non-target service use preset bypass cache result fusion, full service use preset bypass cache result and the like, and the flexibility of search is greatly improved. The scheme protects the request of non-target service search volume; meanwhile, when the overall search quantity is low, the timeliness of the overall search result is fully guaranteed through recall of the search engine system, and when the target service search quantity does not exceed the upper limit of the capacity of the target service type, the target service type result is obtained in real time, the timeliness of the target service type is guaranteed, and the service capacity of the target service subsystem is utilized to the maximum extent; the bypass cache result is preset as an overall spam result and is used when the flow is higher or the request fails, so that the usability of the target service search result is ensured, and the search efficiency is greatly improved.
The following will describe in detail. The following description of the embodiments is not intended to limit the preferred embodiments.
The present embodiment will be described from the perspective of a search apparatus, which may be integrated in an electronic device, and the electronic device may be a server or a terminal, etc.; the terminal may include a mobile phone, a tablet computer, a notebook computer, a personal computer (Personal Computer, PC), and the like.
A search method, comprising: acquiring non-target service search volume of a search engine system in a historical time period, wherein the search engine system comprises at least one target service subsystem; then, determining a target traffic reserve in the current time period based on the non-target traffic search in the historical time period; then, counting the target service searching amount in the current time period in real time, and acquiring the searching result of the search engine system in real time when the target service searching amount is smaller than the target service reserved amount; when the target service search amount is larger than or equal to the target service reserve amount and smaller than the search capacity of a target service subsystem, acquiring a search result of the target service subsystem, and updating a preset bypass cache result by utilizing the search result of the target service subsystem, wherein the preset bypass cache result is a search result of a bypass system which is searched based on target service and is cached in a search engine system in advance; and when the target service search volume is larger than or equal to the target service reserve volume and larger than or equal to the search capacity of the target service subsystem, acquiring a preset bypass cache result of the search engine system.
As shown in fig. 1b, the specific flow of the searching method may be as follows:
101. non-target traffic searches of a search engine system over a historical period of time are obtained, the search engine system including at least one target traffic subsystem.
The search engine system can be a system for retrieving formulated information from the Internet and feeding the information back to the user by applying a specific strategy according to the user requirements and a certain algorithm. A bypass system may refer to a system other than the search engine system that normally stores information. In the embodiment of the application, the bypass data storage of the target service can be realized through the bypass system, and one or some tasks in the search engine system can be completed under the condition that the current running process of the search engine system is not influenced.
The historical time period may refer to a time period before the current time period, and in order to make the real-time of the search result stronger, the historical time period may specifically refer to a time period before the current time period. The time period may refer to a preset certain length of time, for example, may be 100ms, and so on.
The time period may be set in various manners, for example, may be flexibly set according to the actual application requirement, or may be preset and stored in the electronic device. Further, the time period may be built in the electronic device, or may be stored in a memory and transmitted to the electronic device, or the like.
The search service may include a non-target service and at least one target service, and the target service may refer to a service preset in the search service, for example, may specifically refer to an operation activity in the search operation activity, and so on. The non-target service may refer to a service that is not preset in the search service, for example, may specifically refer to a non-operation activity in the search operation activity, and so on.
The service may be that a preset page is displayed after a user searches a certain keyword in a search engine system, or the service may be that the user interacts with a certain social account in a social application to obtain a consumption ticket, or the service may be that the user clicks a certain control in a game application to obtain a game reward, or the like.
The search engine system may include at least one target service subsystem, for example, the search service may include a plurality of target services, each corresponding to a subsystem. For example, an active service is subdivided into a plurality of active services according to different operation activities, and the active service is also one subsystem of the search engine.
102. And determining the target traffic reserve of the current time period based on the non-target traffic search of the historical time period.
For example, the non-target traffic reserve for the current time period may be determined based on the non-target traffic search for the historical time period; and determining the target service reservation amount of the current time period according to the search capacity of the search engine system and the non-target service reservation amount.
The search engine system may include a plurality of service type subsystems, and the search engine system capacity C is determined by a minimum value in an upper limit of the capacity of each service type subsystem of the engine, for example, the search engine system may include three service types: articles, videos, music, the upper limit of subsystem capacity may be in terms of requests per second (QPS, also called query rate per second), e.g., 3200QPS, 3000QPS, 2500QPS, respectively, the search engine system capacity is 2500QPS, etc. For example, the search capacity upper limit of each service type subsystem in the search engine system can be obtained; and determining the minimum value of the upper limit of the search capacity in the service type subsystem as the search capacity of the search engine system.
For example, when the current time period starts, the non-target service searching amount L0 of the previous time period can be used as a reference, and when the non-target service searching amount does not exceed L0, the searching amount for allowing the target service to search for directly requesting the recall of the search engine system is C-L0; when the non-target traffic search volume exceeds L0 (e.g., L0 '), then the search volume that allows the target traffic search to directly request the engine recall is C-L0'. The non-target traffic search volume L0 in the previous time period is used as the non-target traffic reserve volume in the current time period, and the search volume A=min (C-L0, C-L0 ') allowing the target traffic search volume to directly request the engine recall is obtained according to the search engine system capacity C and the non-target traffic search volume L0' in the current time period.
103. And counting the target service searching amount in the current time period in real time, and acquiring the searching result of the search engine system in real time when the target service searching amount is smaller than the target service reserved amount.
For example, specifically, when the search engine system receives a search query request, a query keyword corresponding to the search query request may be obtained; if the query keyword is a target service keyword, updating the target service search volume in the current time period based on the search query request; if the query keyword is not the target service keyword, updating the non-target service search volume in the current time period based on the search query request, and acquiring a search result corresponding to the search query request from the search engine system. For example, when a search query (query) request arrives, whether a target service keyword is judged, if the target service keyword is the target service keyword, the corresponding target service search volume count is +1, and if the target service keyword is not the target service keyword, the non-target service search volume count is +1. The non-targeted traffic search volume may directly request the search engine system to obtain search results.
Where query keywords may refer to information that may trigger processing of a business, including but not limited to characters, words, links, and pictures entered by a user, or instructions generated based on user operations in a search engine system, and so forth.
In order to ensure the availability of the target service search results, improve the search efficiency and ensure the normal use of the search engine system, the preset bypass cache result can be obtained when the search result of the search engine system fails to be obtained. For example, specifically, when the search result of the search engine system fails to be obtained in real time, a preset bypass cache result corresponding to the target service may be obtained.
For example, if the target traffic search amount of the current time period counted by the target traffic i in real time is Li, the total target traffic search in the current time period is lt=l1+l2+ … +ln. If Lt < A, the current query keyword search request firstly acquires a real-time result recall through a request search engine system, and if the request fails, a preset bypass cache result is returned as a search result.
In order to improve the searching efficiency, the searching result of the target service may be cached in the bypass system of the search engine system in advance, that is, the searching result of the target service may be cached in the bypass system of the search engine system in advance. There are many ways to cache the search result of the target service in the bypass system of the search engine system, and the method is not limited herein. In order to ensure timeliness of data stored in the cache and reduce dependence on human resources, for example, a bypass preheating mechanism for preheating three queues can be used, a preheating task is generated through target service configuration, the preheating task is added into a quick queue to start a bypass preheating process, and the task is added into a circulation queue and the preheating queue to be circularly and repeatedly preheated according to time periods. The quick queue ensures that the new modified target service can quickly preheat the result, the cyclic queue promotes the timeliness of the preheating result, and the preheating queue preheats the target service from the global cache center to the local cache in advance, so that the penetration of the global cache center during the peak flow is avoided. For example, a target preheating task may be specifically taken out from the first preheating task queue, where the target preheating task carries service information of the target service; executing the target preheating task according to the service information of the target service to obtain a first preheating result corresponding to the target service; storing the first preheating result and the service information to a bypass system correspondingly, and adding the target preheating task to a task circulation queue; when the target preheating task is taken out from the task circulation queue, executing the target preheating task according to the service information of the target service to obtain a second preheating result corresponding to the target service; and storing the second preheating result and the service information to a bypass system correspondingly to obtain a preset bypass caching result.
104. And when the target service searching amount is larger than or equal to the target service reserved amount and smaller than the searching capacity of the target service subsystem, acquiring the searching result of the target service subsystem, and updating a preset bypass cache result by utilizing the searching result of the target service subsystem.
The preset bypass cache result is a search result of a bypass system which is searched based on the target service and is cached in the search engine system in advance.
In order to improve timeliness of the preset bypass cache result and further improve timeliness of searching, the preset bypass cache result can be updated by utilizing the search result obtained in real time. For example, specifically, when the target service search amount is greater than or equal to the target service reserve amount, a search capacity of a target service subsystem corresponding to the target service may be obtained; if the target service search volume is smaller than the search capacity of the target service subsystem, acquiring search results corresponding to the target service from the target service subsystem in real time through the search engine system; and acquiring a preset bypass cache result corresponding to the target service, and updating the preset bypass cache result corresponding to the target service by utilizing the search result corresponding to the target service acquired by the search engine system in real time to acquire an updated bypass cache result.
In order to improve the comprehensiveness of the returned target search result, the search result of the target service and the preset bypass cache result can be fused and then returned. For example, the search results corresponding to the target service obtained in real time by the search engine system may be fused with the updated bypass buffer result to obtain a fused search result; taking the fused search result as a target search result of the target service; and if the search engine system fails to acquire the search result corresponding to the target service in real time, taking the preset bypass cache result as the target search result of the target service.
For example, as the search amount of the target service in the current time period gradually increases, that is, lt > =a, it is assumed that the current search query request is the target service i request, the search amount of the target service i in the current time period is Li, and the upper limit of the subsystem capacity is Ci. If Li < Ci, the search engine system is used for independently acquiring the search results of the target service subsystems, simultaneously acquiring the preset bypass cache results, replacing the search results of the target subsystems in the preset bypass cache results with the search results of the target service subsystems recalled in real time by the search engine system, and fusing the real-time search results of the target service subsystems and the preset bypass cache results to be returned as final search results. If the search result of the target service subsystem is failed to be obtained through the search engine system, the preset bypass cache result is directly used as a final search result.
105. And when the target service search volume is larger than or equal to the target service reserve volume and larger than or equal to the search capacity of the target service subsystem, acquiring a preset bypass cache result of the search engine system.
For example, specifically, when the target service search amount is greater than or equal to the target service reserve amount, a search capacity of a target service subsystem corresponding to the target service may be obtained; and if the target service search volume is greater than or equal to the search capacity of the target service subsystem, acquiring a preset bypass cache result corresponding to the target service. For example, if Li > =ci, the preset bypass buffer result is directly obtained and returned as the final search result.
In the above method, the data storage is stored in the blockchain to improve the security of the search. The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. The Blockchain (Blockchain), which is essentially a decentralised database, is a string of data blocks that are generated by cryptographic means in association, each data block containing a batch of information of network transactions for verifying the validity of the information (anti-counterfeiting) and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, and an application services layer.
The blockchain underlying platform may include processing modules for user management, basic services, smart contracts, operation monitoring, and the like. The user management module is responsible for identity information management of all blockchain participants, including maintenance of public and private key generation (account management), key management, maintenance of corresponding relation between the real identity of the user and the blockchain address (authority management) and the like, and under the condition of authorization, supervision and audit of transaction conditions of certain real identities, and provision of rule configuration (wind control audit) of risk control; the basic service module is deployed on all block chain node devices, is used for verifying the validity of a service request, recording the service request on a storage after the effective request is identified, for a new service request, the basic service firstly analyzes interface adaptation and authenticates the interface adaptation, encrypts service information (identification management) through an identification algorithm, and transmits the encrypted service information to a shared account book (network communication) in a complete and consistent manner, and records and stores the service information; the intelligent contract module is responsible for registering and issuing contracts, triggering contracts and executing contracts, a developer can define contract logic through a certain programming language, issue the contract logic to a blockchain (contract registering), invoke keys or other event triggering execution according to the logic of contract clauses to complete the contract logic, and simultaneously provide a function of registering contract upgrading; the operation monitoring module is mainly responsible for deployment in the product release process, modification of configuration, contract setting, cloud adaptation and visual output of real-time states in product operation, for example: alarms, monitoring network conditions, monitoring node device health status, etc.
The platform product service layer provides basic capabilities and implementation frameworks of typical applications, and developers can complete the blockchain implementation of business logic based on the basic capabilities and the characteristics of the superposition business. The application service layer provides the application service based on the block chain scheme to the business participants for use.
As can be seen from the foregoing, the present embodiment may obtain a non-target traffic search amount of a search engine system in a historical period, where the search engine system includes at least one target traffic subsystem; then, determining a target traffic reserve in the current time period based on the non-target traffic search in the historical time period; then, counting the target service searching amount in the current time period in real time, and acquiring the searching result of the search engine system in real time when the target service searching amount is smaller than the target service reserved amount; when the target service search amount is larger than or equal to the target service reserve amount and smaller than the search capacity of a target service subsystem, acquiring a search result of the target service subsystem, and updating a preset bypass cache result by utilizing the search result of the target service subsystem, wherein the preset bypass cache result is a search result of a bypass system which is searched based on target service and is cached in a search engine system in advance; and when the target service search volume is larger than or equal to the target service reserve volume and larger than or equal to the search capacity of the target service subsystem, acquiring a preset bypass cache result of the search engine system. According to the scheme, a preset bypass cache result can be flexibly used according to the actual search volume, real-time search volumes of target services and non-target services are counted through time period sliding, the non-target service search volume in the previous time period is taken as a reference, the non-target service search volume is reserved for the current time period, and the request of the non-target service search volume is protected; meanwhile, according to the comparison situation of the target service search volume and the target service capacity upper limit and the comparison situation of the overall search volume and the search engine normal capacity upper limit, the automatic switching is automatically performed among several search result acquisition modes of full service real-time search, target service real-time search and non-target service use preset bypass cache result fusion, full service use preset bypass cache result and the like, and the flexibility of search is greatly improved. The scheme protects the request of non-target service search volume; meanwhile, when the overall search quantity is low, the timeliness of the overall search result is fully guaranteed through recall of the search engine system, and when the target service search quantity does not exceed the upper limit of the capacity of the target service type, the target service type result is obtained in real time, the timeliness of the target service type is guaranteed, and the service capacity of the target service subsystem is utilized to the maximum extent; the bypass cache result is preset as an overall spam result and is used when the flow is higher or the request fails, so that the usability of the target service search result is ensured, and the search efficiency is greatly improved. The scheme can support large search volume impact of the search target service, and the preset bypass cache result is used flexibly according to the actual search volume by carrying out preset bypass cache results on the search target service keywords in advance, so that the impact of the target service search volume is relieved, and the stability of a search engine is effectively ensured.
The method described in the previous embodiment is described in further detail below by way of example.
In this embodiment, the searching apparatus is specifically integrated in an electronic device, and the target service is specifically an active service, the non-target service is specifically an inactive service, the target service search volume is specifically an active traffic, and the non-target service search volume is specifically an inactive traffic.
Firstly, the search result of the target service can be preheated and cached in advance, which can be specifically as follows:
in order to improve the searching efficiency, the searching result of the target service may be cached in the bypass system of the search engine system in advance, that is, the searching result of the target service may be cached in the bypass system of the search engine system in advance.
In order to ensure timeliness of data stored in the cache and reduce dependence on human resources, for example, a bypass preheating mechanism for preheating three queues can be used, a preheating task is generated through target service configuration, the preheating task is added into a quick queue to start a bypass preheating process, and the task is added into a circulation queue and the preheating queue to be circularly and repeatedly preheated according to time periods. The quick queue ensures that the new modified target service can quickly preheat the result, the cyclic queue promotes the timeliness of the preheating result, and the preheating queue preheats the target service from the global cache center to the local cache in advance, so that the penetration of the global cache center during the peak flow is avoided.
For example, the electronic device may specifically take out a target preheating task from the first preheating task queue, where the target preheating task carries service information of the target service; executing the target preheating task according to the service information of the target service to obtain a first preheating result corresponding to the target service; storing the first preheating result and the service information to a bypass system correspondingly, and adding the target preheating task to a task circulation queue; when the target preheating task is taken out from the task circulation queue, executing the target preheating task according to the service information of the target service to obtain a second preheating result corresponding to the target service; and storing the second preheating result and the service information to a bypass system correspondingly to obtain a preset bypass caching result.
And (II) searching based on the search query request by using the cached preset bypass cache result, particularly referring to fig. 2a and 2c.
As shown in fig. 2a, a specific process of the searching method may be as follows:
201. the electronic device obtains non-target traffic search volumes of the search engine system over a historical period of time.
Wherein the search engine system comprises at least one target business subsystem. In order to make the real-time performance of the search result stronger, the historical time period may specifically refer to a time period before the current time period. The time period may refer to a preset certain length of time, for example, may be 100ms, and so on.
Wherein, besides the inactive traffic of the previous period can be used as the inactive traffic reserve of the current period, time average or weighted average can be used, etc., as the inactive traffic reserve,
the time period may be set in various manners, for example, may be flexibly set according to the actual application requirement, or may be preset and stored in the electronic device. Further, the time period may be built in the electronic device, or may be stored in a memory and transmitted to the electronic device, or the like.
The search service may include a non-target service and at least one target service, and the target service may refer to a service preset in the search service, for example, may specifically refer to an active service in a search operation activity (also referred to as an operation activity), and so on. The non-target service may refer to a service that is not preset in the search service, for example, may specifically refer to an inactive service in the search operation activity (also referred to as a non-operation activity), and so on.
The search engine system may include at least one target service subsystem, for example, the search service may include a plurality of target services, each corresponding to a subsystem. For example, an active service is subdivided into a plurality of active services according to different operation activities, and the active service is also one subsystem of the search engine. For example, the search engine system may include at least one active business subsystem.
For operation activity i, the active party may have previously determined an activity operation word (e.g., "activity keyword a", "activity keyword B", etc.) and an activity time (e.g., starting 8 pm on friday evenings). Through the early-stage propaganda work of the activity, a large number of users enter a search at 8 pm on friday to search for an activity operation word to participate in the activity. At this time, a large flow impact pressure is generated on the search engine system, in order to ensure the normal response of the search of the active operation words, a three-queue bypass preheating mechanism can be applied to preheat and cache the search results of the active operation verbs in advance, and the bypass preheating caching mechanism is applied to finish recall of the search results of the active operation verbs during the activity.
202. The electronic device determines the non-target traffic reserve of the current time period based on the non-target traffic search of the historical time period.
For example, when the current period starts, the inactive flow L0 of the previous period may be used as a reference as the inactive flow reservation of the current period.
203. And the electronic equipment determines the target service reservation amount of the current time period according to the search capacity of the search engine system and the non-target service reservation amount.
The search engine system may include a plurality of service type subsystems, and the search engine system capacity C is determined by a minimum value in an upper limit of the capacity of each service type subsystem of the engine, for example, the search engine system may include three service types: articles, videos, music, the upper limit of subsystem capacity may be in terms of requests per second (QPS, also called query rate per second), e.g., 3200QPS, 3000QPS, 2500QPS, respectively, the search engine system capacity is 2500QPS, etc. For example, the electronic device may specifically obtain an upper search capacity limit of each service type subsystem in the search engine system; and determining the minimum value of the upper limit of the search capacity in the service type subsystem as the search capacity of the search engine system.
When the inactive traffic does not exceed L0, allowing the active traffic to directly request the recall search quantity of the search engine system to be C-L0; when the inactive traffic exceeds L0 (e.g., L0 '), then the traffic that allows the active traffic to directly request an engine recall is C-L0'. For example, the following table 1 may be specifically used:
table 1, system capacity and flow examples
Figure BDA0003370559890000161
The inactive flow L0 in the previous time period is taken as the inactive flow reserved quantity in the current time period, and the flow A=min (C-L0, C-L0 ') allowing the active flow to directly request the engine recall is obtained according to the search engine system capacity C and the inactive actual flow L0' in the current time period.
204. The electronic equipment counts the target service search amount in the current time period in real time.
For example, the electronic device may specifically obtain, when the search engine system receives a search query request, a query keyword corresponding to the search query request; if the query keyword is a target service keyword, updating the target service search volume in the current time period based on the search query request; if the query keyword is not the target service keyword, updating the non-target service search volume in the current time period based on the search query request, and acquiring a search result corresponding to the search query request from the search engine system.
For example, as shown in fig. 2b, when a search query (query) request arrives, it is determined whether an active keyword is an active keyword, the corresponding active traffic count is +1, and if not, the corresponding inactive traffic count is +1. The inactive traffic may directly request that the search engine system obtain search results.
Where query keywords may refer to information that may trigger processing of a business, including but not limited to characters, words, links, and pictures entered by a user, or instructions generated based on user operations in a search engine system, and so forth.
205. And when the target service search amount is smaller than the target service reserve amount, the electronic equipment acquires the search result of the search engine system in real time.
In order to ensure the availability of the target service search results, improve the search efficiency and ensure the normal use of the search engine system, the preset bypass cache result can be obtained when the search result of the search engine system fails to be obtained. For example, the electronic device may specifically obtain the preset bypass cache result corresponding to the target service when the search result of the search engine system fails to be obtained in real time.
For example, if the active traffic of the current period of time counted in real time by the active service i is Li, the total active traffic of the current period of time is lt=l1+l2+ … +ln. If Lt < A, the current query keyword search request firstly acquires a real-time result recall through a request search engine system, and if the request fails, a preset bypass cache result is returned as a search result.
206. When the target service search amount is larger than or equal to the target service reserve amount and smaller than the search capacity of the target service subsystem, the electronic equipment acquires the search result of the target service subsystem and updates a preset bypass cache result by utilizing the search result of the target service subsystem.
The preset bypass cache result is a search result of a bypass system which is searched based on the target service and is cached in the search engine system in advance.
In order to improve timeliness of the preset bypass cache result and further improve timeliness of searching, the preset bypass cache result can be updated by utilizing the search result obtained in real time. For example, the electronic device may specifically obtain, when the target service search amount is greater than or equal to the target service reserve amount, a search capacity of a target service subsystem corresponding to the target service; if the target service search volume is smaller than the search capacity of the target service subsystem, acquiring search results corresponding to the target service from the target service subsystem in real time through the search engine system; and acquiring a preset bypass cache result corresponding to the target service, and updating the preset bypass cache result corresponding to the target service by utilizing the search result corresponding to the target service acquired by the search engine system in real time to acquire an updated bypass cache result.
In order to improve the comprehensiveness of the returned target search result, the search result of the target service and the preset bypass cache result can be fused and then returned. For example, the electronic device may specifically fuse the search result corresponding to the target service obtained in real time by the search engine system with the updated bypass buffer result to obtain a fused search result; taking the fused search result as a target search result of the target service; and if the search engine system fails to acquire the search result corresponding to the target service in real time, taking the preset bypass cache result as the target search result of the target service.
For example, as the active keyword traffic of the current time period increases gradually, that is, lt > =a, it is assumed that the current search query request query is an active service i request, the traffic of the current time period of the active service i is Li, and the upper limit of subsystem capacity is Ci. If Li < Ci, the search engine system is used for independently acquiring the search result of the active operation special area (namely the search result of the active service subsystem), acquiring the preset bypass cache result, replacing the active operation special area result in the preset bypass cache result with the search result of the operation special area recalled by the search engine system in real time, and returning the real-time result of the operation active service and the preset bypass cache result as a final search result. If the acquisition of the result of the special area of the active operation fails through the search engine system, the preset bypass cache result is directly used as a final search result.
207. And when the target service search volume is larger than or equal to the target service reserve volume and larger than or equal to the search capacity of the target service subsystem, the electronic equipment acquires a preset bypass cache result of the search engine system.
For example, the electronic device may specifically obtain, when the target service search amount is greater than or equal to the target service reserve amount, a search capacity of a target service subsystem corresponding to the target service; and if the target service search volume is greater than or equal to the search capacity of the target service subsystem, acquiring a preset bypass cache result corresponding to the target service. For example, if Li > =ci, the preset bypass buffer result is directly obtained and returned as the final search result. The particular flow chart may be as shown in fig. 2c and the search result display may be as shown in fig. 2 d.
According to the scheme, the operation active traffic and the inactive traffic are counted in real time according to time segments, the inactive traffic in the previous time period is used as a reference in the current time period, a certain traffic allowance is reserved for the inactive traffic in the current time period, and the situation that all real-time search query requests are occupied by the active traffic and the inactive search requests cannot be processed is avoided. And on the basis of reserving inactive traffic, all activities compete for the residual capacity of the search engine system at the same time, so that the current active traffic distribution recalled by the search engine system is consistent with the reached active traffic distribution. And when the activity flow is not high, the activity flow can be all recalled through the search engine system, so that the timeliness of the request result is ensured. When the active traffic is higher and exceeds the capacity of the search engine system but does not exceed the capacity of the active service, the active service requests the search engine system in real time and is fused with other service results of bypass preheating cache, so that the search engine system is not impacted and crashed by the active traffic, and the timeliness of the results of the active operation special area is also ensured. When the active traffic exceeds the active traffic capacity, the active traffic is directly returned from the bypass preheating buffer memory, so that the stability of the active traffic subsystem is ensured.
According to the scheme, the automatic bypass preheating caching capacity is realized according to the activity real-time flow, and in addition, according to the comparison condition of the operation activity searching flow and the activity capacity upper limit and the comparison condition of the whole searching flow and the search engine normal capacity upper limit, the automatic bypass preheating caching capacity is automatically and flexibly switched among the search result acquisition modes of full-service real-time searching, active service real-time searching and inactive service preheating caching result fusion and full-service preheating caching result.
As can be seen from the foregoing, the present embodiment may obtain a non-target traffic search amount of a search engine system in a historical period, where the search engine system includes at least one target traffic subsystem; then, determining a target traffic reserve in the current time period based on the non-target traffic search in the historical time period; then, counting the target service searching amount in the current time period in real time, and acquiring the searching result of the search engine system in real time when the target service searching amount is smaller than the target service reserved amount; when the target service search amount is larger than or equal to the target service reserve amount and smaller than the search capacity of a target service subsystem, acquiring a search result of the target service subsystem, and updating a preset bypass cache result by utilizing the search result of the target service subsystem, wherein the preset bypass cache result is a search result of a bypass system which is searched based on target service and is cached in a search engine system in advance; and when the target service search volume is larger than or equal to the target service reserve volume and larger than or equal to the search capacity of the target service subsystem, acquiring a preset bypass cache result of the search engine system. According to the scheme, a bypass preheating buffer memory result (namely a preset bypass buffer memory result) can be flexibly used according to the size of the actual search flow, the real-time flow of the operation activity and the inactivity is counted by sliding in a time period, the flow in the previous time period is taken as a reference, and the inactive flow allowance is reserved for the current time period so as to protect the request of the inactive flow; meanwhile, according to the comparison situation of the operation activity search flow and the activity capacity upper limit and the comparison situation of the whole search flow and the search engine normal capacity upper limit, the automatic switching is automatically performed among the modes of full-service real-time search, active service real-time search and inactive service preheating cache result fusion and full-service preheating cache result acquisition, and the flexibility of search is greatly improved. The scheme protects the request of the inactive flow; meanwhile, when the overall search flow is low, timeliness of the overall result is fully guaranteed through recall of the search engine system, and when the activity flow does not exceed the upper limit of the capacity of the operation activity service type, the real-time performance of the special type of the operation result is guaranteed by acquiring the activity service type result in real time, and the service capacity of the operation activity service subsystem is utilized to the maximum extent; the bypass preheating cache result is used as an overall spam result when the flow is higher or the request fails, so that the usability of the search result of the operation liveness verb is ensured, and the search efficiency is greatly improved. According to the scheme, large-flow impact of search operation activities can be supported, bypass preheating cache search results are carried out on the search operation activity verbs in advance, the bypass preheating cache results are flexibly used according to the actual search flow, the flow impact of the operation activities is relieved, and the stability of a search engine is guaranteed.
In order to better implement the above method, correspondingly, the embodiment of the application also provides a searching device, which can be specifically integrated in an electronic device, wherein the electronic device can be a server or a terminal and other devices.
For example, as shown in fig. 3, the search apparatus may include an acquisition unit 301, a determination unit 302, a first search unit 303, a second search unit 304, and a third search unit 305, as follows:
an obtaining unit 301, configured to obtain a non-target service search amount of a search engine system in a historical period, where the search engine system includes at least one target service subsystem;
a determining unit 302, configured to determine a target traffic reserve in a current time period based on a non-target traffic search amount in the historical time period;
a first search unit 303, configured to count, in real time, a target service search amount in a current time period, and obtain, in real time, a search result of the search engine system when the target service search amount is less than the target service reserve amount;
a second search unit 304, configured to obtain a search result of the target service subsystem when the target service search amount is greater than or equal to the target service reserve amount and less than a search capacity of the target service subsystem, and update a preset bypass buffer result with the search result of the target service subsystem, where the preset bypass buffer result is a search result of a bypass system that searches based on a target service and is pre-buffered in a search engine system;
And a third searching unit 305, configured to obtain a preset bypass buffer result of the search engine system when the target service search volume is greater than or equal to the target service reserved volume and greater than or equal to the search capacity of the target service subsystem.
Optionally, in some embodiments, the determining unit 302 may be specifically configured to determine the non-target traffic reserve in the current period based on the non-target traffic search in the historical period; and determining the target service reservation amount of the current time period according to the search capacity of the search engine system and the non-target service reservation amount.
Optionally, in some embodiments, the determining unit 302 may be specifically configured to obtain an upper search capacity limit of each service type subsystem in the search engine system; and determining the minimum value of the upper limit of the search capacity in the service type subsystem as the search capacity of the search engine system.
Optionally, in some embodiments, the first search unit 303 may be specifically configured to, when the search engine system receives a search query request, obtain a query keyword corresponding to the search query request; if the query keyword is a target service keyword, updating the target service search volume in the current time period based on the search query request; if the query keyword is not the target service keyword, updating the non-target service search volume in the current time period based on the search query request, and acquiring a search result corresponding to the search query request from the search engine system.
Optionally, in some embodiments, the first search unit 303 may be specifically configured to obtain a preset bypass cache result corresponding to the target service when the search result of the search engine system fails to be obtained in real time.
Optionally, in some embodiments, the second search unit 304 may be specifically configured to obtain a search capacity of a target service subsystem corresponding to the target service when the target service search amount is greater than or equal to the target service reservation amount; if the target service search volume is smaller than the search capacity of the target service subsystem, acquiring search results corresponding to the target service from the target service subsystem in real time through the search engine system; and acquiring a preset bypass cache result corresponding to the target service, and updating the preset bypass cache result corresponding to the target service by utilizing the search result corresponding to the target service acquired by the search engine system in real time to acquire an updated bypass cache result.
Optionally, in some embodiments, the second search unit 304 may be specifically configured to fuse a search result corresponding to the target service obtained in real time by the search engine system with the updated bypass cache result to obtain a fused search result; taking the fused search result as a target search result of the target service; and if the search engine system fails to acquire the search result corresponding to the target service in real time, taking the preset bypass cache result as the target search result of the target service.
Optionally, in some embodiments, the third searching unit 305 may be specifically configured to obtain a search capacity of a target service subsystem corresponding to the target service when the target service search amount is greater than or equal to the target service reserved amount; and if the target service search volume is greater than or equal to the search capacity of the target service subsystem, acquiring a preset bypass cache result corresponding to the target service.
Optionally, in some embodiments, the searching device may further include a buffer unit, where the buffer unit may be specifically configured to take a target preheating task from the first preheating task queue, where the target preheating task carries service information of the target service; executing the target preheating task according to the service information of the target service to obtain a first preheating result corresponding to the target service; storing the first preheating result and the service information to a bypass system correspondingly, and adding the target preheating task to a task circulation queue; when the target preheating task is taken out from the task circulation queue, executing the target preheating task according to the service information of the target service to obtain a second preheating result corresponding to the target service; and storing the second preheating result and the service information to a bypass system correspondingly to obtain a preset bypass caching result.
In the implementation, each unit may be implemented as an independent entity, or may be implemented as the same entity or several entities in any combination, and the implementation of each unit may be referred to the foregoing method embodiment, which is not described herein again.
As can be seen from the foregoing, in this embodiment, the acquiring unit 301 may acquire, for a historical period of time, a non-target service search amount of a search engine system, where the search engine system includes at least one target service subsystem; then, the target traffic reserve of the current period is determined by the determining unit 302 based on the non-target traffic search amount of the history period; then, the first search unit 303 counts the target service search amount in the current time period in real time, and when the target service search amount is smaller than the target service reserved amount, the search result of the search engine system is obtained in real time; when the target service search amount is greater than or equal to the target service reserve amount and smaller than the search capacity of the target service subsystem, the second search unit 304 obtains the search result of the target service subsystem, and updates a preset bypass cache result by using the search result of the target service subsystem, wherein the preset bypass cache result is a search result of a bypass system which is searched based on target service and is cached in the search engine system in advance; and when the target service search amount is greater than or equal to the target service reserved amount and greater than or equal to the search capacity of the target service subsystem, the third search unit 305 acquires a preset bypass cache result of the search engine system. According to the scheme, a preset bypass cache result can be flexibly used according to the actual search volume, real-time search volumes of target services and non-target services are counted through time period sliding, the non-target service search volume in the previous time period is taken as a reference, the non-target service search volume is reserved for the current time period, and the request of the non-target service search volume is protected; meanwhile, according to the comparison situation of the target service search volume and the target service capacity upper limit and the comparison situation of the overall search volume and the search engine normal capacity upper limit, the automatic switching is automatically performed among several search result acquisition modes of full service real-time search, target service real-time search and non-target service use preset bypass cache result fusion, full service use preset bypass cache result and the like, and the flexibility of search is greatly improved. The scheme protects the request of non-target service search volume; meanwhile, when the overall search quantity is low, the timeliness of the overall search result is fully guaranteed through recall of the search engine system, and when the target service search quantity does not exceed the upper limit of the capacity of the target service type, the target service type result is obtained in real time, the timeliness of the target service type is guaranteed, and the service capacity of the target service subsystem is utilized to the maximum extent; the bypass cache result is preset as an overall spam result and is used when the flow is higher or the request fails, so that the usability of the target service search result is ensured, and the search efficiency is greatly improved.
In addition, the embodiment of the application further provides an electronic device, as shown in fig. 4, which shows a schematic structural diagram of the electronic device according to the embodiment of the application, specifically:
the electronic device may include one or more processing cores 'processors 401, one or more computer-readable storage media's memory 402, power supply 403, and input unit 404, among other components. Those skilled in the art will appreciate that the electronic device structure shown in fig. 4 is not limiting of the electronic device and may include more or fewer components than shown, or may combine certain components, or may be arranged in different components. Wherein:
the processor 401 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device and processes data by running or executing software programs and/or modules stored in the memory 402, and calling data stored in the memory 402, thereby performing overall monitoring of the electronic device. Optionally, processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, an application program, etc., and the modem processor mainly processes wireless communication. It will be appreciated that the modem processor described above may not be integrated into the processor 401.
The memory 402 may be used to store software programs and modules, and the processor 401 executes various functional applications and data processing by executing the software programs and modules stored in the memory 402. The memory 402 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data created according to the use of the electronic device, etc. In addition, memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.
The electronic device further comprises a power supply 403 for supplying power to the various components, preferably the power supply 403 may be logically connected to the processor 401 by a power management system, so that functions of managing charging, discharging, and power consumption are performed by the power management system. The power supply 403 may also include one or more of any of a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
The electronic device may further comprise an input unit 404, which input unit 404 may be used for receiving input digital or character information and generating keyboard, mouse, joystick, optical or trackball signal inputs in connection with user settings and function control.
Although not shown, the electronic device may further include a display unit or the like, which is not described herein. In particular, in this embodiment, the processor 401 in the electronic device loads executable files corresponding to the processes of one or more application programs into the memory 402 according to the following instructions, and the processor 401 executes the application programs stored in the memory 402, so as to implement various functions as follows:
acquiring non-target service search volume of a search engine system in a historical time period, wherein the search engine system comprises at least one target service subsystem; then, determining a target traffic reserve in the current time period based on the non-target traffic search in the historical time period; then, counting the target service searching amount in the current time period in real time, and acquiring the searching result of the search engine system in real time when the target service searching amount is smaller than the target service reserved amount; when the target service search amount is larger than or equal to the target service reserve amount and smaller than the search capacity of a target service subsystem, acquiring a search result of the target service subsystem, and updating a preset bypass cache result by utilizing the search result of the target service subsystem, wherein the preset bypass cache result is a search result of a bypass system which is searched based on target service and is cached in a search engine system in advance; and when the target service search volume is larger than or equal to the target service reserve volume and larger than or equal to the search capacity of the target service subsystem, acquiring a preset bypass cache result of the search engine system.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
As can be seen from the foregoing, the present embodiment may obtain a non-target traffic search amount of a search engine system in a historical period, where the search engine system includes at least one target traffic subsystem; then, determining a target traffic reserve in the current time period based on the non-target traffic search in the historical time period; then, counting the target service searching amount in the current time period in real time, and acquiring the searching result of the search engine system in real time when the target service searching amount is smaller than the target service reserved amount; when the target service search amount is larger than or equal to the target service reserve amount and smaller than the search capacity of a target service subsystem, acquiring a search result of the target service subsystem, and updating a preset bypass cache result by utilizing the search result of the target service subsystem, wherein the preset bypass cache result is a search result of a bypass system which is searched based on target service and is cached in a search engine system in advance; and when the target service search volume is larger than or equal to the target service reserve volume and larger than or equal to the search capacity of the target service subsystem, acquiring a preset bypass cache result of the search engine system. According to the scheme, a preset bypass cache result can be flexibly used according to the actual search volume, real-time search volumes of target services and non-target services are counted through time period sliding, the non-target service search volume in the previous time period is taken as a reference, the non-target service search volume is reserved for the current time period, and the request of the non-target service search volume is protected; meanwhile, according to the comparison situation of the target service search volume and the target service capacity upper limit and the comparison situation of the overall search volume and the search engine normal capacity upper limit, the automatic switching is automatically performed among several search result acquisition modes of full service real-time search, target service real-time search and non-target service use preset bypass cache result fusion, full service use preset bypass cache result and the like, and the flexibility of search is greatly improved. The scheme protects the request of non-target service search volume; meanwhile, when the overall search quantity is low, the timeliness of the overall search result is fully guaranteed through recall of the search engine system, and when the target service search quantity does not exceed the upper limit of the capacity of the target service type, the target service type result is obtained in real time, the timeliness of the target service type is guaranteed, and the service capacity of the target service subsystem is utilized to the maximum extent; the bypass cache result is preset as an overall spam result and is used when the flow is higher or the request fails, so that the usability of the target service search result is ensured, and the search efficiency is greatly improved.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of the various methods of the above embodiments may be performed by instructions, or by instructions controlling associated hardware, which may be stored in a computer-readable storage medium and loaded and executed by a processor.
To this end, embodiments of the present application also provide a storage medium having stored therein a plurality of instructions capable of being loaded by a processor to perform steps in any of the search methods provided by the embodiments of the present application. For example, the instructions may perform the steps of:
acquiring non-target service search volume of a search engine system in a historical time period, wherein the search engine system comprises at least one target service subsystem; then, determining a target traffic reserve in the current time period based on the non-target traffic search in the historical time period; then, counting the target service searching amount in the current time period in real time, and acquiring the searching result of the search engine system in real time when the target service searching amount is smaller than the target service reserved amount; when the target service search amount is larger than or equal to the target service reserve amount and smaller than the search capacity of a target service subsystem, acquiring a search result of the target service subsystem, and updating a preset bypass cache result by utilizing the search result of the target service subsystem, wherein the preset bypass cache result is a search result of a bypass system which is searched based on target service and is cached in a search engine system in advance; and when the target service search volume is larger than or equal to the target service reserve volume and larger than or equal to the search capacity of the target service subsystem, acquiring a preset bypass cache result of the search engine system.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
Wherein the storage medium may include: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like.
The steps in any of the searching methods provided in the embodiments of the present application may be executed due to the instructions stored in the storage medium, so that the beneficial effects that any of the searching methods provided in the embodiments of the present application may be achieved are described in detail in the previous embodiments, and are not repeated herein.
The foregoing describes in detail a search method, apparatus, electronic device, and storage medium provided in the embodiments of the present application, and specific examples are applied to illustrate principles and implementations of the present application, where the foregoing examples are only used to help understand the method and core idea of the present application; meanwhile, those skilled in the art will have variations in the specific embodiments and application scope in light of the ideas of the present application, and the present description should not be construed as limiting the present application in view of the above.

Claims (13)

1. A search method, comprising:
Acquiring non-target service search volume of a search engine system in a historical time period, wherein the search engine system comprises at least one target service subsystem;
determining a target traffic reserve in the current time period based on the non-target traffic search in the historical time period;
counting target service searching quantity in a current time period in real time, and acquiring a searching result of the search engine system in real time when the target service searching quantity is smaller than the target service reserved quantity;
when the target service search amount is larger than or equal to the target service reserve amount and smaller than the search capacity of a target service subsystem, acquiring a search result of the target service subsystem, and updating a preset bypass cache result by utilizing the search result of the target service subsystem, wherein the preset bypass cache result is a search result of a bypass system which is searched based on target service and is cached in a search engine system in advance;
and when the target service search volume is larger than or equal to the target service reserve volume and larger than or equal to the search capacity of the target service subsystem, acquiring a preset bypass cache result of the search engine system.
2. The method of claim 1, wherein the determining the target traffic reserve for the current time period based on the non-target traffic search for the historical time period comprises:
Determining a non-target traffic reserve for the current time period based on the non-target traffic search for the historical time period;
and determining the target service reservation amount of the current time period according to the search capacity of the search engine system and the non-target service reservation amount.
3. The method of claim 2, wherein prior to determining the target traffic reserve for the current time period based on the search capacity of the search engine system and the non-target traffic reserve, further comprising:
acquiring the search capacity upper limit of each service type subsystem in the search engine system;
and determining the minimum value of the upper limit of the search capacity in the service type subsystem as the search capacity of the search engine system.
4. The method of claim 1, wherein the counting the target traffic search amount for the current time period in real time comprises:
when the search engine system receives a search query request, acquiring a query keyword corresponding to the search query request;
if the query keyword is a target service keyword, updating the target service search volume in the current time period based on the search query request;
If the query keyword is not the target service keyword, updating the non-target service search volume in the current time period based on the search query request, and acquiring a search result corresponding to the search query request from the search engine system.
5. The method according to claim 1, wherein after obtaining the search result of the search engine system in real time when the target traffic search volume is smaller than the target traffic reserve volume, further comprising:
and when the search result of the search engine system fails to be obtained in real time, obtaining a preset bypass cache result corresponding to the target service.
6. The method of claim 1, wherein the obtaining the search result of the target service subsystem and updating the preset bypass buffer result with the search result of the target service subsystem when the target service search amount is greater than or equal to the target service reserve amount and less than the search capacity of the target service subsystem comprises:
when the target service searching amount is larger than or equal to the target service reserved amount, acquiring the searching capacity of a target service subsystem corresponding to the target service;
If the target service search volume is smaller than the search capacity of the target service subsystem, acquiring search results corresponding to the target service from the target service subsystem in real time through the search engine system;
and acquiring a preset bypass cache result corresponding to the target service, and updating the preset bypass cache result corresponding to the target service by utilizing the search result corresponding to the target service acquired by the search engine system in real time to acquire an updated bypass cache result.
7. The method of claim 6, wherein updating the preset bypass buffer memory result corresponding to the target service by using the search result corresponding to the target service obtained in real time by the search engine system, after obtaining the updated bypass buffer memory result, further comprises:
fusing the search results corresponding to the target service obtained by the search engine system in real time with the updated bypass cache results to obtain fused search results;
taking the fused search result as a target search result of the target service;
and if the search engine system fails to acquire the search result corresponding to the target service in real time, taking the preset bypass cache result as the target search result of the target service.
8. The method of claim 1, wherein the obtaining the preset bypass cache result of the search engine system when the target traffic search volume is greater than or equal to the target traffic reserve and greater than or equal to a search capacity of a target traffic subsystem comprises:
when the target service searching amount is larger than or equal to the target service reserved amount, acquiring the searching capacity of a target service subsystem corresponding to the target service;
and if the target service search volume is greater than or equal to the search capacity of the target service subsystem, acquiring a preset bypass cache result corresponding to the target service.
9. The method of claim 1, wherein before updating the preset bypass buffer memory result with the search result of the target service subsystem, further comprising:
taking out a target preheating task from a first preheating task queue, wherein the target preheating task carries service information of the target service;
executing the target preheating task according to the service information of the target service to obtain a first preheating result corresponding to the target service;
storing the first preheating result and the service information to a bypass system correspondingly, and adding the target preheating task to a task circulation queue;
When the target preheating task is taken out from the task circulation queue, executing the target preheating task according to the service information of the target service to obtain a second preheating result corresponding to the target service;
and storing the second preheating result and the service information to a bypass system correspondingly to obtain a preset bypass caching result.
10. A search apparatus, comprising:
the acquisition unit is used for acquiring non-target service search volume of a search engine system in a historical time period, wherein the search engine system comprises at least one target service subsystem;
a determining unit for determining a target traffic reserve in a current time period based on the non-target traffic search amount in the history time period;
the first search unit is used for counting the target service search amount in the current time period in real time, and acquiring the search result of the search engine system in real time when the target service search amount is smaller than the target service reserve amount;
the second search unit is used for acquiring the search result of the target service subsystem and updating a preset bypass cache result by utilizing the search result of the target service subsystem when the target service search amount is larger than or equal to the target service reserve amount and smaller than the search capacity of the target service subsystem, wherein the preset bypass cache result is a search result which is searched based on target service and is cached in a bypass system of a search engine system in advance;
And the third searching unit is used for acquiring a preset bypass cache result of the search engine system when the target service searching amount is larger than or equal to the target service reserved amount and larger than or equal to the searching capacity of the target service subsystem.
11. A computer readable storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the steps in the search method of any one of claims 1 to 9.
12. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the search method of any one of claims 1 to 9 when the program is executed by the processor.
13. A computer program product comprising a computer program or instructions which, when executed by a processor, carries out the steps in the search method of any one of claims 1 to 9.
CN202111396649.6A 2021-11-23 2021-11-23 Searching method, searching device, electronic equipment and storage medium Pending CN116150459A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111396649.6A CN116150459A (en) 2021-11-23 2021-11-23 Searching method, searching device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111396649.6A CN116150459A (en) 2021-11-23 2021-11-23 Searching method, searching device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116150459A true CN116150459A (en) 2023-05-23

Family

ID=86353103

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111396649.6A Pending CN116150459A (en) 2021-11-23 2021-11-23 Searching method, searching device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116150459A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116894118A (en) * 2023-09-08 2023-10-17 腾讯科技(深圳)有限公司 Data searching method, device, equipment and storage medium
CN117520686A (en) * 2023-11-20 2024-02-06 广州方舟信息科技有限公司 Search preloading method, device, electronic equipment and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116894118A (en) * 2023-09-08 2023-10-17 腾讯科技(深圳)有限公司 Data searching method, device, equipment and storage medium
CN116894118B (en) * 2023-09-08 2023-12-22 腾讯科技(深圳)有限公司 Data searching method, device, equipment and storage medium
CN117520686A (en) * 2023-11-20 2024-02-06 广州方舟信息科技有限公司 Search preloading method, device, electronic equipment and storage medium
CN117520686B (en) * 2023-11-20 2024-08-20 广州方舟信息科技有限公司 Search preloading method, device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US11663577B2 (en) Resource transfer method and apparatus and storage medium
AU2019277162C1 (en) Blockchain-based transaction processing method and apparatus
CN108494703B (en) Access frequency control method, device and storage medium
EP3777093A2 (en) Blockchain-based service rental method, apparatus, and system, and electronic device
US20130215126A1 (en) Managing Font Distribution
CN109102269A (en) Transfer account method and device, block chain node and storage medium based on block chain
CN114244595B (en) Authority information acquisition method and device, computer equipment and storage medium
CN116150459A (en) Searching method, searching device, electronic equipment and storage medium
CN103368867A (en) Method and system of cached object communicating with secondary site through network
CN110544134A (en) resource processing method and device and computer storage medium
CN111314747B (en) Resource outage control method, device, equipment and storage medium
CN112347184A (en) Bifurcation processing method and block link point
Tang et al. Pricing model for dynamic resource overbooking in edge computing
CN112612496A (en) Intelligent contract operation management method, device, equipment and computer storage medium
CN114070847B (en) Method, device, equipment and storage medium for limiting current of server
CN112468885B (en) Task processing method, electronic device and storage medium
CN110677494B (en) Access response method and device
CN112070342A (en) Microservice evaluation method and apparatus, electronic device and computer-readable storage medium
US20100222022A1 (en) Communication method, communication system and access method to service provider base
CN117408768A (en) Credit line processing method and related equipment
CN110262892A (en) A kind of ticketing service dissemination method based on distributed storage data-link, device and data-link node
CN116976440A (en) Model reasoning method, device, computer equipment, storage medium and product
CN113535780A (en) User request processing method and device, computer equipment and storage medium
CN111260418A (en) Method, device, server and storage medium for probability selection of object
JP7557224B1 (en) Service usage management system, service usage management method and service usage management program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40086758

Country of ref document: HK