Information processing method and device, electronic equipment, storage medium and program product

By obtaining the initial information input by the user, determining the target database, and determining the accurate query information based on the text processing model, the accuracy problem of existing systems when processing fuzzy or complex queries is solved, and higher query results relevance and accuracy are achieved. sex.

CN119396957APending Publication Date: 2025-02-07CHINA UNIONPAY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411652758.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

The existing search enhancement generation system is difficult to find the answer accurately when handling user query intentions that are unclear or complicated, resulting in inaccurate results.

Method used

By obtaining the initial information input by the user, determining its corresponding target database, and determining the precise query information based on the text processing model, thereby improving the accuracy of the query results.

Benefits of technology

This method can more accurately understand the user's query intent, reduce the uncertainty caused by fuzzy queries, improve the relevance and accuracy of query results, and ensure that the query is carried out in the most relevant data source.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119396957A_ABST
    Figure CN119396957A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an information processing method and device, electronic equipment, a storage medium and a program product. The method comprises the following steps: acquiring initial information input by a user; when the initial information is a data query task, determining at least one target database corresponding to the initial information; the at least one target database is screened from a plurality of databases; determining at least one piece of accurate query information corresponding to the initial information based on a first text processing model according to the initial information and the information of the at least one target database; according to the at least one piece of accurate query information, the query result corresponding to the initial information is determined, the query intention of the user can be more accurately understood, the uncertainty caused by fuzzy query is reduced, the correlation and accuracy of the query result are improved, at least one target database is screened out from the multiple databases, and the user experience is improved. The query is ensured to be performed in the most relevant data source, and the screening process can reduce unnecessary data processing and improve efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of retrieval enhancement, and in particular to an information processing method, device, electronic device, storage medium and program product. Background Art

[0002] Retrieval-Augmented Generation (RAG) is a technique that uses retrieval tools to access external databases to enhance the quality of large language models (LLMs). It optimizes contextual information so that LLMs can be based on a broader and more accurate knowledge base when generating text.

[0003] However, existing retrievers rely on semantic matching between user queries and candidate texts in the database to determine what to return. This requires that user queries must contain clear query intent, otherwise it is difficult for the retriever to establish an effective semantic connection between the query and the target text. Therefore, current RAG systems are mainly used for question-answering tasks with clear and specific query intent. However, in actual scenarios, users' query requirements are often more complex and obscure, and retrievers based on "semantic matching" find it difficult to accurately find the text fragments needed to answer questions. Summary of the invention

[0004] Embodiments of the present application provide an information processing method, device, electronic device, storage medium, and program product to improve the accuracy of query results.

[0005] In a first aspect, an embodiment of the present application provides an information processing method, including:

[0006] Get the initial information entered by the user;

[0007] Determine at least one target database corresponding to the initial information; the at least one target database is selected from multiple databases;

[0008] When the initial information is a data query task, determining at least one precise query information corresponding to the initial information based on the first text processing model according to the initial information and information of the at least one target database;

[0009] Determine a query result corresponding to the initial information according to the at least one precise query information.

[0010] In a possible implementation, determining, according to the at least one precise query information, a query result corresponding to the initial information includes:

[0011] Searching the at least one target database according to the at least one precise query information to obtain query results corresponding to each precise query information;

[0012] According to the query results corresponding to the initial information and each precise query information, a target query result corresponding to the initial information is determined.

[0013] In a possible implementation, determining at least one precise query information corresponding to the initial information based on the first text processing model according to the initial information and the information of the at least one target database includes:

[0014] Determine, based on the first text processing model, at least one precise query information and a preliminary query result corresponding to the initial information according to the initial information and the information of the at least one target database;

[0015] Accordingly, determining the query result corresponding to the initial information according to the at least one precise query information includes:

[0016] Determine a query result corresponding to the initial information according to the at least one precise query information and the preliminary query result.

[0017] In a possible implementation, the method further includes:

[0018] For any database among the multiple databases, compress the information of the database to obtain compressed information corresponding to the database;

[0019] Performing overall data compression on the multiple databases to obtain compression information corresponding to the multiple data;

[0020] Accordingly, according to the initial information and the information of the at least one target database, determining at least one precise query information corresponding to the initial information based on the first text processing model includes:

[0021] When the number of the at least one target database is one, or is the same as the number of the plurality of databases, obtaining compression information corresponding to the at least one target database;

[0022] According to the initial information and the compressed information, at least one precise query information corresponding to the initial information is determined based on a first text processing model.

[0023] In a possible implementation, the method further includes:

[0024] Acquire at least one database combination input by a user, wherein the database combination includes identification information of a plurality of first databases;

[0025] For each database combination, determine the multiple first databases corresponding to the database combination according to the identification information of the multiple first databases corresponding to the database combination; perform overall data compression on the multiple first databases to obtain compression information corresponding to the database combination;

[0026] Accordingly, according to the initial information and the information of the at least one target database, determining at least one precise query information corresponding to the initial information based on the first text processing model includes:

[0027] When the number of the at least one target database is greater than 1 and less than the number of the plurality of databases, if compression information corresponding to the target database combination exists in the first mapping relationship table, then the target compression information corresponding to the target database combination is acquired; wherein the target database combination is composed of identification information of each target database; and the first mapping relationship table is used to indicate a correspondence between a database combination and compression information;

[0028] According to the initial information and the target compression information, at least one precise query information corresponding to the initial information is determined based on a first text processing model.

[0029] In a possible implementation, the method further includes:

[0030] If there is no compression information corresponding to the target database combination in the first mapping relationship table, compressing the entire data of at least one target database to obtain compression information corresponding to the at least one target database;

[0031] According to the initial information and the compression information corresponding to the at least one target database, at least one precise query information corresponding to the initial information is determined based on a first text processing model.

[0032] In a possible implementation manner, compressing information on the database to obtain compressed information corresponding to the database includes:

[0033] Inputting the information of the database into a second text processing model to obtain a plurality of memory tokens corresponding to the database;

[0034] Accordingly, according to the initial information and the compressed information, at least one precise query information corresponding to the initial information is determined based on the first text processing model, including:

[0035] Determine a plurality of first original tokens corresponding to the initial information;

[0036] A plurality of first original tokens and a plurality of memory tokens are input into a first text processing model to obtain at least one precise query information corresponding to the initial information.

[0037] In a possible implementation, a plurality of first original tokens and a plurality of memory tokens are input into a first text processing model to obtain at least one precise query information corresponding to the initial information, including:

[0038] The plurality of memory tokens are placed after the plurality of first original tokens to obtain a token input sequence;

[0039] The token is input into a sequence and a first text processing model to obtain at least one precise query information corresponding to the initial information.

[0040] In a possible implementation, determining at least one precise query information corresponding to the initial information based on the first text processing model according to the initial information and the information of the at least one target database includes:

[0041] When the initial information is not a precise query, determining at least one precise query information corresponding to the initial information based on the first text processing model according to the initial information and information of the at least one target database;

[0042] The method further comprises:

[0043] When the initial information is a precise query;

[0044] Searching the at least one target database according to the initial information to obtain a query result corresponding to the precise query information;

[0045] According to the query results corresponding to the initial information and the precise query information, the query result corresponding to the initial information is determined.

[0046] In a possible implementation, the method further includes:

[0047] When the initial information is not a data query task, a summary corresponding to the initial information is determined based on a third text processing model according to the initial information and information of the at least one target database.

[0048] In a possible implementation, determining a summary corresponding to the initial information based on a third text processing model according to the initial information and information of the at least one target database includes:

[0049] Performing information compression on the at least one target database to obtain a plurality of memory tokens corresponding to the at least one target database;

[0050] Determine a plurality of second original tokens corresponding to the initial information;

[0051] The plurality of second original tokens and the plurality of memory tokens are input into a third text processing model to obtain a summary corresponding to the determined initial information.

[0052] In a second aspect, an embodiment of the present application provides an information processing device, including:

[0053] An acquisition module is used to obtain initial information input by the user;

[0054] A first determination module is used to determine at least one target database corresponding to the initial information; the at least one target database is selected from multiple databases;

[0055] A second determination module is used to determine, when the initial information is a data query task, at least one precise query information corresponding to the initial information based on the first text processing model according to the initial information and information of the at least one target database;

[0056] The third determination module is used to determine the query result corresponding to the initial information according to the at least one precise query information.

[0057] In a third aspect, an embodiment of the present application provides an electronic device, including: a memory, a processor;

[0058] The memory stores computer-executable instructions;

[0059] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the above first aspect and / or various possible implementations of the first aspect.

[0060] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the first aspect above and / or various possible implementations of the first aspect.

[0061] 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 above first aspect and / or various possible implementation methods of the first aspect.

[0062] The information processing method, device, electronic device, storage medium and program product provided by the embodiments of the present application obtain initial information input by a user; determine at least one target database corresponding to the initial information; the at least one target database is screened out from multiple databases; when the initial information is a data query task, determine at least one precise query information corresponding to the initial information based on the first text processing model according to the initial information and information of the at least one target database; and determine the query result corresponding to the initial information according to the at least one precise query information. The method can more accurately understand the user's query intention, which reduces the uncertainty brought by fuzzy queries, improves the relevance and accuracy of the query results, and screens out at least one target database from multiple databases to ensure that the query is performed in the most relevant data source. This screening process can reduce unnecessary data processing, improve system efficiency, and ensure that users obtain the most relevant information. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0064] Figure 1 A flowchart of a search enhancement method provided in an embodiment of the present application;

[0065] Figure 2 An application scenario diagram provided for an embodiment of the present application;

[0066] Figure 3 A flowchart of an information processing method provided in an embodiment of the present application;

[0067] Figure 4 A flowchart of another information processing method provided in an embodiment of the present application;

[0068] Figure 5 A schematic diagram of the structure of the information processing device provided by this application;

[0069] Figure 6 A schematic diagram of the structure of the electronic device provided in this application.

[0070] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0071] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0072] Classic RAG systems usually consist of two main components: a retriever and a generator. The retriever is responsible for obtaining text snippets related to the user's query from an external database, while the generator uses these retrieved text snippets as context information to generate more accurate and rich answers. In this way, the RAG system can dynamically access and utilize the latest information resources during the generation process.

[0073] Figure 1 A flowchart of a search enhancement method provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the user inputs the question to be queried, and the retriever searches the database according to the question to be queried to obtain a text fragment corresponding to the question to be queried, and then inputs the text fragment corresponding to the question to be queried into the generator to obtain a query result corresponding to the question to be queried.

[0074] However, existing search engines rely on semantic matching between user queries and candidate texts in the database to determine the returned content. This dependence brings the following challenges:

[0075] 1. Semantic matching requires that the user query must contain clear query intent, otherwise it is difficult for the retriever to establish an effective semantic connection between the query and the target text. This limits the effectiveness of the RAG system in dealing with fuzzy or open queries.

[0076] 2. In actual scenarios, users’ query requirements are often more complex and obscure, and may involve multiple levels of background information and context. Retrievers based on “semantic matching” find it difficult to accurately find the text fragments needed to answer questions, resulting in inaccurate results.

[0077] For example, when users want to ask questions about the entire data set, it is difficult for the classic RAG system to give an accurate answer to the query "Is there any anomaly in August?" Because the concept of "anomaly" is usually not a clear field directly stored in the database, the query results generated by the classic RAG system are not accurate when the query intent is unclear.

[0078] In view of this, the present application provides an information processing method, which can obtain initial information input by a user; determine at least one target database corresponding to the initial information; the at least one target database is screened out from multiple databases; when the initial information is a data query task, based on the initial information and information of at least one target database, determine at least one precise query information corresponding to the initial information based on a first text processing model; based on the at least one precise query information, determine the query result corresponding to the initial information. In this way, based on the initial information and information of at least one target database, the precise query information corresponding to the initial information is determined based on the use of the first text processing model. The method can more accurately understand the user's query intention, which reduces the uncertainty brought by fuzzy queries, improves the relevance and accuracy of the query results, and screens out at least one target database from multiple databases to ensure that the query is performed in the most relevant data source. This screening process can reduce unnecessary data processing, improve system efficiency, and ensure that users obtain the most relevant information.

[0079] Figure 2 An application scenario diagram provided for an embodiment of the present application, such as Figure 2 As shown, the user enters initial information in the input interface of the user terminal, and after the input is completed, clicks the confirmation button. The user terminal sends the initial information to the server, and the server determines at least one target database corresponding to the initial information; the at least one target database is screened out from multiple databases, wherein at least one target database can be selected by the user from multiple databases in the input interface, or it can be a database related to the initial information determined by the server based on the initial information. The present application does not limit this. Exemplarily, multiple databases include: database 1, database 2...database n, at least one target database includes: database 1, database 2, after determining that the initial information is a data query task, the server determines at least one precise query information corresponding to the initial information based on the initial information, the information of database 1 and the information of database 2 based on the first text processing model, and finally determines the query result corresponding to the initial information based on the at least one precise query information.

[0080] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0081] Figure 3 This is a flow chart of an information processing method provided in an embodiment of the present application. The execution subject of this embodiment can be any device with data processing function. This application is specifically described with a server as the execution subject. Figure 3As shown, an information processing method provided by an embodiment of the present application may include:

[0082] Step 301: Obtain initial information input by the user.

[0083] Specifically, the user enters the initial information in the input interface of the user terminal, and after completing the input, clicks a confirmation button, the user terminal sends the initial information to the server, and the server obtains the initial information entered by the user.

[0084] Step 302: Determine at least one target database corresponding to the initial information; the at least one target database is selected from multiple databases.

[0085] The present application does not limit the manner in which the server obtains at least one target database corresponding to the initial information.

[0086] In an optional implementation, the user selects identification information corresponding to at least one target database from the identification information corresponding to multiple databases in the input interface of the user terminal, clicks a confirmation button, and the user terminal sends the identification information corresponding to the at least one target database to the server terminal, and the server terminal determines at least one target database corresponding to the initial information based on the identification information corresponding to the at least one target database.

[0087] In another optional implementation, the server first extracts at least one information keyword from the initial information, and compares the at least one information keyword with library keywords corresponding to multiple databases. For any database, when the similarity between the library keyword corresponding to the database and any information keyword in the at least one information keyword exceeds a preset threshold, the database is determined to be the target data.

[0088] Step 303: When the initial information is a data query task, determine at least one precise query information corresponding to the initial information based on the first text processing model according to the initial information and information of the at least one target database.

[0089] The first text processing model may be any language model that can efficiently process ultra-long contexts, and preferably, may be a 7B language model combined with key-value compression technology.

[0090] Specifically, the server first determines whether the initial information is a data query task. The present application does not limit the method for determining whether the initial information is a data query task.

[0091] Exemplarily, in an optional implementation, a keyword recognition method can be adopted, using natural language processing (NLP) technology to identify keywords or phrases in the input initial information. These words are usually related to data queries, such as "search", "get", "display", "list", etc.

[0092] In another optional implementation, an intent recognition model method can be used to train a machine learning model (such as a deep learning model) to recognize the intent of the initial information input by the user. By annotating a large amount of training data, the model can learn to recognize which initial information generally represents a data query task.

[0093] In another optional implementation, a regular expression matching method may be used to match a specific query pattern. For example, an input containing a structure similar to a SQL (Structured Query Language statements, a standard programming language for managing and operating relational databases) statement (such as "SELECT, FROM") may indicate a data query.

[0094] After determining that the initial information is a data query task, the server determines at least one precise query information corresponding to the initial information based on the initial information and the information of at least one target database and based on the first text processing model. The precise query information is clear and specific conditions extracted based on the initial information and the information of at least one target database. These conditions are used to accurately match text in at least one target database.

[0095] For example, the initial information input by the user is “Is there any abnormality in August?”, and the at least one precise query information may include:

[0096] 1. Check whether there are any trading frequencies or fluctuations in trading volume in August that are different from those in previous months.

[0097] 2. Check whether there is a sudden increase or decrease in trading volume on any specific weekday or weekend in August.

[0098] 3. Analyze the data of each transaction category in August and find out which scenarios had abnormal transactions in August.

[0099] 4. Compare the August trading data of the past few years to identify the anomalies this year.

[0100] 5. Check the performance of different transaction channels (such as online and offline) in August and look for abnormal channels.

[0101] Optionally, the information processing method provided by the present application further includes:

[0102] For any database among the multiple databases, compress the information of the database to obtain compressed information corresponding to the database;

[0103] Performing overall data compression on the multiple databases to obtain compression information corresponding to the multiple data;

[0104] Accordingly, according to the initial information and the information of the at least one target database, determining at least one precise query information corresponding to the initial information based on the first text processing model includes:

[0105] When the number of the at least one target database is one, or is the same as the number of the plurality of databases, obtaining compression information corresponding to the at least one target database;

[0106] According to the initial information and the compressed information, at least one precise query information corresponding to the initial information is determined based on a first text processing model.

[0107] Exemplarily, the multiple databases include: database 1, database 2 and database 3. The server can compress the data of database 1, database 2 and database 3 respectively to obtain compressed information corresponding to database 1, compressed information corresponding to database 2 and compressed information corresponding to database 3.

[0108] The server may also perform overall data compression on database 1, database 2, and database 3 to obtain compression information corresponding to the three databases as a whole.

[0109] When at least one target database is any one of database 1, database 2 and database 3, the server obtains compression information corresponding to the corresponding database; when at least one target database includes database 1, database 2 and database 3, the server obtains compression information corresponding to the three databases as a whole.

[0110] Afterwards, the server determines at least one precise query information corresponding to the initial information based on the first text processing model according to the initial information and the compressed information.

[0111] In this way, by compressing the information in the database, the amount of data can be significantly reduced, thereby speeding up data retrieval and processing. This is especially important for processing large databases, because the compressed data takes up less storage space and bandwidth, and by compressing the information in any database or the entire database in advance, the compressed information corresponding to at least one target database can be quickly obtained after determining the information of at least one target database corresponding to the initial information, thereby improving processing efficiency.

[0112] Optionally, the information processing method provided by the present application further includes:

[0113] Acquire at least one database combination input by a user, wherein the database combination includes identification information of a plurality of first databases;

[0114] For each database combination, determine the multiple first databases corresponding to the database combination according to the identification information of the multiple first databases corresponding to the database combination; perform overall data compression on the multiple first databases to obtain compression information corresponding to the database combination;

[0115] Accordingly, according to the initial information and the information of the at least one target database, determining at least one precise query information corresponding to the initial information based on the first text processing model includes:

[0116] When the number of the at least one target database is greater than 1 and less than the number of the plurality of databases, if compression information corresponding to the target database combination exists in the first mapping relationship table, then the target compression information corresponding to the target database combination is acquired; wherein the target database combination is composed of identification information of each target database; and the first mapping relationship table is used to indicate a correspondence between a database combination and compression information;

[0117] According to the initial information and the target compression information, at least one precise query information corresponding to the initial information is determined based on a first text processing model.

[0118] Specifically, the user inputs at least one database combination in the input section of the user terminal, wherein the database combination is a collection of databases that the user believes may be used in a certain type of data query, and the database combination contains identification information of multiple first databases. After the user completes the input, he clicks a confirmation button, and the user terminal sends the at least one database combination input by the user to the server. The server obtains the at least one database combination input by the user, and for each database combination, determines the multiple first databases corresponding to the database combination according to the identification information of the multiple first databases corresponding to the database combination; and compresses the multiple first databases as a whole to obtain compression information corresponding to the database combination.

[0119] When the number of at least one target database is greater than one and less than the number of multiple databases, determine whether compression information corresponding to the target database combination exists in the first mapping relationship table, and if so, obtain the target compression information corresponding to the target database combination; wherein the first mapping relationship table is used to indicate the correspondence between the database combination and the compression information; the target database combination is composed of identification information of each target database in at least one target database.

[0120] Finally, the server determines at least one precise query information corresponding to the initial information based on the first text processing model according to the initial information and the target compression information.

[0121] In this way, users can determine commonly used database combinations based on experience and send the information of the database combination to the server. The server can compress and store the overall data of multiple databases in the database combination in advance, so that when the overall compressed information of multiple databases in the database combination is used later, it can be quickly obtained, thereby further improving processing efficiency.

[0122] Optionally, the information processing method provided by the present application further includes:

[0123] If there is no compression information corresponding to the target database combination in the first mapping relationship table, compressing the entire data of at least one target database to obtain compression information corresponding to the at least one target database;

[0124] According to the initial information and the compression information corresponding to the at least one target database, at least one precise query information corresponding to the initial information is determined based on a first text processing model.

[0125] Specifically, if there is no compression information corresponding to the target database combination in the first mapping relationship table, the server will perform overall data compression on at least one target database to obtain compression information corresponding to at least one target database, and determine at least one precise query information corresponding to the initial information based on the initial information and the compression information corresponding to at least one target database.

[0126] In this way, when there is no compression information of the target database combination in the first mapping relationship table, the server can dynamically perform overall data compression on the target database. This on-demand compression strategy ensures that the server can still operate efficiently when processing new or unforeseen queries.

[0127] Optionally, compressing the database to obtain compressed information corresponding to the database includes:

[0128] Inputting the information of the database into a second text processing model to obtain a plurality of memory tokens corresponding to the database;

[0129] Accordingly, determining at least one precise query information corresponding to the initial information based on the first text processing model according to the initial information and the compressed information includes:

[0130] Determine a plurality of first original tokens corresponding to the initial information;

[0131] A plurality of first original tokens and a plurality of memory tokens are input into a first text processing model to obtain at least one precise query information corresponding to the initial information.

[0132] Specifically, the server inputs the information of the database into the second text processing model to obtain a plurality of memory tokens corresponding to the database. The plurality of memory tokens are global memories formed after a high degree of generalization of the database information.

[0133] The server determines multiple first original tokens corresponding to the initial information, and inputs the multiple first original tokens and multiple memory tokens into the trained first text processing model to obtain at least one precise query information corresponding to the initial information.

[0134] In this way, using a combination of memory tokens and original tokens, the first text processing model can more accurately understand and parse the user's initial information, thereby generating more precise query information and improving the relevance and accuracy of the query results.

[0135] Optionally, the plurality of first original tokens and the plurality of memory tokens are input into a first text processing model to obtain at least one precise query information corresponding to the initial information, including:

[0136] The plurality of memory tokens are placed after the plurality of first original tokens to obtain a token input sequence;

[0137] The token is input into a sequence and a first text processing model to obtain at least one precise query information corresponding to the initial information.

[0138] Specifically, the first text processing model may select a Transformer model that can process long contexts as a basis, such as some specially designed long-context language models (such as models using key-value compression technology).

[0139] Memory tokens are introduced into the architecture of the Transformer model. These tokens will serve as information carriers for long-term memory. The number and location of memory tokens need to be determined based on the specific task and context length.

[0140] Memory tokens are used as information carriers for long-term memory in the system. Assuming that the working context window length of the underlying large language model is l, the system will append k memory tokens after each context window. These memory tokens are initialized when the model processes the input sequence and are encoded into hidden states together with the original tokens through multiple attention processes. For the input sequence X = {x1,...,x n}, the system expands it to where x1,...,x lis the original token, It's a memory token.

[0141] After each context window of the Transformer, k memory tokens are appended, namely:

[0142]

[0143] Where l is the length of the context window and k is the number of memory tokens.

[0144] That is to say, the number of multiple first original tokens is l, the number of multiple memory tokens is k, the k memory tokens are located after the l first tokens, and a token input sequence is obtained. The token input sequence is input into the trained first text processing model to obtain at least one precise query information corresponding to the initial information, wherein the first text processing model is used to obtain at least one precise query information based on the token input sequence, and the trained first text processing model is obtained through an existing training method, as shown in subsequent embodiments for details.

[0145] In this way, by appending multiple memory tokens to the original token, the model can take advantage of the additional database information provided by these memory tokens. This approach can help the model better understand the context and details of the initial information, further improving its understanding of the initial information.

[0146] Step 304: Determine a query result corresponding to the initial information according to the at least one precise query information.

[0147] Specifically, the server may determine the query result corresponding to the initial information according to at least one precise query information.

[0148] Optionally, determining, according to the at least one precise query information, a query result corresponding to the initial information includes:

[0149] Searching the at least one target database according to the at least one precise query information to obtain query results corresponding to each precise query information;

[0150] According to the query results corresponding to the initial information and each precise query information, a target query result corresponding to the initial information is determined.

[0151] Any search technology, such as sparse search, dense search, etc., may be used when searching at least one target database.

[0152] Specifically, the server searches at least one target database according to at least one precise query information to obtain query results corresponding to each precise query information; the query results corresponding to the initial information and each precise query information are input into the trained generation model to determine the target query result corresponding to the initial information.

[0153] The generation module may be any model designed for generation tasks. For example, a model may be generated for HuggingFace or a generator may be initialized through a commercial API.

[0154] In this way, by using precise query information to search the target database, the accuracy of the query can be significantly improved. Precise query information is usually optimized and refined, and can better match relevant records in the database, thereby improving the relevance and accuracy of the search results. In addition, by combining the initial information and the query results corresponding to each precise query information, the generation model can better understand and associate the input information with the data in the database, which helps to generate target query results that better meet user needs and ensure the practicality and effectiveness of the results.

[0155] Optionally, determining at least one precise query information corresponding to the initial information based on the first text processing model according to the initial information and the information of the at least one target database includes:

[0156] According to the initial information and the information of the at least one target database, determining at least one precise query information and a preliminary query result corresponding to the initial information based on a first text processing model;

[0157] Accordingly, determining the query result corresponding to the initial information according to the at least one precise query information includes:

[0158] Determine a query result corresponding to the initial information according to the at least one precise query information and the preliminary query result.

[0159] Specifically, the server determines at least one precise query information and a preliminary query result corresponding to the initial information based on the first text processing model according to the initial information and the information of the at least one target database. The trained first text processing model can output at least one precise query information and a preliminary query result corresponding to the initial information according to the initial information and the information of the at least one target database.

[0160] Among them, the preliminary query result can be understood as a brief answer to the initial information entered by the user. Although it may contain inaccurate or incomplete information, it provides a basis for the subsequent generation of precise answers. For example, for the initial information "Are there any abnormalities in August?", the corresponding initial query result can be "There are abnormalities in the transaction data in August. Specifically, compared with the previous month, the transaction volume has increased / decreased significantly, especially in the XX category. Further analysis is needed to determine which specific days' transaction data deviated from the norm, as well as the possible reasons for these abnormal data."

[0161] Afterwards, the server inputs the initial information, at least one precise query information, and the preliminary query result into the generation model, and can determine the query result corresponding to the initial information.

[0162] In this way, by generating preliminary query results, the system can determine the final query results more quickly in subsequent steps, and the generated final query results are more accurate.

[0163] The information processing method provided in the embodiment of the present application obtains initial information input by a user; determines at least one target database corresponding to the initial information; when the initial information is a data query task, the at least one target database is screened out from multiple databases; based on the initial information and the information of the at least one target database, determines at least one precise query information corresponding to the initial information based on a first text processing model; and determines the query result corresponding to the initial information based on the at least one precise query information. The method can more accurately understand the user's query intention, which reduces the uncertainty brought by fuzzy queries, improves the relevance and accuracy of query results, and screens out at least one target database from multiple databases to ensure that the query is performed in the most relevant data source. This screening process can reduce unnecessary data processing, improve system efficiency, and ensure that users obtain the most relevant information.

[0164] Optionally, determining at least one precise query information corresponding to the initial information based on the first text processing model according to the initial information and the information of the at least one target database includes:

[0165] When the initial information is not a precise query, determining at least one precise query information corresponding to the initial information based on the first text processing model according to the initial information and information of the at least one target database;

[0166] The information processing method provided by this application also includes:

[0167] When the initial information is a precise query;

[0168] Searching the at least one target database according to the initial information to obtain a query result corresponding to the precise query information;

[0169] According to the query results corresponding to the initial information and the precise query information, the query result corresponding to the initial information is determined.

[0170] Specifically, after the server determines that the initial information is a data query task, it also needs to determine whether the initial information is an accurate query. This application does not limit the method for determining whether the initial information is an accurate query.

[0171] In an optional implementation, a keyword matching method may be used. If the initial information input by the user contains clear keywords or phrases existing in the database, it may be considered as accurate query information. If the keywords or phrases contained in the initial information do not have a direct match in the database, or the match is low, it may not be accurate query information.

[0172] In another optional implementation, similarity analysis can be used to calculate the similarity between the initial information and the entries in the database using natural language processing (NLP) technology. Entries with high similarity can be considered as accurate query information. If the similarity of all entries is low, it can be considered as not accurate query information.

[0173] In another optional implementation, semantic analysis technology can be used to understand the intent of the query. Initial information with clear and specific intent is accurate query information; initial information with unclear or overly broad intent is not accurate query information.

[0174] When the initial information is not a precise query, the server determines at least one precise query information corresponding to the initial information based on the first text processing model according to the initial information and information of at least one target database.

[0175] When the initial information is a precise query, the server can directly search at least one target database based on the initial information to obtain the query results corresponding to the precise query information, and then input the query results corresponding to the initial information and the precise query information into the generation model to determine the query results corresponding to the initial information.

[0176] In this way, when the initial information is a precise query, at least one target database can be directly searched based on the initial information to obtain query results corresponding to the precise query information, which can reduce complicated steps and improve the efficiency of generating query results.

[0177] Optionally, the information processing method provided by the present application further includes:

[0178] When the initial information is not a data query task, a summary corresponding to the initial information is determined based on a third text processing model according to the initial information and information of the at least one target database.

[0179] Specifically, when the initial information is not a data query task, the server may determine a summary corresponding to the initial information based on the third text processing model according to the initial information and information of at least one target database.

[0180] In this way, the third text processing model can understand the initial information more deeply based on the information in the target database, thereby improving the accuracy of the summary corresponding to the initial information.

[0181] Optionally, determining a summary corresponding to the initial information based on a third text processing model according to the initial information and information of the at least one target database includes:

[0182] Performing information compression on the at least one target database to obtain a plurality of memory tokens corresponding to the at least one target database;

[0183] Determine a plurality of second original tokens corresponding to the initial information;

[0184] The plurality of second original tokens and the plurality of memory tokens are input into a third text processing model to obtain a summary corresponding to the determined initial information.

[0185] Specifically, the server can compress information on at least one target database to obtain multiple memory tokens corresponding to the at least one target database; and determine multiple second original tokens corresponding to the initial information; input the multiple second original tokens and the multiple memory tokens into a third text processing model to obtain a summary corresponding to the initial information.

[0186] The process of obtaining the memory token and the original token can be referred to in the above embodiment and will not be described again here.

[0187] In this way, the original tokens of the initial information are combined with the memory tokens of the database and input into the text processing model, which helps to fully consider the context and background information when generating the summary, improving the accuracy and relevance of the summary. Information compression and tokenization processing reduce the amount of data that the model needs to process, thereby speeding up the generation of summaries.

[0188] Figure 4 A flowchart of another information processing method provided in an embodiment of the present application is shown as follows: Figure 4As shown, the entire database is first encoded using a memory module to form a global memory. Among them, the memory module can be located in the database, and the memory module adopts a Transformer-based model structure, which gradually compresses the original input tokens into fewer memory tokens while retaining the necessary semantic information. This method is similar to how human memory is converted from short-term memory to long-term memory. This memory is a highly compressed and abstract representation of the contents of the entire database, retaining the core semantic information of the data. When a query is received, the model prompts its memory module to generate task-related clue answers based on global memory (corresponding to the precise query information in the above embodiment). These clues are the memory module's initial understanding and response to the task requirements. They may not be complete answers, but contain enough information to guide subsequent precise retrieval.

[0189] The generation of clue answers relies on the training of the memory module, especially through supervised fine-tuning to optimize it so that it can generate targeted clues according to task requirements. Clue answers are submitted as queries to the retrieval tool, which searches for relevant evidence text in the database based on these clues. Since clue answers are refined expressions of task requirements, they can more effectively guide the retrieval tool to locate useful information.

[0190] The memory module may also directly generate a more complete fuzzy answer (corresponding to the preliminary query result in the above embodiment). The fuzzy answer can be regarded as a more specific or complete expression of the clue answer. This fuzzy answer is a preliminary response to the task requirements. Although it may contain inaccurate or incomplete information, it provides a basis for the subsequent generation of precise answers. The generation of fuzzy answers also depends on the training of the memory module and the formation of global memory. The evidence text returned by the retrieval tool is submitted to the generation model together with the original query or task instructions. The generation model uses this information to generate the final precise answer. If there is a fuzzy answer, it can also be used as an input to the generation model to help the model converge to the correct answer faster.

[0191] Existing search enhancement technologies cannot answer vague questions such as "Is there anything unusual in August?" Because they do not know the definition of "anomaly", they often report errors or produce irrelevant answers. The technical effects of this application are as follows:

[0192] 1. Significantly improve the ability to handle complex tasks: The present invention effectively solves the shortcomings of traditional RAG systems in processing fuzzy queries and long texts through a global memory library and a dual-system architecture, and significantly improves system performance.

[0193] 2. Enhanced generalization and robustness: Through extensive experimental verification, the present invention performs well on the UnionPay dataset, demonstrating its strong generalization ability and adaptability to various complex scenarios.

[0194] 3. Improve generation efficiency and quality: By optimizing the selection of retrieval clues and generation models, the present invention achieves a higher processing speed while ensuring generation quality.

[0195] The preferred implementation methods of this application are as follows:

[0196] This system mainly consists of three core parts: memory module, retrieval module and generation module. After the user enters the query, the memory module first generates a phased answer or clue, then the retrieval module retrieves relevant information from the database based on these clues, and finally the generation module combines the retrieved information with the user query to generate the final answer.

[0197] The clue answers in this system are not written in advance, but are dynamically generated through the trained memory module. The memory module is a lightweight but long-range language model that processes the entire database to form a global memory. This module converts the original input into a compact memory representation through effective compression techniques for long contexts. During the training process, the memory module first learns how to form memories from the original context through pre-training. Then, supervised fine-tuning is used to enable the memory module to generate clue answers for specific tasks based on the formed memory.

[0198] When the server gets a task (such as a query or instruction), the memory module is prompted to generate clue answers related to the task. These clue answers are generated based on the memory module's compressed representation of the global database. Although they may be incomplete or lack details, they are sufficient to reveal the potential information needs of the task and provide guidance for the subsequent retrieval process. Using the generated clue answers as queries, the relevant context is retrieved from the database through the retrieval tool. The final answer is generated by another more expensive but more expressive generation model based on the retrieved context and the task description. Therefore, the clue answers are generated dynamically. They are not static and pre-written, but are generated in real time based on the memory module's understanding of the global database and the specific needs of the task.

[0199] The design of the memory module is to expand and optimize the Transformer model so that it can process and remember very long context information. This method does not directly add a new component called "memory module" to the model, but realizes the memory ability of long context by modifying the internal structure of the model (such as introducing memory tokens, adjusting the attention mechanism, etc.).

[0200] Retrieval enhancement generation can be expressed as follows:

[0201]

[0202] Where Θ() is a generation model, Γ() is a retrieval model (corresponding to the first text processing model in the above embodiment), C is the context retrieved from the database D, is the final answer, q is the initial information input by the user, θ is the generation function corresponding to the generation model, and γ is the retrieval function corresponding to the retrieval model.

[0203] This proposal proposes a new memory model Mathematically expressed as:

[0204]

[0205] Here, y represents a phased answer, which may be incomplete or lack details, but can serve as a set of clue answers to guide the retrieval of the most relevant context from the database D. Memory Model The global memory of database D is established, and m is the memory function corresponding to the memory model. In practical applications, any language model that can efficiently handle ultra-long contexts can be used as a memory model. For example, a 7B language model combined with key-value compression technology may be a suitable choice. Although such a model may not be able to generate a completely detailed and accurate answer, it can produce a rough outline that helps locate the correct answer.

[0206] The form of the interim answer y is tailored to the specific requirements of each task. In question-answering tasks where the input query is implicit (fuzzy query information), the interim answer y may include intermediate steps such as generating more explicit and disambiguating alternative queries, as well as specific textual evidence from the database that contributes to the final answer. In addition, if the initial information is not a data query task, such as summary generation, the interim answer may consist of key points or concepts extracted from the context, which are crucial for compiling a coherent and accurate summary. The specific implementation steps are shown in S1-S5.

[0207] S1: Initialization of memory tokens. First, choose a Transformer model that can handle long contexts as a basis, such as some specially designed long-context language models (such as models using key-value compression technology).

[0208] Memory tokens are introduced into the architecture of the Transformer model. These tokens will serve as information carriers for long-term memory. The number and location of memory tokens need to be determined based on the specific task and context length.

[0209] Memory tokens are used as information carriers for long-term memory in the system. Assuming that the working context window length of the underlying large language model is l, the system will append k memory tokens after each context window. These memory tokens are initialized when the model processes the input sequence and are encoded into hidden states together with the original tokens through multiple attention processes. For the input sequence X = {x1,...,x n}, the system expands it to where x1,...,x l is the original token, It's a memory token.

[0210] After each context window of the Transformer, k memory tokens are appended, namely:

[0211]

[0212] Where l is the length of the context window and k is the number of memory tokens. It can be understood that l is the number of original tokens corresponding to the initial information.

[0213] The memory module is responsible for building the global memory of the database. It compresses these long text contents into a more compact memory representation by processing input sequences (such as books, articles, databases, etc.) while retaining key semantic information. In implementation, the memory module is a language model that is lightweight but good at processing long texts. It uses attention mechanisms and other neural network techniques to compress and encode input text. Through fine-tuning and pre-training, the memory module learns how to generate fuzzy answers and clue answers that help retrieve relevant information. During the generation process, the memory module may need to iterate or modify the generated fuzzy multiple times to make it more accurately reflect the needs of the task and the information in the database.

[0214] S2: Extended Attention Mechanism. The Transformer’s attention mechanism is modified to enable it to handle memory tokens. This involves taking into account the representation of the memory tokens and the original context together when calculating the attention score. In order to convert short-term memory into long-term memory, the system introduces an extended attention mechanism. This mechanism allows the memory tokens to interact with the original tokens during multiple attention processes, thereby gradually compressing the original input tokens into significantly fewer memory tokens while retaining key semantic information. The system encodes the memory tokens using a specific weight matrix and calculates their interactions with the original tokens through the attention mechanism. In this way, the memory tokens are able to capture the global information of the input sequence and serve as a carrier of long-term memory. Initialize a new weight matrix W for the memory tokens Qm ,W Km ,W Vm , and consider the previous memory cache in the attention mechanism and

[0215] Q m =XW Qm ,K m =XW Km ,V m =XW Vm

[0216]

[0217] [·;·] represents a concatenation operation. Through the extended attention mechanism, the model is able to gradually transform the original input sequence into a long-term memory representation. At the same time, a cache of memory tokens is used to maintain the information flow across multiple context windows. The original tokens in the input sequence are gradually compressed into fewer memory tokens while retaining key semantic information. In this way, the model can process longer contexts without losing important information.

[0218] S3: Training objective function. Randomly sample long context from large-scale long text datasets such as RedPajama. Train the model in an unsupervised or self-supervised manner to enable it to compress long context and retain key information.

[0219] The training objective function is mainly used to optimize the performance of the memory module so that it can effectively remember key information and generate useful clues. The training objective can be expressed as maximizing the probability of generating the next token given the previous memory token and the most recent original token:

[0220]

[0221] By optimizing this objective function, the system is able to train the memory module to generate high-quality memory tokens that are concise and can accurately reflect the key information of the input sequence.

[0222] After training, the memory module is fine-tuned using task-specific supervision data to enable it to generate clue answers for specific tasks. Supervised fine-tuning is to further train the model using a labeled dataset based on the pre-trained model to optimize the model's performance on a specific task. This process usually occurs after pre-training, and the model is supervised on the labeled dataset to learn how to make predictions and inferences on a specific task. First, prepare training data containing queries, original contexts, answers, and clue answers, and then fine-tune the newly added weight matrix in the memory module while keeping the basic model parameters unchanged. By optimizing the objective function, the probability of generating the next token given the memory token and the recent original token is maximized.

[0223] S4: The retrieval module retrieves the context. The retrieval module retrieves relevant information from the database D according to the clues y generated by the memory module to form the context C. This step can rely on various retrieval techniques, such as sparse retrieval, dense retrieval, etc., but it is difficult to directly express the retrieval process with mathematical formulas. The retrieval process can be regarded as a filtering operation on the database, which can be conceptually expressed as:

[0224]

[0225] in Represents a retrieval function. The search module can integrate multiple retrieval methods, such as sparse retrieval, dense retrieval, and re-ranking. Currently, dense retrieval is used by default.

[0226] S5: The generation module generates the final answer. The generation module receives the user query q and the retrieved context C and generates the final answer Y. This step also relies on complex natural language generation technology and can be expressed as:

[0227]

[0228] Θ represents the mapping function of the generation module. The generation module can be any model designed for generation tasks. The current implementation supports generating models from HuggingFace or initializing the generator through commercial APIs.

[0229] Corresponding to the above information processing method, the embodiment of the present application further provides an information processing device, Figure 5 A schematic diagram of the structure of the information processing device provided in this application, such as Figure 5 As shown, the information processing device provided in this embodiment includes:

[0230] The acquisition module 501 is used to acquire the initial information input by the user;

[0231] A first determination module 502 is used to determine at least one target database corresponding to the initial information; the at least one target database is selected from multiple databases;

[0232] A second determination module 503 is used to determine, when the initial information is a data query task, at least one precise query information corresponding to the initial information based on the first text processing model according to the initial information and information of the at least one target database;

[0233] The third determination module 504 is used to determine the query result corresponding to the initial information according to the at least one precise query information.

[0234] Optionally, the third determining module 504 is specifically configured to:

[0235] Searching the at least one target database according to the at least one precise query information to obtain query results corresponding to each precise query information;

[0236] According to the query results corresponding to the initial information and each precise query information, a target query result corresponding to the initial information is determined.

[0237] Optionally, when the second determination module 503 determines at least one precise query information corresponding to the initial information based on the first text processing model according to the initial information and the information of the at least one target database, it is specifically configured to:

[0238] According to the initial information and the information of the at least one target database, determining at least one precise query information and a preliminary query result corresponding to the initial information based on a first text processing model;

[0239] Accordingly, determining the query result corresponding to the initial information according to the at least one precise query information includes:

[0240] Determine a query result corresponding to the initial information according to the at least one precise query information and the preliminary query result.

[0241] Optionally, the second determining module 503 is further configured to:

[0242] For any database among the multiple databases, compress the information of the database to obtain compressed information corresponding to the database;

[0243] Performing overall data compression on the multiple databases to obtain compression information corresponding to the multiple data;

[0244] Accordingly, when the second determination module 503 determines at least one precise query information corresponding to the initial information based on the first text processing model according to the initial information and the information of the at least one target database, it is specifically used to:

[0245] When the number of the at least one target database is one, or is the same as the number of the plurality of databases, obtaining compression information corresponding to the at least one target database;

[0246] According to the initial information and the compressed information, at least one precise query information corresponding to the initial information is determined based on a first text processing model.

[0247] Optionally, the second determining module 503 is further configured to:

[0248] Acquire at least one database combination input by a user, wherein the database combination includes identification information of a plurality of first databases;

[0249] For each database combination, determine the multiple first databases corresponding to the database combination according to the identification information of the multiple first databases corresponding to the database combination; perform overall data compression on the multiple first databases to obtain compression information corresponding to the database combination;

[0250] Accordingly, when the second determination module 503 determines at least one precise query information corresponding to the initial information based on the first text processing model according to the initial information and the information of the at least one target database, it is specifically used to:

[0251] When the number of the at least one target database is greater than 1 and less than the number of the plurality of databases, if compression information corresponding to the target database combination exists in the first mapping relationship table, then the target compression information corresponding to the target database combination is acquired; wherein the target database combination is composed of identification information of each target database; and the first mapping relationship table is used to indicate a correspondence between a database combination and compression information;

[0252] According to the initial information and the target compression information, at least one precise query information corresponding to the initial information is determined based on a first text processing model.

[0253] Optionally, the second determining module 503 is further configured to:

[0254] If there is no compression information corresponding to the target database combination in the first mapping relationship table, compressing the entire data of at least one target database to obtain compression information corresponding to the at least one target database;

[0255] According to the initial information and the compression information corresponding to the at least one target database, at least one precise query information corresponding to the initial information is determined based on a first text processing model.

[0256] Optionally, when the second determining module 503 compresses the information of the database to obtain the compressed information corresponding to the database, it is specifically used to:

[0257] Inputting the information of the database into a second text processing model to obtain a plurality of memory tokens corresponding to the database;

[0258] Accordingly, when the second determination module 503 determines at least one precise query information corresponding to the initial information based on the first text processing model according to the initial information and the information of the at least one target database, it is specifically used to:

[0259] Determine a plurality of first original tokens corresponding to the initial information;

[0260] A plurality of first original tokens and a plurality of memory tokens are input into a first text processing model to obtain at least one precise query information corresponding to the initial information.

[0261] Optionally, when the second determination module 503 inputs the plurality of first original tokens and the plurality of memory tokens into the first text processing model to obtain at least one precise query information corresponding to the initial information, it is specifically configured to:

[0262] The plurality of memory tokens are placed after the plurality of first original tokens to obtain a token input sequence;

[0263] The token is input into a sequence and a first text processing model to obtain at least one precise query information corresponding to the initial information.

[0264] Optionally, when the second determination module 503 determines at least one precise query information corresponding to the initial information based on the first text processing model according to the initial information and the information of the at least one target database, it is specifically configured to:

[0265] When the initial information is not a precise query, determining at least one precise query information corresponding to the initial information based on the first text processing model according to the initial information and information of the at least one target database;

[0266] The first determining module 502 is further configured to:

[0267] When the initial information is a precise query;

[0268] Searching the at least one target database according to the initial information to obtain a query result corresponding to the precise query information;

[0269] According to the query results corresponding to the initial information and the precise query information, the query result corresponding to the initial information is determined.

[0270] Optionally, the first determining module 502 is further configured to:

[0271] When the initial information is not a data query task, a summary corresponding to the initial information is determined based on a third text processing model according to the initial information and information of the at least one target database.

[0272] Optionally, when the first determining module 502 determines the summary corresponding to the initial information based on the third text processing model according to the initial information and the information of the at least one target database, it is specifically configured to:

[0273] Performing information compression on the at least one target database to obtain a plurality of memory tokens corresponding to the at least one target database;

[0274] Determine a plurality of second original tokens corresponding to the initial information;

[0275] The plurality of second original tokens and the plurality of memory tokens are input into a third text processing model to obtain a summary corresponding to the determined initial information.

[0276] The information processing device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be described in detail here.

[0277] Figure 6 This is a schematic diagram of the structure of the electronic device provided in this application. Figure 6 As shown, the electronic device 60 provided in this embodiment includes: at least one processor 601 and a memory 602. Optionally, the device 60 also includes a communication component 603. The processor 601, the memory 602 and the communication component 603 are connected via a bus 604.

[0278] In a specific implementation process, at least one processor 601 executes the computer execution instructions stored in the memory 602, so that at least one processor 601 executes the above method.

[0279] The specific implementation process of the processor 601 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.

[0280] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.

[0281] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-volatile Memory, NVM), such as at least one disk storage.

[0282] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.

[0283] The present application also provides a computer program product, including a computer program, which implements the above method when executed by a processor.

[0284] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.

[0285] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.

[0286] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.

[0287] The division of units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.

[0288] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0289] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0290] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0291] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.

[0292] Finally, it should be noted that those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention, which follow the general principles of the present invention and include common knowledge or customary technical means in the art not disclosed by the present invention, are not limited to the precise structure described above and shown in the drawings, and may be modified and changed in various ways without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.

Claims

1. An information processing method, characterized in that: include: Get the initial information entered by the user; Determining at least one target database corresponding to the initial information; The at least one target database is selected from a plurality of databases; When the initial information is a data query task, determining at least one precise query information corresponding to the initial information based on the first text processing model according to the initial information and information of the at least one target database; Determine a query result corresponding to the initial information according to the at least one precise query information.

2. The method according to claim 1, characterized in that Determining, according to the at least one precise query information, a query result corresponding to the initial information, comprising: Searching the at least one target database according to the at least one precise query information to obtain query results corresponding to each precise query information; According to the query results corresponding to the initial information and each precise query information, a target query result corresponding to the initial information is determined.

3. The method according to claim 1, characterized in that Determining at least one precise query information corresponding to the initial information based on the first text processing model according to the initial information and the information of the at least one target database includes: Determine, based on the first text processing model, at least one precise query information and a preliminary query result corresponding to the initial information according to the initial information and the information of the at least one target database; Accordingly, determining the query result corresponding to the initial information according to the at least one precise query information includes: Determine a query result corresponding to the initial information according to the at least one precise query information and the preliminary query result.

4. The method according to claim 1, characterized in that: The method further comprises: For any database among the multiple databases, compress the information of the database to obtain compressed information corresponding to the database; Performing overall data compression on the multiple databases to obtain compression information corresponding to the multiple data; Accordingly, according to the initial information and the information of the at least one target database, determining at least one precise query information corresponding to the initial information based on the first text processing model includes: When the number of the at least one target database is one, or is the same as the number of the plurality of databases, obtaining compression information corresponding to the at least one target database; According to the initial information and the compressed information, at least one precise query information corresponding to the initial information is determined based on a first text processing model.

5. The method according to claim 1, characterized in that The method further comprises: Acquire at least one database combination input by a user, wherein the database combination includes identification information of a plurality of first databases; For each database combination, determine the multiple first databases corresponding to the database combination according to the identification information of the multiple first databases corresponding to the database combination; perform overall data compression on the multiple first databases to obtain compression information corresponding to the database combination; Accordingly, according to the initial information and the information of the at least one target database, determining at least one precise query information corresponding to the initial information based on the first text processing model includes: When the number of the at least one target database is greater than 1 and less than the number of the plurality of databases, if compression information corresponding to the target database combination exists in the first mapping relationship table, then the target compression information corresponding to the target database combination is acquired; wherein the target database combination is composed of identification information of each target database; and the first mapping relationship table is used to indicate a correspondence between a database combination and compression information; According to the initial information and the target compression information, at least one precise query information corresponding to the initial information is determined based on a first text processing model.

6. The method according to claim 5, characterized in that The method further comprises: If there is no compression information corresponding to the target database combination in the first mapping relationship table, compressing the entire data of at least one target database to obtain compression information corresponding to the at least one target database; According to the initial information and the compression information corresponding to the at least one target database, at least one precise query information corresponding to the initial information is determined based on a first text processing model.

7. The method according to claim 4, characterized in that Compressing the database to obtain compressed information corresponding to the database includes: Inputting the information of the database into a second text processing model to obtain a plurality of memory tokens corresponding to the database; Accordingly, according to the initial information and the compressed information, at least one precise query information corresponding to the initial information is determined based on the first text processing model, including: Determine a plurality of first original tokens corresponding to the initial information; A plurality of first original tokens and a plurality of memory tokens are input into a first text processing model to obtain at least one precise query information corresponding to the initial information.

8. The method according to claim 7, characterized in that Inputting a plurality of first original tokens and a plurality of memory tokens into a first text processing model to obtain at least one precise query information corresponding to the initial information includes: The plurality of memory tokens are placed after the plurality of first original tokens to obtain a token input sequence; The token is input into a sequence and a first text processing model to obtain at least one precise query information corresponding to the initial information.

9. The method according to claim 1, characterized in that: Determining at least one precise query information corresponding to the initial information based on the first text processing model according to the initial information and the information of the at least one target database includes: When the initial information is not a precise query, determining at least one precise query information corresponding to the initial information based on the first text processing model according to the initial information and information of the at least one target database; The method further comprises: When the initial information is a precise query; Searching the at least one target database according to the initial information to obtain a query result corresponding to the precise query information; According to the query results corresponding to the initial information and the precise query information, the query result corresponding to the initial information is determined.

10. The method according to claim 1, characterized in that The method further comprises: When the initial information is not a data query task, a summary corresponding to the initial information is determined based on a third text processing model according to the initial information and information of the at least one target database.

11. The method according to claim 10, characterized in that Determining a summary corresponding to the initial information based on a third text processing model according to the initial information and the information of the at least one target database includes: Performing information compression on the at least one target database to obtain a plurality of memory tokens corresponding to the at least one target database; Determine a plurality of second original tokens corresponding to the initial information; The plurality of second original tokens and the plurality of memory tokens are input into a third text processing model to obtain a summary corresponding to the determined initial information.

12. An information processing device, characterized in that: include: An acquisition module is used to obtain initial information input by the user; A first determination module, configured to determine at least one target database corresponding to the initial information; The at least one target database is selected from a plurality of databases; A second determination module is used to determine, when the initial information is a data query task, at least one precise query information corresponding to the initial information based on the first text processing model according to the initial information and information of the at least one target database; The third determination module is used to determine the query result corresponding to the initial information according to the at least one precise query information.

13. An electronic device, characterized in that: include: Memory, processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 11.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 11 when executed by a processor.

15. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 11 when being executed by a processor.