Artificial intelligence-based context data query method and device, storage medium, and equipment

By constructing an AI-based contextual data query method and utilizing a large language model and hierarchical index, the problems of information truncation and high reasoning costs in existing technologies are solved, achieving efficient and secure data query and rapid location, and improving the response speed of intelligent customer service.

CN122152777APending Publication Date: 2026-06-05CHINA PING AN PROPERTY INSURANCE CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA PING AN PROPERTY INSURANCE CO LTD
Filing Date
2026-03-05
Publication Date
2026-06-05

Smart Images

  • Figure CN122152777A_ABST
    Figure CN122152777A_ABST
Patent Text Reader

Abstract

The application discloses an artificial intelligence-based context data query method and device, a storage medium and equipment, relates to the technical field of artificial intelligence, can be applied to the financial field, and mainly aims to solve the problem of poor effectiveness of existing context data query. Including: in response to a session request, obtaining a business type and a user identifier; determining relevant file information and accurate file information based on the business type and the user identifier, and constructing minimum context information to be searched based on the relevant file information and the accurate file information; generating a plurality of search context sentences corresponding to the minimum context information based on a pre-trained large language model, and querying a query result corresponding to the search context sentence from a file storage space based on the large language model, wherein the file storage space has an independent file directory corresponding to different users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, which can be applied to the financial field, and in particular to an artificial intelligence-based contextual data query method, apparatus, storage medium, and device. Background Technology

[0002] As AI technology becomes deeply integrated into financial operations, intelligent customer service systems, as an auxiliary technology in the financial industry, enable the industry's transformation from automation to intelligence, achieving autonomous perception, decision-making, and collaboration among multiple business processes. In handling complex customer service dialogues, precise management of contextual data is necessary to improve the accuracy of the intelligent agent's processing of financial transactions.

[0003] Currently, existing context systems typically process all data, including dialogue history, tool call results, and retrieval information, into a limited context window. When customer service needs to access this data, they can retrieve a large amount of information, such as customer's historical insurance policies, medical records, and claims rules documents, based on the conversation content for AI processing within the conversation. However, the data input at once often exceeds the model's context window limit, leading to the truncation or omission of key information. Furthermore, when handling conversations such as loan applications, intelligent customer service retrieves far more policy documents than required, significantly consuming valuable context space, increasing model inference costs, and consequently lacking a mechanism for classifying, storing, and indexing different types of information, making it impossible to quickly locate the required information based on task needs. Summary of the Invention

[0004] In view of this, this application provides a context data query method, apparatus, storage medium, and device based on artificial intelligence, with the main purpose of solving the problem of poor effectiveness of existing context data queries.

[0005] According to one aspect of this application, an artificial intelligence-based contextual data query method is provided, comprising:

[0006] In response to a session request, obtain the service type and user identifier; Based on the business type and the user identifier, relevant file information and precise file information are determined, and based on the relevant file information and precise file information, the minimum context information to be retrieved is constructed; Based on a pre-trained large language model, multiple retrieval context statements corresponding to the minimum context information are generated, and query results corresponding to the retrieval context statements are retrieved from the file storage space based on the large language model. The file storage space contains independent file directories corresponding to different users.

[0007] Furthermore, before obtaining the service type and user identifier, the method further includes: In response to a user account creation command, a storage space and an initial directory matching the user identifier carried in the creation command are created in the file storage space; The initial directory is created with a hierarchical index based on different business types and business knowledge information. The hierarchical index includes an explicit index and an index to be categorized. When business information is generated during business operations, the business information is stored in the corresponding storage space according to the hierarchical index, and indexed to generate the independent file directory.

[0008] Furthermore, the step of retrieving query results from the file storage space based on the large language model, corresponding to the retrieval context statement, includes: Generate the retrieval context statement and the conversation statement of the independent file directory, and use the conversation statement as the model input of the large language model for querying; When the query results include file paths corresponding to the first-level index and / or the second-level index, output the file content corresponding to all indexes in the file path as the query results; When the query results include file paths corresponding to at least three levels of indexes, the target index in the file path is determined based on business similarity, and the file content corresponding to the target index is output as the query result.

[0009] Furthermore, determining the relevant file information and precise file information based on the business type and the user identifier includes: The system uses preset wildcards to find relevant file information that matches the business type and the user identifier, and uses preset search patterns to find precise file information that corresponds to the business type and the user identifier. The preset search patterns include multiple precise search patterns that match different business types.

[0010] Furthermore, the construction of the minimum context information to be retrieved based on the relevant file information and the precise file information includes: Based on a pre-trained semantic parsing model, text content matching the business type is parsed from the relevant file information and the precise file information. The text content includes at least one of words, characters, numbers, images, and videos. Key information is extracted from the text content according to a preset repetition ratio, and minimal context information is constructed based on the key information.

[0011] Furthermore, the generation of multiple retrieval context statements corresponding to the minimum context information based on the pre-trained large language model includes: If the minimum context information includes interpretable statements, then the pre-trained large language model is used to combine the minimum context information into multiple retrieval context statements. If the minimum context information includes an uninterpretable statement, then the reference translation text that matches the uninterpretable statement is called, and a pre-trained large language model is used to combine the reference translation text and the uninterpretable statement to obtain multiple retrieval context statements.

[0012] Furthermore, the method also includes: The decision model, which has been trained, makes an output decision based on the query results, and determines the output object and output method of the query results based on the output decision results.

[0013] According to another aspect of this application, an artificial intelligence-based contextual data query apparatus is provided, comprising: The acquisition module is used to retrieve the business type and user identifier in response to session requests; The determination module is used to determine relevant file information and precise file information based on the business type and the user identifier, and to construct the minimum context information to be retrieved based on the relevant file information and precise file information; The generation module is used to generate multiple retrieval context statements corresponding to the minimum context information based on a pre-trained large language model, and to query the query results corresponding to the retrieval context statements from the file storage space based on the large language model. The file storage space contains independent file directories corresponding to different users.

[0014] Furthermore, the device also includes: A creation module is used to, in response to a user account creation instruction, create a storage space and an initial directory in the file storage space that match the user identifier carried by the creation instruction; create a hierarchical index of the initial directory according to different business types and business knowledge information, the hierarchical index including an explicit index and a category index; when business information is generated during business operations, store the business information in the corresponding storage space according to the hierarchical index, and mark it with an index to generate the independent file directory.

[0015] Furthermore, the generation module is specifically used to generate a conversational statement between the retrieval context statement and the independent file directory, and to use the conversational statement as the model input of the large language model for querying; when the obtained query result includes file paths corresponding to the first-level index and / or the second-level index, the module outputs the file content corresponding to all indexes in the file path as the query result; when the obtained query result includes file paths corresponding to at least the third-level index, the module determines the target index in the file path based on business similarity, and outputs the file content corresponding to the target index as the query result.

[0016] Furthermore, the determining module is specifically used to search for relevant file information that matches the business type and the user identifier using a preset wildcard, and to search for precise file information that corresponds to the user identifier according to a preset search mode, wherein the preset search mode includes multiple precise search patterns that match different business types.

[0017] Furthermore, the determining module is specifically used to parse text content matching the business type from the relevant file information and the precise file information based on a pre-trained semantic parsing model. The text content includes at least one of words, characters, numbers, images, and videos. Key information in the text content is extracted according to a preset repetition ratio, and minimal context information is constructed based on the key information.

[0018] Furthermore, the generation module is specifically configured to, when the minimum context information includes interpretable statements, use a pre-trained large language model to combine the minimum context information into multiple retrieval context statements; when the minimum context information includes uninterpretable statements, call the reference translation text that matches the uninterpretable statements, and use the pre-trained large language model to combine the reference translation text and the uninterpretable statements into multiple retrieval context statements.

[0019] Furthermore, the device also includes: The decision module is used to make output decisions on the query results based on the decision model that has been trained, and to determine the output object and output method of the query results based on the output decision results.

[0020] According to another aspect of this application, a storage medium is provided, wherein at least one executable instruction is stored therein, the executable instruction causing a processor to perform an operation corresponding to the above-described AI-based context data query method.

[0021] According to another aspect of this application, a terminal is provided, comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other through the communication bus; The memory is used to store at least one executable instruction, which causes the processor to perform the operation corresponding to the above-described AI-based context data query method.

[0022] By employing the above technical solutions, the technical solutions provided in the embodiments of this application have at least the following advantages: This application provides an artificial intelligence-based contextual data query method, apparatus, storage medium, and device. Compared with existing technologies, the embodiments of this application obtain the business type and user identifier in response to a session request; determine relevant file information and precise file information based on the business type and user identifier, and construct the minimum context information to be retrieved based on the relevant file information and precise file information; generate multiple retrieval context statements corresponding to the minimum context information based on a pre-trained large language model, and query the query results corresponding to the retrieval context statements from the file storage space based on the large language model. The file storage space contains independent file directories corresponding to different users, which greatly reduces the reasoning cost of the query, improves the efficiency of data query completion, enables rapid location of the query purpose, provides strong security protection for data query through user-independent directories, reduces system maintenance costs, and improves the response speed of intelligent customer service.

[0023] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, specific embodiments of this application are given below. Attached Figure Description

[0024] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of this application. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 A flowchart of a context data query method based on artificial intelligence provided in an embodiment of this application is shown; Figure 2 This illustration shows a block diagram of an artificial intelligence-based context data query device according to an embodiment of this application; Figure 3 A schematic diagram of the structure of a terminal provided in an embodiment of this application is shown. Detailed Implementation

[0025] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0026] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0027] The embodiments of this invention can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.

[0028] Foundational technologies for artificial intelligence generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.

[0029] Based on this, in one embodiment, the present invention provides an artificial intelligence-based context data query method. Taking the application of this method to computer devices such as servers as an example, the server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms, such as an intelligent customer service platform.

[0030] This application provides an artificial intelligence-based contextual data query method, such as... Figure 1 As shown, the method includes: 101. In response to a session request, obtain the service type and user identifier.

[0031] In this embodiment, the current execution terminal acts as the execution subject for context data query. In the intelligent customer service application scenario, the user can trigger a session request through the client to enter the data to be consulted or queried. After receiving the session request, the current execution terminal first obtains the business type and user identifier. The business type is used to characterize the type of business information that the user wants to query or requests when conversing with the intelligent customer service, including but not limited to insurance business, wealth management business, and transaction business. The user identifier is used to characterize the user's basic information, including but not limited to identity information and electronic account information, which are not specifically limited in this embodiment.

[0032] It should be noted that the business type and user identifier can be carried based on the session request, or they can be parsed based on the session content in the session request. For example, the business type of the session content can be parsed based on a large language model, or keywords can be extracted from the session content based on natural language processing technology. This application embodiment does not make specific limitations.

[0033] 102. Based on the business type and the user identifier, determine the relevant file information and the precise file information, and construct the minimum context information to be retrieved based on the relevant file information and the precise file information.

[0034] In this embodiment, after obtaining the business type and user identifier, the current execution terminal determines the relevant file information and precise file information to be queried. The relevant file information represents information that is relevant to the content to be queried; it can be understood as having a certain degree of relevance. The precise file information represents information that is precisely matched to the content to be queried; it can be understood as explicitly containing the content to be queried. Furthermore, based on the relevant file information and precise file information, the minimum context information to be retrieved is constructed. This minimum context information represents the minimum amount of query content included in the query. For example, for filenames, the minimum context information can be the fewest folder identifiers or the fewest filenames; this embodiment does not impose specific limitations. Additionally, when constructing the minimum context information to be retrieved, the relevant file information and precise file information can be combined, or similarity filtering can be performed; this embodiment does not impose specific limitations.

[0035] 103. Generate multiple retrieval context statements corresponding to the minimum context information based on the pre-trained large language model, and query the query results corresponding to the retrieval context statements from the file storage space based on the large language model.

[0036] In this embodiment, to adapt to the query function of the large language model, the current execution end parses the minimum context information using a pre-trained large language model to generate multiple retrieval context statements for querying. These multiple retrieval context statements are then sequentially input into the large language model, instructing it to retrieve the corresponding query results from the file storage space. The file storage space contains independent file directories for different users; each user has their own storage unit and directory, ensuring more secure and accurate file storage. In some embodiments, the file directories in the file storage space may include indexes of structured files such as basic information, transaction history, and risk ratings, allowing for targeted searching of user-identified data rather than all user data when a query is performed.

[0037] It should be noted that the Large Language Model (LLM) in the current execution end can be a natural language processing technology based on deep learning. It can be built on the Transformer framework, such as a certain GPT application, to achieve the purpose of intelligent customer service query application.

[0038] In another embodiment of this application, for further definition and explanation, before obtaining the service type and user identifier, the method further includes: In response to a user account creation command, a storage space and an initial directory matching the user identifier carried in the creation command are created in the file storage space; A hierarchical index of the initial directory is created according to different business types and business knowledge information; When business information is generated during business operations, the business information is stored in the corresponding storage space according to the hierarchical index, and indexed to generate the independent file directory.

[0039] To partition the file storage space according to different customers, ensuring accurate retrieval during queries and guaranteeing customer data security, the current execution terminal can create a separate file directory for each user when creating an account. Specifically, when the current execution terminal receives a user's account creation instruction, it first creates a storage space and an initial directory in the file storage space that match the user identifier carried in the creation instruction. At this time, the initial directory may only contain a preset number (such as 2 or 5) of first-level indexes, or it may only create the name of the initial directory without creating indexes, so that subsequent construction can be based on business type and business knowledge information. This application embodiment does not make specific limitations. Furthermore, since the business type is used to characterize the type of business information that the user wants to query or requests when interacting with the intelligent customer, and the business knowledge information is used to characterize all the knowledge content required to perform the business, for example, if the business type is insurance claims, the business knowledge information includes insurance claim amount, insurance claim conditions, etc., which can be retrieved based on a preset knowledge base. This application embodiment does not make specific limitations. When creating the hierarchical index of the initial directory according to different business types and business knowledge information, the hierarchical index is created by extracting matching knowledge from the business knowledge information according to the business type. At this time, the hierarchical index includes a defined index and a category index. The defined index is the upper-level index, and the category index is the lower-level index. For example, the defined index in the initial directory refers to the first-level insurance claim conditions and the first-level insurance claim count, and the category index refers to the second-level insurance claim condition classification. This application embodiment does not make specific limitations.

[0040] It should be noted that after the hierarchical index is created, the user's independent storage space is established, allowing the user to conduct various financial transactions. As the current execution entity, the user can store various data generated. Therefore, when business information is generated during business operations, it is stored in the corresponding storage space according to the hierarchical index and indexed, generating the independent file directory. In this process, the user identifier is first identified to determine the initial file directory, and then the business information is parsed to determine its corresponding hierarchical index. If no corresponding hierarchical index exists, a new hierarchical index can be added. In this case, this embodiment can store business data that cannot be matched with the original hierarchical index by adding a new index to be classified. Furthermore, for the parsing of business information, Natural Language Processing (NLP) technology can be used to extract keywords from the business information and match them with various hierarchical indexes. Alternatively, parsing and matching can be performed based on a large language model; this embodiment does not impose specific limitations.

[0041] In some embodiments, business types may include category identifiers such as loans / , insurance / , wealth, etc., and each business instance corresponds to a hierarchical index, forming a subdirectory at the next level. For example, loan applications are classified as a first-level index, and L20251128001, as an explicit next-level index, can contain multiple file indexes to be classified, such as application forms, review records, and scoring results.

[0042] In some embodiments, business knowledge information may include static knowledge such as stored policy documents, business rules, and regulatory requirements, as well as terms and conditions in the required financial business, supporting the management of different intelligent customer service versions.

[0043] In another embodiment of this application, for further definition and explanation, the step of querying the query results corresponding to the retrieval context statement from the file storage space based on the large language model includes: Generate the retrieval context statement and the conversation statement of the independent file directory, and use the conversation statement as the model input of the large language model for querying; When the query results include file paths corresponding to the first-level index and / or the second-level index, output the file content corresponding to all indexes in the file path as the query results; When the query results include file paths corresponding to at least three levels of indexes, the target index in the file path is determined based on business similarity, and the file content corresponding to the target index is output as the query result.

[0044] To leverage the large language model for querying and obtain accurate and effective results, when the current execution end queries and retrieves query results corresponding to the context statement from the file storage space based on the large language model, it first generates a conversational statement between the retrieval context statement and the independent file directory. This conversational statement is then used as the model input for the large language model. Specifically, since the retrieval context statement and the independent file directory are two separate text contents, a conversational statement that the large language model can understand is generated to better enable the large language model to understand and recognize them. For example, if the retrieval context statement is "Xiaoming, 2020, insurance, claim, expense," and the target file directory is "Xiaoming's file directory," then the corresponding conversational statement would be "Please query the expense incurred by the 2020 insurance claim in Xiaoming's file directory." This conversational statement is used as the model input for the large language model, and this embodiment does not impose specific limitations.

[0045] In this embodiment, when the query results include file paths corresponding to first-level and / or second-level indexes, it indicates that the current query result range is relatively large. Therefore, the current execution terminal outputs the file content corresponding to all indexes in the file paths as the query result, thereby providing users with a full range of data queries. When the query results include file paths corresponding to at least third-level indexes, it indicates that the current query content is relatively precise. Therefore, the current execution terminal determines the target index in the file path based on business similarity and outputs the file content corresponding to the target index as the query result, thereby providing users with precise data queries.

[0046] In another embodiment of this application, for further definition and explanation, the step of determining relevant file information and precise file information based on the business type and the user identifier includes: The system uses preset wildcards to find relevant file information that matches the business type and the user identifier, and uses preset search patterns to find precise file information that corresponds to the expected user identifier for the business type.

[0047] To meet the need for information segmentation and distinguish between precise file information and related file information, the current execution end uses preset wildcards to search for related file information that matches the business type and user identifier. In this case, the preset wildcards can be configured based on the Glob pattern for quick location of related files. For example, to find all loan records for a specific customer: glob("customers / C123456 / loans / ) The example in this application does not specifically limit the definition of " / application.json". Correspondingly, for precise file information, a preset search mode can be used to find precise file information corresponding to the user identifier predicted by the business type. In this case, the preset search mode includes multiple precise search patterns matching different business types, preferably a Grep search pattern, to accurately find information within the file content. For example, searching for the payout ratio for a specific disease in the claims rules: grep("diabetes"). "Compensation ratio", "insurance / rules / " The embodiments in this application do not specifically limit the .txt file.

[0048] In another embodiment of this application, for further definition and explanation, the step of constructing the minimum context information to be retrieved based on the relevant file information and the precise file information includes: Based on a pre-trained semantic parsing model, text content matching the business type is parsed from the relevant file information and the precise file information; Key information is extracted from the text content according to a preset repetition ratio, and minimal context information is constructed based on the key information.

[0049] To improve retrieval accuracy and the effectiveness of large language model queries, the current execution end, when constructing minimal context information, first parses text content matching the business type from relevant file information and the precise file information based on a pre-trained semantic parsing model. At this time, the text content includes at least one of words, characters, numbers, images, and videos. The semantic parsing model can be an end-to-end semantic representation learned using deep learning models (such as RNNs, Transformers, etc.) to accurately parse text content matching the business type; this application embodiment does not impose specific limitations. Furthermore, key information in the text content is extracted according to a preset repetition ratio, and minimal context information is constructed based on this key information. The preset repetition ratio is the proportion of repeated occurrences in the text content. For example, a preset repetition ratio of 2 times means that content that appears twice can be used as key information. Minimum context information is constructed based on this key information. At this time, the text content corresponding to the key information can be directly determined as the minimal context information; this application embodiment does not impose specific limitations.

[0050] In another embodiment of this application, for further definition and explanation, the step of generating multiple retrieval context statements corresponding to the minimum context information based on a pre-trained large language model includes: If the minimum context information includes interpretable statements, then the pre-trained large language model is used to combine the minimum context information into multiple retrieval context statements. If the minimum context information includes an uninterpretable statement, then the reference translation text that matches the uninterpretable statement is called, and a pre-trained large language model is used to combine the reference translation text and the uninterpretable statement to obtain multiple retrieval context statements.

[0051] To improve the accuracy of data retrieval by intelligent customer service through large language model-based queries, the retrieval context statements are constructed by first determining whether the statements in the minimum context information are interpretable, i.e., statements that the large language model can directly translate, such as Chinese or English statements. This embodiment does not impose specific limitations on this. When the minimum context information includes interpretable statements, the pre-trained large language model is used to combine the statements in the minimum context information to obtain multiple retrieval context statements. In this case, the statement combination can be random or arranged according to a default number; this embodiment does not impose specific limitations on this. When the minimum context information includes uninterpretable statements, the reference translation text matching the uninterpretable statement is called, and the pre-trained large language model is used to combine the reference translation text and the uninterpretable statement to obtain multiple retrieval context statements. The reference translation text represents text content or code scripts that can translate uninterpretable statements into interpretable statements. It can be compiled based on different query scenarios or interpretation requirements; this embodiment does not impose specific limitations on this.

[0052] It should be noted that when determining whether the minimum context information contains interpretable or uninterpretable statements, consecutive strings can be identified, for example, by using natural language processing technology. If the text can be identified as Chinese or English, which is understandable by a large language model, it is determined to be an interpretable statement; otherwise, it is determined to be an uninterpretable statement. This application does not impose specific limitations on the embodiments.

[0053] In another embodiment of this application, for further definition and explanation, the steps also include: The decision model, which has been trained, makes an output decision based on the query results, and determines the output object and output method of the query results based on the output decision results.

[0054] To improve the effectiveness and accuracy of data queries, the current execution end outputs a decision based on a pre-trained decision model. This output decision characterizes the choice of whether to provide the query result to the user. The decision model can be constructed using a Random Forest, an ensemble model composed of multiple decision trees that improves stability and accuracy through voting or averaging. The Random Forest generation process includes bootstrap sampling, random feature selection, decision tree construction, and prediction and ensemble. Bootstrap sampling involves drawing N samples with replacement from the original dataset to form multiple training subsets. Random feature selection involves randomly selecting m features (m is much smaller than the total number of features M) at each node of each tree. Decision tree construction involves building an unpruned decision tree based on the selected features and samples. Finally, the average of all tree predictions is taken as the final decision output.

[0055] It should be noted that the output object and output method of the query results are determined based on the output decision results. Here, the output object refers to the outputtable content of the query results, which can include all query results or be filtered based on the decision results. This application embodiment does not impose specific limitations. The output method refers to the way the query results are displayed to the user. For example, it can directly display the text content of the query results, or it can use speech conversion to output the corresponding language broadcast content of the query results. This application embodiment does not impose specific limitations.

[0056] This application provides an artificial intelligence-based contextual data query device. Compared with the prior art, this application responds to a session request by obtaining the business type and user identifier; determining relevant file information and precise file information based on the business type and user identifier; constructing minimal context information to be retrieved based on the relevant file information and precise file information; generating multiple retrieval context statements corresponding to the minimal context information based on a pre-trained large language model; and querying the query results corresponding to the retrieval context statements from a file storage space based on the large language model. The file storage space contains independent file directories corresponding to different users, which greatly reduces the reasoning cost of the query, improves the efficiency of data query completion, provides strong security for data query through user-independent directories, reduces system maintenance costs, and improves the response speed of intelligent customer service.

[0057] Furthermore, as a response to the above Figure 1 The implementation of the method shown in this application provides an artificial intelligence-based context data query device, such as... Figure 2 As shown, the device includes: Module 21 is used to obtain the service type and user identifier in response to a session request; The determination module 22 is used to determine relevant file information and precise file information based on the business type and the user identifier, and to construct the minimum context information to be retrieved based on the relevant file information and precise file information; The generation module 23 is used to generate multiple retrieval context statements corresponding to the minimum context information based on a pre-trained large language model, and to query the query results corresponding to the retrieval context statements from the file storage space based on the large language model. The file storage space contains independent file directories corresponding to different users.

[0058] Furthermore, the device also includes: A creation module is used to, in response to a user account creation instruction, create a storage space and an initial directory in the file storage space that match the user identifier carried by the creation instruction; create a hierarchical index of the initial directory according to different business types and business knowledge information, the hierarchical index including an explicit index and a category index; when business information is generated during business operations, store the business information in the corresponding storage space according to the hierarchical index, and mark it with an index to generate the independent file directory.

[0059] Furthermore, the generation module is specifically used to generate a conversational statement between the retrieval context statement and the independent file directory, and to use the conversational statement as the model input of the large language model for querying; when the obtained query result includes file paths corresponding to the first-level index and / or the second-level index, the module outputs the file content corresponding to all indexes in the file path as the query result; when the obtained query result includes file paths corresponding to at least the third-level index, the module determines the target index in the file path based on business similarity, and outputs the file content corresponding to the target index as the query result.

[0060] Furthermore, the determining module is specifically used to search for relevant file information that matches the business type and the user identifier using a preset wildcard, and to search for precise file information that corresponds to the user identifier according to a preset search mode, wherein the preset search mode includes multiple precise search patterns that match different business types.

[0061] Furthermore, the determining module is specifically used to parse text content matching the business type from the relevant file information and the precise file information based on a pre-trained semantic parsing model. The text content includes at least one of words, characters, numbers, images, and videos. Key information in the text content is extracted according to a preset repetition ratio, and minimal context information is constructed based on the key information.

[0062] Furthermore, the generation module is specifically configured to, when the minimum context information includes interpretable statements, use a pre-trained large language model to combine the minimum context information into multiple retrieval context statements; when the minimum context information includes uninterpretable statements, call the reference translation text that matches the uninterpretable statements, and use the pre-trained large language model to combine the reference translation text and the uninterpretable statements into multiple retrieval context statements.

[0063] Furthermore, the device also includes: The decision module is used to make output decisions on the query results based on the decision model that has been trained, and to determine the output object and output method of the query results based on the output decision results.

[0064] This application provides an artificial intelligence-based contextual data query device. Compared with the prior art, this application responds to a session request by obtaining the business type and user identifier; determining relevant file information and precise file information based on the business type and user identifier; constructing minimal context information to be retrieved based on the relevant file information and precise file information; generating multiple retrieval context statements corresponding to the minimal context information based on a pre-trained large language model; and querying the query results corresponding to the retrieval context statements from a file storage space based on the large language model. The file storage space contains independent file directories corresponding to different users, which greatly reduces the reasoning cost of the query, improves the efficiency of data query completion, provides strong security for data query through user-independent directories, reduces system maintenance costs, and improves the response speed of intelligent customer service.

[0065] According to one embodiment of this application, a storage medium is provided, the storage medium storing at least one executable instruction that can execute the AI-based context data query method in any of the above method embodiments.

[0066] Figure 3 The diagram shows a structural schematic of a terminal according to one embodiment of the present application. The specific embodiments of the present application do not limit the specific implementation of the terminal.

[0067] like Figure 3 As shown, the terminal may include: a processor 302, a communications interface 304, a memory 306, and a communications bus 308.

[0068] The processor 302, communication interface 304, and memory 306 communicate with each other via communication bus 308.

[0069] Communication interface 304 is used to communicate with other network elements such as clients or other servers.

[0070] The processor 302 is used to execute program 310, specifically to execute the relevant steps in the above-described embodiment of the AI-based context data query method.

[0071] Specifically, program 310 may include program code that includes computer operation instructions.

[0072] Processor 302 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application. The terminal includes one or more processors, which may be processors of the same type, such as one or more CPUs; or they may be processors of different types, such as one or more CPUs and one or more ASICs.

[0073] Memory 306 is used to store program 310. Memory 306 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.

[0074] Specifically, program 310 can be used to cause processor 302 to perform the following operations: In response to a session request, obtain the service type and user identifier; Based on the business type and the user identifier, relevant file information and precise file information are determined, and based on the relevant file information and precise file information, the minimum context information to be retrieved is constructed; Based on a pre-trained large language model, multiple retrieval context statements corresponding to the minimum context information are generated, and query results corresponding to the retrieval context statements are retrieved from the file storage space based on the large language model. The file storage space contains independent file directories corresponding to different users.

[0075] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.

[0076] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. An artificial intelligence-based context data query method, characterized by, include: In response to a session request, obtain the service type and user identifier; Based on the business type and the user identifier, relevant file information and precise file information are determined, and based on the relevant file information and precise file information, the minimum context information to be retrieved is constructed; Based on a pre-trained large language model, multiple retrieval context statements corresponding to the minimum context information are generated, and query results corresponding to the retrieval context statements are retrieved from the file storage space based on the large language model. The file storage space contains independent file directories corresponding to different users.

2. The method according to claim 1, characterized in that, Before obtaining the service type and user identifier, the method further includes: In response to a user account creation command, a storage space and an initial directory matching the user identifier carried in the creation command are created in the file storage space; The initial directory is created with a hierarchical index based on different business types and business knowledge information. The hierarchical index includes an explicit index and an index to be categorized. When business information is generated during business operations, the business information is stored in the corresponding storage space according to the hierarchical index, and indexed to generate the independent file directory.

3. The method according to claim 2, characterized in that, The query results obtained from the file storage space based on the large language model, corresponding to the retrieval context statement, include: Generate the retrieval context statement and the conversation statement of the independent file directory, and use the conversation statement as the model input of the large language model for querying; When the query results include file paths corresponding to the first-level index and / or the second-level index, output the file content corresponding to all indexes in the file path as the query results; When the query results include file paths corresponding to at least three levels of indexes, the target index in the file path is determined based on business similarity, and the file content corresponding to the target index is output as the query result.

4. The method according to claim 1, characterized in that, The process of determining relevant file information and precise file information based on the business type and the user identifier includes: The system uses preset wildcards to find relevant file information that matches the business type and the user identifier, and uses preset search patterns to find precise file information that corresponds to the business type and the user identifier. The preset search patterns include multiple precise search patterns that match different business types.

5. The method according to claim 1, characterized in that, The construction of the minimum context information to be retrieved based on the relevant file information and the precise file information includes: Based on a pre-trained semantic parsing model, text content matching the business type is parsed from the relevant file information and the precise file information. The text content includes at least one of words, characters, numbers, images, and videos. Key information is extracted from the text content according to a preset repetition ratio, and minimal context information is constructed based on the key information.

6. The method according to claim 5, characterized in that, The generation of multiple retrieval context statements corresponding to the minimum context information by the pre-trained large language model includes: If the minimum context information includes interpretable statements, then the pre-trained large language model is used to combine the minimum context information into multiple retrieval context statements. If the minimum context information includes an uninterpretable statement, then the reference translation text that matches the uninterpretable statement is called, and a pre-trained large language model is used to combine the reference translation text and the uninterpretable statement to obtain multiple retrieval context statements.

7. The method according to any one of claims 1-6, characterized in that, The method further includes: The decision model, which has been trained, makes an output decision based on the query results, and determines the output object and output method of the query results based on the output decision results.

8. A contextual data query device based on artificial intelligence, characterized in that, include: The acquisition module is used to retrieve the business type and user identifier in response to session requests; The determination module is used to determine relevant file information and precise file information based on the business type and the user identifier, and to construct the minimum context information to be retrieved based on the relevant file information and precise file information; The generation module is used to generate multiple retrieval context statements corresponding to the minimum context information based on a pre-trained large language model, and to query the query results corresponding to the retrieval context statements from the file storage space based on the large language model. The file storage space contains independent file directories corresponding to different users.

9. A computer-readable storage medium having a computer program / instructions stored thereon, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method of claim 1.

10. A computer device, comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method of claim 1.