Session information processing method, electronic equipment and storage medium

By extracting and associated proprietary nouns in user sessions, the problem of low document retrieval accuracy caused by inconsistent with colloquial nouns and proprietary nouns is solved, and more efficient document retrieval and dialogue system understanding capabilities are achieved.

CN119903156APending Publication Date: 2025-04-29TRAVELSKY TECHNOLOGY LIMITED
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411996340.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

Existing language models understand that colloquial nouns are inconsistent with proper nouns, resulting in low document retrieval accuracy.

Method used

By obtaining user-initiated session information, spoken nouns are intelligently extracted and corresponding proper nouns are determined based on these nouns, so as to accurately match and improve document retrieval accuracy.

Benefits of technology

It has achieved the improvement of document retrieval accuracy and dialogue system understanding ability, and solved the problem of low search accuracy caused by the inconsistency between colloquial nouns and proper nouns in the existing language model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119903156A_ABST
    Figure CN119903156A_ABST
Patent Text Reader

Abstract

The invention discloses a session information processing method, electronic equipment and a storage medium. The method comprises the steps that session information is acquired, and the session information is initiated by a target user; first noun information is determined based on the session information, and the first noun information comprises spoken language nouns in the session information; second noun information is determined based on the first noun information, and the second noun information comprises proper nouns associated with the spoken language nouns; and rewriting the session information based on the second noun information to obtain target session information. The technical problem that the document retrieval accuracy is low due to the fact that an existing language model is inconsistent with proper nouns when understanding spoken nouns is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method for processing conversation information, an electronic device, and a storage medium. Background Art

[0002] Conversational information is text content based on natural language processing technology. It represents communications between users and systems in specific contexts, such as the question-and-answer exchanges between users and customer service representatives in daily life. Conversational information processing typically involves two steps: understanding and rewriting. Understanding extracts semantic information from conversational information to determine its semantic structure. Rewriting, based on the semantic structure derived from understanding, rewrites user-initiated conversational information to achieve efficient processing.

[0003] In recent years, with the widespread adoption of large-scale language models (LLMs), conversational natural language processing tasks have become increasingly widely used across various fields. These large models, leveraging deep learning techniques, can understand and generate human-like content, demonstrating tremendous potential and advantages in machine translation, automatic summarization, text generation, and conversational systems. In many scenarios, users desire to obtain complex information through simple natural language conversations. This is particularly true when retrieving external knowledge bases or documents, requiring the system to quickly and accurately return relevant content.

[0004] To meet this need, RAG (Retrieval-Augmented Generation) technology emerged. RAG is a hybrid model that combines retrieval and generation. By first retrieving relevant document fragments and then generating answers using a generative model, it provides users with more efficient and accurate information. However, in practical applications, particularly in dialogue systems, the performance of RAG is often hampered by inconsistencies between colloquial nouns and proper nouns, resulting in reduced retrieval accuracy.

[0005] To address the above-mentioned problems, no effective solutions have been proposed so far. Summary of the Invention

[0006] Embodiments of the present invention provide a method for processing conversation information, an electronic device, and a storage medium, to at least solve the technical problem of low document retrieval accuracy caused by the inconsistency between the existing language model in understanding colloquial nouns and proper nouns.

[0007] According to one aspect of an embodiment of the present invention, a method for processing session information is provided, comprising: obtaining session information, wherein the session information is initiated by a target user; determining first noun information based on the session information, wherein the first noun information includes spoken nouns in the session information; determining second noun information based on the first noun information, wherein the second noun information includes proper nouns associated with the spoken nouns; and rewriting the session information based on the second noun information to obtain target session information.

[0008] Furthermore, determining the second noun information based on the first noun information includes: acquiring association information, the association information being used to determine a mapping relationship between colloquial nouns and proper nouns; and determining the second noun information based on the association information and the first noun information.

[0009] Furthermore, determining the second noun information based on the association information and the first noun information includes: matching the first noun information with proper nouns in the proper noun information based on the association information, and determining the properly matched proper nouns as the second noun information, wherein the proper noun information is a collection of all proper nouns.

[0010] Furthermore, obtaining associated information includes: obtaining training session information, wherein the training session information includes at least one of the following: preset user questions, historical session records of target users; obtaining noun truth value information, wherein the noun truth value information includes proper nouns and first noun explanations of proper nouns; determining spoken noun information based on the training session information, wherein the spoken noun information includes spoken nouns and second noun explanations corresponding to the spoken nouns; grouping the noun truth value information and the spoken noun information based on similarity to obtain grouping results, wherein one grouping result includes one proper noun and at least one spoken noun; establishing a mapping relationship between the proper nouns and spoken nouns in the same grouping result to obtain associated information.

[0011] Furthermore, similarity grouping is performed on the noun true value information and the spoken noun information to obtain a grouping result, including: embedding the noun true value information to obtain a first embedding vector; embedding the spoken noun information to obtain a second embedding vector; and grouping the first embedding vector and the second embedding vector based on similarity to obtain a grouping result.

[0012] Furthermore, the first embedding vector and the second embedding vector are grouped based on similarity to obtain a grouping result, including: performing a first grouping on the first embedding vector and the second embedding vector to obtain an intermediate grouping result; and performing a second grouping on the intermediate grouping result using the large language model to obtain a grouping result.

[0013] Furthermore, the first embedding vector and the second embedding vector are grouped for the first time to obtain an intermediate grouping result, including: calculating the semantic similarity between the first embedding vector and the second embedding vector through the KNN algorithm; judging through the large language model whether the proper noun corresponding to the first embedding vector and the colloquial noun corresponding to the second embedding vector represent the same real thing, and obtaining a judgment result; and determining the intermediate grouping result based on the semantic similarity and the judgment result.

[0014] According to another aspect of an embodiment of the present invention, an electronic device is provided, including: a memory storing an executable program; and a processor for running the program, wherein the program executes the methods of various embodiments of the present invention when running.

[0015] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium includes a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the methods in various embodiments of the present invention.

[0016] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the method in each embodiment of the present invention is implemented.

[0017] In an embodiment of the present invention, a method of conversation information processing and noun conversion is adopted. By collecting conversation information initiated by users and intelligently extracting colloquial nouns therein, and then determining the corresponding proper nouns based on these colloquial nouns, the purpose of accurately matching users' colloquial expressions with professional terms is achieved, thereby achieving the technical effect of improving document retrieval accuracy and the understanding ability of the dialogue system, and further solving the technical problem of low document retrieval accuracy caused by the inconsistency between the existing language model in understanding colloquial nouns and proper nouns. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0019] Figure 1 is a flowchart of an optional method for processing session information according to an embodiment of the present invention;

[0020] Figure 2 is a schematic diagram of a question rewriting process of an optional method for processing session information according to an embodiment of the present invention;

[0021] Figure 3 1 is a schematic diagram of a noun extraction and relationship binding process of an optional method for processing session information according to an embodiment of the present invention;

[0022] Figure 4 This is a flowchart of an overall implementation of a problem rewriting of an optional method for processing session information according to an embodiment of the present invention;

[0023] Figure 5 This is a structural block diagram of a control device for a method for processing session information according to one embodiment of the present invention. DETAILED DESCRIPTION

[0024] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0025] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0026] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following interpretations:

[0027] Retrieval-Augmented Generation (RAG) is a technique that combines information retrieval with generative models. By retrieving relevant information from external knowledge bases, RAG models are able to reference this content when generating text, thereby improving the accuracy and consistency of the generated text. It is particularly suitable for tasks that require reference to specific knowledge domains, such as question-answering systems and dialogue generation.

[0028] Embedding is the process of converting text data into numerical representations in a high-dimensional vector space. This conversion aims to capture the meaning and context of words, sentences, and even documents, enabling machines to better understand and process natural language.

[0029] The KNN algorithm (K-nearest neighbor algorithm) is a basic machine learning algorithm that measures the distance between the sample to be classified and the known category sample to find the nearest K neighbors, and then votes to determine the category of the sample to be classified based on the categories of these neighbors.

[0030] Large language models (LLMs) are deep learning-based algorithms that can understand and generate natural language text. These models typically have hundreds of millions to hundreds of billions of parameters and are trained using large amounts of text data. They can perform complex language tasks such as translation, text summarization, question answering, and writing.

[0031] A graph database is a system that stores graph-structured data. It represents entities and their relationships through nodes and edges and is suitable for processing complex associative data.

[0032] A vector database is a database designed specifically for storing and querying vector data. It supports vector similarity search and is suitable for high-dimensional data processing in machine learning and data science.

[0033] A relational database (RDB) is a database based on the relational model, storing data in two-dimensional tables. Each table consists of rows (records) and columns (fields). Tables are linked using primary and foreign keys to ensure data consistency. SQL is commonly used for data query and management.

[0034] The Neo4j Graph Data Science (GDS) plugin is used to perform graph analytics and machine learning tasks on graph databases. It provides a rich set of graph algorithms (such as community detection and path finding), graph projection, and data preprocessing capabilities, helping users discover relationships between nodes and perform predictive analytics. It is widely used in areas such as social networks, recommender systems, and fraud detection.

[0035] According to an embodiment of the present invention, a method embodiment of a method for processing session information is provided. It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system, such as a set of computer-executable instructions, and although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown.

[0036] Figure 1 is a method according to an embodiment of the present invention, such as Figure 1 As shown, the method includes the following steps:

[0037] Step S102: obtaining session information, wherein the session information is initiated by the target user;

[0038] Optionally, acquiring session information involves capturing and recording natural language questions asked by users in specific conversational scenarios. Session information includes not only the user's current question but also historical conversation records, which provide contextual information to help more accurately understand the context and meaning of nouns in subsequent processing.

[0039] In one specific embodiment, for example, in an airline's work scenario, a customer communicates with customer service through an online chat interface, inquiring about "points redemption" and "membership level." First, all conversations between the customer and customer service are recorded. For example, the customer might say, "I want to redeem my points for a plane ticket," or ask, "How many points do I need to upgrade to a gold card?" Each customer question is received and stored in real time. For example, the customer's most recent question is, "Can my silver card entitle me to two free checked bags?" As new questions are received, historical conversation records are integrated to capture the complete context of the user's conversation. In this embodiment, it is learned that the customer has a silver card and is interested in the specific benefits of "points redemption" and "membership level." The collected conversation information is formatted and stored for subsequent processing. The stored data includes the timestamp, content, and possible contextual information of the user's question.

[0040] Step S104, determining first noun information based on the conversation information, wherein the first noun information includes spoken nouns in the conversation information;

[0041] Optionally, determining the first noun information based on the conversation information refers to identifying and extracting informal or colloquial nouns from the conversation between the user and the customer service representative. These nouns often do not fully match the standardized terms in professional documents, but carry important information about the user's intent.

[0042] Specifically, in the following user conversation record: User: "I'm wondering if I can redeem my travel points for free flights?"; Customer Service: "Of course, you can. You'll need to log in to your account and select the flight you want in the points store."; User: "So what's my current membership level? I've heard from friends that Gold members have a lot of extra benefits."; Customer Service: "You're currently a Silver member. Gold members do enjoy more services, like extra baggage check-in and priority boarding." From the conversation record above, we can identify nouns such as "travel points," "points store," "membership level," "silver card," and "gold card." These are all colloquial expressions used by the user in the conversation. These colloquial nouns indicate the user's intent to inquire about reward points and membership services. Therefore, these nouns are identified as the first noun information within the conversation.

[0043] In this embodiment, by analyzing user conversations, a series of colloquial nouns can be accurately extracted. This noun information provides a foundation for subsequent noun binding and question rewriting. This ensures that, in practical applications, even if a user's question uses non-standard colloquial expressions, it can be correctly understood and converted into standard terminology in professional documents, thereby improving the accuracy and efficiency of information retrieval.

[0044] Step S106, determining second noun information based on the first noun information, wherein the second noun information includes proper nouns associated with the spoken nouns;

[0045] The goal of step S106 is to associate the spoken noun with the standardized terminology (i.e., proper noun) in the professional document to form the second noun information. When determining the second noun information, we also need to consider the context of the conversation. This ensures that even if a spoken noun has multiple possible proper noun counterparts, the most appropriate proper noun can be selected for association based on the context of the current conversation.

[0046] Specifically, in the airline customer service conversation scenario, it has been determined that "flight points" is a colloquial noun mentioned by the user. In this step, by comparing it with the professional documentation, "flight points" will be identified and associated with the proper noun "reward points." Similarly, "silver card" and "gold card" will be associated with the proper nouns "silver card member" and "gold card member," respectively.

[0047] The above steps not only enhance the understanding of user intent, but also build a bridge between colloquial nouns and proper nouns, thereby improving the accuracy and efficiency of information retrieval.

[0048] Step S108: rewrite the conversation information based on the second noun information to obtain target conversation information.

[0049] Step S108 utilizes the established associations between proper nouns and colloquial nouns to rewrite the original conversation information, thereby generating the target conversation information. This process converts the colloquial expressions contained in the user's question into expressions consistent with the terminology in the professional document, enhancing the match between the question and the document content, and improving the accuracy and efficiency of retrieval.

[0050] For example, a user might ask, "I'd like to know if my travel points can be redeemed for a plane ticket." Through the previous steps, the system has already determined that "travel points" is associated with the term "reward points." In this step, the question is rewritten as, "I'd like to know if my reward points can be redeemed for a plane ticket." This not only clearly expresses the user's intent but also ensures more accurate matching of relevant documents during retrieval.

[0051] Through the above steps S102 to S108, in an embodiment of the present invention, a conversation information processing and noun conversion method is adopted to collect conversation information initiated by the user and intelligently extract the colloquial nouns therein, and then determine the corresponding proper nouns based on these colloquial nouns, thereby achieving the purpose of accurately matching the user's colloquial expressions with professional terms, thereby achieving the technical effect of improving the accuracy of document retrieval and the understanding ability of the dialogue system, and further solving the technical problem of low document retrieval accuracy caused by the inconsistency between the existing language model in understanding colloquial nouns and proper nouns.

[0052] As an optional implementation, in step S106, determining the second noun information based on the first noun information includes:

[0053] Step S1061: Acquire association information, where the association information is used to determine a mapping relationship between colloquial nouns and proper nouns;

[0054] Specifically, there are two main sources for obtaining related information: the user's historical conversation records and parsing conversation information based on a large language model. Past user conversations are reviewed to identify the colloquial nouns used in different contexts and their corresponding proper nouns. For example, in an airline scenario, users may use "flight points," "points," or "points" to describe reward points in different conversations. Conversation information is parsed using a language model to extract proper nouns and their definitions or descriptions that are similar in meaning to the colloquial nouns. The colloquial nouns and proper nouns are converted into vector representations using an embedding model, and the similarity between them is calculated. This similarity calculation utilizes a graph database or vector database, along with the retrieval capabilities of RAG (Retrieval Augmented Generation) technology, to identify nouns that represent the same concept. Based on the similarity comparison, for each colloquial noun, the most relevant or similar proper noun is determined by obtaining related information. All related information is aggregated to create a noun mapping database.

[0055] Step S1062: Determine the second noun information based on the association information and the first noun information.

[0056] Specifically, for each spoken noun extracted from the user conversation and its associated message, the noun mapping database is queried to find the proper noun that best matches it, thereby determining the second noun information.

[0057] Specifically, in an example of an airline customer service conversation, a user asks, "I want to redeem my travel points for a ticket. How do I do this?" The system first identifies the colloquial noun "travel points" from historical records, and then uses parsing to determine the mapping between "travel points" and "reward points." Using this association, the user's question is rewritten as, "I want to redeem my reward points for a ticket. How do I do this?"

[0058] Through the above steps, the accuracy of spoken noun conversion can be ensured, possible errors caused by direct conversion can be avoided, and more accurate services can be provided to users.

[0059] Optionally, determining the second noun information based on the association information and the first noun information includes: matching the first noun information with proper nouns in the proper noun information based on the association information, and determining the successfully matched proper nouns as the second noun information, wherein the proper noun information is a collection of all proper nouns.

[0060] First, the colloquial nouns extracted from user conversations (i.e., primary noun information) and the proper nouns extracted from formal documents (i.e., proper noun information) are converted into vector representations using an embedding model. These vectors are then stored in a vector database, and the similarity between the colloquial noun vectors and the proper noun vectors is calculated using the K-nearest neighbor algorithm. For each colloquial noun, the best matching proper noun is searched in the proper noun information based on the associated information. If a highly matching proper noun is found, it is determined as the secondary noun information.

[0061] Specifically, suppose a user asks an airline customer service representative, "I'd like to know if my travel points can be redeemed for a free flight." In this scenario, the large language model analyzes the user conversation and extracts "flight points" as the first noun. Next, the graph database stores noun relationships and retrieves all proper nouns, including "reward points," "points mall," and "points redemption." Using the embedding model, the similarity between "flight points" and these proper nouns is calculated, revealing that "flight points" has the highest similarity to "reward points." "Flight points" is matched with these proper nouns to confirm a successful match, identifying "reward points" as the second noun. This association information and the large language model are then used to rewrite the user's question: "I'd like to know if my reward points can be redeemed for a free flight."

[0062] Through the above steps, the first noun information and the proper noun are accurately matched to determine the second noun information, which can effectively reduce errors in the conversion process and improve the reliability of the processing results, especially in fields involving a large number of proper nouns.

[0063] Optionally, in step S1061, obtaining associated information includes:

[0064] Step S10611: Acquire training session information, wherein the training session information includes at least one of the following: preset user questions, historical session records of the target user;

[0065] Preset user questions: A series of questions that users may ask, containing spoken nouns, are pre-set. These questions are designed based on the analysis of user behavior and common spoken expressions.

[0066] Target user's historical conversation records: Collect conversation records of the target user's past interactions with the system and extract snippets containing spoken nouns. These records provide the user's spoken nouns and contextual information used in real conversation scenarios.

[0067] Step S10612: Acquire noun truth value information, wherein the noun truth value information includes proper nouns and the first definition of the proper nouns;

[0068] Truth-value information for proper nouns refers to the definitions and explanations of proper nouns in formal documents. This information provides a standardized semantic benchmark, enabling the parsing and binding of spoken nouns to be based on accurate proper noun definitions. This facilitates the construction of mappings between proper nouns and spoken nouns.

[0069] Proper nouns: Professional terms extracted from formal documents, such as "reward points" and "gold card membership".

[0070] First definition of proper nouns: A detailed description of the proper nouns, explaining their specific meanings and usage scenarios.

[0071] Step S10613: determining spoken noun information based on the training session information, wherein the spoken noun information includes the spoken noun and a second noun explanation corresponding to the spoken noun;

[0072] Colloquial nouns: non-standard nouns used by users in conversations, such as "flight points" and "silver card".

[0073] Secondary noun explanation for spoken nouns: An explanation of the meaning of spoken nouns provided through contextual understanding in order to map them with proper nouns.

[0074] Step S10614: performing similarity grouping on the noun truth value information and the spoken noun information to obtain grouping results, wherein one grouping result includes one proper noun and at least one spoken noun;

[0075] Specifically, embedding technology is used to convert proper nouns and colloquial nouns into vector representations. The semantic relationship between the proper nouns and colloquial nouns is quantified by calculating the distance or similarity score between the vectors. The higher the similarity score, the stronger the semantic connection between the two nouns. Based on the results of the similarity calculation, the system groups the nouns, with each group containing a proper noun and at least one colloquial noun with a high similarity. This grouping process is implemented using a graph database or a vector database, using methods such as the K-nearest neighbor algorithm to determine the similarity between nouns within the group.

[0076] Step S10615: Establish a mapping relationship between proper nouns and colloquial nouns in the same grouping result to obtain association information.

[0077] Specifically, based on the similarity grouping results, a mapping list is created for each proper noun, containing all matching colloquial nouns. These mappings, along with the noun's explanation, form association information, which is used for noun replacement during subsequent question rewriting. This association information is then updated in the noun relationship database, ensuring that these mappings can be quickly retrieved and applied in subsequent user conversations.

[0078] In a specific example, suppose a user asks, "I'd like to know if my travel points can be redeemed for air tickets?" in a conversation with an airline customer service representative. The system may have already collected similar questions as training session information, including colloquial nouns such as "flight points," "points," and "reward points." The system then extracts the ground truth of the noun from official documents, such as "reward points," and its detailed definition: "Reward points are a reward offered by airlines to members. Members can accumulate points through flying or spending, and can redeem them for services such as air tickets, upgrades, and baggage allowances." The system determines that "flight points" in the user's question is a colloquial noun, and extracts its meaning from the context, such as "accumulated points can be redeemed for air tickets." A similarity calculation is performed on the vector representations of "flight points" and "reward points," revealing that they represent similar concepts and grouping them together. A mapping relationship is established between "reward points" and "flight points," indicating that "flight points" can be replaced by "reward points." This set of associated information (including nouns and their definitions) is stored in a noun relation database for subsequent question rewriting and document retrieval, thereby improving the system's retrieval accuracy and efficiency.

[0079] Through the above steps, by studying user historical conversations and preset questions, we can learn the diverse spoken expressions of the same concept by different users in different situations, better understand the user's spoken expression habits, use noun truth information and spoken noun information to perform similarity grouping, and establish a mapping relationship based on the grouping structure. Based on the mapping relationship, we can automatically convert spoken nouns into corresponding proper nouns, avoiding the problem of inaccurate retrieval caused by spoken expressions.

[0080] Optionally, in step S10614, the noun truth value information and the spoken noun information are grouped according to similarity to obtain a grouping result, including:

[0081] Embed the noun truth value information to obtain the first embedding vector;

[0082] Optionally, the true value information of the nouns is extracted. For formal documents, if the document is too large, it must first be split into sub-documents of appropriate size. Then, a large language model is used to extract relevant proper nouns and the first noun explanations of the proper nouns from these sub-documents, and the different meanings of the same proper noun in different contexts are merged. All processed noun true value information is used to obtain a first embedding vector through embedding technology. The generated first embedding vector is stored in a graph database or a vector database and associated with the noun node. These first embedding vectors can capture the semantic characteristics of proper nouns, making similar nouns closer in the vector space.

[0083] Embed the spoken noun information to obtain the second embedding vector;

[0084] Specifically, the system extracts spoken noun information and, based on pre-set user questions and the target user's historical conversation history, extracts the spoken nouns and their corresponding secondary noun explanations. This spoken noun information is processed using embedding technology to generate secondary embedding vectors, which are then stored in a graph database or vector database and associated with the corresponding spoken noun nodes. These secondary embedding vectors are used to describe the semantic features of the spoken nouns, facilitating subsequent similarity calculations.

[0085] The first embedding vector and the second embedding vector are grouped based on similarity to obtain a grouping result.

[0086] Specifically, an algorithm such as cosine similarity is used to calculate the similarity score between the first and second embedding vectors. A similarity threshold is set, typically 0.5, indicating that two vectors are considered to represent the same real-world object only if their cosine similarity is at least 0.5. Nouns with similarity scores above the threshold are grouped, ensuring that each group contains at least one first embedding vector and at least one second embedding vector. Each group represents a group of nouns representing the same or similar concepts, providing a basis for establishing subsequent noun mapping relationships.

[0087] Through the above steps, the true value information of nouns and the spoken noun information are embedded separately, converted into vector representations, and grouped according to the similarity between vectors. This method combines traditional algorithms and deep learning models, and can more comprehensively consider the semantic and contextual information of nouns, improving the accuracy and intelligence of the conversion.

[0088] Optionally, performing similarity grouping on the first embedding vector and the second embedding vector to obtain a grouping result includes:

[0089] Performing a first grouping on the first embedding vector and the second embedding vector to obtain an intermediate grouping result;

[0090] Specifically, a similarity threshold (such as 0.5) is set, and based on the calculated score, the second embedding vector with a score higher than the threshold is regarded as a group with the corresponding first embedding vector to form an intermediate grouping result.

[0091] The intermediate grouping results are grouped again using the large language model to obtain the grouping results.

[0092] Specifically, the intermediate grouping results obtained in the first grouping are used as input and sent to a pre-trained large language model (LLM). Based on its powerful language understanding and generation capabilities, the LLM performs in-depth semantic analysis on each group of nouns to determine whether they actually represent the same or related concepts or entities. For groups containing multiple first embedding vectors, the LLM will identify and retain the most semantically representative proper nouns, while ensuring that the spoken nouns are accurately bound to at least one proper noun. After a second grouping is performed by the large language model, the grouping results are obtained, ensuring that each grouping result contains only one proper noun. In the graph database, based on these grouping results, binding relationships are added for proper nouns and corresponding spoken nouns.

[0093] Through the above steps, potential noun bindings are quickly screened through vector space similarity calculations in the early stages. LLM's deep semantic understanding capabilities are then used to accurately determine and optimize noun bindings, significantly improving the accuracy and efficiency of noun bindings and providing strong support for the question rewriting phase of RAG technology. This two-stage grouping strategy not only enables the processing of large amounts of noun data but also ensures that binding relationships meet the semantic standards of specialized fields, thereby improving the overall system's retrieval performance and user experience.

[0094] Optionally, performing a first grouping on the first embedding vector and the second embedding vector to obtain an intermediate grouping result includes:

[0095] Calculate the semantic similarity between the first embedding vector and the second embedding vector using the KNN algorithm;

[0096] Specifically, the K-NN algorithm follows these steps: 1. For each first embedding vector, find the K vectors with the highest similarity scores to the second embedding vector. 2. If the similarity scores of these second embedding vectors exceed a preset similarity threshold (0.5), group them together with the first embedding vector. 3. Repeat these steps until all vectors have been considered.

[0097] The large language model is used to determine whether the proper noun corresponding to the first embedding vector and the spoken noun corresponding to the second embedding vector represent the same real thing, and a judgment result is obtained; based on the semantic similarity and the judgment result, an intermediate grouping result is determined.

[0098] Specifically, the input text (proper nouns corresponding to the first embedding vector and spoken nouns corresponding to the second embedding vector) is constructed. Using the prompt word technique, the LLM is invoked and the constructed input text is input as prompt words into the large language model. If the semantic similarity between the proper noun corresponding to the first embedding vector and the spoken noun corresponding to the second embedding vector exceeds a preset threshold, and the LLM determines that they represent the same real-world object, the pair of nouns is included in the same group to obtain an intermediate grouping result. Otherwise, they are considered unrelated and are not included in the same group.

[0099] It should be further explained that the first and second embedding vectors are stored in the graph database and associated with the relevant nodes. When nodes with the same name appear in the graph database (i.e., multiple nodes with the same name), the KNN algorithm is first applied to calculate the semantic similarity between the embedding vectors of these nodes (i.e., the first and second embedding vectors). For nodes with high similarity identified by the KNN algorithm, the LLM is further used to perform in-depth semantic analysis. LLM, with its powerful language understanding capabilities, analyzes the node names and descriptions to determine whether they represent the same real-world object. If both the KNN algorithm and the LLM meet the criteria, namely, that the nodes with the same name are semantically similar and represent the same real-world object, the system deletes one node and retains the other. The descriptions of the retained nodes are then merged and summarized using a large language model to create a more comprehensive and accurate description, which serves as the descriptive attribute for the retained node. This step ensures the refinement and accuracy of noun nodes in the graph database and avoids unnecessary redundancy. If one of the nodes with the same name is a colloquial noun and the other is a proper noun, and their semantics are consistent, the system retains the proper noun node and deletes the colloquial noun node. This approach is based on the priority of proper nouns in formal documents and retrieval, ensuring that the system can accurately use proper nouns in question rewriting and subsequent retrieval.

[0100] In the context of RAG technology, this semantic merging strategy for duplicate proper nouns eliminates noun ambiguity and standardizes noun information, helping to improve the efficiency and accuracy of subsequent document retrieval. Deleting redundant nodes with the same name reduces graph database storage space and simplifies the data structure, making subsequent queries and analysis more efficient.

[0101] Figure 2 is a schematic diagram of a question rewriting process of an optional method for processing session information according to an embodiment of the present invention. Figure 2 The diagram shows the entire process from user questioning, question rewriting, and then to institutional document retrieval. Each box and arrow in the diagram represents the logic of information flow and the processing steps.

[0102] User questions: Users ask questions in the form of dialogue through the system's UI interface. The system receives the user's questions and records the conversation information.

[0103] Question rewriting: Use the established mapping relationship between spoken nouns and proper nouns to rewrite the user's question so that it is semantically closer to the expression in the formal document.

[0104] Institutional document retrieval: This involves using RAG technology to retrieve relevant information from formal documents using rewritten questions as query conditions.

[0105] Figure 3is a schematic diagram of a noun extraction and relationship binding process of an optional method for processing session information according to an embodiment of the present invention. Figure 3 The following specific steps are shown:

[0106] Step 1: Collect user questions: When the user asks a question to the system, the current user question is collected and the user's historical session information is recorded at the same time for reference in subsequent processing.

[0107] Step 2: Extracting Spoken Nouns: Based on user questions and historical conversation records, we extract spoken nouns and their explanations. These nouns and explanations are processed using embedding technology and stored in the corresponding node attributes of the graph database for subsequent matching and association.

[0108] Step 3: Extracting Proper Nouns: For formal documents that are too large, they must first be split into appropriately sized sub-documents. Next, a large language model is used to extract relevant nouns and their meanings from these sub-documents. The different meanings of the same noun in different contexts are merged. All processed nouns and meanings are also stored in the graph database using embedding technology.

[0109] Step 4: Binding proper nouns to colloquial nouns: Nouns are grouped based on similarity using their embedding vectors, grouping nouns that likely represent the same thing. These noun groups are then regrouped using a large language model to ensure that each group contains only one proper noun. Based on these grouping results, binding relationships are added to the graph database between proper nouns and their corresponding colloquial nouns.

[0110] Step 5: Question Rewriting: When the user asks a question again, the system extracts the colloquial nouns in the question based on the current conversation history and retrieves the corresponding proper nouns through the binding relationships in the graph database. The large language model then incorporates this information to rewrite the user's question to better align with the terminology and expressions in the formal document.

[0111] Through the above steps, the transformation from colloquial questions to professional questions is achieved, the matching degree between colloquial nouns and proper nouns is enhanced, and the accuracy of retrieval is significantly improved.

[0112] Figure 4 This is a flowchart of the overall implementation of an optional method for processing session information according to an embodiment of the present invention. Figure 4 The following specific steps are shown:

[0113] 1. Start: The starting point of the flowchart indicates the beginning of the technical process. When the user asks a question through the UI interface, the entire question rewriting process is triggered.

[0114] 2. Record user conversations: The system automatically records user questions and related conversation history information, which is stored in a relational database (RDB) to provide the necessary context for subsequent steps.

[0115] 3. Extracting Spoken Nouns: Using a Large Language Model (LLM), we extract all spoken nouns and their secondary meanings from stored user conversation records. These nouns are then processed for matching and binding with proper nouns.

[0116] 4. Extract proper nouns: At the same time, proper nouns and their first definitions are extracted from the official documents. These nouns will be used as references in subsequent steps to bind colloquial nouns.

[0117] 5. Noun Embedding: All extracted nouns, whether colloquial or proper, need to be converted into vector form through the embedding model in order to calculate semantic similarity.

[0118] 6. Similarity grouping: Using the noun embedding vector, through the K-nearest neighbor algorithm (KNN) or similarity calculation, nouns representing similar concepts are grouped together to form an intermediate grouping result.

[0119] 7. Named Entity Semantic Judgment: For the intermediate grouping results, a large language model (LLM) is used to perform in-depth semantic judgment to confirm whether the nouns in each group actually represent the same real-world object. This step ensures the accuracy of noun binding.

[0120] 8. Noun binding: The noun relationships determined in the above steps will add binding relationships (mapping relationships between proper nouns and colloquial nouns) between proper nouns and corresponding colloquial nouns in the graph database, providing a basis for subsequent question rewriting.

[0121] 9. Question rewriting: Based on the established mapping relationship, the question rewriting module will rewrite the user's question, replacing the colloquial nouns with proper nouns to improve the matching degree between the question and the formal document content, and enhance the accuracy and efficiency of the retrieval.

[0122] Specifically, the user's question is combined with the context to extract the colloquial nouns and their secondary definitions. First, all colloquial nouns with the same name are retrieved. If any colloquial nouns exist, the corresponding colloquial noun and proper noun information are added to the context of the prompt word. The user's question is then rewritten using LLM. If no corresponding colloquial noun is found or there is no associated proper noun for the colloquial noun, the user's question is rewritten based solely on the conversation context, without replacing the colloquial noun.

[0123] 10 End: The end of the process. After the question is rewritten, the user's question will be used for document retrieval in a more accurate form, and the process ends.

[0124] Through the above steps, starting with the automatic recording of user questions, we can accurately parse and understand colloquial nouns. By deeply binding them to proper nouns, we ensure that the rewritten questions are semantically consistent with the professional terminology in formal documents. This process not only integrates the context of the user's question but also fully utilizes large language models and graph database technologies to ultimately achieve precise rewriting of user questions. This significantly improves RAG technology's retrieval efficiency and result accuracy when processing complex professional documents, providing users with a faster, more professional, and more tailored search experience.

[0125] It should be further explained that the conversation information processing method consists of five modules: question collection module, spoken noun parsing module, proper noun parsing module, noun relationship construction module, and question rewriting module.

[0126] Question collection module: This module is mainly used to automatically collect questions raised by users when using the system, and provide data support for the subsequent spoken noun analysis module.

[0127] Spoken noun parsing module: This module mainly uses a large language model to extract the spoken nouns and explanations involved in the user questions and contexts collected by the question collection module for subsequent binding with proper nouns.

[0128] Proper noun parsing module: This module mainly parses formal documents through a large language model, extracting the proper nouns, terms, and their explanations involved, for subsequent binding with spoken nouns.

[0129] Noun binding module: This module uses the noun information from the spoken noun parsing module and the proper noun parsing module, embeds them, makes semantic relevance judgments, and binds nouns with high relevance. Each proper noun is bound to multiple spoken nouns.

[0130] Question rewriting module: This module mainly uses the established noun relationships to rewrite the user's questions, making them semantically closer to the nouns in the official publication, improving the semantic relevance during retrieval, and thus improving the accuracy of retrieval.

[0131] Figure 5 FIG. 1 is a structural block diagram of a control device for a method for processing session information according to one embodiment of the present invention. Figure 5 As shown, the device includes:

[0132] The question collection module 501 is used to obtain session information, wherein the session information is initiated by the target user;

[0133] a spoken noun parsing module 502 for determining first noun information based on the conversation information, wherein the first noun information includes spoken nouns in the conversation information;

[0134] a proper noun parsing module 503 and a noun mapping module 504 for determining second noun information based on the first noun information, wherein the second noun information includes proper nouns associated with the spoken nouns;

[0135] The question rewriting module 505 is configured to rewrite the conversation information based on the second noun information to obtain target conversation information.

[0136] Optionally, for determining the second noun information based on the first noun information, the noun mapping module 504 obtains associated information, the associated information is used to determine the mapping relationship between the colloquial nouns and the proper nouns; and the second noun information is determined based on the associated information and the first noun information.

[0137] Optionally, the second noun information is determined based on the associated information and the first noun information by the proper noun parsing module 503 and the noun mapping module 504, including: based on the associated information, matching the first noun information with the proper nouns in the proper noun information, and determining that the properly matched proper noun is the second noun information, wherein the proper noun information is a collection of all proper nouns.

[0138] Optionally, the noun mapping module 504 is used to obtain associated information, including: obtaining training session information, wherein the training session information includes at least one of the following: preset user questions, historical session records of target users; obtaining noun truth value information, wherein the noun truth value information includes proper nouns and first noun explanations of proper nouns; the spoken noun parsing module 502 is used to determine spoken noun information based on the training session information, wherein the spoken noun information includes spoken nouns and second noun explanations corresponding to the spoken nouns; performing similarity grouping on the noun truth value information and the spoken noun information to obtain grouping results, wherein one grouping result includes one proper noun and at least one spoken noun; establishing a mapping relationship between the proper nouns and spoken nouns in the same grouping result to obtain associated information.

[0139] Optionally, the noun mapping module 504 performs similarity grouping on the noun truth value information and the spoken noun information to obtain a grouping result, including: embedding the noun truth value information to obtain a first embedding vector; embedding the spoken noun information to obtain a second embedding vector; and performing similarity grouping on the first embedding vector and the second embedding vector to obtain a grouping result.

[0140] Optionally, the first embedding vector and the second embedding vector are grouped by similarity through the noun mapping module 504 to obtain a grouping result, including: performing a first grouping on the first embedding vector and the second embedding vector to obtain an intermediate grouping result; and performing a second grouping on the intermediate grouping result using the large language model to obtain a grouping result.

[0141] Optionally, the first embedding vector and the second embedding vector are grouped for the first time by the noun mapping module 504 to obtain an intermediate grouping result, including: calculating the semantic similarity between the first embedding vector and the second embedding vector by the KNN algorithm; judging by the large language model whether the proper noun corresponding to the first embedding vector and the spoken noun corresponding to the second embedding vector represent the same real thing, and obtaining a judgment result; and determining the intermediate grouping result based on the semantic similarity and the judgment result.

[0142] An embodiment of the present application further provides an electronic device, comprising: a memory storing an executable program; and a processor for running the program, wherein the program executes the methods of various embodiments of the present invention when running.

[0143] Optionally, in this embodiment, the processor may be configured to execute the following steps through a computer program:

[0144] Step S102: obtaining session information, wherein the session information is initiated by the target user;

[0145] Step S104, determining first noun information based on the conversation information, wherein the first noun information includes spoken nouns in the conversation information;

[0146] Step S106, determining second noun information based on the first noun information, wherein the second noun information includes proper nouns associated with the spoken nouns;

[0147] Step S108: rewrite the conversation information based on the second noun information to obtain target conversation information.

[0148] An embodiment of the present application further provides a computer-readable storage medium, which includes a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the methods in various embodiments of the present invention.

[0149] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:

[0150] Step S102: obtaining session information, wherein the session information is initiated by the target user;

[0151] Step S104, determining first noun information based on the conversation information, wherein the first noun information includes spoken nouns in the conversation information;

[0152] Step S106, determining second noun information based on the first noun information, wherein the second noun information includes proper nouns associated with the spoken nouns;

[0153] Step S108: rewrite the conversation information based on the second noun information to obtain target conversation information.

[0154] An embodiment of the present application further provides a computer program product, including a computer program, which implements the methods in various embodiments of the present invention when executed by a processor.

[0155] Optionally, in this embodiment, the computer program product may be configured as a computer program for executing the following steps:

[0156] Step S102: obtaining session information, wherein the session information is initiated by the target user;

[0157] Step S104, determining first noun information based on the conversation information, wherein the first noun information includes spoken nouns in the conversation information;

[0158] Step S106, determining second noun information based on the first noun information, wherein the second noun information includes proper nouns associated with the spoken nouns;

[0159] Step S108: rewrite the conversation information based on the second noun information to obtain target conversation information.

[0160] In the above embodiments of the present invention, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0161] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only exemplary. For example, the division of the units can be a logical function division. In actual implementation, there may be other division methods, 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 through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

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

[0163] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0164] If the integrated unit 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 all or 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 and includes several instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk, etc. Various media that can store program codes.

[0165] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.

Claims

1. A method for processing session information, characterized in that: include: Acquire session information, wherein the session information is initiated by a target user; determining first noun information based on the conversation information, wherein the first noun information includes spoken nouns in the conversation information; determining second noun information based on the first noun information, wherein the second noun information includes a proper noun associated with the spoken noun; The session information is rewritten based on the second noun information to obtain target session information.

2. The processing method according to claim 1, characterized in that: Determining the second noun information based on the first noun information includes: Acquiring association information, wherein the association information is used to determine a mapping relationship between the colloquial noun and the proper noun; The second noun information is determined based on the association information and the first noun information.

3. The processing method according to claim 2, characterized in that: Determining the second noun information based on the association information and the first noun information includes: Based on the association information, the first noun information is matched with the proper nouns in the proper noun information, and the properly matched proper noun is determined to be the second noun information, wherein the proper noun information is a collection of all the proper nouns.

4. The processing method according to claim 2, characterized in that: Get related information, including: Acquire training session information, wherein the training session information includes at least one of the following: preset user questions, historical session records of the target user; Acquire noun truth information, wherein the noun truth information includes the proper noun and the first noun explanation of the proper noun; Determining spoken noun information based on the training session information, wherein the spoken noun information includes the spoken noun and a second noun explanation corresponding to the spoken noun; performing similarity grouping on the noun truth value information and the spoken noun information to obtain a grouping result, wherein one of the grouping results includes one of the proper nouns and at least one spoken noun; A mapping relationship is established between the proper nouns and the colloquial nouns in the same grouping result to obtain the association information.

5. The processing method according to claim 4, characterized in that: The noun truth information and the spoken noun information are grouped according to similarity to obtain a grouping result, including: Embedding the truth value information of the noun to obtain a first embedding vector; Embedding the spoken noun information to obtain a second embedding vector; The first embedding vector and the second embedding vector are grouped according to similarity to obtain the grouping result.

6. The processing method according to claim 5, characterized in that: Grouping the first embedding vector and the second embedding vector by similarity to obtain the grouping result includes: performing a first grouping on the first embedding vector and the second embedding vector to obtain an intermediate grouping result; The intermediate grouping result is grouped for the second time using a large language model to obtain the grouping result.

7. The processing method according to claim 6, characterized in that: The first embedding vector and the second embedding vector are grouped for the first time to obtain an intermediate grouping result, including: Calculate the semantic similarity between the first embedding vector and the second embedding vector by using a KNN algorithm; Determining, by means of a large language model, whether the proper noun corresponding to the first embedding vector and the spoken noun corresponding to the second embedding vector represent the same real thing, and obtaining a determination result; The intermediate grouping result is determined based on the semantic similarity and the judgment result.

8. An electronic device, characterized in that: include: A memory storing an executable program; A processor, configured to run the program, wherein the program executes the method according to any one of claims 1 to 7 when running.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored executable program, wherein when the executable program is executed, the device where the storage medium is located is controlled to execute the method according to any one of claims 1 to 7.

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