Information generation method and device, electronic equipment and computer readable storage medium
By setting up scene link mapping relationships and target execution links in the intelligent question-and-answer system, the problem that existing systems are difficult to quickly and accurately handle diversified query content is solved, and more efficient reply content generation is achieved.
Patent Information
- Application Number
- CN202411782227.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-05-06
AI Technical Summary
When the existing intelligent question-answer system generates the reply content corresponding to the user query information, it is difficult to quickly and accurately process the diverse query content, resulting in low response efficiency.
By presetting the scene link mapping relationship, the query scenario to which the query content belongs, and determining the target execution link based on the scenario, and generating reply content through the functional modules and execution logic relationships in the target execution link.
It realizes more accurately answering diverse query content, and improves answer efficiency, adapting to different types of query scenarios.
Smart Images

Figure CN119940524A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an information generation method, device, electronic device and computer-readable storage medium. Background Art
[0002] With the rapid development of computer technology, intelligent question-answering systems have been widely used in all walks of life. For example, in e-commerce platforms, customer service robots can generate responses to information queried by customers. When generating responses to information queried by users, there is usually a set of execution processes for generating responses, and each question asked by the user will generate corresponding responses through this set of execution processes. This method may result in some queries not being answered accurately and quickly, and the efficiency of answering questions is relatively low. Summary of the invention
[0003] The present application provides an information generation method, system, device, electronic device and computer-readable storage medium, which can better adapt to the diverse query content, so as to more accurately answer the various query content, and the efficiency of answering each query content is relatively high. The specific scheme is as follows:
[0004] In a first aspect, the present application provides an information generation method, the method comprising:
[0005] Get the query content;
[0006] Determining the query scenario to which the query content belongs;
[0007] Determine the target execution link corresponding to the query scenario based on the preset scenario link mapping relationship, wherein the target execution link is provided with various functional modules used in the process of generating reply content for the query scenario and the execution logic relationship between the functional modules;
[0008] The reply content corresponding to the query content is generated through each functional module corresponding to the target execution link and based on the execution logic relationship between each functional module.
[0009] Optionally, the scenario link mapping relationship includes execution links corresponding to various query scenarios, wherein query scenarios of the same type correspond to the same execution link.
[0010] Optionally, before generating reply content corresponding to the query content through each functional module corresponding to the target execution link and based on the execution logic relationship between the functional modules, the method further includes:
[0011] Acquire permission information corresponding to the target execution link, wherein the permission information includes data resources available to each functional module corresponding to the target execution link during operation;
[0012] The generating of the reply content corresponding to the query content by executing each functional module corresponding to the target link and based on the execution logic relationship between the functional modules includes:
[0013] The reply content corresponding to the query content is generated through the functional modules corresponding to the target execution link and the execution logic relationship between the functional modules, and based on the available data resources in the permission information.
[0014] Optionally, when the target execution link is an execution link corresponding to a query scenario of a product consultation type, the permission information includes permission information set by a merchant, and the permission information includes the data sources that the target execution link can access during operation and / or the products that are allowed to use the target execution link.
[0015] Optionally, the generating the reply content corresponding to the query content through each functional module corresponding to the target execution link and based on the execution logic relationship between each functional module includes:
[0016] Acquire each target operator from a preset operator warehouse, where the target operator is an operator corresponding to a functional module of the target execution link;
[0017] The reply content corresponding to the query content is generated through each of the target operators corresponding to the target execution link and based on the execution logic relationship between the functional modules.
[0018] Optionally, one functional module corresponds to multiple operators, and each operator corresponding to the same functional module is an interchangeable operator capable of realizing the same function;
[0019] The generating of reply content corresponding to the query content through each of the target operators corresponding to the target execution link and based on the execution logic relationship between the functional modules includes:
[0020] For multiple target operators corresponding to the functional modules of the target execution link, selecting a selected operator for information query;
[0021] The reply content corresponding to the query content is generated through each of the selected operators corresponding to the target execution link and based on the execution logic relationship between the functional modules.
[0022] Optionally, the generating the reply content corresponding to the query content through each functional module corresponding to the target execution link and based on the execution logic relationship between each functional module includes:
[0023] Acquire an adjusted execution link corresponding to the target execution link, where the adjusted execution link is an execution link obtained by adjusting the target execution link;
[0024] Testing the execution effects of the target execution link and the adjustment execution link through a test experiment to obtain a test result;
[0025] Selecting a link with a good test result from the target execution link and the adjustment execution link as a selected execution link according to the test result;
[0026] The reply content corresponding to the query content is generated through each functional module corresponding to the selected execution link and based on the execution logic relationship between each functional module of the selected execution link.
[0027] Optionally, the acquiring the adjustment execution link corresponding to the target execution link includes at least one of the following:
[0028] Adjust at least one of the algorithms, operators, parameters, and calculation processes corresponding to the functional modules in the target execution link;
[0029] The intelligent model used by the functional modules in the target execution link is adjusted.
[0030] Optionally, before testing the execution effects of the target execution link and the adjustment execution link through the test experiment, the method further includes:
[0031] A test experiment corresponding to the target execution link is obtained from various pre-set test experiments as a test experiment for testing the execution effects of the target execution link and the adjustment execution link.
[0032] Optionally, each functional module of the target execution link is used to generate reply content corresponding to the query content by means of retrieval enhancement to generate RAG.
[0033] Optionally, each functional module of the target execution link includes a retrieval module, a post-retrieval processing module, and a generation module which are arranged in sequence;
[0034] The generating of the reply content corresponding to the query content by executing each functional module corresponding to the target link and based on the execution logic relationship between the functional modules includes:
[0035] Searching for retrieval information related to the query content from a preset knowledge base through the retrieval module;
[0036] Processing the search information by the post-search processing module to obtain processed search information;
[0037] The generation module generates reply content corresponding to the query content based on the pre-trained large model and with reference to the processed retrieval information.
[0038] Optionally, the scene link mapping relationship includes at least one of the following execution links: an execution link for querying product information, an execution link for querying promotional activity information, an execution link for querying logistics information, an execution link for querying membership or points information, an execution link for querying payment information, and an execution link for querying merchant information.
[0039] Optionally, the generating the reply content corresponding to the query content through each functional module corresponding to the target execution link and based on the execution logic relationship between each functional module includes:
[0040] Generate an execution flow chart corresponding to the target execution link, wherein the execution flow chart includes each processing node in the process of generating the reply content corresponding to the query content and the flow between each processing node, the processing node is a functional module of the target execution link, and the flow between each processing node is the execution logic relationship between each functional module;
[0041] Based on the execution flow chart and each functional module corresponding to the target execution link, a reply content corresponding to the query content is generated.
[0042] Optionally, generating reply content corresponding to the query content based on the execution flowchart and each functional module corresponding to the target execution link includes:
[0043] Determine link configuration information corresponding to the target execution link, where the link configuration information includes each functional module included in the target execution link and an implementation operator corresponding to each functional module;
[0044] Generate reply content corresponding to the query content according to the link configuration information and the link configuration information.
[0045] In a second aspect, the present application provides an information generating device, the device comprising:
[0046] An acquisition unit, used for acquiring query content;
[0047] A scene determination unit, used to determine the query scene to which the query content belongs;
[0048] A link determination unit, configured to determine a target execution link corresponding to the query scenario based on a preset scenario-link mapping relationship, wherein the target execution link is provided with various functional modules used for information query for the query scenario and execution logic relationships between the functional modules;
[0049] The query unit is used to generate reply content corresponding to the query content through each functional module corresponding to the target execution link and based on the execution logic relationship between each functional module.
[0050] In a third aspect, the present application provides an electronic device comprising: a processor, a memory, and computer program instructions stored in the memory and executable on the processor; when the processor executes the computer program instructions, it implements the method described in any one of the first aspects.
[0051] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement any of the methods described in the first aspect.
[0052] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the method as described in any one of the first aspects.
[0053] Compared with the prior art, this application has the following advantages:
[0054] The information generation method provided in the embodiment of the present application pre-sets a scene link mapping relationship, and the scene link mapping relationship includes execution links corresponding to each query scenario respectively. The execution link corresponding to the query scenario, that is, the execution link matches the query scenario, and the process of generating reply content through the logic of the execution link is more suitable for the corresponding query scenario. After obtaining the query content, the present application determines the query scenario to which the query content belongs, and determines the target execution link corresponding to the query scenario to which the query content belongs based on the pre-set above-mentioned scene link mapping relationship, that is, determines the target execution link that matches the query scenario of the query content, and the execution logic of the target execution link is more suitable for generating reply content corresponding to the query content. Since the target execution link is provided with each functional module used in the process of generating reply content for the query scenario and the execution logic relationship between each functional module, that is, the target execution link is provided with a complete implementation process for generating reply content corresponding to the query content, therefore, through each functional module corresponding to the target execution link and based on the execution logic relationship between each functional module, the reply content corresponding to the query content can be generated.
[0055] It can be seen that the solution provided by the present application can determine an execution link that is more suitable for the query content by setting a scene link mapping relationship. Therefore, for a variety of query contents, it is possible to find an execution link that matches the user's query content from the scene link mapping relationship to generate reply content, thereby being able to more accurately answer each of the various query contents. Moreover, since the execution link is more suitable, the efficiency of answering each query content is also higher. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 It is a schematic diagram of the application scenario of the information generation solution provided by this application;
[0057] Figure 2 It is a flowchart of an example of the information generation method provided in an embodiment of the present application;
[0058] Figure 3 is a schematic diagram of a DAG graph in an embodiment of the present application;
[0059] Figure 4 This is a schematic diagram of the merchant setting permission information in an embodiment of the present application;
[0060] Figure 5 is a schematic diagram of configuration information of a target execution link provided in an embodiment of the present application;
[0061] Figure 6 yes Figure 5 A schematic diagram of configuration information of a filtered execution link after filtering the target execution link shown;
[0062] Figure 7 It is a flowchart of generating reply content during the execution of the RAG engine in this application;
[0063] Figure 8 is an example diagram of the executable context in the embodiment of the present application;
[0064] Fig. 9 It is a structural block diagram of the electronic device provided in this application. DETAILED DESCRIPTION
[0065] In order to enable those skilled in the art to better understand the technical solution of the present application, the present application is described clearly and completely below in conjunction with the drawings in the embodiments of the present application. However, the present application can be implemented in many other ways different from the following description. Therefore, based on the embodiments provided by the present application, all other embodiments obtained by those of ordinary skill in the art without creative work should fall within the scope of protection of the present application.
[0066] It should be noted that the terms "first", "source domain", "third", etc. in the claims, description and drawings of the present application are used to distinguish similar objects and are not used to describe a specific order or sequence. The data used in this way are interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including", "having" and their variants are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0067] In order to facilitate understanding of the various embodiments of the present application, the application background of the embodiments is described.
[0068] With the rapid development of computer technology, intelligent question-answering systems have been widely used in all walks of life. For example, in e-commerce platforms, customer service robots can quickly respond to customer questions. Since the Large Language Model (LLM) has demonstrated strong performance and generalization capabilities in natural language processing tasks such as text generation, sentiment analysis, and complex question-answering systems, it is increasingly used in intelligent question-answering systems. Specifically, Retrieval-Augmented Generation (RAG) can be used for intelligent question-answering in professional fields. RAG is a technology that combines retrieval and generation to build a knowledge base for the application scenarios of the question-answering system. The knowledge in the knowledge base is used as reference information for LLM, so that the LLM model generates accurate answers that are more compatible with the application scenarios.
[0069] In the related art, RAG usually constructs a fixed processing flow through pre-defined steps and configurations. However, since users' query questions are often diverse, this fixed processing flow of the related art is difficult to adapt to various query questions, resulting in inaccurate answers to some query questions. Moreover, since the fixed processing flow cannot adapt to different types of questions, some questions cannot be answered quickly, and the efficiency of answering questions is relatively low.
[0070] In order to solve the above problems, the embodiments of the present application provide an information generation method, device, electronic device and computer-readable storage medium, which are intended to more accurately answer various query contents and provide a relatively high efficiency in answering various query contents.
[0071] The information generation method provided in the present application can be used to generate dialogue content in an intelligent dialogue system. For example, it can be applied to an intelligent customer service system to generate reply content corresponding to the content of a user's query, or it can be applied to an intelligent chat system to generate dialogue content that matches the chat content input by the user (the chat content can be understood as the query content). It can also be applied to an intelligent navigation system to generate navigation route content queried by the user, and it can also be applied to an intelligent translation system to generate translation content that the user needs to query, etc. The present application does not limit the specific application scenarios of the above-mentioned information generation method.
[0072] In order to facilitate understanding of the method embodiments of the present application, the application scenarios are introduced. Figure 1 , Figure 1 Schematic diagram of the application scenario of the solution provided in the embodiment of the present application. For the convenience of description, the following describes the embodiment of the present application by taking the e-commerce platform as an example. The application scenario is a schematic illustration and is not intended to be a specific description of the application scenario. Figure 1 As shown, in this application scenario, a server 102, a merchant 103 and a client 101 are provided. In this embodiment, a connection is established between the client 101 and the server 102, and between the merchant 103 and the server 102 via network communication.
[0073] The merchant terminal 103 can be an electronic device with display and data processing functions, such as a mobile phone, a tablet computer (pad), a smart watch, a desktop computer, a smart TV, a VR device, a vehicle-mounted device, a wearable device, a laptop computer, etc. The merchant terminal 103 is used to upload product information to the server 102. The merchant terminal 103 can also be used to receive configuration information input by the merchant, such as receiving permission information input by the merchant, product attribute information input by the merchant, etc. The merchant terminal 103 sends the configuration information input by the merchant to the server 102 so that the server 102 synchronizes relevant information. The merchant terminal 103 can also be used to receive query content input by the merchant and send it to the server 102. After the server 102 generates the reply content corresponding to the query content, it returns the reply content to the merchant terminal 103, and the merchant terminal 103 displays the reply content for the merchant to read.
[0074] A specific communication connection needs to be established between the merchant end 103 and the server end 102 to perform data transmission.
[0075] The client 101 may be a mobile phone, tablet computer (pad), smart watch, desktop computer, smart TV, VR device, vehicle-mounted device, wearable device, laptop computer and other electronic devices with display function and data processing function. The client 101 is used to receive the query content input by the user and send it to the server 102, so that the server 102 generates the corresponding reply content and sends it to the client 101, and the client 101 displays the reply content. The client 101 can also be used to send order information, browse information, add-to-purchase information to the server 102, obtain and display product pages, promotion information, etc. from the server 102, but is not limited thereto.
[0076] A specific communication connection needs to be established between the client 101 and the server 102 to perform data transmission.
[0077] The server 102 has high computing power. The server 102 can be a server, which has high-speed processor (central processing unit, CPU) computing power, long-term reliable operation, powerful input / output (input / output, I / O) external data throughput capacity and better scalability. The server 102 can be a single server or a server cluster. The server 102 is used to obtain product information, promotional information, query content and other content from the merchant 103, and is also used to obtain query content from the client 101, and generate corresponding reply content based on the query content and return it to the merchant 103 or the client 101. The server 102 can also provide other specific services to the client 101 and the merchant 103, such as user information access, website access, application access, etc., which are not specifically limited in this application.
[0078] The client 101 and the server 102, and the merchant 103 and the server 102 can communicate with each other using various communication systems, such as a wired communication system or a wireless communication system. The wireless communication system may be, for example, a global system for mobile communications (GSM) system, a code division multiple access (CDMA) system, a wideband code division multiple access (WCDMA) system, a general packet radio service (GPRS), a long term evolution (LTE) system, a LTE frequency division duplex (FDD) system, a LTE time division duplex (TDD) system, a universal mobile telecommunication system (UMTS), a worldwide interoperability for microwave access (WiMAX) communication system, a future fifth generation (5G) system or a new radio (NR), a satellite communication system, etc.
[0079] Embodiment 1
[0080] The first embodiment of the present application provides an information generation method, which is applied to an electronic device, which may be a server, a laptop computer, a tablet computer, a desktop computer, or other electronic device with a data processing function. Since the server has a strong data processing capability, the information generation method in the present application is introduced below using the electronic device as an example of a server.
[0081] like Figure 2 As shown, the information generating method provided in the first embodiment of the present application includes the following steps S110 to S140.
[0082] Step S110: Obtain query content.
[0083] The query content can be input into the client by text or voice. After the user inputs the query content into the client, the client can send the query content to the server so that the server obtains the query content input by the user from the client. This embodiment takes the user inputting the query content into the client as an example to introduce information generation. In actual applications, the merchant can also input the query content into the merchant terminal and send it to the server terminal for information generation. In the specific implementation process, the client terminal is similar to the merchant terminal.
[0084] The query content may be a textual question or a voice question. To facilitate the subsequent determination of a reply text based on the query content, the query content may be a textual question. When the query content is a voice-based question, the server or client may convert the query content into a textual question and then generate a reply.
[0085] The above query content can be questions in any scenario, for example, it can be content to inquire about product information, content to inquire about promotion activities, content to inquire about points, content to obtain navigation information, content to translate, etc., but not limited to these.
[0086] Taking the query content of consulting product information as an example, the above query content can specifically be at least one of consulting product quality, consulting product price, consulting product promotion, consulting product evaluation, and consulting product details, but is not limited thereto.
[0087] Step S120: Determine the query scenario to which the query content belongs.
[0088] Since the query content input by the user is usually more specific, and many questions correspond to the same type, the reply content generation process for the same type of query content is usually similar. Therefore, the query scenario to which the query content belongs can be determined, so that the reply content can be generated according to the query scenario in the future. In the embodiment of the present application, the same query scenario can correspond to many query contents, and the query intents corresponding to these queries are the same, that is, the query scenarios are the same.
[0089] In the embodiment of the present application, the query content can be identified by intent to obtain the query scenario to which the query content belongs. Specifically, the query scenario to which the query content belongs can be determined by keyword matching method, semantic analysis method, intelligent model analysis method, etc.
[0090] For example, when determining the query scenario to which the query content belongs by keyword matching, keywords can be extracted from the query content, and the query scenario to which it belongs can be determined based on the keywords. For example, if the query content is "how is the quality of A", the keywords include "A" and "quality", and the query scenario determined based on these two keywords can be "quality situation".
[0091] For another example, when the query scenario to which the query content belongs is determined through intelligent model analysis methods, the scene analysis model can be pre-trained to determine the query scenario to which the query content belongs. The specific training process of the scene analysis model can refer to the supervised learning algorithm, semi-supervised learning algorithm, etc. in the relevant technology, which will not be described in detail in this application.
[0092] When the query scenario to which the query content belongs is determined by semantic analysis or the like, the verbs, nouns, adjectives, etc. in the sentence may be analyzed to identify the intent of the query (ie, the query scenario).
[0093] Step S130: determining a target execution link corresponding to the query scenario based on a preset scenario link mapping relationship, wherein the target execution link is provided with various functional modules used for information query for the query scenario and execution logic relationships between the functional modules.
[0094] The above-mentioned scene link mapping relationship includes the execution link corresponding to each query scene. The execution link is provided with various functional modules used in the process of generating reply content for the corresponding query scene and the execution logic relationship between the functional modules. The collaborative execution of each functional module can generate the corresponding reply content. Each functional module is used to realize the preset function.
[0095] In an embodiment of the present application, the scene link mapping relationship may include execution link identifiers corresponding to each query scene, and each execution link identifier is provided with a corresponding execution link. In this case, the electronic device may determine the execution link identifier corresponding to the query scene based on the scene link mapping relationship, and determine the execution link corresponding to the execution link identifier as the target execution link.
[0096] In the embodiment of the present application, one query scenario may be set with one corresponding execution link, or query scenarios of the same type may correspond to the same execution link. For example, when one query scenario is set with one corresponding execution link, the scenario of product quality corresponds to the quality query execution link, and the scenario of product price corresponds to the price query execution link; when query scenarios of the same type correspond to the same execution link, the scenario of product quality corresponds to the product consultation execution link, and the scenario of product price also corresponds to the product consultation execution link.
[0097] It is understandable that for the same type of query scenarios, the functional modules used in the process of generating query content and the execution logic between the functional modules are usually similar. For example, the process of generating query content for scenarios such as inquiring about product prices and inquiring about product quality is similar, and the relevant information of the product is usually extracted from the product details. Therefore, the same type of query scenarios can be mapped to the same execution link to reduce the number of execution link settings, thereby reducing the workload of setting up execution links, reducing resource consumption in the information generation process, and making the response content generation process more efficient.
[0098] In a specific embodiment, when the query scenarios of the same type correspond to the same execution link, the scenario link mapping relationship may include at least one of the following execution links: an execution link for querying product information, an execution link for querying promotional activity information, an execution link for querying logistics information, an execution link for querying membership or points information, an execution link for querying payment information, and an execution link for querying merchant information. Each execution link can realize the generation of reply content under different scenario types, and the generation process is efficient and accurate.
[0099] Each functional module corresponding to the execution link may include at least one of the following: retrieval preprocessing module, retrieval module, retrieval post-processing module, prompt rendering module, generation module, generation post-processing module, answer rewriting module, but not limited thereto. The functional modules corresponding to different execution links may be different. Specifically, the number of functional modules corresponding to different execution links may be different, the types of functional modules may be different, the corresponding same functional modules may have different execution logics, the parameters in the same functional modules may be different, and the like. Those skilled in the art may set the specific contents of the functional modules of each execution link according to the actual situation, and this application does not specifically limit this.
[0100] In order to more conveniently and accurately obtain the generated reply content, corresponding sub-function modules can be set under each function module. For example, the search pre-processing module may include an input information rewriting sub-module and an input information expansion sub-module; the search module may include a knowledge base search sub-module, a commodity attribute search sub-module, and an image information search sub-module; the search post-processing module may include a knowledge base sorting and filtering sub-module and an image information sorting and filtering sub-module; the prompt rendering module may include a prompt splicing sub-module and a prompt fusion processing sub-module; the generation module may include a large model generation sub-module; the generation post-processing module may include a risk control sub-module and an answer rewriting sub-module, etc. The specific function module setting method can be based on the actual situation, and this application does not specifically limit it. The above-mentioned sub-modules are also the function modules corresponding to the execution link.
[0101] The execution logic relationship between each functional module includes the execution order and dependency relationship of each functional module, for example, which functional module is executed first, to which functional module the output data of each functional module is input, from which module the input data of each functional module is obtained, etc.
[0102] The retrieval preprocessing module is used to rewrite or expand the query content to obtain processed query content so that more accurate reply content can be obtained later.
[0103] The retrieval module is used to search for retrieval information related to the processed query content from a preset knowledge base, for example, to search for merchant information related to the query content from a merchant knowledge base, and to search for product information related to the query content from a product knowledge base.
[0104] The above-mentioned post-retrieval processing module is used to process the retrieval information. For example, the retrieval information can be sorted, filtered, etc. to obtain processed retrieval information.
[0105] The prompt rendering module is used to perform splicing, fusion and other processing on the processed query content, the query content and the processed retrieval information to obtain prompts that are easier to be understood by the large model.
[0106] The generation module is used to generate corresponding initial reply content according to the prompt.
[0107] The post-generation module is used to perform risk control elimination, answer rewriting and other processing on the above initial reply content, so as to delete sensitive information in the initial reply content and rewrite it into more fluent and reasonable content to obtain the reply content.
[0108] The specific implementation operators and implementation algorithms of the above modules are not the focus of this application. Those skilled in the art can refer to the relevant technologies for flexible configuration, and this application will not elaborate on them.
[0109] Step S140: Generate reply content corresponding to the query content through each functional module corresponding to the target execution link and based on the execution logic relationship between each functional module.
[0110] After determining the target execution link for generating the reply content corresponding to the query content, the reply content corresponding to the query content can be generated through the various functional modules of the target execution link and the execution logic relationship between the functional modules. Since each functional module has specified the specific data processing logic for realizing the preset function, the corresponding reply content can be obtained by performing data processing through each functional module.
[0111] In one embodiment, the information generation method provided in the present application can be an information generation method based on retrieval-augmented generation (RAG), wherein RAG is a large language model architecture that combines retrieval and generation, and improves the performance and accuracy of the large model on specific tasks by retrieving relevant information from external knowledge sources. In this case, each functional module corresponding to the execution link in the scene link mapping relationship is used to generate the reply content corresponding to the query content by means of RAG, that is, each functional module of the above-mentioned target execution link is used to generate the reply content corresponding to the query content by means of retrieval-augmented generation RAG. In this case, as described above, the functional modules of the target execution link may include a retrieval module, a post-retrieval processing module, and a generation module that are set in sequence. When the above-mentioned information generation method is an information generation method based on RAG, the above-mentioned step S140 can be implemented according to the following steps: searching for retrieval information related to the query content from a pre-set knowledge base through the retrieval module of the target execution link; processing the retrieval information through the post-retrieval processing module to obtain the processed retrieval information; generating the reply content corresponding to the query content through the generation module based on the pre-trained large model (LLM) and referring to the processed retrieval information. The target execution link may also include the above-mentioned retrieval preprocessing module, the above-mentioned prompt rendering module and the above-mentioned post-generation module, etc. The specific content of each module can be referred to as described above and will not be repeated here.
[0112] This implementation method generates reply content corresponding to the query content through RAG, which can handle complex tasks and has stronger knowledge acquisition and information processing capabilities, thereby generating more accurate, relevant and rich reply content.
[0113] In one implementation, before step S140, the information generating method may further include the following step S140a.
[0114] Step S140a: Acquire permission information corresponding to the target execution link, where the permission information includes data resources available to each functional module corresponding to the target execution link during operation.
[0115] The above permission information may be preset by the designer, and the data resources available to each functional module during operation may include databases that each function can access, commodities that can be processed, etc., but is not limited thereto.
[0116] When the target execution link is an execution link corresponding to a query scenario of a commodity consultation type, the above-mentioned permission information may include permission information set by the merchant, and the permission information includes the data source that the target execution link can access during operation and / or the commodities that are allowed to use the target execution link. Specifically, the merchant can set permission information for a certain execution link on the merchant side, and the permission information may include, for example, the commodities that can use the execution link, whether the execution link can access the picture information, knowledge base, commodity attributes, page details and other information set by the merchant. By allowing merchants to set permission information, the business secrets of merchants can be better protected. Since some information set by merchants is very important and cannot be disclosed to the public, by allowing merchants to set permission information and shielding this information when generating information, the business secrets of merchants can be better protected and the security of merchants' commodities can be improved.
[0117] like Figure 4 As shown, the permission information set by the merchant is: which products can use the skill (ie, the execution link), and which data sources are turned on or off for the skill.
[0118] Correspondingly, the above step S140 can be implemented according to the following step S141.
[0119] Step S141: Generate reply content corresponding to the query content through each functional module corresponding to the target execution link and the execution logic relationship between the functional modules, and based on the available data resources in the permission information.
[0120] Specifically, in step S141 , during the operation of each functional module corresponding to the target execution link, available data resources in the access right information may be accessed to obtain reply content corresponding to the query content according to the accessed data resources.
[0121] This implementation method sets permission information. Since the permission information includes data resources available to each functional module corresponding to the target execution link during operation, it can avoid leakage of some private information and improve information security.
[0122] In one implementation, step S140 may generate reply content corresponding to the query content according to the following steps S141 to S142.
[0123] Step S141: Acquire each target operator from a preset operator warehouse, where the target operator is an operator corresponding to a functional module of the target execution link.
[0124] In an embodiment of the present application, operators for implementing various functional modules may be set. Each functional module may be implemented by one operator or by multiple operators. For example, multiple operators may work together to implement the functions required to be implemented. Alternatively, each of the multiple operators may be able to implement the functions required to be implemented by the functional module. In this case, the operators corresponding to the same functional module are interchangeable operators that can implement the same functions. By setting multiple interchangeable operators for the same functional module, the flexibility of the operation can be improved.
[0125] Among them, each interchangeable operator corresponding to the same function may have the same interface protocol, so that different operators can be called interchangeably.
[0126] Each operator in the operator warehouse is provided with its corresponding functional module. When calling an operator from the operator warehouse, the operator corresponding to the functional module of the target execution link can be easily found.
[0127] The above-mentioned operators may be intelligent models, processing algorithms, etc., or other operators capable of realizing data processing functions, which are not specifically limited in this application.
[0128] Step S142: Generate reply content corresponding to the query content through each of the target operators corresponding to the target execution link and based on the execution logic relationship between the functional modules.
[0129] By setting up an operator warehouse, this embodiment can inject operators with different functions through dependency injection, so that the system can automatically load and configure each operator Operator and realize automatic injection of operators, which can easily expand new functional modules without making extensive modifications to the existing system.
[0130] When a functional module corresponds to multiple interchangeable operators, step S142 can be implemented according to the following steps S142a to S142b.
[0131] Step S142a: For multiple target operators corresponding to the functional modules of the target execution link, select a selected operator for information query.
[0132] Specifically, any operator corresponding to the functional module can be selected as the selected operator, or the execution effect of each interchangeable target operator can be tested through experiments, and the operator with good effect can be selected as the selected operator. For example, the execution effect of each interchangeable target operator can be tested through AB experiments.
[0133] Step S142b: Generate reply content corresponding to the query content through each of the selected operators corresponding to the target execution link and based on the execution logic relationship between the functional modules.
[0134] This implementation pre-sets various operators in the operator warehouse, and can flexibly call required operators to generate information, thereby improving the flexibility of the generation process.
[0135] Optionally, in the process of generating reply content in step S142b, operators corresponding to functional modules that have no mutual dependencies can be executed concurrently to improve information generation efficiency, wherein functional modules that have no mutual dependencies refer to two functional modules that perform data processing independently, and the operation of one functional module does not depend on the processing results of another functional module.
[0136] In one implementation, step S140 may generate reply content corresponding to the query content according to the following steps S143 to S146.
[0137] Step S143: obtaining an adjusted execution link corresponding to the target execution link, wherein the adjusted execution link is an execution link obtained by adjusting the target execution link.
[0138] Specifically, step S143 may obtain the adjustment execution link in a manner listed in at least one of the following steps S143a to S143b.
[0139] Step S143a: Adjust at least one of the algorithms, operators, parameters, and calculation processes corresponding to the functional modules in the target execution link.
[0140] For example, the designer can pre-set multiple operators corresponding to the functional module, and these multiple operators can all realize the functions realized by the functional module, among which the first operator is the default initial selection operator, and the electronic device can replace the first operator with the second operator to obtain an adjusted execution link.
[0141] Step S143b: Adjust the intelligent model used by the functional modules in the target execution link.
[0142] Designers often continuously train and optimize various intelligent models during actual applications to improve the accuracy of the generated response content. In this case, the optimized intelligent model can be used to replace the original intelligent model of the functional module to adjust the execution link, so that a better intelligent model can be selected for information generation in the future, thereby improving the accuracy of the generated content.
[0143] Step S144: testing the execution effects of the target execution link and the adjustment execution link through a test experiment to obtain a test result.
[0144] The above-mentioned test experiment can be an AB test experiment. AB test experiment, namely A / B test (A / B Experimenting), is a commonly used experimental method used to compare the performance of two or more versions (usually two versions, namely A and B) to determine which version is more effective. Through A / B testing, it is possible to scientifically evaluate and select better solutions, thereby improving the accuracy and matching degree of the final response content generation, and also improving the generation efficiency.
[0145] In the embodiments of the present application, the experimental method of the test experiment can be set according to the specific test content. The specific process of the test experiment is not the focus of the present application. Those skilled in the art can set the experimental method by adopting the relevant setting method of the AB test experiment in the relevant technology.
[0146] In one embodiment, designers can pre-set test experiments corresponding to different types of execution links. For example, they can set test experiments corresponding to the execution link of product consultation, test experiments corresponding to the execution link of payment consultation, test experiments corresponding to the execution link of merchant inquiry, etc. The pre-set test experiments correspond to various contents about the test, such as corresponding test methods, test contents, test items, etc. In this way, the electronic device can obtain the test experiment corresponding to the target execution link from the pre-set test experiments as a test experiment for testing the execution effects of the target execution link and the adjustment execution link, so that the test experiment for testing the execution effects of the target execution link and the adjustment execution link can be obtained efficiently and quickly.
[0147] Step S145: Selecting a link with a good test result from the target execution link and the adjusted execution link as a selected execution link according to the test result.
[0148] The above test results usually include the test effects corresponding to the target execution link and the adjusted execution link, and the execution link with better test effect can be selected.
[0149] Step S146: Generate reply content corresponding to the query content through each functional module corresponding to the selected execution link and based on the execution logic relationship between each functional module of the selected execution link.
[0150] This implementation manner tests the adjustment execution link and the target execution link through a test experiment, and selects a link with good effect to generate reply content, which can improve the accuracy of the generated reply content.
[0151] In one implementation, step S140 may generate reply content corresponding to the query content according to the following steps S147 to S148.
[0152] Step S147: Generate an execution flow chart corresponding to the target execution link.
[0153] The execution flowchart includes each processing node and the flow between each processing node in the process of generating the reply content corresponding to the query content. The processing node is the functional module of the target execution link, and the flow between each processing node is the execution logic relationship between different functional modules. The execution flowchart can be understood as a simplified version of the execution process flowchart. The above-mentioned execution flowchart can be a directed acyclic graph (DAG) or a flowchart in other forms.
[0154] For example, Figure 3 The following is a DAG diagram determined by the target execution link. Figure 3 It can be seen that each node of the DAG graph corresponding to the target execution link represents each functional module of the target execution link. For example, after starting the process of generating the reply content, the data will be processed in turn through the five modules of preprocessing module, retrieval module, post-retrieval processing module, prompt rendering module, generation module, and post-generation module to obtain the reply content. Among them, the DAG graph can also include sub-modules included in different modules. For example, the preprocessing module includes a query (input information) rewriting sub-module and a query expansion sub-module. Since the query rewriting sub-module and the query expansion sub-module have no dependency relationship, they can be executed concurrently. The retrieval module includes a knowledge base retrieval sub-module, an image information retrieval sub-module, etc. The sub-modules included in other functional modules refer to Figure 3 , which will not be described in detail here. The DAG graph can also include operators corresponding to each submodule, for example, Figure 3 As shown, the image information sorting and filtering submodule corresponds to two interchangeable operators, the rank model and the embedding model, for implementing image information sorting and filtering.
[0155] Step S148: Based on the execution flowchart and each functional module corresponding to the target execution link, generate reply content corresponding to the query content.
[0156] This embodiment can simply and clearly represent the execution logic relationship of each functional module in the target execution link through the execution flowchart, so that when the reply content is subsequently generated, the process corresponding to the target execution link can be more accurately executed according to the execution flowchart to accurately generate the reply content.
[0157] In a specific embodiment, step S148 can be implemented according to the following steps: determine the link configuration information corresponding to the target execution link, the link configuration information including the functional modules included in the target execution link and the implementation operators corresponding to the functional modules; generate reply content corresponding to the query content according to the link configuration information and the link configuration information.
[0158] The link configuration information may be, for example, Figure 5 The configuration information shown is from Figure 5 It can be seen that the configuration information corresponding to the target execution link includes the various functional modules of the target execution link and the implementation operators of each functional module. For example, the implementation operator corresponding to the generation module is the "M1" model. The configuration information corresponding to the target execution link can also include the execution order of each functional module.
[0159] This embodiment can accurately represent the target execution link through the execution flowchart and the configuration information corresponding to the target execution link, so that according to the link configuration information corresponding to the target execution link and the above-mentioned execution flowchart, the execution process specified by the target execution link can be accurately executed to generate accurate reply content.
[0160] In a specific embodiment, step S140 can be implemented according to the following steps: filtering the functional modules in the target execution link to eliminate invalid modules, obtaining a filtered execution link, and generating reply content corresponding to the query content through each functional module corresponding to the filtered execution link and based on the execution logic relationship between each functional module.
[0161] like Figure 5 Shown is the target execution chain before filtering. Figure 6 The corresponding post-screening execution link is shown, in which the product attribute sorting and filtering module and the product attribute retrieval module in the target execution link are removed in the post-screening execution link because these two modules are useless for product quality query. In this way, the processing flow can be more concise and efficient.
[0162] In a specific embodiment, the above step S140 may be executed by an execution engine, specifically, by a RAG engine, such as Figure 7 The following is a detailed description of the process of generating reply content through the RAG execution engine. Please refer to Figure 7 , step S140 can be implemented according to the following steps 1 to 3.
[0163] Step 1: The path rendering module obtains the execution flow chart and execution context information.
[0164] The execution context information includes the link configuration information and query content corresponding to the above target execution link. The execution context information may also include other information that the response content depends on, such as user information, query scenario, test experiment adopted, objects hit by the test experiment, links with good results in the test experiment, permission information, etc., but is not limited to this. For example, the content of context information can be found in Figure 8 shown.
[0165] Among them, various contents included in the execution flowchart and the execution context information have been described in detail above and will not be described in detail here.
[0166] Step 2: The path rendering module searches and obtains the operators corresponding to each functional module in the target execution link from the operator warehouse according to the execution flowchart and execution context information, assembles the actual execution process, and executes the actual execution process through the obtained operators to generate the response content corresponding to the query content.
[0167] Among them, each operator in the operator warehouse can be obtained through the following process: scan the services that can be registered as operators, such as query rewriting service, query expansion service, etc., through object management container instantiation, and package the scanned services as operators, and then register them in the operator warehouse.
[0168] Among them, the object management container can be a spring container. The spring container is one of the core components of the Spring framework and is used to manage objects (Beans) and their dependencies in the application. The Spring container implements automatic assembly and life cycle management of objects through mechanisms such as Dependency Injection (DI) and Aspect-Oriented Programming (AOP).
[0169] Step 3: The concurrent executor runs each functional module in a concurrent execution mode to obtain the response content.
[0170] Running each functional module in a concurrent execution manner means that operators corresponding to each functional module that has no interdependence are executed concurrently to improve operation efficiency.
[0171] The examples of steps 1 to 3 roughly describe the execution process of the RAG execution engine. The detailed process has been described in detail in the above embodiments and will not be repeated here.
[0172] Through the flexible configuration capabilities of the spring container and the modular process configuration method, real-time orchestration of RAG processes based on RAG context is achieved.
[0173] The information generation method provided in the embodiment of the present application pre-sets a scene link mapping relationship, and the scene link mapping relationship includes execution links corresponding to each query scenario respectively. The execution link corresponding to the query scenario, that is, the execution link matches the query scenario, and the process of generating reply content through the logic of the execution link is more suitable for the corresponding query scenario. After obtaining the query content, the present application determines the query scenario to which the query content belongs, and determines the target execution link corresponding to the query scenario to which the query content belongs based on the pre-set above-mentioned scene link mapping relationship, that is, determines the target execution link that matches the query scenario of the query content, and the execution logic of the target execution link is more suitable for generating reply content corresponding to the query content. Since the target execution link is provided with each functional module used in the process of generating reply content for the query scenario and the execution logic relationship between each functional module, that is, the target execution link is provided with a complete implementation process for generating reply content corresponding to the query content, therefore, through each functional module corresponding to the target execution link and based on the execution logic relationship between each functional module, the reply content corresponding to the query content can be generated.
[0174] It can be seen that the solution provided by the present application can determine an execution link that is more suitable for the query content by setting a scene link mapping relationship. Therefore, for a variety of query contents, it is possible to find an execution link that matches the user's query content from the scene link mapping relationship to generate reply content, thereby being able to more accurately answer each of the various query contents. Moreover, since the execution link is more suitable, the efficiency of answering each query content is also higher.
[0175] In addition, the present application realizes the RAG process through a modular RAG process setting, that is, through multiple functional modules to efficiently generate response content corresponding to various query contents. Through the Flow-Module-Operator three-level architecture, where Flow is the above-mentioned execution link, when determining the response content corresponding to the query content, the target execution link can be composed of various configurable functional modules, Module is the above-mentioned functional module, and Flow includes multiple Modules. For example, Flow can be the above-mentioned generation module, retrieval module, etc. Operator performs specific operations and calculation tasks. Operator is the above-mentioned operator. A Module can include one Operator or multiple Operators. Through this three-level architecture setting, flexible configuration of modules can be achieved to cope with complex scenario requirements.
[0176] Embodiment 2
[0177] The second embodiment of the present application also provides an information generation device corresponding to the information generation method embodiment provided in the first embodiment, and the device is applied to an electronic device, which can be an electronic device with data processing function such as a server, a laptop, a tablet computer, a desktop computer, etc. Since the server has a strong data processing capability, the information generation method in the present application is introduced below by taking the electronic device as an example of a server. The information generation device provided in this embodiment includes:
[0178] An acquisition unit, used for acquiring query content;
[0179] A scene determination unit, used to determine the query scene to which the query content belongs;
[0180] A link determination unit, configured to determine a target execution link corresponding to the query scenario based on a preset scenario-link mapping relationship, wherein the target execution link is provided with various functional modules used for information query for the query scenario and execution logic relationships between the functional modules;
[0181] The query unit is used to generate reply content corresponding to the query content through each functional module corresponding to the target execution link and based on the execution logic relationship between each functional module.
[0182] Optionally, the scenario link mapping relationship includes execution links corresponding to various query scenarios, wherein query scenarios of the same type correspond to the same execution link.
[0183] Optionally, the acquisition unit is further used to: acquire permission information corresponding to the target execution link, the permission information including data resources available to each functional module corresponding to the target execution link during operation;
[0184] The query unit is specifically used to generate reply content corresponding to the query content through each functional module corresponding to the target execution link and the execution logic relationship between each functional module, and based on the available data resources in the permission information.
[0185] Optionally, when the target execution link is an execution link corresponding to a query scenario of a product consultation type, the permission information includes permission information set by a merchant, and the permission information includes the data sources that the target execution link can access during operation and / or the products that are allowed to use the target execution link.
[0186] Optionally, the query unit is specifically used to: obtain each target operator from a pre-set operator warehouse, the target operator being the operator corresponding to the functional module of the target execution link; and generate reply content corresponding to the query content through each target operator corresponding to the target execution link and based on the execution logic relationship between each functional module.
[0187] Optionally, one functional module corresponds to multiple operators, and each operator corresponding to the same functional module is an interchangeable operator capable of realizing the same function;
[0188] The query unit is specifically used to: select a selected operator for information query for multiple target operators corresponding to the functional modules of the target execution link; generate reply content corresponding to the query content through each of the selected operators corresponding to the target execution link and based on the execution logic relationship between each of the functional modules.
[0189] Optionally, the query unit is specifically used to: obtain an adjusted execution link corresponding to the target execution link, the adjusted execution link being an execution link adjusted on the basis of the target execution link; testing the execution effects of the target execution link and the adjusted execution link through a test experiment to obtain a test result; selecting a link with a good test effect from the target execution link and the adjusted execution link according to the test result as a selected execution link; and generating reply content corresponding to the query content through each functional module corresponding to the selected execution link and based on the execution logic relationship between the functional modules of the selected execution link.
[0190] Optionally, the acquiring the adjustment execution link corresponding to the target execution link includes at least one of the following:
[0191] Adjust at least one of the algorithms, operators, parameters, and calculation processes corresponding to the functional modules in the target execution link;
[0192] The intelligent model used by the functional modules in the target execution link is adjusted.
[0193] Optionally, the acquisition unit is further used to: acquire the test experiment corresponding to the target execution link from various pre-set test experiments as a test experiment for testing the execution effects of the target execution link and the adjustment execution link.
[0194] Optionally, each functional module of the target execution link is used to generate reply content corresponding to the query content by means of retrieval enhancement to generate RAG.
[0195] Optionally, each functional module of the target execution link includes a retrieval module, a post-retrieval processing module, and a generation module which are arranged in sequence;
[0196] The query unit is specifically used to: search for retrieval information related to the query content from a pre-set knowledge base through the retrieval module; process the retrieval information through the post-retrieval processing module to obtain processed retrieval information; and generate reply content corresponding to the query content based on a pre-trained large model and with reference to the processed retrieval information through the generation module.
[0197] Optionally, the scene link mapping relationship includes at least one of the following execution links: an execution link for querying product information, an execution link for querying promotional activity information, an execution link for querying logistics information, an execution link for querying membership or points information, an execution link for querying payment information, and an execution link for querying merchant information.
[0198] Optionally, the query unit is specifically used to: generate an execution flowchart corresponding to the target execution link, the execution flowchart including each processing node in the process of generating reply content corresponding to the query content and the flow between each processing node, the processing node is a functional module of the target execution link, and the flow between each processing node is the execution logic relationship between each functional module; based on the execution flowchart and each functional module corresponding to the target execution link, generate the reply content corresponding to the query content.
[0199] Optionally, the query unit is specifically used to: determine link configuration information corresponding to the target execution link, the link configuration information including each functional module included in the target execution link and an implementation operator corresponding to each functional module; generate reply content corresponding to the query content according to the link configuration information and the link configuration information.
[0200] The third embodiment of the present application also provides an electronic device embodiment corresponding to the information generation method provided in the first embodiment; the following description of the electronic device embodiment is only illustrative. The electronic device embodiment is as follows:
[0201] Please refer to Fig. 9 Understand the above electronic devices, Fig. 9 The electronic device provided in this embodiment includes: a processor 1001, a memory 1002, a communication bus 1003, and a communication interface 1004;
[0202] The memory 1002 is used to store computer instructions for data processing. When the computer instructions are read and executed by the processor 1001, the following steps are performed:
[0203] Get the query content;
[0204] Determining the query scenario to which the query content belongs;
[0205] Determine the target execution link corresponding to the query scenario based on the preset scenario link mapping relationship, wherein the target execution link is provided with various functional modules used in the process of generating reply content for the query scenario and the execution logic relationship between the functional modules;
[0206] The reply content corresponding to the query content is generated through each functional module corresponding to the target execution link and based on the execution logic relationship between each functional module.
[0207] The fourth embodiment of the present application also provides a computer-readable storage medium for implementing the method described in the first embodiment. The computer-readable storage medium embodiment provided in the present application is described relatively simply. For the relevant parts, please refer to the corresponding description of the above method embodiment. The embodiment described below is only illustrative.
[0208] The computer-readable storage medium provided in this embodiment stores computer instructions, and the computer-readable storage medium can be applied to electronic devices; when the instructions are executed by a processor, the following steps are implemented:
[0209] Get the query content;
[0210] Determining the query scenario to which the query content belongs;
[0211] Determine the target execution link corresponding to the query scenario based on the preset scenario link mapping relationship, wherein the target execution link is provided with various functional modules used in the process of generating reply content for the query scenario and the execution logic relationship between the functional modules;
[0212] The reply content corresponding to the query content is generated through each functional module corresponding to the target execution link and based on the execution logic relationship between each functional module.
[0213] The fifth embodiment of the present application also provides a computer program product for implementing the method described in the first embodiment. The computer program product embodiment provided in this application is described relatively simply, and the relevant parts can refer to the corresponding description of the above method embodiment. The embodiment described below is only illustrative.
[0214] The computer program product provided in this embodiment includes a computer program, which, when executed by a processor, implements the following steps based on the estimation model:
[0215] Get the query content;
[0216] Determining the query scenario to which the query content belongs;
[0217] Determine the target execution link corresponding to the query scenario based on the preset scenario link mapping relationship, wherein the target execution link is provided with various functional modules used in the process of generating reply content for the query scenario and the execution logic relationship between the functional modules;
[0218] The reply content corresponding to the query content is generated through each functional module corresponding to the target execution link and based on the execution logic relationship between each functional module.
[0219] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0220] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0221] 1. Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include non-transitory media such as modulated data signals and carrier waves.
[0222] 2. Those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems or computer program products. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0223] Although the present application is disclosed as above in the form of a preferred embodiment, it is not intended to limit the present application. Any technical personnel in this field may make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.
Claims
1. A method for generating information, characterized in that: The method comprises: Get the query content; Determining the query scenario to which the query content belongs; Determine the target execution link corresponding to the query scenario based on the preset scenario link mapping relationship, wherein the target execution link is provided with various functional modules used in the process of generating reply content for the query scenario and the execution logic relationship between the functional modules; The reply content corresponding to the query content is generated through each functional module corresponding to the target execution link and based on the execution logic relationship between each functional module.
2. The information generation method according to claim 1, characterized in that: The scene link mapping relationship includes execution links corresponding to each query scene, wherein query scenes of the same type correspond to the same execution link.
3. The information generation method according to claim 1, characterized in that: Before generating the reply content corresponding to the query content through each functional module corresponding to the target execution link and based on the execution logic relationship between each functional module, the method further includes: Acquire permission information corresponding to the target execution link, wherein the permission information includes data resources available to each functional module corresponding to the target execution link during operation; The generating of the reply content corresponding to the query content by executing each functional module corresponding to the target link and based on the execution logic relationship between the functional modules includes: The reply content corresponding to the query content is generated through the functional modules corresponding to the target execution link and the execution logic relationship between the functional modules, and based on the available data resources in the permission information.
4. The information generation method according to claim 3, characterized in that: When the target execution link is an execution link corresponding to a query scenario of a product consultation type, the permission information includes permission information set by a merchant, and the permission information includes the data sources that the target execution link can access during operation and / or the products that are allowed to use the target execution link.
5. The information generation method according to claim 1, characterized in that: The generating of the reply content corresponding to the query content by executing each functional module corresponding to the target link and based on the execution logic relationship between the functional modules includes: Acquire each target operator from a preset operator warehouse, where the target operator is an operator corresponding to a functional module of the target execution link; The reply content corresponding to the query content is generated through each of the target operators corresponding to the target execution link and based on the execution logic relationship between the functional modules.
6. The information generating method according to claim 5, characterized in that: One of the functional modules corresponds to a plurality of operators, and the operators corresponding to the same functional module are interchangeable operators capable of realizing the same function; The generating of reply content corresponding to the query content through each of the target operators corresponding to the target execution link and based on the execution logic relationship between the functional modules includes: For multiple target operators corresponding to the functional modules of the target execution link, selecting a selected operator for information query; The reply content corresponding to the query content is generated through each of the selected operators corresponding to the target execution link and based on the execution logic relationship between the functional modules.
7. The information generating method according to claim 1, characterized in that: The generating of the reply content corresponding to the query content by executing each functional module corresponding to the target link and based on the execution logic relationship between the functional modules includes: Acquire an adjusted execution link corresponding to the target execution link, where the adjusted execution link is an execution link obtained by adjusting the target execution link; Testing the execution effects of the target execution link and the adjustment execution link through a test experiment to obtain a test result; Selecting a link with a good test result from the target execution link and the adjustment execution link as a selected execution link according to the test result; The reply content corresponding to the query content is generated through each functional module corresponding to the selected execution link and based on the execution logic relationship between each functional module of the selected execution link.
8. The information generating method according to claim 7, characterized in that: The obtaining of the adjustment execution link corresponding to the target execution link includes at least one of the following: Adjust at least one of the algorithms, operators, parameters, and calculation processes corresponding to the functional modules in the target execution link; The intelligent model used by the functional modules in the target execution link is adjusted.
9. The information generating method according to claim 7, characterized in that: Before testing the execution effects of the target execution link and the adjustment execution link through the test experiment, the method further includes: A test experiment corresponding to the target execution link is obtained from various pre-set test experiments as a test experiment for testing the execution effects of the target execution link and the adjustment execution link.
10. The information generating method according to claim 1, characterized in that: Each functional module of the target execution link is used to generate the reply content corresponding to the query content by means of retrieval enhancement generation RAG.
11. The information generating method according to claim 10, characterized in that: Each functional module of the target execution link includes a retrieval module, a post-retrieval processing module, and a generation module which are arranged in sequence; The generating of the reply content corresponding to the query content by executing each functional module corresponding to the target link and based on the execution logic relationship between the functional modules includes: Searching for retrieval information related to the query content from a preset knowledge base through the retrieval module; Processing the search information by the post-search processing module to obtain processed search information; The generation module generates reply content corresponding to the query content based on the pre-trained large model and with reference to the processed retrieval information.
12. The information generating method according to claim 1, characterized in that: The scene link mapping relationship includes at least one of the following execution links: an execution link for querying product information, an execution link for querying promotional activity information, an execution link for querying logistics information, an execution link for querying membership or points information, an execution link for querying payment information, and an execution link for querying merchant information.
13. The information generating method according to claim 1, characterized in that: The generating of the reply content corresponding to the query content by executing each functional module corresponding to the target link and based on the execution logic relationship between the functional modules includes: Generate an execution flow chart corresponding to the target execution link, wherein the execution flow chart includes each processing node in the process of generating the reply content corresponding to the query content and the flow between each processing node, the processing node is a functional module of the target execution link, and the flow between each processing node is the execution logic relationship between each functional module; Based on the execution flow chart and each functional module corresponding to the target execution link, a reply content corresponding to the query content is generated.
14. The information generating method according to claim 13, characterized in that: The generating of reply content corresponding to the query content based on the execution flow chart and each functional module corresponding to the target execution link includes: Determine link configuration information corresponding to the target execution link, where the link configuration information includes each functional module included in the target execution link and an implementation operator corresponding to each functional module; Generate reply content corresponding to the query content according to the link configuration information and the link configuration information.
15. An information generating device, characterized in that: The device comprises: An acquisition unit, used for acquiring query content; A scene determination unit, used to determine the query scene to which the query content belongs; A link determination unit, configured to determine a target execution link corresponding to the query scenario based on a preset scenario-link mapping relationship, wherein the target execution link is provided with various functional modules used for information query for the query scenario and execution logic relationships between the functional modules; The query unit is used to generate reply content corresponding to the query content through each functional module corresponding to the target execution link and based on the execution logic relationship between each functional module.
16. An electronic device, characterized in that: include: A processor, a memory, and computer program instructions stored on the memory and executable on the processor; When the processor executes the computer program instructions, the method according to any one of claims 1 to 14 is implemented.
17. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method described in any one of claims 1 to 14 when executed by a processor.
Citation Information
Cited By
Conversation interaction method and device, electronic equipment and medium
CN121166859A