Information generation method and device, electronic equipment and storage medium
By predicting scenarios and obtaining reference information during the search process of general search engines, the problem of RAG generation delay caused by the long time to obtain classified information for general search is solved, and faster information generation and display are achieved, improving user experience.
Patent Information
- Application Number
- CN202510229656.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2045-02-28
AI Technical Summary
The classification information obtained based on general search takes a long time to determine the corresponding scenario of the query request, resulting in a large delay in RAG generation information, affecting the user experience.
While searching the first information corresponding to the query request through a general search engine, the first scene corresponding to the query request is predicted and reference information is obtained based on the first scene. If the first scene matches the scene signal, the second information is generated to obtain the query result.
By obtaining reference information synchronously, the delay in generating the second information is reduced, the user experience is improved, and the generated information can be displayed to the user more quickly.
Smart Images

Figure CN119719511A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the field of computer technology, and in particular, to an information generating method, device, electronic device, and storage medium. Background Art
[0002] Retrieval-Augmented Generation (RAG) is an artificial intelligence technology that combines information retrieval technology and language generation models. RAG can retrieve relevant information from external knowledge bases and input the retrieved relevant information as prompts to the Large Language Model (LLM) to enhance the model's ability to handle instruction-intensive tasks such as question-answering, text summarization, content generation, etc. In search application scenarios, combining general search (traditional search) with RAG can display both information retrieved based on general search and information generated based on RAG, improving the user experience.
[0003] Currently, based on the classification information obtained by the general search, after determining the scene corresponding to the query request, information is generated through the RAG according to the scene corresponding to the query request.
[0004] However, RAG generation information needs to be determined based on the scenario corresponding to the query request, and the scenario corresponding to the query request needs to be determined based on the classification information obtained based on the general search. It takes a long time to obtain the classification information based on the general search, resulting in a large delay in displaying the RAG generation information, which in turn leads to a poor user experience. Summary of the invention
[0005] In view of this, the embodiments of the present disclosure provide an information generating method, device, electronic device and storage medium to at least partially solve the above problems.
[0006] According to a first aspect of an embodiment of the present disclosure, there is provided an information generating method, comprising: based on a query request from a user device, retrieving first information corresponding to the query request through a general search engine, predicting a first scenario corresponding to the query request, and obtaining at least one reference information corresponding to the query request based on the first scenario; obtaining a scenario signal generated in the process of retrieving the first information through the general search engine; if the first scenario matches the scenario signal, generating second information corresponding to the query request based on the at least one reference information; and obtaining a query result corresponding to the query request based on the first information and the second information.
[0007] According to a second aspect of an embodiment of the present disclosure, another information generation method is provided, including: generating a query request using user input data; sending the query request to a server; receiving a query result obtained by the server in response to the query request, wherein the query result is obtained based on first information and second information, the first information being obtained by retrieving the query request through a general search engine, the second information being generated based on at least one reference information when a first scene matches a scene signal, the scene signal being generated during the process of retrieving the first information through the general search engine, the first scene being a predicted scene of the query request, and the at least one reference information being obtained based on the first scene; and displaying the query result.
[0008] According to the third aspect of an embodiment of the present disclosure, there is provided an electronic device, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other through the communication bus; the memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to the method described in the first aspect or the second aspect above.
[0009] According to a fourth aspect of an embodiment of the present disclosure, a computer storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the method described in the first aspect or the second aspect is implemented.
[0010] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided, comprising computer instructions, wherein the computer instructions instruct a computing device to execute the method described in the first aspect or the second aspect above.
[0011] According to the information generation scheme provided by the embodiment of the present disclosure, while retrieving the first information corresponding to the query request through a general search engine, the first scene corresponding to the query request is predicted, and reference information corresponding to the first query request is obtained based on the first scene. After the scene signal is obtained in the process of detecting the first information through the general search engine, if the first scene matches the scene signal, the second information corresponding to the query request is generated according to the obtained reference information, and then the query result corresponding to the query request is obtained according to the first information and the second information. Since the reference information is retrieved synchronously with the first information, there is no need to wait for the first information to be retrieved before obtaining the reference information, which saves the time required to obtain the reference information, thereby reducing the delay in generating the second information, and displaying the second information to the user more quickly, thereby improving the user's experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present disclosure. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0013] Figure 1 is a schematic diagram of an exemplary system applied in one embodiment of the present disclosure; Figure 2 is a flow chart of an information generating method according to an embodiment of the present disclosure; Figure 3 is a schematic diagram of multiple information generating devices according to an embodiment of the present disclosure; Figure 4 is a schematic diagram of multiple information generating devices according to another embodiment of the present disclosure; Figure 5 is a schematic diagram of an information generating device according to an embodiment of the present disclosure; Figure 6 is a schematic diagram of an information generating device according to another embodiment of the present disclosure; Figure 7 is a schematic diagram of multiple information generating devices according to yet another embodiment of the present disclosure; Figure 8 is a schematic diagram of an information generating device according to another embodiment of the present disclosure; Fig. 9 is a flow chart of an information generating method according to another embodiment of the present disclosure; Fig.10 is a schematic diagram of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0014] The present disclosure is described below based on embodiments, but the present disclosure is not limited to these embodiments. In the detailed description of the present disclosure below, some specific details are described in detail. It is possible for a person skilled in the art to fully understand the present disclosure without the description of these details. In order to avoid confusing the essence of the present disclosure, well-known methods, processes, and procedures are not described in detail. In addition, the drawings are not necessarily drawn to scale.
[0015] Exemplary Systems Figure 1 An exemplary system suitable for the embodiment of the present disclosure is shown. Figure 1 As shown, the system may include a cloud service end 102, a communication network 104 and at least one user device 106. Figure 1 The example shown is a plurality of user devices 106 .
[0016] The cloud server 102 may be any suitable device for storing information, data, programs and / or any other suitable type of content, including but not limited to distributed storage system devices, server clusters, computing cloud server clusters, etc. In some embodiments, the cloud server 102 may perform any suitable function. For example, in some embodiments, the cloud server 102 may be used for information generation. As an optional example, the cloud server 102 may receive a query request sent by the user device 106, retrieve the first information corresponding to the query request through a general search engine according to the query request, and simultaneously predict the first scene corresponding to the query request, and obtain at least one reference information corresponding to the query request based on the first scene, after obtaining the scene signal during the process of retrieving the first information through the general search engine, determine whether the first scene matches the scene signal, and if the first scene matches the scene signal, generate the second information corresponding to the query request according to the reference information, and then obtain the query result corresponding to the query request according to the first information and the second information. Since the determination of the first scene and the acquisition of reference information are carried out simultaneously with the retrieval through a general search engine, after it is determined that the first scene matches the scene signal, the second information can be generated directly based on the reference information without waiting for the scene signal to be acquired through the general search engine and then determining the scene corresponding to the query request and acquiring the reference information. This reduces the delay in acquiring the second information and allows the second information to be displayed to the user more quickly, thereby improving the user experience.
[0017] The communication network 104 can be any suitable combination of one or more wired and / or wireless networks. For example, the communication network 104 can include any one or more of the following: the Internet, an intranet, a wide area network (WAN), a local area network (LAN), a wireless network, a digital subscriber line (DSL) network, a frame relay network, an asynchronous transfer mode (ATM) network, a virtual private network (VPN), and / or any other suitable communication network. The user device 106 can be connected to the communication network 104 via one or more communication links (e.g., communication link 112), and the communication network 104 can be linked to the cloud service end 102 via one or more communication links (e.g., communication link 114). The communication link can be any communication link suitable for transmitting data between the cloud service end 102 and the user device 106, such as a network link, a dial-up link, a wireless link, a hard-wired link, any other suitable communication link, or any suitable combination of such links.
[0018] The user device 106 may include any one or more user devices suitable for text presentation and interaction. When the solution of the embodiment of the present disclosure is completed by the user device 106, the user device 106 may send a query request to the cloud service end 102 to generate a query result including the first information and the second information through the cloud service end 102. As an optional example, the user device 106 may generate a query request based on the user's input data, and send the generated query request to the cloud service end 102, so that the cloud service end 102 generates a query result corresponding to the query request according to the description in the above embodiment, and returns the generated query result to the user device 106, and then the user device 106 can display the received query result after receiving the query result returned by the cloud service end 102.
[0019] The user device 106 may include any suitable type of device, for example, the user device 106 may include any other suitable type of user device, such as a mobile device, a tablet computer, a laptop computer, a desktop computer, etc. As an optional example, a predetermined client program (such as a browser, etc.) may be installed on the user device 106, and the client program may receive user input data through a human-computer interaction interface, generate a query request according to the input data, and then send the query request to the cloud service end 102.
[0020] The disclosed embodiment mainly focuses on the process of generating information by the cloud service end 102 and the user device 106 , and the information generation process will be described in detail hereinafter.
[0021] Information generation method applied to the server Based on the above system, the embodiment of the present disclosure provides an information generation method, which can be executed by a server, such as the above cloud server 102. The information generation method is described in detail below through multiple embodiments.
[0022] Figure 2 FIG. 1 is a flow chart of an information generation method according to an embodiment of the present disclosure. Figure 2 As shown, the information generation method includes the following steps: Step 201: According to a query request from a user device, first information corresponding to the query request is retrieved through a general search engine, and a first scenario corresponding to the query request is predicted, and at least one reference information corresponding to the query request is acquired based on the first scenario.
[0023] The general search engine is used to retrieve the first information corresponding to the query request using a general search (traditional search) method. For example, the general search engine can be a variety of search engines applied to browsers. The disclosed embodiments do not limit the type of general search engines and information search methods. The first information can be a document, a website address, text or an image that can jump to a corresponding website after clicking, etc.
[0024] The query request can be a query request in any scenario. The scenario can be a simple question and answer scenario, a medical scenario, a computer scenario, a car scenario, an artificial intelligence scenario, etc. Different scenarios require different retrieval-augmented generation (RAG) services to generate corresponding texts. Different RAG services can share some functional modules. Based on the query request, it may not be possible to accurately determine the scenario corresponding to the query request. Therefore, the first scenario corresponding to the query request is the prediction result. It should be noted that the accuracy of the scenario prediction results can be improved by continuously optimizing the model used to predict the scenario, such as making the prediction result of the scenario corresponding to the query request reach more than 80%.
[0025] After determining the first scenario corresponding to the query request, at least one reference information corresponding to the query request can be obtained based on the first scenario. In one example, the at least one reference information corresponding to the query request can be obtained through the RAG service. The reference information can be in any suitable format, such as text, image, video, voice, etc.
[0026] The processing steps of step 201 include two sub-processing steps. Sub-processing step 1 is to retrieve the first information corresponding to the query request through a general search engine, and sub-processing step 2 is to predict the first scenario corresponding to the query request, and obtain at least one reference information corresponding to the query request based on the first scenario. Sub-processing step 1 and sub-processing step 2 are performed in parallel, and the execution time of sub-processing step 2 is less than or equal to the execution time of sub-processing step 1.
[0027] Step 202: Acquire a scene signal generated during the process of retrieving the first information through a general search engine.
[0028] In the process of retrieving the first information corresponding to the query request through a general search engine, a scene signal is generated, and the scene signal can accurately indicate the scene corresponding to the query request. The scene signal can be an intermediate variable or a search result of the process of retrieving the first information through a general search engine, which is not limited in the embodiments of the present disclosure.
[0029] Step 203: If the first scene matches the scene signal, generate second information corresponding to the query request according to at least one reference information.
[0030] After acquiring the scene signal, it can be determined whether the scene indicated by the scene signal is the first scene. If the scene indicated by the scene signal is the first scene, that is, the first scene matches the scene signal, then the prediction result of the scene corresponding to the query request is correct, and therefore the reference information pre-acquired based on the first scene is also accurate, and then the second information corresponding to the query request can be generated based on the acquired reference information. In one example, the second information corresponding to the query request can be generated based on the acquired reference information through the RAG service corresponding to the first scene.
[0031] Step 204: Obtain a query result corresponding to the query request according to the first information and the second information.
[0032] After detecting the first information corresponding to the query request through the general search engine and generating the second information corresponding to the query request based on the reference information, the query result corresponding to the query request can be obtained according to the first information and the second information, and the query result can be displayed through the display interface on the user device 106. The query result includes the first information obtained based on the general search engine and the second information obtained based on the RAG service, so that the information obtained based on the query request is richer and the user experience is improved.
[0033] In the disclosed embodiment, while retrieving the first information corresponding to the query request through a general search engine, the first scene corresponding to the query request is predicted, and reference information corresponding to the first query request is obtained based on the first scene. After the scene signal is obtained in the process of detecting the first information through the general search engine, if the first scene matches the scene signal, the second information corresponding to the query request is generated based on the obtained reference information, and then the query result corresponding to the query request is obtained based on the first information and the second information. Since the reference information is retrieved synchronously with the first information, there is no need to wait for the first information to be retrieved before obtaining the reference information, which saves the time required to obtain the reference information, thereby reducing the delay in generating the second information, and displaying the second information to the user more quickly, thereby improving the user experience.
[0034] In one possible implementation, after obtaining the query request, it is possible to check whether the query request is stored in the first cache, and the first cache is used to store historical query requests and information corresponding to the historical query requests. After the RAG service generates corresponding information for the historical access request, it will store the historical access request and the corresponding information in the first cache. The first cache includes an online cache and an offline cache. The online cache is used to store the user's recent query requests and the corresponding information generated by the RAG service. The offline cache is used to store high-frequency query requests and the corresponding information generated by the RAG service. High-frequency query requests are query requests that appear frequently. The information corresponding to high-frequency query requests can be generated by the RAG service during the system idle period. The caching time of data in the online cache is less than the caching time of data in the offline cache. The online cache and the offline cache can be implemented through different storage media.
[0035] If the query request is found in the first cache, it means that information corresponding to the query request has been generated through the RAG service before, and the generated information is stored in the first cache, and then the information corresponding to the query request in the first cache can be determined as the second information.
[0036] In the disclosed embodiment, the first cache stores historical query requests and corresponding information generated by the RAG service. After the query request is obtained, the query request is searched from the first cache. If the query request can be found from the first cache, it means that the information corresponding to the query request has been generated by the RAG service before, and the generated information is stored in the first cache. Then, the information corresponding to the query request in the first cache can be determined as the second information corresponding to the query request. By searching the first cache, for the query request that has been stored in the first cache, the second information corresponding to the query request can be directly read from the first cache without calling the RAG service again to generate the second information, thereby improving the efficiency of obtaining the second information and saving computing resources for the RAG service.
[0037] In a possible implementation, if the first cache does not include the query request to be processed, the query request may be semantically parsed to obtain a generalized query request with the same semantics as the query request, and then the generalized query request may be searched from the first cache. If the generalized query request is found from the first cache, the information corresponding to the generalized query request in the first cache is determined as the second information corresponding to the query request.
[0038] Different users may express the same question in different ways. For example, the query request raised by user A is "Why is the sky blue?", and the query request raised by user B is "Why is the sky blue?". The query requests raised by user A and user B have the same semantics. The information generated by the RAG service for different query requests with the same semantics is the same. Therefore, when the first cache does not include a historical query request that is identical to the query request to be processed, the first cache may be searched for a historical query request that is identical to the query request to be processed. If the first cache contains a historical query request that is identical to the query request to be processed, the information corresponding to the historical query request that is identical to the query request to be processed in the first cache is determined as the second information. For example, if the query request to be processed is the query request raised by user A, and if the first cache contains the query request raised by user B and the corresponding information, the information corresponding to the query request raised by user B in the first cache is determined as the second information corresponding to the query request raised by user A.
[0039] By semantically parsing the query request, one or more generalized query requests may be obtained, and then the generalized query requests may be searched in sequence from the first cache, and information corresponding to the first generalized query request found may be determined as the second information.
[0040] In the disclosed embodiment, when the query request to be processed is not included in the first cache, a generalized query request with the same semantics as the query request is obtained by semantically parsing the query request, and then the generalized query request is searched from the first cache. If the generalized query request exists in the first cache, the information corresponding to the generalized query request in the first cache is determined as the second information corresponding to the query request to be processed. Since the information generated by the RAG service for different query requests with the same semantics is the same, the generalized query request with the same semantics as the query request to be processed is searched from the first cache, and the information corresponding to the generalized query request is determined as the second information corresponding to the query request to be processed. There is no need to call the RAG service again to generate the second information, which improves the efficiency of obtaining the second information and can save computing resources for the RAG service. After searching for query requests not included in the first cache, searching the first cache for the generalized query request can control the traffic of searching the first cache and avoid excessive traffic of searching the first cache affecting the stability of the system.
[0041] In a possible implementation, when predicting the first scene corresponding to the query request, the query request can be first searched from the second cache, and the second cache is used to store historical query requests and scenes corresponding to the historical query requests. In the process of the general search engine retrieving information corresponding to the historical query request, a scene signal of the historical query request is generated, and the scene signal of the historical query request can indicate the scene corresponding to the historical query request, and then the historical query request and its corresponding scene are stored in the second cache.
[0042] If a query request to be processed is found in the second cache, it means that the information of the query request has been retrieved through the general search engine before, and the scene corresponding to the query request has been stored in the second cache according to the scene signal generated during the retrieval process, so that the scene corresponding to the query request in the second cache can be determined as the first scene. It should be noted that the first scene determined by querying the second cache is accurate in most cases, but in a few cases it is inaccurate because the scene to which the same query request belongs can change over time.
[0043] If the second cache does not include the query request to be processed, the first scenario corresponding to the query request can be predicted based on the semantics of the query request. The embodiments of the present disclosure may determine the semantics of the query request in any suitable manner and predict the scenario corresponding to the query request based on the semantics of the query request, which is not limited by the embodiments of the present disclosure.
[0044] In the embodiment of the present disclosure, the second cache stores scenes corresponding to historical query requests. After obtaining a query request, if the query request can be found in the second cache, it means that the scene corresponding to the query request has been determined before, and the scene corresponding to the query request in the second cache can be determined as the first scene, ensuring the correctness of the determined first scene. If the second cache does not include the query request to be processed, the first scene corresponding to the query request is predicted based on the semantics of the query request, ensuring that the first scene corresponding to the query request can be obtained.
[0045] In a possible implementation, when the first scene corresponding to the query request is determined by prediction, there may be multiple first scenes determined, and reference information corresponding to the query request is obtained for each determined first scene. After obtaining the scene signal, a second scene matching the scene signal is determined from the multiple first scenes, that is, the scene to which the query request belongs is determined to be the second scene according to the scene signal, and then the second information corresponding to the query request is generated according to at least one reference signal obtained based on the second scene.
[0046] When multiple first scenarios are determined, reference information corresponding to the query request is obtained based on each first scenario. The process of obtaining reference information based on the first scenario is performed simultaneously with retrieving the first information through a general search engine. The total time consumed to determine the first scenario and obtain reference information based on each first scenario is less than or equal to the time consumed to retrieve the first information through a general search engine.
[0047] In the disclosed embodiment, when predicting the scene corresponding to the query request, multiple first scenes can be predicted, and reference information corresponding to the query request is obtained for each first scene. After the scene signal is obtained, if there is a second scene matching the scene signal in each first scene, the second information corresponding to the query request is generated based on the reference information obtained based on the second scene. Predicting multiple first scenes corresponding to the query request increases the probability that the predicted first scene matches the scene signal, so that after obtaining the scene signal, the second information can be directly generated based on the reference information obtained based on a certain first scene, which reduces the probability of obtaining the reference information according to the scene indicated by the scene information after obtaining the scene signal, thereby reducing the delay in generating the second information in most cases.
[0048] In one possible implementation, after the scene signal is acquired, if there is no first scene matching the scene signal, it means that the scene prediction is wrong. At this time, it is necessary to acquire reference information of the query request based on the scene indicated by the scene signal, and then generate second information corresponding to the query request based on the acquired reference information to ensure that the second information corresponding to the query request can still be acquired in the case of a scene prediction error.
[0049] In one possible implementation, when obtaining reference information corresponding to a query request based on the first scenario, if the intent complexity of the query request is greater than a complexity threshold, the query request is split into multiple sub-query requests through a splitting module, and then at least one reference information corresponding to the query request is retrieved from a knowledge base through a retrieval module, and at least one reference information corresponding to each sub-query request is retrieved from the knowledge base through the retrieval module.
[0050] When the query request has an intention complexity greater than a complexity threshold, the splitting module 201 can split the query request into multiple sub-query requests. The user can input the desired purpose or information to be obtained on the user device 106 as required, and the user device 106 generates a query request based on the user input data.
[0051] The intent of a query request refers to the purpose or type of information the user wants to achieve through this query request. Intent types include information query (users want to obtain specific information on a topic or issue), navigation (users want to find a specific website or webpage), transactional operation (users want to complete a transaction, such as purchasing goods, booking services, etc.), answer query (users want to get an answer to a specific question, such as "what will the weather be like tomorrow"), entertainment (users want to listen to music, watch videos or play games, etc.), social interaction (users want to communicate with others or check updates on social networks), local search (users want to find nearby services or businesses, such as "where is the nearest convenience store"), etc.
[0052] The intent complexity of a query request can indicate the complexity of the needs expressed by the user when making a query. Based on the complexity threshold, query requests can be divided into simple intent query requests and complex intent query requests. Simple intent query requests are short queries, such as "weather", "news", etc. Complex intent query requests are long and complex queries that can contain multiple clauses and conditions, such as "find a tourist destination suitable for a two-day trip for one person with a budget of less than 2,000."
[0053] For ease of description, in the embodiment of the present disclosure, a complex intent query request is defined as a first query request, and a simple intent query request is defined as a second query request. In one example, after receiving the query request sent by the user device 106, the cloud service end 102 may determine the intent complexity of the query request by the upstream model. If the intent complexity of the query request is greater than the complexity threshold, the query request is determined as the first query request. If the intent complexity of the query request is less than or equal to the complexity threshold, the query request is determined as the second query request. After the upstream model determines that a query request is a first query request or a second query request, the upstream model may send a corresponding upstream signal for the query request, and according to the upstream signal, it can be determined whether the query request is a first query request or a second query request. It should be noted that the upstream model can determine the intent complexity of the query request in any suitable manner, such as according to the length of the query request, the number of clauses included, the number of conditions included, etc. The embodiment of the present disclosure does not limit the manner in which the upstream model determines the intent complexity.
[0054] When the first query request is split into multiple sub-query requests by the splitting module, the multiple clauses and / or conditions included in the first query request can be split into multiple sub-query requests. For example, the first query request is "with a budget of less than 2000, find a tourist destination suitable for a two-day trip for one person", and the splitting module can split the first query request into two sub-query requests, "budget within 2000" and "find a tourist destination suitable for a two-day trip for one person". It should be noted that the splitting module can split the first query request into multiple sub-query requests in any suitable manner, and the embodiment of the present disclosure does not limit the specific manner in which the splitting module splits the first query request into multiple sub-query requests.
[0055] After the first query request is split into multiple sub-query requests through the splitting module, one or more reference information corresponding to the first query request can be retrieved from the knowledge base through the retrieval module, and one or more reference information corresponding to the sub-query request can be retrieved from the knowledge base. The retrieval module can obtain a recall parameter based on the first query request and the sub-query request, and then retrieve a matching index from the knowledge base according to the recall parameter, and then use the retrieved index as reference information. The reference information can be in any suitable format, for example, the reference information can be text, image, video, voice, etc. It should be noted that, unless otherwise stated, the knowledge base in the embodiment of the present disclosure refers to a shared knowledge base, that is, the knowledge base in the embodiment of the present disclosure is a common knowledge base for RAG in different scenarios.
[0056] In one example, the parameter generation module can generate a recall parameter corresponding to the first query request, and can generate a recall parameter corresponding to the sub-query request. The retrieval module can retrieve reference information corresponding to the first query request from the knowledge base according to the recall parameter corresponding to the first query request. The retrieval module can retrieve reference information corresponding to the sub-query request from the knowledge base according to the recall parameter corresponding to the sub-query request. Different scenarios are equipped with separate parameter generation modules.
[0057] In different scenarios, the rules or models for query request splitting and related information retrieval are the same, so different scenarios can share the splitting module and retrieval module, that is, the splitting module and retrieval module are used in multiple scenarios including the first scenario. Figure 3 In the information generating device shown, scenes 1 to N share a splitting module 301 and a retrieval module 303 .
[0058] In the disclosed embodiment, a query request can be split into multiple sub-query requests through a splitting module, and reference information corresponding to the query request and the sub-query requests can be retrieved from a knowledge base respectively through a retrieval module. The splitting module and the retrieval module can be used in multiple scenarios. When iteratively updating an information generating device including a splitting module and a retrieval module, the splitting module and the retrieval module shared by multiple scenarios can be iteratively updated once, without the need to iteratively update the splitting module and the retrieval module respectively for information generating devices in different scenarios, thereby improving the efficiency of iterative updating of the information generating device.
[0059] In a possible implementation, when generating the second information corresponding to the query request based on the reference information, a prompt word generation module can be used to generate a first prompt word (Prompt) based on at least part of the reference information, and the first prompt word can be one or more. The prompt word generation module can generate the first prompt word based on the reference information in any suitable manner, which is not limited in the embodiments of the present disclosure. After the first prompt word is generated by the prompt word generation module, the first prompt word can be input into the text generation model through the text generation module, so that the text generation model generates the second information corresponding to the query request based on the first prompt word. The text generation model can be an LLM.
[0060] In different scenarios, the rules or models for generating prompt words are different, and the text generation models called to generate the second information are different, so different scenarios are equipped with separate prompt word generation modules and text generation modules, that is, the prompt word generation module and the text generation module are dedicated to the scenario corresponding to the query request.
[0061] like Figure 3 As shown, scenes 1 to N respectively have their own prompt word generation module 304 and text generation module 305 , and scenes 1 to N share the splitting module 301 and the retrieval module 303 .
[0062] It should be noted that the information generating device in the embodiment of the present disclosure can at least partially implement the RAG function and iteratively update the functional modules included in the RAG, that is, iteratively update at least part of the modules included in the information generating device.
[0063] In the disclosed embodiment, the prompt word generation module can generate a first prompt word according to at least part of the reference information, and after the first prompt word is input into the text generation model through the text generation module, the second information corresponding to the query request can be generated through the text generation model. Since the prompt word generation module 304 and the text generation module 305 are dedicated to the scene corresponding to the query request, the correctness of the generated second information is guaranteed.
[0064] In a possible implementation, when generating the first prompt word based on at least part of the reference information, the first screening module can screen the target reference information from the reference information corresponding to the query request and the sub-query request based on the relevance to the query request, and then the prompt word generation module can generate the first prompt word based on the target reference information.
[0065] After the retrieval module retrieves the reference information of the query request and the sub-query request, the first screening module can sort the multiple reference information retrieved by the retrieval module in descending order of relevance to the query request, and then determine the first at least one reference information as the target reference information according to the sorting result, that is, the target reference information can be one or more. The first screening module can send the determined target reference information to the prompt word generation module, and then the prompt word generation module generates the first prompt word based on the received target reference information.
[0066] The first screening module is used to screen target reference information with high relevance to the query request from the reference information according to the relevance between the reference information and the query request, so the same first screening module can be applied to different scenarios, that is, different scenarios can share the first screening module. Figure 4 In the schematic diagram of multiple information generating devices shown, scenes 1 to N respectively have their own prompt word generating module 304 and text generating module 305, and scenes 1 to N share the splitting module 301, the retrieval module 303 and the first screening module 306.
[0067] In the disclosed embodiment, after a plurality of reference information is retrieved by the retrieval module, the target reference information with a high relevance to the query request is screened out from the plurality of reference information by the first screening module, and after the prompt word generation module generates the first prompt word according to the first target reference information, the first prompt word is input into the text generation model by the text generation module to obtain the second information corresponding to the query request. The first target reference information is screened by the first screening module, so as to reduce the number of reference information based on which the first prompt word is generated, and avoid excessive reference information causing great interference to the text generation model, thereby ensuring the correctness of the generated second information. The first screening module can be used in multiple scenarios. When the information generation device is iteratively updated, the first screening module shared by multiple scenarios can be updated once, without the need to iteratively update the first screening module for the information generation devices in different scenarios, thereby improving the efficiency of iteratively updating the information generation device.
[0068] In one possible implementation, Figure 5 In the schematic diagram of the information generating device 300 shown, the first screening module 306 includes a first screening unit 3061 , a second screening unit 3062 and a third screening unit 3063 .
[0069] The first screening unit 3061 can screen out at least one first reference information from the reference information corresponding to the first query request in descending order of relevance to the first query request. In one example, the first screening unit 3061 can sort the reference information corresponding to the first query request in descending order of relevance to the first query request, and then determine the first at least one reference information as the first reference information according to the sorting result, that is, the first reference information can be one or more.
[0070] For each sub-query request, the second screening unit 3062 may screen out at least one second reference information from the reference information corresponding to the sub-query request in descending order of relevance to the sub-query request. In one example, for each sub-query request, the second screening unit 3062 may sort the reference information corresponding to the sub-query request in descending order of relevance to the sub-query request, and then determine the first at least one reference information as the second reference information according to the sorting result, that is, the second reference information may be one or more.
[0071] The third screening unit 3063 can screen out at least one first target reference information from the first reference information and the second reference information according to the relevance to the first query request. In one example, the third screening unit 3063 can sort the first reference information and the second reference information in a mixed manner according to the order of relevance to the first query request from high to low, and then determine at least one of the first reference information and / or the second reference information that is ranked higher as the first target reference information according to the sorting result, that is, the first target reference information can be one or more.
[0072] In the embodiment of the present disclosure, the first screening unit 3061 screens first reference information with a high relevance to the first query request from the reference information corresponding to the first query request, the second screening unit 3062 screens second reference information with a high relevance to the first query request from the reference information corresponding to the sub-query request, and the third screening unit 3063 screens first target reference information with a high relevance to the first query request from the first reference information and the second reference information, so that the first target reference information has a wide source and a high relevance to the first query request, thereby ensuring the accuracy of the generated second information.
[0073] In a possible implementation, the information supplementation module may query supplementary reference information from a supplementary knowledge base, and then determine target reference information from the reference information corresponding to the query request and the supplementary reference information, and the prompt word generation module may generate a first prompt word according to the determined target reference information.
[0074] like Figure 6The schematic diagram of the information generating device shown in FIG. 300 includes an information supplementing module 307 and a second screening module 308. The information supplementing module 307 can query at least one supplementary reference information from the supplementary knowledge base of the scene corresponding to the first query request, and the second screening module 308 can screen the target reference information from the reference information corresponding to the query request and the sub-query request and the supplementary information according to the relevance to the first query request, and then the prompt word generating module 304 can generate the first prompt word according to the target reference information.
[0075] The scenario corresponding to the first query request has a corresponding supplementary knowledge base, which stores relevant information belonging to the scenario corresponding to the first query request, and the information in the supplementary knowledge base can be used as reference information when generating the second information in the corresponding scenario. The supplementary knowledge base is a dedicated knowledge base for the corresponding scenario, and different scenarios correspond to different supplementary knowledge bases. For example, the question-answering scenario, the text summary scenario, and the content generation scenario correspond to different supplementary knowledge bases.
[0076] After receiving the first query request, the information supplementation module 307 can search for information matching the first query request from the corresponding supplementary knowledge base as supplementary reference information for the first query request. In one example, the information supplementation module 307 can use one or more information in the supplementary knowledge base that has a high degree of matching with the first query request as supplementary reference information for the first query request.
[0077] The retrieval module 303 can send the retrieved relevant information to the second screening module 308, and the information supplement module 307 can send the found supplementary reference information to the second screening module 308. The second screening module 308 can screen the target reference information with a greater relevance to the first query request from the reference information and the supplementary reference information according to the relevance of the reference information and the supplementary reference information to the first query request, and then send the screened target reference information to the prompt word generation module 304, and then the prompt word generation module 304 generates a first prompt word based on the received target reference information.
[0078] The second screening module 308 is used to screen target reference information with a greater relevance to the first query request from the reference information and the supplementary reference information according to the relevance of the reference information and the supplementary reference information to the first query request, so the same second screening module 308 can be applied to different scenarios, that is, different scenarios can share the second screening module 308. The information supplement module 307 is used to search for supplementary reference information matching the first query request from the supplementary knowledge base of the scenario corresponding to the first query request. Different scenarios correspond to different supplementary knowledge bases, so the information supplement module 307 needs to be designed separately for the corresponding scenarios, that is, the information supplement module 307 is dedicated to the scenario corresponding to the first query request, and different scenarios correspond to different information supplement modules 307.
[0079] like Figure 7 As shown in the schematic diagram of multiple information generating devices, scenes 1 to N respectively have their own prompt word generating module 304, text generating module 305 and information supplementing module 307, and scenes 1 to N share the splitting module 301, retrieval module 303 and second screening module 308.
[0080] In the disclosed embodiment, the information supplementation module 307 can search for supplementary reference information matching the first query request from the supplementary knowledge base, the second screening module 308 screens the target reference information with a high relevance to the first query request from the reference information and the supplementary reference information, and after the prompt word generation module 304 generates the first prompt word according to the target reference information, the text generation module 305 inputs the first prompt word into the text generation model to obtain the second information corresponding to the first query request. The information supplementation module 307 searches for the supplementary reference information, and the supplementary reference information comes from the dedicated knowledge base of the scene corresponding to the first query request, which can provide the target reference information with a high relevance to the first query request, and ensure the correctness of the second information generated by the text generation model. The second screening module 308 screens the target reference information, reduces the number of reference information based on which the first prompt word is generated, and avoids too much reference information causing greater interference to the text generation model, thereby ensuring the correctness of the generated second information. The second filtering module 308 can be used in multiple scenarios. When the information generating device 300 is iteratively updated, the second filtering module 308 shared by multiple scenarios can be updated once without iteratively updating the second filtering module 308 for the information generating devices 300 in different scenarios respectively, thereby improving the efficiency of iterative updating of the information generating device 300.
[0081] In one possible implementation, Figure 8 As shown in the schematic diagram of the information generating device, the second screening module 308 includes a fourth screening unit 3081, a fifth screening unit 3082, a sixth screening unit 3083 and a seventh screening unit 3084.
[0082] The fourth screening unit 3081 may screen out at least one third reference information from the reference information corresponding to the first query request in descending order of relevance to the first query request. In one example, the fourth screening unit 3081 may sort the reference information corresponding to the first query request in descending order of relevance to the first query request, and then determine the first at least one reference information as the third reference information according to the sorting result, that is, the third reference information may be one or more.
[0083] For each sub-query request, the fifth screening unit 3082 may screen out at least one fourth reference information from the reference information corresponding to the sub-query request in descending order of relevance to the sub-query request. In one example, for each sub-query request, the fifth screening unit 3082 may sort the reference information corresponding to the sub-query request in descending order of relevance to the sub-query request, and then determine the first at least one reference information as the fourth reference information according to the sorting result, that is, the fourth reference information may be one or more.
[0084] The sixth screening unit 3083 may screen out at least one fifth reference information from the supplementary reference information in descending order of relevance to the first query request. In one example, the sixth screening unit 3083 may sort the supplementary reference information in descending order of relevance to the first query request, and then determine at least one supplementary reference information ranked first as the fifth reference information according to the sorting result, that is, the fifth reference information may be one or more.
[0085] The seventh screening unit 3084 can screen out at least one target reference information from the third reference information, the fourth reference information, and the fifth reference information according to the relevance to the first query request. In one example, the seventh screening unit 3084 can sort the third reference information, the fourth reference information, and the fifth reference information in a mixed manner according to the order of relevance to the first query request from high to low, and then determine at least one third reference information and / or fourth reference information and / or fifth reference information ranked first as the target reference information according to the sorting result, that is, the target reference information can be one or more.
[0086] In the embodiment of the present disclosure, the fourth screening unit 3081 screens third reference information with a high relevance to the first query request from the reference information corresponding to the first query request, the fifth screening unit 3082 screens fourth reference information with a high relevance to the first query request from the reference information corresponding to the sub-query request, the sixth screening unit 3083 screens fifth reference information with a high relevance to the first query request from the supplementary reference information, and the seventh screening unit 3084 screens target reference information with a high relevance to the first query request from the third reference information, the fourth reference information and the fifth reference information, so that the source of the target reference information is wide and has a high relevance to the first query request, thereby ensuring the accuracy of the generated second information.
[0087] In a possible implementation, when the intent complexity of the query request is less than or equal to the complexity threshold, a second prompt word can be directly generated according to the query request by a prompt word generation module, and then the second prompt word can be input into a text generation model by a text generation module, and the second information corresponding to the query request is generated by the text generation model.
[0088] When the intent complexity of the query request is less than or equal to the complexity threshold, the text generation model can provide second information with higher accuracy based on the prompt words generated according to the query request, so there is no need to obtain reference information of the query request.
[0089] In the disclosed embodiment, for query requests with simple intent, there is no need to split the query requests and recall reference information. The prompt word generation module directly generates a second prompt word based on the query request, and the text generation module inputs the second prompt word into the text generation model, and generates second information corresponding to the query request through the text generation model, thereby improving the speed of generating the second information corresponding to the query request, that is, improving the response speed of simple intent query requests.
[0090] In a possible implementation, after obtaining the first information and the second information, the first information and the second information can be directly used as the query results corresponding to the query request, or after generating multimodal display information according to the second information, the first information and the multimodal display information can be used as the query results corresponding to the query request. The multimodal display information includes information in the form of pictures, videos, video links, and mind maps.
[0091] After obtaining the second information, multimodal display information can be generated based on the second information according to the scene or type corresponding to the query request, and then the first information and the multimodal display information can be integrated as the query result corresponding to the query request. The server can send the query result to the user device, and after receiving the query result, the user device displays the first information and the multimodal display information included in the query result in the display interface.
[0092] In the disclosed embodiment, the first information and the second information can be used as the query result corresponding to the query request, or the second information can be converted into multimodal display information, and the first information and the multimodal display information can be used as the query result corresponding to the query request, so as to meet different application scenarios and ensure the applicability of the information generation method in the disclosed embodiment. After the second information is converted into multimodal display information, the first information and the multimodal display information are used as the query result, so that the query result is displayed through a variety of information display methods, which can improve the user experience.
[0093] It should be noted that, in the above-mentioned embodiments, when data is transmitted between modules in the information generating device 300, the module that sends the data can format the data to be sent so that the data can be completely received by the module that receives the data. After receiving the data, the module that receives the data can parse the data to obtain data that can be identified and processed.
[0094] In one possible implementation, after obtaining the second information, a risk control check will be performed on the second information to detect whether the second information contains sensitive information such as violation of the law. If the second information passes the risk control check, that is, the second information does not contain sensitive information such as violation of the law, a query result can be generated based on the second information. If the second information fails the risk control check, a query result including the first information but not the second information is generated.
[0095] Information generation method applied to user equipment Based on the above system, the embodiment of the present disclosure provides an information generation method, which can be executed by the above user equipment 106. The information generation method is described in detail below through multiple embodiments.
[0096] Fig. 9 is a flowchart of an information generation method according to an embodiment of the present disclosure, and the information generation method is executed by a user device, such as Fig. 9 As shown, the information generation method includes the following steps: Step 901: Generate a query request using user input data.
[0097] Step 902: Send the query request to the server.
[0098] In one example, a query request may be sent to the cloud server 102 in the above system embodiment, and the cloud server 102 executes the above information generation method applied to the server.
[0099] Step 903: Receive the query result obtained by the server in response to the query request.
[0100] The query result is obtained based on the first information and the second information. The first information is retrieved through a general search engine according to the query request. The second information is generated based on at least one reference information when the first scene matches the scene signal. The scene signal is generated in the process of retrieving the first information through a general search engine. The first scene is the predicted scene of the query request. At least one reference information is obtained based on the first scene.
[0101] Step 904: Display the query results.
[0102] In one example, the query results are displayed via a browser.
[0103] In the disclosed embodiment, after a query request is generated using the user's input data, the query request is sent to the server, so that the server generates a query result based on the query request, and then receives the query result generated by the server in response to the query request, and displays the query result. While the server retrieves the first information corresponding to the query request through a general search engine, it predicts the first scene corresponding to the query request, and obtains reference information corresponding to the first query request based on the first scene. After the scene signal is obtained during the process of detecting the first information through the general search engine, if the first scene matches the scene signal, the second information corresponding to the query request is generated based on the obtained reference information, and then the query result corresponding to the query request is obtained based on the first information and the second information. Since the reference information is retrieved synchronously with the first information, there is no need to wait for the first information to be retrieved before obtaining the reference information, which saves the time required to obtain the reference information, thereby reducing the delay in generating the second information, and then reducing the delay in displaying the second information to the user when displaying the query result, thereby improving the user experience.
[0104] It should be noted that the information generation method applied to the user device of the embodiment of the present disclosure is based on the same inventive concept as the aforementioned information generation method embodiment applied to the server. The specific process of the information generation method applied to the user device can be found in the description in the aforementioned information generation method embodiment applied to the server, and has the same beneficial effects as the aforementioned information generation method embodiment applied to the server, which will not be repeated here.
[0105] Electronic devices Fig.10 is a schematic block diagram of an electronic device provided by an embodiment of the present disclosure, and the specific embodiment of the present disclosure does not limit the specific implementation of the electronic device. Fig.10 As shown, the electronic device may include: a processor (processor) 1002, a communication interface (Communications Interface) 1004, a memory (memory) 1006, and a communication bus 1008. Among them: The processor 1002 , the communication interface 1004 , and the memory 1006 communicate with each other via a communication bus 1008 .
[0106] The communication interface 1004 is used to communicate with other electronic devices or servers.
[0107] The processor 1002 is used to execute the program 1010, and specifically can execute the relevant steps in any of the aforementioned information generation method embodiments.
[0108] Specifically, the program 1010 may include program codes, which include computer operation instructions.
[0109] The processor 1002 may be a CPU, or a GPU (Graphic Processing Unit), or an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present disclosure. The one or more processors included in the smart device may be processors of the same type, such as one or more CPUs; or may be processors of different types, such as one or more CPUs and one or more ASICs.
[0110] The memory 1006 is used to store the program 1010. The memory 1006 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0111] The program 1010 may be specifically used to enable the processor 1002 to execute the information generating method in any of the aforementioned embodiments.
[0112] The specific implementation of each step in program 1010 can refer to the corresponding description of the corresponding steps and units in any of the above-mentioned information generation method embodiments, which will not be repeated here. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described devices and modules can refer to the corresponding process description in the above-mentioned method embodiments, which will not be repeated here.
[0113] Through the electronic device of the embodiment of the present disclosure, while retrieving the first information corresponding to the query request through the general search engine, the first scene corresponding to the query request is predicted, and reference information corresponding to the first query request is obtained based on the first scene. After the scene signal is obtained in the process of detecting the first information through the general search engine, if the first scene matches the scene signal, the second information corresponding to the query request is generated according to the obtained reference information, and then the query result corresponding to the query request is obtained according to the first information and the second information. Since the reference information is retrieved synchronously with the first information, there is no need to wait for the first information to be retrieved before obtaining the reference information, which saves the time required to obtain the reference information, thereby reducing the delay in generating the second information, and displaying the second information to the user more quickly, thereby improving the user's experience.
[0114] Computer storage media The present disclosure also provides a computer-readable storage medium storing instructions for causing a machine to execute the information generation method as described herein. Specifically, a system or device equipped with a storage medium may be provided, on which a software program code for implementing the functions of any of the above-mentioned embodiments is stored, and a computer (or CPU or MPU) of the system or device is enabled to read and execute the program code stored in the storage medium.
[0115] In this case, the program code itself read from the storage medium can realize the function of any one of the above embodiments, and thus the program code and the storage medium storing the program code constitute part of the present disclosure.
[0116] The storage medium embodiments for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a non-volatile memory card, and a ROM. Alternatively, the program code can be downloaded from a server computer via a communication network.
[0117] Computer program product The embodiments of the present disclosure also provide a computer program product, including computer instructions, which instruct a computing device to execute any corresponding operation in the above-mentioned multiple method embodiments.
[0118] It should be noted that the user-related information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to sample data used to train the model, data used for analysis, stored data, displayed data, etc.) involved in the embodiments of the present disclosure are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0119] It should be pointed out that, according to the needs of implementation, the various components / steps described in the embodiments of the present disclosure can be split into more components / steps, or two or more components / steps or partial operations of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of the present disclosure.
[0120] The above-mentioned method according to the embodiment of the present disclosure may be implemented in hardware, firmware, or implemented as software or computer code that can be stored in a recording medium (such as a CD ROM, RAM, floppy disk, hard disk or magneto-optical disk), or implemented as computer code originally stored in a remote recording medium or a non-temporary machine-readable medium downloaded through a network and to be stored in a local recording medium, so that the method described herein can be stored in such software processing on a recording medium using a general-purpose computer, a special-purpose processor or programmable or special-purpose hardware (such as an ASIC or FPGA). It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component (e.g., RAM, ROM, flash memory, etc.) that can store or receive software or computer code, and when the software or computer code is accessed and executed by a computer, a processor or hardware, the method described herein is implemented. In addition, when a general-purpose computer accesses the code for implementing the method shown herein, the execution of the code converts the general-purpose computer into a special-purpose computer for executing the method shown herein.
[0121] It should be noted that the user-related information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to sample data used to train the model, data used for analysis, stored data, displayed data, etc.) involved in the embodiments of the present disclosure are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0122] Those of ordinary skill in the art will appreciate that the units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for specific applications, but such implementation should not be considered to be beyond the scope of the embodiments of the present disclosure.
[0123] The above implementation methods are only used to illustrate the embodiments of the present disclosure, and are not limitations of the embodiments of the present disclosure. Ordinary technicians in the relevant technical field may make various changes and modifications without departing from the spirit and scope of the embodiments of the present disclosure. Therefore, all equivalent technical solutions also belong to the scope of the embodiments of the present disclosure. The scope of patent protection of the embodiments of the present disclosure should be defined by the claims.
Claims
1. A method for generating information, comprising: According to a query request from a user device, first information corresponding to the query request is retrieved through a general search engine, a first scenario corresponding to the query request is predicted, and at least one reference information corresponding to the query request is acquired based on the first scenario; Acquire a scene signal generated in the process of retrieving the first information through the general search engine; If the first scene matches the scene signal, generating second information corresponding to the query request according to the at least one reference information; A query result corresponding to the query request is obtained according to the first information and the second information.
2. The method according to claim 1, further comprising: searching for the query request from a first cache, where the first cache is used to store historical query requests and information corresponding to the historical query requests; If the query request is found in the first cache, the information corresponding to the query request in the first cache is determined as the second information.
3. The method according to claim 2, further comprising: If the query request is not included in the first cache, semantically parse the query request to obtain a generalized query request with the same semantics as the query request; searching the first cache for the generalized query request; If the generalized query request is found in the first cache, the information corresponding to the generalized query request in the first cache is determined as the second information.
4. The method according to claim 1, wherein: The predicting a first scenario corresponding to the query request includes: searching for the query request from a second cache, where the second cache is used to store historical query requests and scenarios corresponding to the historical query requests; If the query request is found in the second cache, determining the scene corresponding to the query request in the second cache as the first scene; If the second cache does not include the query request, the first scenario is determined according to the semantics of the query request.
5. The method according to claim 1, wherein: The number of the first scenes is multiple; The generating the second information corresponding to the query request according to the at least one reference information includes: determining a second scene matching the scene signal among the multiple first scenes, and generating the second information corresponding to the query request according to the reference information obtained based on the second scene.
6. The method according to claim 1, wherein: The acquiring, based on the first scenario, at least one reference information corresponding to the query request includes: If the intention complexity of the query request is greater than the complexity threshold, the query request is split into multiple sub-query requests through a splitting module, and at least one reference information corresponding to the query request is retrieved from a knowledge base through a retrieval module, and at least one reference information corresponding to the sub-query request is retrieved from the knowledge base through the retrieval module; The splitting module and the retrieval module are used for multiple scenarios including the first scenario.
7. The method according to claim 6, wherein: The generating second information corresponding to the query request according to the at least one reference information includes: Generate a first prompt word according to at least part of the reference information through a prompt word generation module; Inputting the first prompt word into a text generation model through a text generation module, and generating second information corresponding to the query request through the text generation model; The prompt word generation module and the text generation module are dedicated to the first scenario.
8. The method according to claim 7, wherein: The step of generating a first prompt word according to at least part of the reference information comprises: By means of a first screening module, target reference information is screened from the reference information corresponding to the query request and the sub-query request according to the relevance to the query request, and by means of the prompt word generating module, the first prompt word is generated according to the target reference information; The screening module is used for a plurality of scenarios including the first scenario.
9. The method according to any one of claims 1 to 8, wherein: The obtaining, according to the first information and the second information, a query result corresponding to the query request includes: Obtaining a query result including the first information and the second information; or, Multimodal display information is generated according to the second information, and a query result including the first information and the multimodal display information is obtained, wherein the multimodal display information includes at least one of a picture, a video, a video link, and a mind map.
10. A method for generating information, comprising: Generate query request using user input data; Sending the query request to the server; Receiving a query result obtained by the server in response to the query request, wherein the query result is obtained according to first information and second information, the first information is obtained by searching through a general search engine according to the query request, the second information is generated according to at least one reference information when a first scene matches a scene signal, the scene signal is generated in the process of retrieving the first information through the general search engine, the first scene is a predicted scene of the query request, and the at least one reference information is obtained based on the first scene; The query result is displayed.
11. An electronic device, comprising: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute an operation corresponding to any one of the methods in claims 1-10.
12. A computer storage medium having a computer program stored thereon, which, when executed by a processor, implements the method according to any one of claims 1 to 10.
13. A computer program product comprising computer instructions, the computer instructions instructing a computing device to execute the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Multi-source-type interoperability and / or information retrieval optimization
CA3102984A1
Search processing method and device
CN106446132A
Service side and multi-data-source search method and system
CN107526762A
Information query method and device based on fixed-section grading, electronic equipment and medium
CN116450916A
Intention recognition method, intention recognition device and electronic equipment
CN118260405A