A term alignment enhancement method, device, computer equipment and storage medium

CN120780802BActive Publication Date: 2026-09-18PING AN TECH (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510855974.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-24
Publication Date
2026-09-18
Estimated Expiration
2045-06-24

AI Technical Summary

Technical Problem

[0005]本发明的目的是提供一种术语对齐增强方法、装置、计算机设备及存储介质,旨在解决现有技术中的大语言模型难以满足金融场景下对术语精准性和语言风格一致性的高要求的问题

Benefits of technology

[0020] This invention provides a terminology alignment enhancement method, apparatus, computer device, and storage medium. The method receives a natural language request input by a user and reconstructs it into a structured statement containing service scenario tags. Based on these tags, it obtains a terminology template set from a dynamic terminology knowledge base. The terminology templates are then converted into terminology control vectors, and the natural language request is converted into a request semantic vector. These vectors are concatenated and input into a large language model to generate preliminary results. Subsequently, the terms in the preliminary results are aligned and matched with standard terms to determine terminology consistency. If inconsistencies are found, a terminology rewriting model is used to replace them. Finally, an accurate terminology result conforming to language style norms is obtained. This method improves terminology accuracy, ensures that the generated content conforms to the professionalism and norms of a specific domain, enhances language style consistency, further improves customer experience, reduces business risks caused by improper terminology use, and improves the level and efficiency of intelligent services in financial institutions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120780802B_ABST
    Figure CN120780802B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of artificial intelligence and natural language processing, and discloses a term alignment enhancement method and device, a computer device and a storage medium, which comprises the following steps: reconstructing a natural language request to obtain a structured sentence containing a service scenario label; acquiring a term template set through a dynamic term knowledge base according to the service scenario label; converting terms in the term template set into a term control vector, converting the natural language request into a request semantic vector, and inputting the term control vector and the request semantic vector into a large language model after splicing to obtain a preliminary generation result; aligning and matching the terms in the preliminary generation result with standard terms to determine whether they are consistent; if the terms are not consistent, replacing the terms using a term rewriting model to obtain a final generation result. The method can be applied to the field of financial science and technology business, has the term correction and dynamic adaptation capability, and significantly improves the compliance and professionalism of the large language model in the financial business.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of artificial intelligence and natural language processing, and in particular to a term alignment enhancement method, apparatus, computer device, and storage medium. Background Technology

[0002] In the fintech sector, with technological advancements, intelligent customer service and automated question-answering systems based on Large Language Models (LLM) are gradually becoming key tools for the financial industry, especially in banking, securities, and insurance, to improve service efficiency and customer experience. Leveraging its superior language generation and understanding capabilities, LLM demonstrates high intelligence and responsiveness in handling customer inquiries, providing business guidance, and automating processes, bringing about a revolution in service models for financial institutions.

[0003] However, the unique nature of the financial industry, especially banking services, imposes strict compliance requirements and business standards on customer service communication. These standards not only cover the precise use of terminology—for example, strictly distinguishing between synonyms such as "loan" and "borrow money" to ensure accuracy—but also the compliance of expression—such as avoiding absolute promises and prohibiting statements like "guaranteed principal" or "guaranteed profit" that may mislead customers; and even extend to the standardization of sentence structure, such as requiring closing remarks to include polite phrases like "thank you for your call" to maintain good customer relationships.

[0004] Furthermore, while current general-purpose language models on the market, such as GPT, GLM, and LLaMA, perform well in general domains, they are not specifically designed for financial services. Although these models generate semantically fluent responses, they often fail to meet the high requirements of terminology accuracy and stylistic consistency in financial scenarios, potentially leading to compliance risks such as misuse of terminology and inappropriate wording. This "insufficient alignment capability" manifests in two ways: first, terminology misuse or generalization, i.e., confusing standard terms with synonyms, violating the principle of precision in financial terminology; second, language style inconsistencies with banking terminology norms, making the output content difficult to directly apply to customer service or copywriting generation. Summary of the Invention

[0005] The purpose of this invention is to provide a terminology alignment enhancement method, apparatus, computer device, and storage medium, aiming to solve the problem that existing large language models cannot meet the high requirements for terminology accuracy and language style consistency in financial scenarios.

[0006] In a first aspect, embodiments of the present invention provide a term alignment enhancement method, comprising:

[0007] Receive a natural language request from the user and reconstruct the natural language request to obtain a structured statement containing service scenario tags;

[0008] Based on the service scenario tags of the structured statements, a set of term templates is obtained through a dynamic term knowledge base;

[0009] The terms in the term template set are converted into term control vectors, the natural language request is converted into a request semantic vector, and the term control vector and the request semantic vector are concatenated. The concatenated vector is then input into the large language model to obtain the preliminary generation result.

[0010] The terms in the preliminary generated results are aligned and matched with standard terms to determine whether the terms in the preliminary generated results are consistent with the standard terms.

[0011] If the terminology is inconsistent with the standard terminology, a terminology rewriting model is used to replace it, resulting in the final generated result.

[0012] Secondly, embodiments of the present invention also provide a term alignment enhancement device, comprising:

[0013] The preprocessing unit is used to receive natural language requests input by the user and reconstruct the natural language requests to obtain structured statements containing service scenario tags.

[0014] The acquisition unit is used to acquire a set of term templates through a dynamic term knowledge base based on the service scenario tags of the structured statement.

[0015] The conversion unit is used to convert the terms in the term template set into term control vectors, convert the natural language request into a request semantic vector, and concatenate the term control vector and the request semantic vector. The concatenated vector is then input into the large language model to obtain the preliminary generation result.

[0016] An alignment matching unit is used to perform alignment matching between the terms in the preliminary generated result and the standard terms, and to determine whether the terms in the preliminary generated result are consistent with the standard terms.

[0017] The replacement unit is used to replace the term with a term rewriting model if the term is inconsistent with the standard term, so as to obtain the final generated result.

[0018] Thirdly, embodiments of the present invention provide a computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the term alignment enhancement method described in the first aspect above.

[0019] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the term alignment enhancement method described in the first aspect.

[0020] This invention provides a terminology alignment enhancement method, apparatus, computer device, and storage medium. The method receives a natural language request input by a user and reconstructs it into a structured statement containing service scenario tags. Based on these tags, it obtains a terminology template set from a dynamic terminology knowledge base. The terminology templates are then converted into terminology control vectors, and the natural language request is converted into a request semantic vector. These vectors are concatenated and input into a large language model to generate preliminary results. Subsequently, the terms in the preliminary results are aligned and matched with standard terms to determine terminology consistency. If inconsistencies are found, a terminology rewriting model is used to replace them. Finally, an accurate terminology result conforming to language style norms is obtained. This method improves terminology accuracy, ensures that the generated content conforms to the professionalism and norms of a specific domain, enhances language style consistency, further improves customer experience, reduces business risks caused by improper terminology use, and improves the level and efficiency of intelligent services in financial institutions. Attached Figure Description

[0021] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 This is a schematic diagram of an application environment for the term alignment enhancement method provided in this embodiment of the invention;

[0023] Figure 2 This is a flowchart illustrating the term alignment enhancement method provided in this embodiment of the invention;

[0024] Figure 3 yes Figure 2 A schematic diagram of a specific implementation of step S300;

[0025] Figure 4 yes Figure 2 A schematic diagram of a specific implementation of step S400;

[0026] Figure 5 yes Figure 2 A schematic diagram of a specific implementation of step S500;

[0027] Figure 6 This is a schematic diagram of the term alignment enhancement device provided in an embodiment of the present invention;

[0028] Figure 7 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present invention;

[0029] Figure 8 This is another structural schematic diagram of the computer device provided in this embodiment of the invention. Detailed Implementation

[0030] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0031] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0032] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0033] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0034] The term alignment enhancement method provided in this invention can be applied to, for example... Figure 1In this application environment, the client communicates with the program via a network. The program can receive natural language requests from the client and reconstruct them to obtain structured statements containing service scenario tags. Based on the service scenario tags of the structured statements, a set of term templates is obtained through a dynamic terminology knowledge base. The terms in the term template set are converted into term control vectors, and the natural language request is converted into a request semantic vector. The term control vector and the request semantic vector are concatenated and input into a large language model to obtain a preliminary generation result. The terms in the preliminary generation result are aligned and matched with standard terms to determine whether they are consistent. If the terms are inconsistent with the standard terms, a term rewriting model is used to replace them to obtain the final generation result.

[0035] In the technical solution of this invention, for financial business scenarios, especially banking business, a terminology alignment enhancement method can be used to generate high-precision, highly consistent standardized language to improve customer service quality and compliance. Specifically, firstly, a natural language request input by the user is received, such as a customer's consultation or business processing needs regarding loans, deposits, wealth management products, etc., and the natural language request is reconstructed to obtain a structured statement containing service scenario tags (such as "loan consultation," "deposit business processing," etc.); then, based on the service scenario tags of the structured statement, a set of terminology templates related to the scenario is obtained through a dynamic terminology knowledge base. These template sets contain commonly used professional terms and standardized expressions in banking business; subsequently, the terms in the terminology template set are converted into terminology control vectors, the natural language request is converted into a request semantic vector, and the terminology control vector and the request semantic vector are concatenated. The concatenated vector is then input into a large language model to obtain a preliminary generation result.

[0036] Next, the initial generated result initially integrates the semantics of the customer request and the professional terminology of banking business. Then, the terminology in the initial generated result is aligned and matched with standard terminology to determine whether the terminology in the initial generated result is consistent with the standard terminology, so as to ensure the accuracy and compliance of the terminology used in the generated response. If the terminology is inconsistent with the standard terminology, a terminology rewriting model is used to replace it to obtain the final generated result. This result is not only semantically clear, but also uses terminology accurately, which meets the professionalism and compliance requirements of banking business.

[0037] For the fintech business sector, this method receives natural language requests from users and reconstructs them into structured statements containing service scenario tags. Based on these tags, it retrieves a set of terminology templates from a dynamic terminology knowledge base. The terminology templates are then converted into terminology control vectors, and the natural language requests are converted into request semantic vectors. These vectors are concatenated and input into a large language model to generate preliminary results. Subsequently, the terms in the preliminary results are aligned and matched with standard terms to determine terminology consistency. If inconsistencies are found, a terminology rewriting model is used to replace them. Finally, accurate terms that conform to language style norms are generated. This method improves terminology accuracy, ensures that the generated content conforms to the professionalism and norms of a specific domain, enhances language style consistency, further improves customer experience, reduces business risks caused by improper terminology use, and improves the level and efficiency of intelligent services provided by financial institutions. The client can be, but is not limited to, various personal computers, laptops, smartphones, and tablets. The program can be implemented using a dedicated server or a server cluster consisting of multiple servers. The following detailed description of specific embodiments further illustrates this invention.

[0038] Please see Figure 2 , Figure 2 This is a flowchart illustrating a term alignment enhancement method provided in an embodiment of the present invention. The method includes steps S100 to S500:

[0039] S100: Receive a natural language request input by the user, and reconstruct the natural language request to obtain a structured statement containing service scenario tags;

[0040] In this embodiment, within a financial business scenario, particularly in banking, the system receives natural language requests from customers via online or offline channels. Examples of such requests include account inquiries, fund transfers, loan applications, and financial product consultations. Natural language processing (NLP) technology is then used to parse and reconstruct the customer's request, identifying key information and service scenarios. These are then transformed into structured statements containing explicit service scenario tags (such as "account inquiry," "fund transfer," and "loan application consultation"), enabling subsequent processing to accurately understand customer needs and invoke corresponding business logic and terminology templates.

[0041] S200. Based on the service scenario tags of the structured statement, obtain a set of term templates through a dynamic term knowledge base;

[0042] In this embodiment, the dynamic terminology knowledge base is a knowledge storage system built for banking operations. It updates and maintains information such as terminology, standardized expressions, and business rules related to various banking operations in real time. Unlike traditional static knowledge bases, the dynamic terminology knowledge base can update its content promptly based on changes in banking operations, adjustments in regulatory policies, and evolution of market demands, ensuring that the provided terminology and templates are always up-to-date and accurate.

[0043] Specifically, in banking operations, upon receiving a structured statement containing service scenario tags, a precise match is performed in a dynamic terminology knowledge base based on these tags. For example, if the service scenario tag is "loan application consultation," then all terms and templates related to loan applications will be searched in the knowledge base. Upon successful matching, the dynamic terminology knowledge base returns a set of terminology templates. This set contains various loan application-related terms, such as "loan amount," "loan interest rate," and "repayment method," as well as some commonly used standardized expression templates, such as "Your maximum loan amount is [X] yuan, the specific amount will be determined based on a comprehensive assessment of your credit status and repayment ability" and "The loan interest rate will be [X]% higher than the benchmark interest rate for loans of the same term and grade published by the People's Bank of China."

[0044] In a specific embodiment, assuming the customer's natural language request is "I want to know about the process and conditions for applying for a personal housing loan," the service scenario tag obtained after processing in step S101 is "personal housing loan application consultation." Matching is performed in a dynamic terminology knowledge base based on the service scenario tag, and the resulting set of terminology templates may include: terms such as down payment ratio, loan term, collateral, credit assessment, etc. Templates: "For personal housing loans, the down payment ratio is generally no less than [X]% of the total house price," "The maximum loan term is [X] years, the specific term is determined based on your age and repayment ability," "You need to provide qualified collateral, such as real estate," and "We will conduct a credit assessment based on your credit history, income, etc., and the assessment result will affect your loan amount and interest rate," etc.

[0045] In this way, we can quickly and accurately obtain terms and templates related to the current service scenario, which provides a solid foundation for generating accurate and standardized responses in the future and effectively avoids business risks and customer misunderstandings caused by improper use of terms or non-standard expressions.

[0046] S300. Convert the terms in the term template set into term control vectors, convert the natural language request into a request semantic vector, and concatenate the term control vector and the request semantic vector. Input the concatenated vector into the large language model to obtain the preliminary generation result.

[0047] In this embodiment, each term in the term template set obtained from the dynamic terminology knowledge base is converted into a term control vector. A term control vector is a mathematical representation of the semantics, contextual relationships, and compliance requirements of a term in banking operations. For example, the control vector for the term "loan limit" might include its definition (such as the maximum loan amount a bank can provide to a borrower), usage scenarios (such as the loan application approval stage), and compliance constraints (such as not exceeding the regulatory limit).

[0048] Furthermore, after structured processing, users' natural language requests are converted into request semantic vectors. These vectors capture key information such as the core intent, business type, and sentiment of the user's request. For example, a user request "I want to know about the process and conditions for applying for a personal housing loan" will be converted into a vector containing semantic elements such as "Loan type = personal housing loan," "Request type = process consultation," and "Information needs = application conditions and required materials."

[0049] The terminology control vector is concatenated with the request semantic vector to form a comprehensive input vector. This concatenation process not only preserves the original semantic information of the user request but also incorporates precise control and compliance constraints of banking terminology. The concatenated vector is then input into a pre-trained large language model, which can understand and process complex inputs that mix business terminology and user requests. Upon receiving the concatenated vector, the large language model, based on its powerful language generation capabilities and combined with banking expertise and compliance requirements, generates an initial response.

[0050] Among them, such as Figure 3 As shown, in step S300, converting the terms in the term template set into term control vectors includes the following steps S301 to S302:

[0051] S301. Embed each term in the term template set using the term encoder according to the following formula to obtain a term embedding set:

[0052] e i =f t (t i )∈R d

[0053] Among them, f t For the term encoder, R d Let t represent a d-dimensional real vector space. i Let S represent each term in the term template set S, where S = t1, t2, ..., t i ;

[0054] S302. Aggregate the term embedding set using average pooling according to the following formula to obtain the term control vector:

[0055]

[0056] Where n represents the number of vectors.

[0057] In step S301, in banking operations, terminology encoders typically employ pre-trained large language models (such as BERT encoder, GPT, etc.). These encoders possess a deep understanding of the semantics and contextual relationships of banking terminology, ensuring the accuracy of term embedding. For the terminology set recommended in the dynamic terminology knowledge base (such as "loan amount," "loan interest rate," "repayment method," etc.), the terminology encoder performs embedding processing on each term. The embedding process converts each term into a high-dimensional vector representation. These vectors not only capture the literal meaning of the term but also include its specific meaning, usage scenarios, and compliance constraints in banking operations. For example, the embedding vector for "loan amount" may contain information such as its definition, calculation method, and regulatory restrictions. After embedding processing, each term corresponds to a unique vector, and these vectors together constitute the term embedding set. This set provides a rich semantic information foundation for subsequent terminology control vector generation.

[0058] Furthermore, in step S302, average pooling is a feature aggregation method that compresses the embedding information of multiple terms into a comprehensive vector representation by averaging all vectors in the term embedding set. In banking operations, this method can effectively integrate the overall semantics and compliance requirements of the term template set to generate a representative term control vector. After applying average pooling, the value of each dimension in the term embedding set is the average of all term embedding vectors along that dimension. This term control vector not only contains the common features of the term template set but also implicitly includes compliance constraints and term usage norms in banking operations. For example, in a loan consultation scenario, the term control vector may emphasize compliance points such as "credit limit assessment is based on credit status" and "interest rates comply with regulatory requirements."

[0059] In summary, the generated terminology control vector is concatenated with the user's request semantic vector and input into the large language model. This guides the model to generate responses that meet user needs while strictly adhering to banking business standards. This approach ensures the accuracy and consistency of terminology in the generated responses, reducing business risks arising from inappropriate terminology.

[0060] In step S300, converting the terms in the term template set into term control vectors includes the following steps S311 to S312:

[0061] S311. Embed each term in the term template set using the term encoder according to the following formula to obtain a term embedding set:

[0062] e i =f t (t i )∈R d

[0063] Among them, f t For the term encoder, R d Let t represent a d-dimensional real vector space. i Let S represent each term in the term template set S, where S = t1, t2, ..., t i ;

[0064] S312. Aggregate the term embedding set using attention-weighted pooling according to the following formula to obtain the term control vector:

[0065] α i =softmax(w T tanh(W a e i +b a )

[0066]

[0067] Where softmax is the normalized exponential function, tanh is the hyperbolic tangent function, and b a W represents the bias vector. a ∈R h ×d ,R h×d Let w represent an h×d dimensional real vector space, where w∈R h ,a∈R h ,T represents the transpose operation, R h Let α represent an h-dimensional real vector space. i This represents the attention weights, and n represents the number of vectors.

[0068] In this embodiment, attention-weighted pooling is an aggregation method based on an attention mechanism. It calculates the importance weight of each term embedding vector during the aggregation process, and then performs a weighted sum of all term embedding vectors based on these weights to obtain the aggregated vector. In banking term aggregation scenarios, the attention mechanism can automatically identify terms that are more critical and important to the current business scenario and assign them higher weights.

[0069] In banking, the importance of different terms varies across different business scenarios. For example, in a loan application scenario, terms such as "loan amount," "interest rate," and "repayment period" may be more critical; while in an account inquiry scenario, terms such as "account balance" and "transaction details" are more important. Attention-weighted pooling can dynamically adjust the weights of terms according to specific scenarios, making the aggregated term control vector more accurately reflect the core semantics of the current business scenario.

[0070] In a specific implementation, the term embedding set is first input into an attention network. The attention network consists of one or more fully connected layers that learn the semantic relationships between each term embedding vector and other vectors. The attention network calculates an attention score for each term embedding vector, reflecting the importance of the term in the current business context. The attention score can be calculated using various methods such as dot product attention and additive attention. For example, in dot product attention, the attention score is obtained by performing a dot product operation between the term embedding vector and a learnable query vector.

[0071] After calculating the attention score, it is typically normalized using the softmax function to obtain the attention weight for each term. The attention weight ranges from 0 to 1, and the sum of the attention weights for all terms is 1. After obtaining the attention weight for each term, each vector in the term embedding set is multiplied by its corresponding attention weight to obtain a weighted term embedding vector.

[0072] Furthermore, the weighted term embedding vectors are summed to obtain the final term control vector. This vector integrates the semantic information of all terms and is weighted according to the importance of each term in the current business scenario, thus more accurately representing the core semantics of the current business scenario.

[0073] Suppose that when processing a customer request for a personal housing loan application, the following terminology set is recommended from a dynamic terminology knowledge base: {"Loan Amount", "Loan Interest Rate", "Repayment Method", "Collectibles", "Credit Assessment"}. After embedding by a terminology encoder, the corresponding terminology embedding set is obtained. When aggregating using attention-weighted pooling, the attention network automatically identifies the three terms "Loan Amount", "Loan Interest Rate", and "Repayment Method" as more critical based on the current loan application scenario, as they directly relate to the customer's loan costs and repayment pressure. Therefore, these three terms are assigned higher attention weights, while "Collectibles" and "Credit Assessment," although important, have relatively lower weights in this scenario. Ultimately, the terminology control vector obtained through weighted summation will focus more on reflecting the semantic information of "Loan Amount", "Loan Interest Rate", and "Repayment Method", providing precise guidance for subsequent large language model generation. This ensures that the generated response accurately and comprehensively answers the customer's questions about the personal housing loan application, while ensuring the accuracy and compliance of terminology usage.

[0074] In step S300, concatenating the term control vector with the request semantic vector includes the following steps S321 to S322:

[0075] S321. Concatenate the terminology control vector and the request semantic vector according to the following formula:

[0076] v fused =[v x ;v t ]∈R 2d

[0077] Among them, v x To request the semantic vector, v t For the term control vector, R 2d Represents a 2d-dimensional real vector space;

[0078] S322. Map the concatenated vectors to the input space of the large language model using a linear mapping according to the following formula:

[0079] v'=W proj ·v fused +b

[0080] Among them, W proj Let be the projection matrix, and b be the bias term.

[0081] In this embodiment, in step S321, the terminology control vector carries semantic and compliance information of terms closely related to banking business extracted from a dynamic terminology knowledge base. For example, in a loan business scenario, it may contain the precise semantics and business rules of terms such as "loan amount," "loan interest rate," and "repayment method."

[0082] The request semantic vector captures the core intent, business type, and key information of the customer's natural language request. For example, if a customer requests "I would like to know about the process and conditions for applying for a personal housing loan," the request semantic vector will parse out semantic information such as "Loan type = personal housing loan" and "Request type = process and conditions consultation."

[0083] By concatenating the aforementioned terminology control vector and request semantic vector, the specific content of the customer's request and the professional knowledge of banking business can be integrated, providing more comprehensive and accurate input information for the large language model. This enables the model to better understand the customer's real needs and generate responses that conform to banking business standards.

[0084] In step S322, different large language models may have different input vector dimension requirements. The dimension of the concatenated vector may not match the model's expected input dimension, so it needs to be transformed to a suitable dimension space through linear mapping. Linear mapping can also perform feature transformation and dimensionality reduction on the concatenated vector (if needed), extracting the most useful information for model prediction, removing redundancy and noise, and improving the model's training efficiency and prediction accuracy.

[0085] In step S300, concatenating the term control vector with the request semantic vector further includes the following step S331:

[0086] S331. The weights of the term control vector and the request semantic vector are dynamically adjusted using the gating coefficient according to the following formula:

[0087] g=σ(W g [v x ;v t ])

[0088] v'=g·v x +(1-g)·v t

[0089] Where g is the gating coefficient, · denotes element-wise multiplication, σ is the sigmoid function, and W g These are learnable parameters.

[0090] In this embodiment, different customer requests rely on varying degrees of terminology and semantic meaning when generating responses. For example, professional customers may prioritize terminology accuracy, while ordinary customers may value the clarity and understandability of the response. The gating coefficient dynamically adjusts the weighting of the terminology control vector and the request semantic vector, enabling the model to generate responses that better meet customer needs.

[0091] The gating coefficient can be viewed as a "switch" or "regulator" that automatically determines the contribution ratio of the terminology control vector and the request semantic vector in the final input vector based on the context information of the current request, customer characteristics, and so on. For example, for inquiries involving complex financial products, the gating coefficient may increase the proportion of the terminology control vector to ensure the accuracy of the response; while for simple account inquiry requests, the gating coefficient may focus more on the request semantic vector to make the response more concise and clear.

[0092] S400: Align and match the terms in the preliminary generated result with the standard terms, and determine whether the terms in the preliminary generated result are consistent with the standard terms;

[0093] In this embodiment, a standard terminology system is used for various business operations (such as loans, deposits, and wealth management). These standard terms clarify key information such as business concepts, operational procedures, and risk points. Aligning and matching the terms in the initial generated results with the standard terms aims to check whether the model-generated responses accurately use these standard terms, avoiding customer misunderstandings or compliance risks due to improper terminology use.

[0094] Among them, such as Figure 4 As shown, step S400 includes the following steps S401 to S403:

[0095] S401, Construct a set of term rewriting pairs;

[0096] S402. Use the BERT encoder to represent each rewrite pair in the term rewrite pair set and establish an embedding library;

[0097] S403. Input the fragment to be replaced in the preliminary generated result into the embedding library for retrieval, and retrieve terms that are inconsistent with the standard terms.

[0098] In this embodiment, the terminology rewriting pair set serves as the foundational data for training and optimizing the model to identify inconsistent terminology. By collecting and organizing the correspondences between standard and non-standard terms, the model learns how to identify and correct errors in terminology usage.

[0099] In specific implementations, standard terminology and its common non-standard expressions are extracted from internal bank documents, such as business manuals, contract texts, and operation guides. For example, in loan business, "annualized loan interest rate" may be expressed as "annual interest rate" or "loan interest." Customer interaction records with the bank are analyzed to identify commonly used non-standard terms. For example, a customer may refer to "credit card billing date" as "payment due date" or "billing date."

[0100] In a more specific embodiment, it is assumed that the standard term "equal principal and interest repayment" is expressed as "paying the same amount of money every month" in a non-standard way, and "equal principal and interest repayment" is rewritten as ("equal principal and interest repayment", "paying the same amount of money every month"), ("equal principal and interest repayment", "equal principal and interest repayment").

[0101] S500. If the terminology is inconsistent with the standard terminology, then the terminology rewriting model is used to replace it to obtain the final generated result.

[0102] In this embodiment, the core task of the terminology rewriting model is to convert non-standard terms into standard terms while maintaining semantic consistency. In banking operations, the terminology rewriting model needs to have a deep understanding of financial terminology, be able to accurately identify various non-standard expressions, and convert them into corresponding standard terms.

[0103] Among them, such as Figure 5 As shown, step S500 includes the following steps S501 to S503:

[0104] S501. Extract non-standard terms and their corresponding standard terms from customer service dialogue data to form non-standard terminology pairs and standard terminology pairs.

[0105] S502. Add a context window around the non-standard term pair and the standard term pair;

[0106] S503. Use the BART model to train the term rewriting model using an Encoder-Decoder, and input inconsistent terms into the trained term rewriting model for rewriting.

[0107] In this embodiment, in step S501, the customer service dialogue data is a real record of actual communication between the bank and the customer, which contains a large number of non-standard terms and their corresponding standard terms. By extracting these term pairs, a rich data foundation can be provided for training the terminology rewriting model, enabling the terminology rewriting model to learn the mapping relationship from non-standard terms to standard terms.

[0108] Specifically, professional annotators manually annotate customer service dialogue data. Based on the bank's internal standard terminology database and business knowledge, the annotators identify non-standard terms in the dialogue and find their corresponding standard terms. For example, when a customer inquires about loan services and says, "I want to borrow some money, how is the interest calculated?", the annotators can identify that "interest" in a more formal context might correspond to "loan interest rate," forming a terminology pair ("interest," "loan interest rate").

[0109] In step S502, the meaning of a term is often closely related to its context. Adding a context window can provide the term rewriting model with more semantic information, helping the model better understand the use of non-standard and standard terms in different contexts, thereby improving the accuracy of term rewriting.

[0110] Specifically, a fixed window size can be set, for example, taking 5 words before and after each term as context. For example, for a term pair ("interest", "loan interest rate"), if the original sentence is "I want to know how much the interest on this loan is", after adding the context window, it might become "I want to know how much [interest] on this loan is", where "I want to know how much" and "how much" are used as context.

[0111] In step S503, term pairs added to the context window are used as training data, with non-standard terms and their contexts as input and standard terms and their contexts as output. A pre-trained BART model can be used for initialization to leverage its general language knowledge learned on large amounts of text data. By minimizing the cross-entropy loss between the input and output sequences, the model learns the mapping from non-standard terms and their contexts to standard terms and their contexts. During training, the model continuously adjusts its parameters to improve the accuracy and fluency of the generated standard terms. By constructing an efficient terminology rewriting model, the problem of inconsistent terminology in customer service dialogues can be effectively solved, improving the quality and efficiency of customer communication.

[0112] As can be seen, in the above solution, for the fintech business field, the natural language request input by the user is received and reconstructed into a structured statement containing service scenario tags. Based on the tags, a set of term templates is obtained from a dynamic terminology knowledge base. The term templates are then converted into terminology control vectors, and the natural language request is converted into a request semantic vector. These vectors are then concatenated and input into a large language model to generate preliminary results. Subsequently, the terms in the preliminary results are aligned and matched with standard terms to determine terminology consistency. If there is a mismatch, a terminology rewriting model is used to replace them. Finally, the generated result with accurate terms and in accordance with language style norms is obtained. The above method improves terminology accuracy, ensures that the generated content conforms to the professionalism and norms of a specific field, enhances language style consistency, further improves customer experience, reduces business risks caused by improper use of terms, and improves the level and efficiency of intelligent services of financial institutions.

[0113] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0114] This invention also provides a terminology alignment enhancement device, which corresponds one-to-one with the terminology alignment enhancement methods described in the above embodiments. For example... Figure 6 As shown, the terminology alignment enhancement device 600 includes a preprocessing unit 601, an acquisition unit 602, a conversion unit 603, an alignment matching unit 604, and a replacement unit 605. Detailed descriptions of each functional unit are as follows:

[0115] The preprocessing unit 601 is used to receive a natural language request input by the user and reconstruct the natural language request to obtain a structured statement containing service scenario tags.

[0116] The acquisition unit 602 is used to acquire a set of term templates through a dynamic term knowledge base based on the service scenario tags of the structured statement.

[0117] The conversion unit 603 is used to convert the terms in the term template set into term control vectors, convert the natural language request into a request semantic vector, and concatenate the term control vector and the request semantic vector. The concatenated vector is then input into the large language model to obtain a preliminary generation result.

[0118] Alignment matching unit 604 is used to perform alignment matching between the terms in the preliminary generated result and the standard terms, and to determine whether the terms in the preliminary generated result are consistent with the standard terms.

[0119] The replacement unit 605 is used to replace the term with a term rewriting model if the term is inconsistent with the standard term, so as to obtain the final generated result.

[0120] This invention provides a terminology alignment enhancement device. The device receives a user's input natural language request and reconstructs it into a structured statement containing service scenario tags. Based on these tags, it retrieves a terminology template set from a dynamic terminology knowledge base. The terminology templates are then converted into terminology control vectors, and the natural language request is converted into a request semantic vector. These vectors are concatenated and input into a large language model to generate preliminary results. Subsequently, the terms in the preliminary results are aligned and matched with standard terms to determine terminology consistency. If inconsistencies are found, a terminology rewriting model is used to replace them. Finally, an accurate terminology result conforming to language style norms is obtained. This method improves terminology accuracy, ensures that the generated content conforms to the professionalism and norms of a specific domain, enhances language style consistency, further improves customer experience, reduces business risks caused by improper terminology use, and improves the level and efficiency of intelligent services in financial institutions.

[0121] Specific limitations regarding the term alignment enhancement device can be found in the limitations of the term alignment enhancement method above, and will not be repeated here. Each module in the aforementioned term alignment enhancement device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in hardware or independently of the processor in a computer device, or stored in software in the memory of a computer device, so that the processor can call and execute the operations corresponding to each module.

[0122] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 7 As shown. The computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used to communicate with external clients via a network connection. When the computer program is executed by the processor, it implements the functions or steps of a term alignment enhancement method on the server side.

[0123] In one embodiment, a computer device is provided, which may be a client, and its internal structure diagram may be as follows: Figure 8 As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used to communicate with an external server via a network connection. When the computer program is executed by the processor, it implements functions or steps on the client side of a term alignment enhancement method.

[0124] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:

[0125] Receive a natural language request from the user and reconstruct the natural language request to obtain a structured statement containing service scenario tags;

[0126] Based on the service scenario tags of the structured statements, a set of term templates is obtained through a dynamic term knowledge base;

[0127] The terms in the term template set are converted into term control vectors, the natural language request is converted into a request semantic vector, and the term control vector and the request semantic vector are concatenated. The concatenated vector is then input into the large language model to obtain the preliminary generation result.

[0128] The terms in the preliminary generated results are aligned and matched with standard terms to determine whether the terms in the preliminary generated results are consistent with the standard terms.

[0129] If the terminology is inconsistent with the standard terminology, a terminology rewriting model is used to replace it, resulting in the final generated result.

[0130] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0131] Receive a natural language request from the user and reconstruct the natural language request to obtain a structured statement containing service scenario tags;

[0132] Based on the service scenario tags of the structured statements, a set of term templates is obtained through a dynamic term knowledge base;

[0133] The terms in the term template set are converted into term control vectors, the natural language request is converted into a request semantic vector, and the term control vector and the request semantic vector are concatenated. The concatenated vector is then input into the large language model to obtain the preliminary generation result.

[0134] The terms in the preliminary generated results are aligned and matched with standard terms to determine whether the terms in the preliminary generated results are consistent with the standard terms.

[0135] If the terminology is inconsistent with the standard terminology, a terminology rewriting model is used to replace it, resulting in the final generated result.

[0136] It should be noted that the functions or steps that can be implemented by the computer-readable storage medium or computer device described above can be referred to the relevant descriptions on the server side and client side in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.

[0137] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0138] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0139] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A term alignment enhancement method, characterized in that, Includes the following steps: Receive a natural language request from the user and reconstruct the natural language request to obtain a structured statement containing service scenario tags; Based on the service scenario tags of the structured statements, a set of term templates is obtained through a dynamic term knowledge base; The terms in the term template set are converted into term control vectors, the natural language request is converted into a request semantic vector, and the term control vector and the request semantic vector are concatenated. The concatenated vector is then input into the large language model to obtain the preliminary generation result. The terms in the preliminary generated results are aligned and matched with standard terms to determine whether the terms in the preliminary generated results are consistent with the standard terms. If the terminology is inconsistent with the standard terminology, a terminology rewriting model is used to replace it to obtain the final generated result; The step of aligning and matching the terms in the preliminary generated results with standard terms, and determining whether the terms in the preliminary generated results are consistent with the standard terms, includes: constructing a set of term rewriting pairs; using a BERT encoder to represent each rewriting pair in the set of term rewriting pairs, and establishing an embedding library; inputting the fragment to be replaced in the preliminary generated results into the embedding library for retrieval, and retrieving terms that are inconsistent with the standard terms; If the terminology is inconsistent with the standard terminology, a terminology rewriting model is used to replace it to obtain the final generated result. This includes: extracting non-standard terms and their corresponding standard terms from customer service dialogue data to form non-standard terminology pairs and standard terminology pairs; adding context windows around the non-standard terminology pairs and standard terminology pairs; using the BART model to train the terminology rewriting model using an Encoder-Decoder, and inputting the inconsistent terms into the trained terminology rewriting model for rewriting.

2. The term alignment enhancement method according to claim 1, characterized in that, The process of converting terms in the term template set into term control vectors includes the following steps: The term embedding set is obtained by embedding each term in the term template set using the term encoder according to the following formula: in, For the term encoder, R d Let t represent a d-dimensional real vector space. i Represents each term in the term template set S. ; The term embedding set is aggregated using average pooling according to the following formula to obtain the term control vector: Where n represents the number of vectors.

3. The term alignment enhancement method according to claim 1, characterized in that, Converting terms in the term template set into term control vectors includes the following steps: The term embedding set is obtained by embedding each term in the term template set using the term encoder according to the following formula: in, For the term encoder, R d Let t represent a d-dimensional real vector space. i Represents each term in the term template set S. ; The term embedding set is aggregated using attention-weighted pooling according to the following formula to obtain the term control vector: Where softmax is the normalized exponential function, tanh is the hyperbolic tangent function, and b a W represents the bias vector. a ∈R h×d ,R h ×d Let w represent an h×d dimensional real vector space, where w∈R h ,a∈R h ,T represents the transpose operation, R h Let α represent an h-dimensional real vector space. i This represents the attention weights, and n represents the number of vectors.

4. The term alignment enhancement method according to claim 1, characterized in that, The concatenation of the term control vector and the request semantic vector includes the following steps: The terminology control vector and the request semantic vector are concatenated according to the following formula: in, To request semantic vectors, For the term control vector, R 2d Represents a 2d-dimensional real vector space; The concatenated vectors are mapped to the input space of the large language model using a linear mapping as follows: Among them, W proj Let be the projection matrix, and b be the bias term.

5. The term alignment enhancement method according to claim 4, characterized in that, The concatenation of the term control vector and the request semantic vector further includes the following steps: The weighting of the term control vector and the request semantic vector is dynamically adjusted using the following formula via a gating coefficient: Where g is the gating coefficient, This indicates element-wise multiplication. It is the sigmoid function. These are learnable parameters.

6. A term alignment enhancement device, characterized in that, include: The preprocessing unit is used to receive natural language requests input by the user and reconstruct the natural language requests to obtain structured statements containing service scenario tags. The acquisition unit is used to acquire a set of term templates through a dynamic term knowledge base based on the service scenario tags of the structured statement. The conversion unit is used to convert the terms in the term template set into term control vectors, convert the natural language request into a request semantic vector, and concatenate the term control vector and the request semantic vector. The concatenated vector is then input into the large language model to obtain the preliminary generation result. An alignment matching unit is used to perform alignment matching between the terms in the preliminary generated result and the standard terms, and to determine whether the terms in the preliminary generated result are consistent with the standard terms. The replacement unit is used to replace the term with a term rewriting model if the term is inconsistent with the standard term, so as to obtain the final generated result. The alignment matching unit is specifically used for: aligning and matching the terms in the preliminary generated result with standard terms, and determining whether the terms in the preliminary generated result are consistent with the standard terms, including: constructing a term rewriting pair set; using a BERT encoder to represent each rewriting pair in the term rewriting pair set, and establishing an embedding library; inputting the segment to be replaced in the preliminary generated result into the embedding library for retrieval, and retrieving terms that are inconsistent with the standard terms; The replacement unit is specifically used for: if the terminology is inconsistent with the standard terminology, then using a terminology rewriting model to replace it to obtain the final generated result, including: extracting non-standard terms and corresponding standard terms from customer service dialogue data to form non-standard terminology pairs and standard terminology pairs; adding context windows around the non-standard terminology pairs and standard terminology pairs; using the BART model to train the terminology rewriting model using an Encoder-Decoder, and inputting the inconsistent terms into the trained terminology rewriting model for rewriting.

7. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the term alignment enhancement method as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to perform the term alignment enhancement method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Term translation method and device based on large language model

    CN118536517A

  • Model optimization method and device, equipment, medium and program product

    CN119721049A