Information Generation Method, Apparatus, Electronic Device, and Storage Medium

By synchronously predicting scenes and obtaining scene signals in a general search engine, the problem of large delay in RAG generation information is solved, and the rapid generation and display of rich information is achieved, and the user experience is improved.

CN119719511BActive Publication Date: 2025-07-18UC MOBILE CHINA CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510229656.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-28
Publication Date
2025-07-18
Estimated Expiration
2045-02-28

AI Technical Summary

Technical Problem

In the prior art, after determining the corresponding scenario of the query request based on the classification information obtained by general search, the delay in generating information through search enhancement generation (RAG) is large, resulting in poor user experience.

Method used

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 the scene signal is obtained. If the scene matches the signal, the second information corresponding to the query request is generated based on the reference information, reducing the waiting time for obtaining the reference information.

Benefits of technology

It reduces the delay in generating the second information, improves the user's user experience, and quickly displays rich information to users by synchronously obtaining reference information and retrieving the first information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119719511B_ABST
    Figure CN119719511B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure provide an information generation method, apparatus, electronic device, and storage medium. The information generation method includes: retrieving, according to a query request from a user device, 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 during 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 according to the at least one reference information; and obtaining a query result corresponding to the query request according to the first information and the second information. This solution can reduce the latency of generating the second information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to the field of computer technologies, and particularly to an information generation method, apparatus, 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 an external knowledge base and input the retrieved relevant information as a prompt into a 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 a search application scenario, combining general search (traditional search) with RAG can display both the information retrieved based on general search and the information generated based on RAG, improving the user experience.

[0003] Currently, after determining the scenario corresponding to a query request based on the classification information obtained from general search, information is generated through RAG according to the scenario corresponding to the query request.

[0004] However, generating information by RAG requires 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 from general search. Obtaining classification information from general search takes a long time, resulting in a large delay in displaying the information generated by RAG, and thus a poor user experience. Summary of the Invention

[0005] In view of this, embodiments of the present disclosure provide an information generation method, apparatus, electronic device, and storage medium to at least partially solve the above problems.

[0006] According to a first aspect of the embodiments of the present disclosure, an information generation method is provided, including: retrieving, through a general search engine, first information corresponding to a query request from a user device, and 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 during 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 according to the at least one reference information; and obtaining a query result corresponding to the query request according to the first information and the second information.

[0007] According to a second aspect of the embodiments of the present disclosure, another information generation method is provided, including: generating a query request using input data of a user; sending the query request to a server; receiving a query result obtained by the server in response to the query request, where the query result is obtained based on first information and second information, the first information is retrieved by a general search engine according to the query request, the second information is generated based on at least one reference information when a first scenario matches a scenario signal, the scenario signal is generated during the process of retrieving the first information by the general search engine, the first scenario is a predicted scenario of the query request, and the at least one reference information is obtained based on the first scenario; and presenting the query result.

[0008] According to a third aspect of the embodiments of the present disclosure, an electronic device is provided, including: a processor, a memory, a communication interface, and a communication bus. The processor, the memory, and the communication interface complete communication with each other through the communication bus; the memory is used for storing at least one executable instruction, and the executable instruction causes 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 the embodiments of the present disclosure, a computer storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method described in the first aspect or the second aspect above is implemented.

[0010] According to a fifth aspect of the embodiments of the present disclosure, a computer program product is provided, including computer instructions, and the computer instructions instruct a computing device to perform the method described in the first aspect or the second aspect above.

[0011] According to the information generation solution provided by the embodiments of the present disclosure, while retrieving the first information corresponding to the query request through a general search engine, the first scenario corresponding to the query request is predicted, and the reference information corresponding to the first query request is obtained based on the first scenario. After the scenario signal is obtained during the process of detecting the first information by the general search engine, if the first scenario matches the scenario 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 retrieval to complete before obtaining the reference information, saving the time required to obtain the reference information, thereby reducing the delay in generating the second information and presenting the second information to the user faster, improving the user experience. Description of the Drawings

[0012] To more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the following briefly introduces the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only some embodiments described in the embodiments of the present disclosure. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings.

[0013] Figure 1 It is a schematic diagram of an exemplary system applied in an embodiment of the present disclosure;

[0014] Figure 2 It is a flowchart of an information generation method in an embodiment of the present disclosure;

[0015] Figure 3 It is a schematic diagram of multiple information generation devices in an embodiment of the present disclosure;

[0016] Figure 4 It is a schematic diagram of multiple information generation devices in another embodiment of the present disclosure;

[0017] Figure 5 It is a schematic diagram of an information generation device in an embodiment of the present disclosure;

[0018] Figure 6 It is a schematic diagram of an information generation device in another embodiment of the present disclosure;

[0019] Figure 7 It is a schematic diagram of multiple information generation devices in yet another embodiment of the present disclosure;

[0020] Figure 8 It is a schematic diagram of an information generation device in yet another embodiment of the present disclosure;

[0021] Figure 9 It is a flowchart of an information generation method in another embodiment of the present disclosure;

[0022] Figure 10 It is a schematic diagram of an electronic device in an embodiment of the present disclosure. Detailed implementation manners

[0023] The following describes the present disclosure based on embodiments, but the present disclosure is not limited to these embodiments. In the following detailed description of the present disclosure, some specific details are described in detail. Those skilled in the art can fully understand the present disclosure without the description of these details. To avoid obscuring the essence of the present disclosure, well-known methods, processes, and procedures are not described in detail. Additionally, the accompanying drawings are not necessarily drawn to scale.

[0024] Exemplary System

[0025] Figure 1An exemplary system applicable to the solution of the embodiments of the present disclosure is shown. As Figure 1 shown, the system may include a cloud server 102, a communication network 104, and at least one user device 106, Figure 1 exemplified as a plurality of user devices 106 in the figure.

[0026] The cloud server 102 may be any suitable device for storing information, data, programs, and / or any other appropriate 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 alternative example, the cloud server 102 may receive a query request sent by the user device 106, retrieve first information corresponding to the query request through a general search engine according to the query request, synchronously predict a first scenario corresponding to the query request, and obtain at least one reference information corresponding to the query request based on the first scenario. After obtaining a scenario signal during the process of retrieving the first information through the general search engine, it is determined whether the first scenario matches the scenario signal. If the first scenario matches the scenario signal, second information corresponding to the query request is generated according to the reference information, and then a query result corresponding to the query request is obtained based on the first information and the second information. Since the determination of the first scenario and the acquisition of the reference information are carried out synchronously with the retrieval through the general search engine, after determining that the first scenario matches the scenario signal, the second information can be directly generated based on the reference information without waiting to obtain the scenario signal through the general search engine and then determining the scenario corresponding to the query request and obtaining the reference information, thereby reducing the latency of obtaining the second information and enabling the second information to be presented to the user faster, thus improving the user experience.

[0027] 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 through one or more communication links (such as the communication link 112), and the communication network 104 can be linked to the cloud server 102 via one or more communication links (such as the communication link 114). The communication link can be any communication link suitable for transmitting data between the cloud server 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.

[0028] The user device 106 can include any one or more user devices suitable for text presentation and interaction. When the solution of the embodiments of the present disclosure is completed by the user device 106, the user device 106 can send a query request to the cloud server 102 to generate a query result including first information and second information through the cloud server 102. As an optional example, the user device 106 can generate a query request according to the input data of the user and send the generated query request to the cloud server 102, so that the cloud server 102 generates a query result corresponding to the query request according to the description in the above embodiments and returns the generated query result to the user device 106. Then, after receiving the query result returned by the cloud server 102, the user device 106 can display the received query result.

[0029] The user device 106 can include any suitable type of device. For example, the user device 106 can include a mobile device, a tablet computer, a laptop computer, a desktop computer, or any other suitable type of user device. As an optional example, a predetermined client program (such as a browser, etc.) can be installed on the user device 106. The client program can receive the input data of the user through the human-computer interaction interface, generate a query request according to the input data, and then send the query request to the cloud server 102.

[0030] The embodiments of the present disclosure mainly focus on the process of generating information by the cloud server 102 and the user device 106, and the information generation process will be described in detail later.

[0031] Information Generation Method Applied to Server

[0032] Based on the above system, embodiments of the present disclosure provide an information generation method, which can be executed by a server, such as the above cloud server 102. The following will detail this information generation method through multiple embodiments.

[0033] Figure 2 It is a flowchart of the information generation method according to an embodiment of the present disclosure. As Figure 2 shown, the information generation method includes the following steps:

[0034] Step 201, according to a query request from a user device, retrieve first information corresponding to the query request through a general search engine, predict a first scenario corresponding to the query request, and obtain at least one reference information corresponding to the query request based on the first scenario.

[0035] The general search engine is used to retrieve the first information corresponding to the query request by using a general search (traditional search) method. For example, the general search engine can be various search engines applied to browsers. Embodiments of the present disclosure do not limit the type of the general search engine and the information search method. The first information can be a document, a website address, text or an image that can be jumped to the corresponding website after clicking, etc.

[0036] The query request can be a query request in any scenario. The scenario can be a simple Q&A scenario, a medical scenario, a computer scenario, an automotive 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 a prediction result. It should be noted that the accuracy of the scenario prediction result can be improved by continuously optimizing the model for predicting the scenario, such as making the prediction result of the scenario corresponding to the query request reach more than 80%.

[0037] 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, at least one reference information corresponding to the query request can be obtained through a RAG service. The reference information can be in any suitable format. For example, the reference information can be text, image, video, voice, etc.

[0038] 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. 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.

[0039] Step 202: Obtain the scenario signal generated during the process of retrieving the first information through the general search engine.

[0040] During the process of retrieving the first information corresponding to the query request through the general search engine, a scenario signal will be generated. The scenario signal can accurately indicate the scenario corresponding to the query request. The scenario signal can be an intermediate variable or a retrieval result during the process of retrieving the first information through the general search engine. The embodiments of the present disclosure do not limit this.

[0041] Step 203: If the first scenario matches the scenario signal, generate the second information corresponding to the query request according to at least one reference information.

[0042] After obtaining the scenario signal, it can be determined whether the scenario indicated by the scenario signal is the first scenario. If the scenario indicated by the scenario signal is the first scenario, that is, the first scenario matches the scenario signal, it means that the prediction result of the scenario corresponding to the query request is correct. Therefore, the reference information pre - obtained based on the first scenario is also accurate. Furthermore, the second information corresponding to the query request can be generated according to the obtained reference information. In one example, the second information corresponding to the query request can be generated based on the obtained reference information through the RAG service corresponding to the first scenario.

[0043] Step 204: Obtain the query result corresponding to the query request according to the first information and the second information.

[0044] 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. The query result can be displayed through the display interface on the user device 106. The query result includes the first information obtained through the general search engine and also includes the second information obtained through the RAG service, making the information obtained based on the query request richer and improving the user experience.

[0045] In an embodiment of the present disclosure, while retrieving the first information corresponding to a query request through a general search engine, a first scenario corresponding to the query request is predicted, and reference information corresponding to the first query request is obtained based on the first scenario. After a scenario signal is obtained during the process of detecting the first information by the general search engine, if the first scenario matches the scenario 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 based on the first information and the second information. Since the reference information is retrieved synchronously with the retrieval of the first information, there is no need to wait for the retrieval of the first information to be completed before obtaining the reference information, saving the time required to obtain the reference information, thereby reducing the latency in generating the second information and presenting the second information to the user faster, enhancing the user experience.

[0046] In a possible implementation, after obtaining a query request, it is possible to check whether the query request is stored in a first cache, which is used to store historical query requests and the information corresponding to the historical query requests. After the RAG service generates corresponding information for a historical access request, the historical access request and the corresponding information will be stored 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, and 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 occur frequently, and the information corresponding to high-frequency query requests can be generated by the RAG service during idle periods of the system. The cache time of the data in the online cache is less than the cache time of the data in the offline cache, and the online cache and the offline cache can be implemented through different storage media.

[0047] If the query request is found in the first cache, it indicates 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. Therefore, the information corresponding to the query request in the first cache can be determined as the second information.

[0048] In an embodiment of the present disclosure, the first cache stores historical query requests and the corresponding information generated by the RAG service. After obtaining a query request, the query request is searched for in the first cache. If the query request can be found in the first cache, it indicates 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. Therefore, 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 query requests that have been stored in the first cache, the second information corresponding to the query request can be directly read from the first cache without having to call the RAG service again to generate the second information, improving the efficiency of obtaining the second information and saving the computing resources used for the RAG service.

[0049] In a possible implementation, if the query request to be processed is not included in the first cache, the query request can be semantically parsed to obtain a generalized query request with the same semantics as the query request, and then the generalized query request can be searched for in the first cache. 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 corresponding to the query request.

[0050] For the same problem, different users may express it differently. For example, the query request made by user A is "Why is the sky blue?", and the query request made by user B is "Why is the sky blue?". The semantics of the query requests made by user A and user B are the same. 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 the historical query request that is the same as the query request to be processed, the historical query request with the same semantics as the query request to be processed can be searched for in the first cache. If there is a historical query request with the same semantics as the query request to be processed in the first cache, the information corresponding to the historical query request with the same semantics as 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 made by user A above, and if the query request made by user B above and the corresponding information are stored in the first cache, the information corresponding to the query request made by user B in the first cache is determined as the second information corresponding to the query request made by user A above.

[0051] By semantically parsing the query request, one or more generalized query requests can be obtained, and then each generalized query request can be sequentially searched for in the first cache, and the information corresponding to the first generalized query request found is determined as the second information.

[0052] In the embodiments of the present disclosure, when the query request to be processed is not included in the first cache, the query request is semantically parsed to obtain a generalized query request with the same semantics as the query request, and then the generalized query request is searched for in the first cache. If there is a generalized query request 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 RAG service generates the same information for different query requests with the same semantics, searching for the generalized query request with the same semantics as the query request to be processed in the first cache and determining the information corresponding to the generalized query request as the second information corresponding to the query request to be processed eliminates the need to call the RAG service again to generate the second information, improving the acquisition efficiency of the second information and saving the computing resources for the RAG service. After searching for the query request that is not included in the first cache, searching for the generalized query request in the first cache can control the traffic of searching the first cache and avoid excessive traffic of searching the first cache from affecting the stability of the system.

[0053] In a possible implementation, when predicting the first scenario corresponding to a prediction query request, the query request may first be searched for in a second cache, which is used to store historical query requests and the scenarios corresponding to the historical query requests. During the process of the general search engine retrieving information corresponding to a historical query request, a scenario signal of the historical query request will be generated. The scenario signal of the historical query request can indicate the scenario corresponding to the historical query request, and then the historical query request and its corresponding scenario will be stored in the second cache.

[0054] If the query request to be processed is found in the second cache, it indicates that the information of this query request has been retrieved by the general search engine before, and the scenario corresponding to this query request has been stored in the second cache according to the scenario signal generated during the retrieval process. Therefore, the scenario corresponding to this query request in the second cache can be determined as the first scenario. It should be noted that in most cases, the first scenario determined by querying the second cache is accurate, but there are a small number of cases where it is inaccurate because the scenario to which the same query request belongs can change over time.

[0055] If the query request to be processed is not included in the second cache, the first scenario corresponding to this query request can be predicted according to the semantics of the query request. 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 according to the semantics of the query request. Embodiments of the present disclosure do not make any limitations in this regard.

[0056] In the embodiments of the present disclosure, the scenarios corresponding to historical query requests are stored in the second cache. After obtaining a query request, if this query request can be found in the second cache, it indicates that the scenario corresponding to this query request has been determined before. Therefore, the scenario corresponding to this query request in the second cache can be determined as the first scenario, ensuring the correctness of the determined first scenario. If the query request to be processed is not included in the second cache, the first scenario corresponding to this query request is predicted according to the semantics of the query request, ensuring that the first scenario corresponding to the query request can be obtained.

[0057] In a possible implementation, when determining the first scenario corresponding to a query request through a prediction method, multiple first scenarios may be determined. For each determined first scenario, reference information corresponding to the query request is obtained respectively. After obtaining the scenario signal, a second scenario that matches the scenario signal is determined from the multiple first scenarios, that is, the scenario to which the query request belongs is determined as the second scenario according to the scenario signal. Then, at least one reference signal obtained based on the second scenario is used to generate second information corresponding to the query request.

[0058] When there are multiple determined first scenarios, the reference information corresponding to the query request is obtained respectively based on each first scenario. The process of obtaining the reference information based on the first scenario is synchronized with the retrieval of the first information through a general search engine. The total time consumed for determining the first scenario and obtaining the reference information based on each first scenario is less than or equal to the time consumed for retrieving the first information through the general search engine.

[0059] In the embodiments of the present disclosure, when predicting the scenario corresponding to the query request, multiple first scenarios can be predicted. For each first scenario, the reference information corresponding to the query request is obtained respectively. After obtaining the scenario signal, if there is a second scenario in each first scenario that matches the scenario signal, the second information corresponding to the query request is generated based on the reference information obtained based on the second scenario. Predicting multiple first scenarios corresponding to the query request improves the probability that the predicted first scenario matches the scenario signal. Therefore, after obtaining the scenario signal, the second information can be directly generated based on the reference information obtained based on a certain first scenario, reducing the probability of obtaining the reference information according to the scenario indicated by the scenario information after obtaining the scenario signal, thereby reducing the delay in generating the second information in most cases.

[0060] In a possible implementation manner, after obtaining the scenario signal, if there is no first scenario that matches the scenario signal, it indicates that the scenario prediction is incorrect. At this time, the reference information of the query request needs to be obtained based on the scenario indicated by the scenario signal, and then the second information corresponding to the query request is generated based on the obtained reference information, ensuring that the second information corresponding to the query request can still be obtained in the case of incorrect scenario prediction.

[0061] In a possible implementation manner, when obtaining the reference information corresponding to the query request based on the first scenario, if the intent complexity of the query request is greater than the complexity threshold, the query request is split into multiple sub-query requests by the splitting module, and then at least one reference information corresponding to the query request is retrieved from the knowledge base by the retrieval module, and at least one reference information corresponding to each sub-query request is retrieved from the knowledge base by the retrieval module.

[0062] When the intent complexity of the query request is greater than the complexity threshold, the splitting module 201 can split the query request into multiple sub-query requests. The user can input the purpose or information to be obtained on the user device 106 according to the needs, and then the user device 106 generates a query request according to the data input by the user.

[0063] The intent of a query request refers to the purpose or the type of information that the user intends to achieve or obtain through this query request. The intent types include information query (the user wants to obtain specific information about a certain topic or question), navigation (the user wants to find a specific website or web page), transactional operation (the user wants to complete a certain transaction, such as purchasing goods, booking services, etc.), answer query (the user wants to get an answer to a specific question, such as "What's the weather like tomorrow"), entertainment (the user wants to listen to music, watch videos or play games, etc.), social interaction (the user wants to communicate with others or view updates on social networks), local search (the user wants to find nearby services or merchants, such as "Where is the nearest convenience store"), etc.

[0064] The intent complexity of a query request can indicate the complexity of the requirements expressed by the user when making the query. Based on a 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 structurally complex queries that can contain multiple clauses and conditions, such as "Looking for a tourist destination suitable for a two-day solo trip with a budget within 2000".

[0065] For ease of description, in the embodiments of the present disclosure, complex intent query requests are defined as first query requests, and simple intent query requests are defined as second query requests. In one example, after the cloud server 102 receives a query request sent by the user device 106, the upstream model can determine the intent complexity of the query request. If the intent complexity of the query request is greater than the complexity threshold, then the query request is determined as a first query request. If the intent complexity of the query request is less than or equal to the complexity threshold, then the query request is determined as a second query request. After the upstream model determines that a certain query request is a first query request or a second query request, the upstream model can send a corresponding upstream signal for this query request. Based on 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 embodiments of the present disclosure do not limit the manner in which the upstream model determines the intent complexity.

[0066] When splitting the first query request into multiple sub-query requests through a splitting module, multiple clauses and / or conditions included in the first query request can be split into multiple sub-query requests. For example, if the first query request is "Find tourist destinations suitable for a two-day solo trip with a budget within 2000", the splitting module can split this first query request into two sub-query requests: "The budget is within 2000" and "Find tourist destinations suitable for a two-day solo trip". It should be noted that the splitting module can split the first query request into multiple sub-query requests in any suitable way, and the embodiments of the present disclosure do not limit the specific way of splitting the first query request into multiple sub-query requests by the splitting module.

[0067] After splitting the first query request into multiple sub-query requests through the splitting module, the retrieval module can retrieve one or more reference information corresponding to the first query request from the knowledge base, and retrieve one or more reference information corresponding to the sub-query requests from the knowledge base. The retrieval module can obtain recall parameters based on the first query request and the sub-query requests, and then retrieve matching indexes from the knowledge base according to the recall parameters, and then use the retrieved indexes 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 embodiments of the present disclosure refers to a shared knowledge base, that is, the knowledge base in the embodiments of the present disclosure is a knowledge base shared by RAG in different scenarios.

[0068] In one example, the parameter generation module can generate recall parameters corresponding to the first query request and can generate recall parameters corresponding to the sub-query requests. The retrieval module can retrieve the reference information corresponding to the first query request from the knowledge base according to the recall parameters corresponding to the first query request. The retrieval module can retrieve the reference information corresponding to the sub-query requests from the knowledge base according to the recall parameters corresponding to the sub-query requests. Different scenarios are equipped with their own parameter generation modules.

[0069] 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 the retrieval module, that is, the splitting module and the retrieval module are used for multiple scenarios including the first scenario. As Figure 3 shown in the information generation device, Scenario 1 to N share the splitting module 301 and the retrieval module 303.

[0070] In the embodiments of the present disclosure, by splitting the module, a query request can be split into multiple sub-query requests. Through the retrieval module, the reference information corresponding to the query request and the sub-query requests can be retrieved from the knowledge base respectively. The splitting module and the retrieval module can be used in multiple scenarios. When iteratively updating the information generation device including the splitting module and the retrieval module, the splitting module and the retrieval module shared by multiple scenarios can be iteratively updated at one time, without separately iteratively updating the splitting module and the retrieval module for the information generation devices in different scenarios, thereby improving the efficiency of iteratively updating the information generation device.

[0071] In a possible implementation, when generating the second information corresponding to the query request according to the reference information, the first prompt (Prompt) can be generated by the prompt word generation module according to at least part of the reference information. The first prompt can be one or more. The prompt word generation module can generate the first prompt based on the reference information in any suitable manner, and the embodiments of the present disclosure do not limit this. After generating the first prompt by the prompt word generation module, the first prompt can be input into the text generation model by the text generation module, so that the text generation model generates the second information corresponding to the query request based on the first prompt. The text generation model can be an LLM.

[0072] In different scenarios, the rules or models for generating prompt words are different, and the text generation models called for generating the second information are different. Therefore, different scenarios are equipped with their own 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.

[0073] As Figure 3 shown, Scenario 1 to Scenario N each have their own prompt word generation module 304 and text generation module 305, and Scenario 1 to Scenario N share the splitting module 301 and the retrieval module 303.

[0074] It should be noted that the information generation device in the embodiments 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 generation device.

[0075] In the embodiments of the present disclosure, the first prompt can be generated by the prompt word generation module according to at least part of the reference information. After the first prompt is input into the text generation model by the text generation module, the second information corresponding to the query request can be generated by the text generation model. Since the prompt word generation module 304 and the text generation module 305 are dedicated to the scenario corresponding to the query request, the correctness of the generated second information is ensured.

[0076] In a possible implementation, when generating the first prompt 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 according to the relevance to the query request, and then the prompt generation module can generate the first prompt based on the target reference information.

[0077] After the reference information of the query request and the sub-query request is retrieved by the retrieval module, the first screening module can sort the multiple pieces of reference information retrieved by the retrieval module in descending order of relevance to the query request, and then determine the first at least one piece of 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 generation module, and then the prompt generation module generates the first prompt based on the received target reference information.

[0078] The first screening module is used to screen the target reference information with a higher relevance to the query request from the reference information according to the relevance between the reference information and the query request. Therefore, the same first screening module can be applied to different scenarios, that is, different scenarios can share the first screening module. As Figure 4 shown in the schematic diagram of multiple information generation devices, each of Scenarios 1 to N has its own prompt generation module 304 and text generation module 305, and Scenarios 1 to N share the splitting module 301, the retrieval module 303, and the first screening module 306.

[0079] In the embodiments of the present disclosure, after multiple pieces of reference information are retrieved by the retrieval module, the first screening module screens out the target reference information with a higher relevance to the query request from these multiple pieces of reference information. After the prompt generation module generates the first prompt based on the first target reference information, the text generation module inputs the first prompt into the text generation model to obtain the second information corresponding to the query request. By screening the first target reference information through the first screening module, the number of reference information used to generate the first prompt is reduced, avoiding excessive reference information from causing greater 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 iteratively updating the information generation device, the first screening module shared by multiple scenarios can be iteratively updated once, without iteratively updating the first screening module for the information generation devices in different scenarios respectively, thereby improving the efficiency of iteratively updating the information generation device.

[0080] In a possible implementation, as Figure 5 shown in the schematic diagram of the information generation device 300, the first screening module 306 includes a first screening unit 3061, a second screening unit 3062, and a third screening unit 3063.

[0081] The first screening unit 3061 may screen out at least one first reference information from the reference information corresponding to the first query request in the order of the relevance to the first query request from high to low. In one example, the first screening unit 3061 may sort the reference information corresponding to the first query request in the order of the relevance to the first query request from high to low, 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 may be one or more.

[0082] 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 the order of the relevance to the sub-query request from high to low. 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 the order of the relevance to the sub-query request from high to low, 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.

[0083] The third screening unit 3063 may 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 may mix and sort the first reference information and the second reference information in the order of the relevance to the first query request from high to low, and then determine the first at least one reference information and / or the second reference information with a higher ranking as the first target reference information according to the sorting result, that is, the first target reference information may be one or more.

[0084] In the embodiment of the present disclosure, the first screening unit 3061 screens the first reference information with a higher relevance to the first query request from the reference information corresponding to the first query request, the second screening unit 3062 screens the second reference information with a higher relevance to the first query request from the reference information corresponding to the sub-query request, and the third screening unit 3063 screens the first target reference information with a higher relevance to the first query request from the first reference information and the second reference information, so that the source of the first target reference information is wide and the relevance to the first query request is high, ensuring the accuracy of the generated second information.

[0085] In a possible implementation manner, the information supplement module may query the supplementary reference information from the supplementary knowledge base, and then determine the target reference information from the reference information corresponding to the query request and the supplementary reference information, and the first prompt word is generated by the prompt word generation module according to the determined target reference information.

[0086] Such as Figure 6Schematic diagram of the information generation device shown. The information generation device 300 includes an information supplement module 307 and a second screening module 308. The information supplement module 307 can query at least one supplementary reference information from the supplementary knowledge base of the scenario corresponding to the first query request. The second screening module 308 can screen the target reference information from the reference information and supplementary information corresponding to the query request and sub-query request according to the relevance to the first query request. Furthermore, the prompt word generation module 304 can generate the first prompt word based on the target reference information.

[0087] 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. The information in this 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-and-answer scenario, text summarization scenario, and content generation scenario respectively correspond to different supplementary knowledge bases.

[0088] After receiving the first query request, the information supplement module 307 can search for information in the corresponding supplementary knowledge base that matches the first query request as the supplementary reference information for the first query request. In one example, the information supplement module 307 can use one or more pieces of information in the supplementary knowledge base with a relatively high matching degree to the first query request as the supplementary reference information for the first query request.

[0089] 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 relatively high relevance to the first query request from the reference information and supplementary reference information according to the relevance of the reference information and supplementary reference information to the first query request, and then send the screened target reference information to the prompt word generation module 304. Furthermore, the prompt word generation module 304 generates the first prompt word based on the received target reference information.

[0090] The second screening module 308 is used to screen out target reference information with a relatively high relevance to the first query request from the reference information and the supplementary reference information according to the relevance between the reference information and the supplementary reference information and the first query request. Therefore, 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 corresponding to the scenario of the first query request. Different scenarios correspond to different supplementary knowledge bases. Therefore, the information supplement module 307 needs to be designed separately for the corresponding scenario, 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.

[0091] As Figure 7 shown in the schematic diagram of multiple information generation devices, scenarios 1 to N each have their own prompt word generation module 304, text generation module 305, and information supplement module 307, and scenarios 1 to N share the splitting module 301, retrieval module 303, and second screening module 308.

[0092] In the embodiments of the present disclosure, the information supplement module 307 can search for supplementary reference information matching the first query request from the supplementary knowledge base. The second screening module 308 screens out target reference information with a relatively high relevance to the first query request from the reference information and the supplementary reference information. After the prompt word generation module 304 generates the first prompt word based on 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. By searching for supplementary reference information through the information supplement module 307, and the supplementary reference information comes from the dedicated knowledge base corresponding to the scenario of the first query request, it can provide target reference information with a relatively high relevance to the first query request, ensuring the correctness of the second information generated by the text generation model. By screening out target reference information through the second screening module 308, the number of reference information used to generate the first prompt word is reduced, avoiding excessive reference information from causing greater interference to the text generation model, thereby ensuring the correctness of the generated second information. The second screening module 308 can be used in multiple scenarios. When iteratively updating the information generation device 300, the second screening module 308 shared by multiple scenarios can be iteratively updated once, without iteratively updating the second screening module 308 for the information generation device 300 in different scenarios respectively, thereby improving the efficiency of iteratively updating the information generation device 300.

[0093] In a possible implementation manner, as Figure 8 shown in the schematic diagram of the information generation 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.

[0094] 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 the order of decreasing 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 the order of decreasing 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.

[0095] 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 the order of decreasing 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 the order of decreasing 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.

[0096] The sixth screening unit 3083 may screen out at least one fifth reference information from the supplementary reference information in the order of decreasing relevance to the first query request. In one example, the sixth screening unit 3083 may sort the supplementary reference information in the order of decreasing relevance to the first query request, and then determine the first at least one supplementary reference information as the fifth reference information according to the sorting result, that is, the fifth reference information may be one or more.

[0097] The seventh screening unit 3084 may 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 may perform a mixed sorting on the third reference information, the fourth reference information, and the fifth reference information in the order of decreasing relevance to the first query request, and then determine the first at least one third reference information and / or fourth reference information and / or fifth reference information as the target reference information according to the sorting result, that is, the target reference information may be one or more.

[0098] In an embodiment of the present disclosure, the fourth screening unit 3081 screens out third reference information with a relatively high relevance to the first query request from the reference information corresponding to the first query request. The fifth screening unit 3082 screens out fourth reference information with a relatively high relevance to the first query request from the reference information corresponding to the sub-query request. The sixth screening unit 3083 screens out fifth reference information with a relatively high relevance to the first query request from the supplementary reference information. The seventh screening unit 3084 screens out target reference information with a relatively 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 the relevance to the first query request is relatively high, ensuring the accuracy of the generated second information.

[0099] In a possible implementation manner, when the intent complexity of the query request is less than or equal to the complexity threshold, the prompt word generation module can directly generate a second prompt word according to the query request, and then the text generation module can input the second prompt word into the text generation model to generate the second information corresponding to the query request through the text generation model.

[0100] When the intent complexity of the query request is less than or equal to the complexity threshold, the text generation model can give relatively accurate second information based on the prompt word generated according to the query request, so there is no need to obtain the reference information of the query request.

[0101] In an embodiment of the present disclosure, for a query request with a simple intent, there is no need to split the query request and recall the reference information. The prompt word generation module directly generates a second prompt word according to the query request, and the text generation module inputs the second prompt word into the text generation model to generate the second information corresponding to the query request through the text generation model, improving the speed of generating the second information corresponding to the query request, that is, improving the response speed of the query request with a simple intent.

[0102] In a possible implementation manner, after obtaining the first information and the second information, the first information and the second information can be directly used as the query result corresponding to the query request, or after generating multi-modal display information according to the second information, the first information and the multi-modal display information can be used as the query result corresponding to the query request. The multi-modal display information includes information in forms such as pictures, videos, video links, and mind maps.

[0103] After obtaining the second information, multi-modal display information can be generated based on the second information according to the scenario or type corresponding to the query request, and then the first information and the multi-modal display information are 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 multi-modal display information included in the query result on the display interface.

[0104] In the embodiments of the present disclosure, the first information and the second information can be used as the query result corresponding to the query request, or after converting the second information into multi-modal display information, the first information and the multi-modal 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 embodiments of the present disclosure. After converting the second information into multi-modal display information and using the first information and the multi-modal display information as the query result, the query result can be displayed through multiple information display methods, which can improve the user experience.

[0105] It should be noted that in the above embodiments, when data is transmitted between the modules in the information generation device 300, the module that sends the data can format the data to be sent (format) so that the data can be completely received by the module that receives the data. The module that receives the data can parse (parser) the data after receiving the data to obtain data that can be recognized and processed.

[0106] In a possible implementation manner, after obtaining the second information, risk control detection will be performed on the second information to detect whether there is sensitive information such as violation of laws in the second information. If the risk control detection of the second information passes, that is, there is no sensitive information such as violation of laws in the second information, then the query result can be generated based on the second information. If the risk control detection of the second information fails, a query result including the first information but not including the second information will be generated.

[0107] Information Generation Method Applied to User Equipment

[0108] Based on the above system, the embodiments of the present disclosure provide an information generation method, which can be executed by the user equipment 106 above. The following will detail this information generation method through multiple embodiments.

[0109] Figure 9 is a flowchart of the information generation method according to an embodiment of the present disclosure. This information generation method is executed by the user equipment, as Figure 9 shown, this information generation method includes the following steps:

[0110] Step 901, generate a query request using the input data of the user.

[0111] Step 902, send the query request to the server.

[0112] In an example, the query request can be sent to the cloud server 102 in the above system embodiment, and the cloud server 102 executes the information generation method applied to the server as described above.

[0113] Step 903, receive the query result obtained by the server in response to the query request.

[0114] The query result is obtained based on the first information and the second information. The first information is retrieved by a general search engine according to the query request. The second information is generated based on at least one reference information when the first scenario matches the scenario signal. The scenario signal is generated during the process of retrieving the first information by the general search engine. The first scenario is the predicted scenario of the query request. The at least one reference information is obtained based on the first scenario.

[0115] Step 904: Display the query result.

[0116] In one example, the query result is displayed through a browser.

[0117] In the embodiments of the present disclosure, after generating a query request using the user's input data, the query request is sent to the server, enabling the server to generate a query result based on the query request. Subsequently, the query result generated by the server in response to the query request is received and the query result is displayed. While the server retrieves the first information corresponding to the query request through a general search engine, it predicts the first scenario corresponding to the query request and obtains the reference information corresponding to the first query request based on the first scenario. After obtaining the scenario signal during the process of detecting the first information by the general search engine, if the first scenario matches the scenario signal, the second information corresponding to the query request is generated based on the obtained reference information. 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 retrieval of the first information, there is no need to wait for the completion of the retrieval of the first information to obtain the reference information, saving the time required to obtain the reference information. Thus, the latency in generating the second information can be reduced, and further, when displaying the query result, the latency in presenting the second information to the user can be reduced, thereby improving the user experience.

[0118] It should be noted that the information generation method applied to the user device in the embodiments of the present disclosure is based on the same inventive concept as the information generation method embodiment applied to the server. The specific process of the information generation method applied to the user device can refer to the description in the information generation method embodiment applied to the server mentioned above and has the same beneficial effects as the information generation method embodiment applied to the server, which will not be elaborated here.

[0119] Electronic Device

[0120] Figure 10 is a schematic block diagram of an electronic device provided by the embodiments of the present disclosure. The specific implementation of the electronic device is not limited in the specific embodiments of the present disclosure. As Figure 10 shown, the electronic device may include: a processor 1002, a communications interface 1004, a memory 1006, and a communication bus 1008. Among them:

[0121] The processor 1002, the communication interface 1004, and the memory 1006 communicate with each other via the communication bus 1008.

[0122] The communication interface 1004 is used to communicate with other electronic devices or servers.

[0123] The processor 1002 is used to execute the program 1010, and specifically can execute the relevant steps in any of the foregoing information generation method embodiments.

[0124] Specifically, the program 1010 may include program code, and the program code includes computer operation instructions.

[0125] The processor 1002 may be a CPU, or a GPU (Graphic Processing Unit), or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present disclosure. One or more processors included in the intelligent device may be of the same type of processor, such as one or more CPUs; or may be of different types of processors, such as one or more CPUs and one or more ASICs.

[0126] The memory 1006 is used to store the program 1010. The memory 1006 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk memory.

[0127] The program 1010 is specifically used to cause the processor 1002 to execute the information generation method in any of the foregoing embodiments.

[0128] For the specific implementation of each step in the program 1010, reference may be made to the corresponding steps and descriptions in the corresponding units in any of the foregoing information generation method embodiments, which will not be elaborated here. Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding process descriptions in the foregoing method embodiments, which will not be elaborated here.

[0129] Through the electronic device according to the embodiments of the present disclosure, while retrieving the first information corresponding to the query request through a general search engine, the first scenario corresponding to the query request is predicted, and the reference information corresponding to the first query request is obtained based on the first scenario. After obtaining the scenario signal during the process of detecting the first information through the general search engine, if the first scenario matches the scenario 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 based on the first information and the second information. Since the reference information is retrieved synchronously with the retrieval of the first information, there is no need to wait for the retrieval of the first information to be completed before obtaining the reference information, saving the time required to obtain the reference information, thereby reducing the latency in generating the second information and presenting the second information to the user faster, enhancing the user experience.

[0130] Computer Storage Medium

[0131] 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 can be provided, on which software program code for implementing the functions of any one of the above embodiments is stored, and the computer (or CPU or MPU) of the system or device reads and executes the program code stored in the storage medium.

[0132] In this case, the program code read from the storage medium itself can implement the functions of any one of the above embodiments, so the program code and the storage medium storing the program code constitute a part of the present disclosure.

[0133] Embodiments of the storage medium for providing the program code include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), magnetic tapes, non-volatile memory cards, and ROMs. Optionally, the program code can be downloaded from a server computer via a communication network.

[0134] Computer Program Product

[0135] Embodiments of the present disclosure also provide a computer program product including computer instructions that direct a computing device to perform any corresponding operation in the above-mentioned multiple method embodiments.

[0136] It should be noted that the information related to users (including but not limited to user device information, user personal information, etc.) and data (including but not limited to sample data for training the model, data for analysis, stored data, displayed data, etc.) involved in the embodiments of the present disclosure are all information and data authorized by the users or fully authorized by all parties. Moreover, the collection, use, and processing of the relevant data need to comply with the relevant laws, regulations, and standards of the relevant countries and regions, and corresponding operation entrances are provided for users to choose to authorize or reject.

[0137] 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 the components / steps can be combined into new components / steps to achieve the purpose of the embodiments of the present disclosure.

[0138] The methods according to the embodiments of the present disclosure described above can be implemented in hardware, firmware, or be 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 be implemented as computer code originally stored in a remote recording medium or a non-transitory machine-readable medium and downloaded through a network and to be stored in a local recording medium, so that the methods described herein can be stored in such software processing on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated 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 (such as a RAM, a ROM, a flash memory, etc.) that can store or receive software or computer code, and when the software or computer code is accessed and executed by the computer, the processor, or the hardware, the methods described herein are implemented. In addition, when a general-purpose computer accesses the code for implementing the methods shown herein, the execution of the code converts the general-purpose computer into a dedicated computer for executing the methods shown herein.

[0139] It should be noted that the information related to users (including but not limited to user device information, user personal information, etc.) and data (including but not limited to sample data for training the model, data for analysis, stored data, displayed data, etc.) involved in the embodiments of the present disclosure are all information and data authorized by the users or fully authorized by all parties. Moreover, the collection, use, and processing of the relevant data need to comply with the relevant laws, regulations, and standards of the relevant countries and regions, and corresponding operation entrances are provided for users to choose to authorize or reject.

[0140] Those of ordinary skill in the art will appreciate that the units and method steps of the examples described in connection with the embodiments disclosed herein can be implemented in electronic hardware, or in a combination of computer software and electronic hardware. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for a specific application, but such implementation should not be considered to exceed the scope of the embodiments disclosed herein.

[0141] The above embodiments are only used to illustrate the embodiments of the present disclosure, rather than to limit the embodiments of the present disclosure. Those of ordinary skill in the relevant technical field can also 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 patent protection scope of the embodiments of the present disclosure shall be defined by the claims.

Claims

1. An information generation method, comprising: Retrieving, according to a query request from a user device, 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 during the process of retrieving the first information through the general search engine; Determining whether the first scenario matches the scenario signal, and if the first scenario matches the scenario signal, generating, through a retrieval augmentation generation service, second information corresponding to the query request according to the at least one reference information; Obtaining a query result corresponding to the query request according to the first information and the second information; The obtaining at least one reference information corresponding to the query request based on the first scenario includes: if the intent complexity of the query request is greater than a complexity threshold, splitting the query request into multiple sub-query requests through a splitting module, and retrieving, through a retrieval module, at least one reference information corresponding to the query request from a knowledge base, and retrieving, through the retrieval module, at least one reference information corresponding to the sub-query request from the knowledge base; wherein, the splitting module and the retrieval module are used for multiple scenarios including the first scenario; The generating second information corresponding to the query request according to the at least one reference information includes: generating 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, through the text generation model, second information corresponding to the query request; wherein, the prompt word generation module and the text generation module are dedicated to the first scenario; The generating a first prompt word according to at least part of the reference information includes: screening target reference information from the reference information corresponding to the query request and the sub-query request according to the relevance to the query request through a first screening module, and generating the first prompt word according to the target reference information through the prompt word generation module; the first screening module is used for multiple scenarios including the first scenario.

2. The method according to claim 1, the method further comprising: Searching for the query request in a first cache, the first cache being used to store historical query requests and information corresponding to the historical query requests; If the query request is found in the first cache, determining the information corresponding to the query request in the first cache as the second information.

3. The method according to claim 2, the method further comprising: If the query request is not included in the first cache, performing semantic parsing on the query request to obtain a generalized query request with the same semantics as the query request; Searching for the generalized query request in the first cache; If the generalized query request is found in the first cache, determining the information corresponding to the generalized query request in the first cache as the second information.

4. The method according to claim 1, wherein The predicting a first scenario corresponding to the query request includes: Search for the query request in a second cache, where the second cache is used to store historical query requests and the scenarios corresponding to the historical query requests; If the query request is found in the second cache, determine the scenario corresponding to the query request in the second cache as the first scenario; If the query request is not included in the second cache, determine the first scenario according to the semantics of the query request.

5. The method according to claim 1, wherein, The number of the first scenarios is multiple; The generating the second information corresponding to the query request according to the at least one reference information includes: determining a second scenario that matches the scenario signal among the multiple first scenarios, and generating the second information corresponding to the query request according to the reference information obtained based on the second scenario.

6. According to the method as claimed in any one of claims 1-5, wherein, The obtaining the query result corresponding to the query request according to the first information and the second information includes: Obtaining a query result including the first information and the second information; Or, Generating multimodal display information according to the second information, and obtaining a query result including the first information and the multimodal display information, where the multimodal display information includes at least one of pictures, videos, video links, and mind maps.

7. An information generation method, including: Generating a query request using the input data of a user; Sending the query request to a server; Receiving the query result obtained by the server in response to the query request, where the query result includes a part of the query result obtained according to the first information and another part of the query result obtained according to the second information, the first information is retrieved through a general search engine according to the query request, the second information is generated by a retrieval-augmented generation service according to at least one reference information when the result of determining whether the first scenario matches the scenario signal is that the first scenario matches the scenario signal, the scenario signal is generated during the process of retrieving the first information through the general search engine, the first scenario is the predicted scenario of the query request, and the at least one reference information is obtained based on the first scenario; where if the intent complexity of the query request is greater than a complexity threshold, the query request is split into multiple sub-query requests by a splitting module, and at least one reference information corresponding to the query request is retrieved from a knowledge base by a retrieval module, and at least one reference information corresponding to the sub-query request is retrieved from the knowledge base by the retrieval module; the splitting module and the retrieval module are used for multiple scenarios including the first scenario; Displaying the query result; Where when the result of determining whether the first scenario matches the scenario signal is that the first scenario matches the scenario signal, the second information is generated in the following manner: generating a first prompt word according to at least part of the reference information by a prompt word generation module; inputting the first prompt word into a text generation model by a text generation module, and generating the second information corresponding to the query request by the text generation model; the prompt word generation module and the text generation module are dedicated to the first scenario; The first prompt is generated in the following manner: through 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 through the prompt generation module, the first prompt is generated according to the target reference information; the first screening module is used for multiple scenarios including the first scenario.

8. An electronic device, comprising: A processor, a memory, a communication interface, and a communication bus, and the processor, the memory, and the communication interface complete communication with each other through the communication bus; The memory is used for storing at least one executable instruction, and the executable instruction causes the processor to execute the operations corresponding to the method according to any one of claims 1-7.

9. A computer storage medium, on which a computer program is stored, and when the program is executed by a processor, the method according to any one of claims 1-7 is implemented.

10. A computer program product, including computer instructions, and the computer instructions instruct a computing device to execute the method according to any one of claims 1-7.

Citation Information

Patent Citations

  • 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