Searching method, system, device and equipment and storage medium

By distributing search sentences and content to applicable large language models, it solves the problem of traditional search engines' lack of deep understanding of user needs, improves the quality and efficiency of search results, and achieves good retrieval results in all fields.

CN118733864AActive Publication Date: 2024-10-01BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410831571.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-25
Publication Date
2024-10-01
Estimated Expiration
2044-06-25

AI Technical Summary

Technical Problem

Traditional search engines lack in-depth understanding of user needs and adaptability, resulting in low-quality search results, increasing user query and search costs, and reducing user experience.

Method used

Introducing large language model technology, the search statements and search content are distributed to the large language model suitable for the scenario, and the final search results are generated, giving full play to the advantages of each large language model and optimizing the search effect.

Benefits of technology

It improves the quality of search results and the efficiency of users in acquiring knowledge, reduces the waste of computing power, solves the problem of insufficient capabilities of a single large model in different scenarios, and achieves good retrieval results in all fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733864A_ABST
    Figure CN118733864A_ABST
Patent Text Reader

Abstract

The invention provides a search method, system, device and equipment and a storage medium, and relates to the technical field of computers, in particular to the technical field of search, neural networks, large language models and the like. According to the specific implementation scheme, a search statement and multiple pieces of search content are input into a distribution module, and the distribution module distributes the search statement and the multiple pieces of search content to a first model; wherein the first model is a large language model suitable for search scenes corresponding to the search statement and the multiple pieces of search content; and through the first model, generating a search result based on the search statement and the plurality of search contents. The search effect can be optimized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to technical fields such as search, neural networks, and large language models. Background Art

[0002] Search engines are a type of search technology that uses specific strategies to retrieve specific information from the Internet and feed it back to users based on user needs and certain algorithms. The development of Large Language Model (LLM) technology has brought about a rapid improvement in the natural language understanding and processing capabilities of artificial intelligence systems. How to introduce large language model technology capabilities into search engines to enhance the search capabilities of search engines is a technical problem that needs to be solved. Summary of the invention

[0003] The present disclosure provides a search method, system, apparatus, device and storage medium.

[0004] According to one aspect of the present disclosure, there is provided a search method, comprising:

[0005] Inputting a search statement and a plurality of search contents into a distribution module, and distributing the search statement and the plurality of search contents to a first model by the distribution module; wherein the first model is a large language model applicable to the search scenario corresponding to the search statement and the plurality of search contents; and,

[0006] Through the first model, search results are generated based on the search statement and multiple search contents.

[0007] According to another aspect of the present disclosure, a search system is provided, including a distribution module and a plurality of large language models, each of which corresponds to a different search scenario:

[0008] The distribution module is used to receive a search statement and a plurality of search contents, and distribute the search statement and the plurality of search contents to a first model; wherein the first model is a large language model applicable to a search scenario corresponding to the search statement and the plurality of search contents;

[0009] The large language model is used to receive a search statement and a plurality of search contents from the distribution module, and generate search results based on the search statement and the plurality of search contents.

[0010] According to another aspect of the present disclosure, there is provided a distribution device, comprising:

[0011] A receiving unit, used for receiving a search statement and a plurality of search contents;

[0012] A distribution unit is used to determine a first model corresponding to the search statement and multiple search contents, and distribute the search statement and multiple search contents to the first model, so that the first model generates search results based on the search statement and multiple search contents; wherein the first model is a large language model suitable for the search scenario corresponding to the search statement and multiple search contents.

[0013] According to another aspect of the present disclosure, there is provided an electronic device, comprising:

[0014] at least one processor; and

[0015] a memory communicatively connected to the at least one processor; wherein,

[0016] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute any method in the embodiments of the present disclosure.

[0017] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute any method according to the embodiments of the present disclosure.

[0018] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, which implements any method according to the embodiments of the present disclosure when executed by a processor.

[0019] The present disclosure uses a distribution module to input the search statement and multiple search contents into a large language model that is "good at" processing the search scenario, that is, a large language model suitable for the search scenario corresponding to the search statement and multiple search contents, and the large language model generates the final search results based on the search statement and multiple search contents. Therefore, the embodiments of the present disclosure can give full play to the advantages of each large language model and optimize the search effect.

[0020] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0022] Figure 1 is a schematic diagram of an application scenario according to an embodiment of the present disclosure;

[0023] Figure 2 is a flowchart of an implementation of a search method according to an embodiment of the present disclosure;

[0024] Figure 3 is a flowchart of an implementation of a search method according to another embodiment of the present disclosure;

[0025] Figure 4 is a flowchart for implementing a search method according to another embodiment of the present disclosure, for determining a large language model applicable to each search scenario from a plurality of large language models;

[0026] Figure 5 is a schematic diagram of a search method according to another embodiment of the present disclosure;

[0027] Figure 6 is a schematic diagram of the structure of a search system 600 according to an embodiment of the present disclosure;

[0028] Figure 7 is a schematic diagram of a search system 700 according to another embodiment of the present disclosure

[0029] Figure 8 A schematic block diagram of an example electronic device 800 that may be used to implement embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0030] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0031] The “and / or” in the embodiments of the present disclosure indicates that three relationships may exist. For example, A and / or B may indicate the following three situations: A exists alone, A and B exist at the same time, and B exists alone. The term “at least one” herein indicates any combination of at least two of any one or more of a plurality of types. For example, at least one of A, B, and C may indicate any one or more elements selected from the set consisting of A, B, and C. The terms “first” and “second” herein refer to and distinguish between multiple similar technical terms, and do not mean to limit the order or to limit the meaning to only two. For example, the first feature and the second feature refer to two types / two features. The first feature may be one or more, and the second feature may also be one or more.

[0032] A search engine is a search technology that uses specific strategies to retrieve specified information from the Internet and feed it back to users based on user needs and certain algorithms. Traditional search engine technology provides keyword-based web search services by indexing content on the Internet. However, although traditional search engines can quickly return a large amount of relevant information, they often lack the ability to deeply understand and adapt and adjust to specific problems. If the original web page cannot meet the user's query needs or the web page content has a low knowledge density and contains discussions that are useless to user needs, it will increase the user's query and search costs and reduce the user's search experience.

[0033] The big language model is a natural language processing (NLP) model based on deep learning, which is used to process and generate human language text. The big language model can learn language patterns in large-scale corpora, understand and generate complex language structures, and has the ability to understand context, and has memory and reasoning capabilities. The development of big model technology has brought about a rapid improvement in the natural language understanding and processing capabilities of artificial intelligence systems. How to introduce the capabilities of big language models into search engines so that search engines can deeply understand user needs and improve the quality of search results is an area that is currently being actively explored.

[0034] The disclosed embodiment aims to propose a search method, which introduces large language model technology into search engine technology to solve the search needs of users.

[0035] Figure 1 is a schematic diagram of an application scenario according to an embodiment of the present disclosure, such as Figure 1 As shown, the application scenario diagram of the embodiment of the present disclosure may include a search terminal 110 and a search system 120, and the search terminal 110 and the search system 120 may communicate through any type of wired or wireless network. Specifically, the user inputs a search request through the search terminal 110, and the search terminal 110 sends the search request to the search system 120 through a wired or wireless network; the search system 120 receives the search request, searches based on the search request, and obtains search results. Among them, the search terminal 110 proposed in the embodiment of the present disclosure includes but is not limited to electronic devices such as mobile phones, computers, intelligent voice interaction devices, smart home appliances, car terminals, game consoles, e-book readers, multimedia playback devices, wearable devices, etc.; the search system 120 may include electronic devices or servers for providing search services for the search terminal 110. In addition, the embodiment of the present disclosure does not specifically limit the number of search terminals 110. For example, the application scenario diagram of the embodiment of the present disclosure may include one or more search terminals 110.

[0036] Figure 2is a flowchart of a search method according to an embodiment of the present disclosure, including:

[0037] S210, inputting a search statement and a plurality of search contents into a distribution module, and distributing the search statement and the plurality of search contents to a first model by the distribution module; wherein the first model is a large language model applicable to the search scenario corresponding to the search statement and the plurality of search contents; and

[0038] S220: Generate search results based on the search statement and multiple search contents through the first model.

[0039] It can be seen that the search method proposed in the embodiment of the present disclosure summarizes the search scenarios that the large language model is "good at". When the distribution model receives the search statement and multiple search contents, the search statement and multiple search contents are input into the large language model that is "good at" processing the search scenario, that is, the large language model applicable to the search scenario corresponding to the search statement and multiple search contents, and the large language model generates the final search results based on the search statement and multiple search contents. Therefore, the embodiment of the present disclosure can give full play to the advantages of each large language model and optimize the search effect.

[0040] Figure 3 is a flowchart of a search method according to another embodiment of the present disclosure. In some implementations, before the search statement and the plurality of search contents are input into the distribution module, the following may also be included:

[0041] S310, inputting a search statement into a search engine;

[0042] S320: Determine the plurality of search contents according to the output contents of the search engine; the plurality of search contents match the search statement.

[0043] For example, the search statement is a search query input by the user, and the search engine outputs the K search contents (TopK search contents) that have the highest matching degree with the user's search query; the search query and the TopK search contents are distributed by the distribution model to the large language model applicable to the search scenario. The large language model can be used as a large language model problem processing module built into the search engine. The search engine can have multiple large language model problem processing modules (i.e., large language models) built into it, and each large language model is adapted to different fields or search scenarios, such as medical, legal, life knowledge, education, encyclopedia, etc. The large language model can summarize and refine the web page content (i.e., multiple search contents) searched by the search engine based on its text understanding and organization generation capabilities, and in this process use the internalized knowledge obtained by model pre-training to further enrich the summary content, thereby obtaining richer and more accurate answers than the original web page, and improving the efficiency of users in acquiring knowledge.

[0044] It can be seen that the retrieval method proposed in the embodiment of the present disclosure can comprehensively utilize the system of multiple large language models, analyze the capabilities of multiple large language models from the dimensions of cost, performance, field, demand, etc., and combine the characteristics of the search scenario to select the most suitable large language model for the scenario to solve the user's search needs.

[0045] In some implementations, after the large language model generates search results, the search results may be returned to a search engine; and the search results may be rendered and displayed by the search engine.

[0046] It can be seen that the embodiments of the present disclosure can use multiple large language models as built-in modules of the search engine. After the large language model generates search results, the search engine is used to render and display the search results. Therefore, the existing functions of the search engine can be fully utilized, and the changes to the existing search engine are relatively small.

[0047] In some implementations, the search method further includes: pre-training a plurality of large language models; and determining, from the plurality of large language models, a large language model applicable to each search scenario.

[0048] Each large language model is a model that answers questions. The input content of the large language model is the query and the TopK web page index, and the output content is the answer to the question. For example, the input query is "The importance of Qingming Festival", and the input TopK web page index is a number of web pages for this question obtained from the search engine, including web page content introducing the origin of Qingming Festival, Qingming Festival customs, and Qingming Festival cultural significance. The query and web page text are distributed to the large language model applicable to the search scenario, so that the large language model summarizes the web page content and outputs the answer to "The importance of Qingming Festival". In the above process, the large language model mainly answers the query based on its own internalized knowledge and content summary ability, referring to the web page content.

[0049] The training set of the large language model includes multiple queries and TopK web pages, which may include thousands to tens of thousands of such training data. Then, by distilling other large models with stronger capabilities or manually answering and labeling methods, high-quality answers under the corresponding queries are obtained, thereby obtaining a training set including query+TopK web page content and answers. The "query+TopK web page content" in the training set is the training sample, and the corresponding answer is the sample label. This training set is used to train the large language model so that the large language model can learn the answer summary ability expected by this solution.

[0050] The different training sets used by different large language models result in different performance capabilities of different large language models in different scenarios. For example, model A is good at historical questions, while model B is good at common sense questions.

[0051] Since there is no large language model that can perfectly cope with all search needs and problems in the field, under simple knowledge question-answering needs, a pre-trained model with a small number of parameters can achieve good performance after fewer rounds of fine-tuning, but such a model has limited capabilities under complex needs; on the contrary, a larger-scale model used for simple needs is equivalent to a waste of computing power, which increases costs. For example, simple search needs include key data, encyclopedia queries, etc., such as "a person's native place", "the location of a certain scenic spot", etc., and complex retrieval needs such as summary needs include "the nutritional value of a certain food and precautions for eating", "analysis of the cause of a certain phenomenon or event". The retrieval method proposed in the embodiment of the present disclosure can distribute the search statements and multiple search contents of simple needs to a large language model of a smaller scale, and use the large language model of a smaller scale to solve the simple needs; and distribute the search statements and multiple search contents of complex needs to a large language model of a larger scale, and use the large language model of a larger scale to solve the complex needs; thereby achieving good retrieval performance without wasting computing power. The search engine that introduces the distribution module has the ability to reasonably dispatch the large language model according to specific needs, and has achieved good results in various scenarios at the most reasonable cost. The disclosed embodiment pre-trains multiple large language models applicable to different search scenarios. Therefore, the set of search scenarios applicable to the multiple large language models can be equivalent to the entire field. Therefore, the retrieval method proposed in the disclosed embodiment can achieve better retrieval effects in the entire field.

[0052] In addition, since there is currently no large language model that can perfectly respond to all search needs and problems in the field, in order to achieve the best capabilities in multiple dimensions, the enhanced training of the large language model often brings about the "seesaw" problem, that is, after improving the ability of a certain search scenario, the ability of another search scenario will decrease. The retrieval method proposed in the embodiment of the present disclosure can solve this type of problem. The embodiment of the present disclosure pre-trains multiple large language models, and each large language model is applicable to (i.e., "good at") different search scenarios. Therefore, when training a large language model, it is only necessary to pay attention to the search scenario to which the large language model is applicable, and improve the ability of the large language model in the search scenario in which it is used, without paying attention to its ability in other search scenarios, and there will be no "seesaw" problem.

[0053] After training multiple large language models, we can conduct a comprehensive evaluation of the capabilities of each large language model and analyze what types of problems each large language model is good at. The comprehensive evaluation can use a query set that covers a more comprehensive field. By comparing the quality of the output answers of different large models, we can obtain their ability ranking.

[0054] like Figure 4As shown, in some implementations, determining a large language model applicable to each search scenario from a plurality of large language models includes:

[0055] S410, obtaining a verification data set covering multiple search scenarios, the verification data set including M groups of data, each group of data including a search statement and multiple search contents, each group of data corresponding to a search scenario; M is a positive integer;

[0056] S420: for each large language model, input the data in the verification data set into the large language model respectively, and score the search results output by the large language model to obtain M scoring results of the large language model;

[0057] S430, ranking the effects of multiple large language models in each search scenario based on the M scoring results of each large language model;

[0058] S440: Determine the large language model applicable to each search scenario according to the ranking results.

[0059] For example, for the common sense search scenario, the effects of multiple large language models in this scenario are ranked as model A, model B, model C, ..., that is, model A is the large language model with the best effect in the common sense search scenario, and it can be determined that the large language model applicable to the common sense search scenario is model A. Using a validation data set covering multiple search scenarios, it is possible to conduct a comprehensive evaluation of multiple successfully trained large language models, thereby improving the accuracy of determining the large language models applicable to different search scenarios.

[0060] In addition, the embodiments of the present disclosure can further fine-tune each large language model to improve the ability of the large language model in its applicable scenario. For example, for the large language model applicable to each search scenario, the large language model is fine-tuned, and the fine-tuning method includes:

[0061] Determine a first training set for fine-tuning, where the first training set includes a search statement and search content corresponding to the search scenario;

[0062] The first training set is used to fine-tune the large language model applicable to the search scenario.

[0063] For example, after training multiple large language models, we can continue to enrich training data in different fields to form special training sets, such as historical training sets, common sense training sets, etc. Then the historical training sets are only used to fine-tune model A, and the common sense training sets are only used to fine-tune model B. This will further enhance the capabilities of each model in its own field of expertise and form specialized capabilities.

[0064] The distribution module proposed in the embodiment of the present disclosure may include a pre-trained distribution model, which is used to determine the corresponding search scenario and the large language model suitable for the search scenario based on the search statement and multiple search contents.

[0065] After obtaining the ability ranking of different large language models, query+web page->the model that best answers the query can be used as a training feature to train the distribution model.

[0066] In some embodiments, the training method includes:

[0067] Determine a second training set, the second training set includes multiple training data and labels corresponding to each training data; the training data includes a search statement and multiple search contents, and the labels corresponding to the training data include search scenarios and a large language model corresponding to the search statement and the multiple search contents;

[0068] The second training set is used to train the distribution model.

[0069] By training the distribution model with search statements and search content corresponding to different search scenarios, the successfully trained distribution model can be equipped with the ability to identify the search scenarios corresponding to the search statements and search content, and then identify the appropriate large language model, so that the distribution model can play the role of a central node to distribute query traffic and enable each large model downstream to perform its respective functions.

[0070] Figure 5 FIG. 1 is a schematic diagram of a search method according to another embodiment of the present disclosure. Figure 5 As shown, the method includes:

[0071] S501, the search engine receives a search query input by a user;

[0072] S502, the search engine searches based on the query to obtain multiple related web page contents, and sorts the multiple related web page contents by keywords to obtain the top K search results with the highest relevance, where K is a positive integer;

[0073] S503, the search engine inputs the query input by the user and the TopK search results of the query into the distribution module;

[0074] S504, the distribution module determines the large language model applicable to the query and the TopK search result according to the query and the TopK search result; for example, the distribution module may include a distribution model;

[0075] S505, using the query and TopK search results to organize a large model prompt, and input the prompt into a large language module determined by the distribution module, the large language model generates search results based on the query and TopK search results, and returns the search results to the search engine;

[0076] S506: The search engine performs front-end rendering and display on the search results, and presents them to the user.

[0077] In summary, the search method proposed in the embodiment of the present disclosure can analyze each large language model from the perspectives of cost, field, demand, performance, etc., and summarize the search scenarios that the model is "good at". Based on the user's search query and the TopK index with the highest matching degree with the query provided by the search engine, it is determined as a feature and input into the large language model. By adjusting the prompt, the ability of each model to solve the problem is obtained, and then the model ability ranking in each scenario is evaluated, which is used as the distribution benchmark of the distribution module.

[0078] During retrieval, the query and TopK search content are used as input, the language model selected by the distribution benchmark is used as output, and the distribution decision logic is designed. The distribution decision logic includes the decision code and the distribution model. The distribution decision code performs simple distribution at the basic feature level, and the distribution model is used for complex feature extraction and distribution based on complex feature decisions.

[0079] According to the distribution benchmark, we collect fine-tuning training data in the areas that each model is good at, and train them in their respective specialized scenarios to enhance their ability to solve problems in the search scenarios they are responsible for.

[0080] The distribution module (or distribution model) involved in the embodiment of the present disclosure serves as the post-logic of the search engine's search results and exists as the central node of each large language model, playing the role of query traffic distribution, so that each downstream large model performs its own duties. After the large model obtains the search results, the search engine collects the output of the large language model and performs post-processing such as structuring and front-end display.

[0081] The disclosed embodiment also provides a search system. Figure 6 6 is a schematic diagram of the structure of a search system 600 according to an embodiment of the present disclosure, including a distribution module 601 and multiple large language models 602, each of which corresponds to a different search scenario:

[0082] The distribution module 601 is used to receive a search statement and a plurality of search contents, and distribute the search statement and the plurality of search contents to a first model; wherein the first model is a large language model applicable to the search scenario corresponding to the search statement and the plurality of search contents;

[0083] The large language model 602 is used to receive a search statement and a plurality of search contents from the distribution module, and generate search results based on the search statement and the plurality of search contents.

[0084] Figure 7 700 is a schematic diagram of the structure of a search system according to another embodiment of the present disclosure. In some implementations, the system further includes:

[0085] The search engine 703 is used to receive a search statement, determine a plurality of search contents matching the search statement, and send the search statement and the plurality of search contents to the distribution module.

[0086] In some implementations, the search engine 703 is also used to:

[0087] receiving search results from the large language model;

[0088] The search results are rendered and displayed.

[0089] The search system proposed in the disclosed embodiment changes the system architecture from a single upstream and downstream serial structure model to a star structure, that is, the distribution module is used as the distribution center of the peripheral model (large language model). From a macro perspective, the distribution module (such as the distribution model) increases the time consumption of the entire system, but the number of distribution model parameters is much smaller than that of the large language model. In addition, since the distribution model can distinguish peripheral large language models of different sizes, large language models with smaller parameters, such as the 1B model, share part of the processing, and large language models with longer parameters, such as 20B, 70B, etc., are no longer used to undertake all search needs. Therefore, the average total time consumption of the system is reduced compared to a single large parameter model.

[0090] This application can adaptively select the most appropriate large model to deal with specific problems, realizing the strategy of "learning from the best of many". In this way, this application solves the limitation of a single large model in search engine applications. In various fields or user needs, this system can provide users with high-quality search results at a reasonable cost, thereby meeting their needs and improving the search experience.

[0091] In some implementations, the multiple large language models are pre-trained, and the multiple large language models are applicable to different search scenarios.

[0092] In some implementations, a method of determining a large language model applicable to each search scenario includes:

[0093] Obtain a verification data set covering multiple search scenarios, the verification data set including M groups of data, each group of data including a search statement and multiple search contents, and each group of data corresponding to a search scenario; M is a positive integer;

[0094] For each of the large language models, the data in the verification data set are respectively input into the large language model, and the search results output by the large language model are scored to obtain M scoring results of the large language model;

[0095] Based on the M scoring results of each of the large language models, sort the effects of the multiple large language models in each of the search scenarios;

[0096] According to the ranking results, determine the large language model applicable to each search scenario.

[0097] In some implementations, after the training of the multiple large language models is completed, they are fine-tuned, and the fine-tuning method includes:

[0098] Determine a first training set for fine-tuning the large language model, where the first training set includes search statements and search content corresponding to a search scenario to which the large language model is applicable;

[0099] The first training set is used to fine-tune the large language model applicable to the search scenario.

[0100] In some embodiments, the distribution module 601 includes a pre-trained distribution model, which is used to determine a corresponding search scenario and a large language model suitable for the search scenario based on a search statement and multiple search contents.

[0101] In some embodiments, the distribution model is pre-trained, and the method of training the distribution model includes:

[0102] Determine a second training set, the second training set including a plurality of training data and labels corresponding to each training data; the training data includes a search statement and a plurality of search contents, and the labels corresponding to the training data include search scenarios and a large language model corresponding to the search statement and the plurality of search contents;

[0103] The distribution model is trained using the second training set.

[0104] The present disclosure also provides a distribution device, including:

[0105] A receiving unit, used for receiving a search statement and a plurality of search contents;

[0106] A distribution unit is used to determine a first model corresponding to the search statement and multiple search contents, and distribute the search statement and multiple search contents to the first model, so that the first model generates search results based on the search statement and multiple search contents; wherein the first model is a large language model suitable for the search scenario corresponding to the search statement and multiple search contents.

[0107] For the description of specific functions and examples of each module and submodule of the device in the embodiment of the present disclosure, reference can be made to the relevant description of the corresponding steps in the above method embodiment, which will not be repeated here.

[0108] In the technical solution disclosed in the present invention, the acquisition, storage and application of personal information of users involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0109] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0110] Figure 8 A schematic block diagram of an example electronic device 800 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0111] like Figure 8 As shown, the device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0112] A number of components in the device 800 are connected to the I / O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0113] The computing unit 801 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above, such as search methods. For example, in some embodiments, the search method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by the computing unit 801, one or more steps of the search method described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform the search method in any other appropriate manner (e.g., by means of firmware).

[0114] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0115] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0116] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0117] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0118] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0119] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0120] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0121] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the principles of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A search method, comprising: Inputting a search statement and a plurality of search contents into a distribution module, and the distribution module distributes the search statement and the plurality of search contents to a first model; wherein the first model is a large language model applicable to the search scenario corresponding to the search statement and the plurality of search contents; and The first model is used to generate search results based on the search statement and multiple search contents.

2. The method according to claim 1, before inputting the search statement and the plurality of search contents into the distribution module, further comprising: Entering the search statement into a search engine; Determining the plurality of search contents according to the output contents of the search engine; The multiple search contents match the search statement.

3. The method according to claim 2, further comprising: Returning the search results to the search engine; The search results are rendered and displayed through the search engine.

4. The method according to any one of claims 1 to 3, further comprising: Pre-train multiple large language models; A large language model applicable to each search scenario is determined from the multiple large language models.

5. The method according to claim 4, wherein: The step of determining, from the plurality of large language models, a large language model applicable to each search scenario includes: Obtain a verification data set covering multiple search scenarios, wherein the verification data set includes M groups of data, each group of data includes a search statement and multiple search contents, and each group of data corresponds to a search scenario; M is a positive integer; For each of the large language models, the data in the verification data set are respectively input into the large language model, and the search results output by the large language model are scored to obtain M scoring results of the large language model; Based on the M scoring results of each of the large language models, sorting the effects of the multiple large language models in each of the search scenarios; According to the ranking results, determine the large language model applicable to each search scenario.

6. The method according to claim 4 or 5, further comprising: For the large language model applicable to each search scenario, the large language model is fine-tuned, and the fine-tuning method includes: Determining a first training set for fine-tuning, wherein the first training set includes a search statement and search content corresponding to the search scenario; The first training set is used to fine-tune the large language model applicable to the search scenario.

7. The method according to any one of claims 1 to 6, wherein: The distribution module includes a pre-trained distribution model, which is used to determine a corresponding search scenario according to a search statement and multiple search contents, and a large language model suitable for the search scenario.

8. The method according to claim 7, further comprising pre-training the distribution model, wherein the training method comprises: Determine a second training set, where the second training set includes a plurality of training data and a label corresponding to each training data; The training data includes a search statement and a plurality of search contents, and the labels corresponding to the training data include search scenarios and a large language model corresponding to the search statement and the plurality of search contents; The distribution model is trained using the second training set.

9. A search system, comprising a distribution module and a plurality of large language models, each of the large language models corresponding to a different search scenario: The distribution module is used to receive a search statement and a plurality of search contents, and distribute the search statement and the plurality of search contents to the first model; wherein, The first model is a large language model applicable to the search scenario corresponding to the search statement and the multiple search contents; The large language model is used to receive a search statement and a plurality of search contents from the distribution module, and generate search results based on the search statement and the plurality of search contents.

10. The system according to claim 9, wherein: The system further comprises: The search engine is used to receive a search statement, determine a plurality of search contents matching the search statement, and send the search statement and the plurality of search contents to the distribution module.

11. The system according to claim 10, wherein: The search engine is also used to: receiving search results from the large language model; The search results are rendered and displayed.

12. The system according to any one of claims 9 to 11, wherein: The multiple large language models are pre-trained and are suitable for different search scenarios.

13. The system according to claim 12, wherein: Methods for determining the large language model applicable to each search scenario include: Obtain a verification data set covering multiple search scenarios, wherein the verification data set includes M groups of data, each group of data includes a search statement and multiple search contents, and each group of data corresponds to a search scenario; M is a positive integer; For each of the large language models, the data in the verification data set are respectively input into the large language model, and the search results output by the large language model are scored to obtain M scoring results of the large language model; Based on the M scoring results of each of the large language models, sorting the effects of the multiple large language models in each of the search scenarios; According to the ranking results, determine the large language model applicable to each search scenario.

14. The system according to claim 12 or 13, wherein: After the training of the multiple large language models is completed, they are fine-tuned, and the fine-tuning method includes: Determining a first training set for fine-tuning the large language model, wherein the first training set includes search statements and search contents corresponding to a search scenario to which the large language model is applicable; The first training set is used to fine-tune the large language model applicable to the search scenario.

15. The system according to any one of claims 9 to 14, wherein: The distribution module includes a pre-trained distribution model, which is used to determine a corresponding search scenario according to a search statement and multiple search contents, and a large language model suitable for the search scenario.

16. The system of claim 15, wherein: The distribution model is pre-trained, and the method of training the distribution model includes: Determine a second training set, the second training set including a plurality of training data and labels corresponding to each training data; the training data includes a search statement and a plurality of search contents, and the labels corresponding to the training data include search scenarios and a large language model corresponding to the search statement and the plurality of search contents; The distribution model is trained using the second training set.

17. A dispensing device comprising: A receiving unit, used for receiving a search statement and a plurality of search contents; A distribution unit is used to determine a first model corresponding to the search statement and multiple search contents, and distribute the search statement and multiple search contents to the first model, so that the first model generates search results based on the search statement and multiple search contents; wherein the first model is a large language model suitable for the search scenario corresponding to the search statement and multiple search contents.

18. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 8.

19. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-8.

20. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Generative large language model training method and model-based search method

    CN116226334A

  • Intelligent dialogue method and device based on large language model, medium and equipment

    CN117076650A

  • Man-machine interaction method, system and equipment based on large language model and storage medium

    CN117909557A

  • Systems for controllable summarization of content

    US12008332B1