Palm bank semantic retrieval method, device and equipment and storage medium
By applying a pre-trained semantic analysis model to perform deep semantic feature extraction and similarity calculation on bank terminals, the problem of inaccurate search results in bank search technology has been solved, achieving accurate identification of user intent and improvement of search results.
Patent Information
- Application Number
- CN202511056567.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-30
- Publication Date
- 2025-11-11
AI Technical Summary
Existing bank search technologies are insufficient to meet users' demands for accuracy and intelligence, resulting in high deviation rates in search results and failing to support the efficient development of bank digital services.
By applying a pre-trained semantic analysis model to perform deep semantic feature extraction on the mobile banking terminal, the semantic vector of the user's search statement is obtained, and semantic similarity is calculated with the pre-built mobile banking knowledge base. The search results are then determined by combining the filtering rules.
It achieves a deep understanding of diverse user search queries, accurately identifies user intent, and improves the accuracy of search results and user experience.
Smart Images

Figure CN120929615A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of semantic retrieval technology, and in particular to a palm-sized semantic retrieval method, apparatus, device, and storage medium. Background Technology
[0002] With the accelerated digital transformation of the banking industry, mobile banking has become a core platform for financial services, with users relying on it to search for and query financial products and services. Currently, over 95% of retail transactions can be conducted through mobile banking, and the search function, as a frequently used entry point, directly impacts user satisfaction and transaction conversion efficiency in terms of its user experience. However, existing search technologies struggle to meet users' demands for accuracy and intelligence, becoming a key bottleneck restricting the improvement of service efficiency.
[0003] Currently, mainstream technical solutions fall into two categories: keyword retrieval and matching, and rule-based semantic analysis. Keyword retrieval and matching extracts keywords from user input and matches them against a database, but it cannot resolve semantic relationships (such as polysemy of the same word or colloquial expressions), resulting in a high bias rate. Rule-based semantic analysis parses user intent using pre-set semantic templates for financial scenarios, but due to the limited coverage of rules, it struggles to handle complex natural language (such as non-professional descriptions and flexible sentence structures), severely limiting its applicability.
[0004] In summary, existing technologies suffer from weak semantic parsing capabilities, a lack of dynamic learning mechanisms, and poor scenario adaptability, resulting in low accuracy of search results and a fragmented user experience, failing to support the efficient development needs of digital banking services. There is an urgent need to build an intelligent search system with intent recognition and continuous optimization capabilities through the deep integration of artificial intelligence and natural language processing technologies. Summary of the Invention
[0005] This invention provides a mobile banking semantic retrieval method, device, equipment, and storage medium to deeply understand the user's true retrieval intent through the mobile banking terminal, accurately match data information in the knowledge base, and improve the retrieval efficiency and accuracy of retrieval results.
[0006] According to one aspect of the present invention, a mobile banking semantic retrieval method is provided, applied to a mobile banking terminal, comprising:
[0007] Obtain the first search statement requested by the mobile banking terminal for the target object;
[0008] Based on the pre-trained semantic analysis model, the first retrieval statement is subjected to deep semantic feature extraction to obtain the first semantic vector.
[0009] Based on the first semantic vector and the pre-built Palm Silver knowledge base, determine the semantic similarity score between the first semantic vector and each knowledge data in the Palm Silver knowledge base, wherein the Palm Silver knowledge base stores the knowledge data vector corresponding to each knowledge data.
[0010] Based on the semantic similarity score and preset filtering rules, the semantic search result corresponding to the first search statement is determined in the mobile terminal. The preset filtering rules include highest score filtering and score threshold filtering.
[0011] According to another aspect of the present invention, a handheld banking semantic retrieval device is provided, applied to a handheld banking terminal, comprising:
[0012] The search statement acquisition module is used to acquire the first search statement requested by the search object through the mobile banking terminal.
[0013] The statement vector conversion module is used to extract deep semantic features from the first retrieval statement based on a pre-trained semantic analysis model to obtain a first semantic vector.
[0014] The similarity score determination module is used to determine the semantic similarity score between the first semantic vector and each knowledge data in the Palm Silver Knowledge Base based on the first semantic vector and the pre-built Palm Silver Knowledge Base, wherein the Palm Silver Knowledge Base stores the knowledge data vector corresponding to each knowledge data.
[0015] The retrieval result determination module is used to determine the semantic retrieval result corresponding to the first retrieval statement in the mobile terminal based on the semantic similarity score and preset filtering rules, wherein the preset filtering rules include the highest score filtering and the score threshold filtering.
[0016] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0017] At least one processor; and
[0018] A memory communicatively connected to the at least one processor; wherein,
[0019] The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform the palm-based semantic retrieval method according to any embodiment of the present invention.
[0020] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions, the computer instructions being configured to cause a processor to execute and implement the palm-printed semantic retrieval method according to any embodiment of the present invention.
[0021] The technical solution of this invention involves obtaining a first search statement requested by a user through a mobile banking terminal; extracting deep semantic features from the first search statement using a pre-trained semantic analysis model to obtain a first semantic vector; determining a semantic similarity score between the first semantic vector and each knowledge data in the mobile banking knowledge base based on the first semantic vector and a pre-built mobile banking knowledge base, wherein the mobile banking knowledge base stores a knowledge data vector corresponding to each knowledge data; and determining a semantic retrieval result corresponding to the first search statement in the mobile banking terminal based on the semantic similarity score and preset filtering rules. This invention's technical solution can adapt to diverse user search statements when a user uses a mobile banking terminal to search for bank products or services, achieving a deep understanding of user search input, accurately identifying user intent, and effectively improving the accuracy of mobile banking search results.
[0022] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 This is a flowchart of a semantic retrieval method for mobile banking provided in Embodiment 1 of the present invention;
[0025] Figure 2 This is a flowchart of a palm-based semantic retrieval method provided in Embodiment 2 of the present invention;
[0026] Figure 3 This is a schematic diagram of the semantic analysis model provided in Embodiment 2 of the present invention;
[0027] Figure 4 This is a structural diagram of a palm-sized semantic retrieval device provided according to Embodiment 3 of the present invention;
[0028] Figure 5 This is a schematic diagram of the structure of an electronic device that implements the palm-based semantic retrieval method of this invention. Detailed Implementation
[0029] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0030] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0031] Example 1
[0032] Figure 1 This is a flowchart of a mobile banking semantic retrieval method provided in Embodiment 1 of the present invention. This embodiment is applicable to situations where information retrieval is performed using a mobile banking terminal device. The method can be executed by a mobile banking semantic retrieval device, which can be implemented in hardware and / or software and can be configured in an electronic device. Figure 1 As shown, the method includes:
[0033] S101. Obtain the first search statement requested by the search object through the mobile banking terminal.
[0034] The search target can refer to the object of data retrieval, such as a user in the usage phase. The first search statement can refer to the statement information to be retrieved in the mobile banking terminal.
[0035] Specifically, the first search statement can be obtained by recognizing the search information entered by the target in the search box of the mobile banking terminal.
[0036] S102. Based on the pre-trained semantic analysis model, perform deep semantic feature extraction on the first retrieval statement to obtain the first semantic vector.
[0037] The semantic analysis module is a deep neural network model pre-trained using sample data, such as the BERT model based on the Transformer architecture. Its function is to convert user-input search queries into semantic vectors. The BERT architecture is a pre-trained language model based on a multi-layer Transformer encoder. By combining word segmentation, various embedding methods, and task-specific output layers, it can efficiently capture long-distance dependencies and bidirectional contextual information between words in text. The Transformer is a deep learning architecture based on an attention mechanism, with the Transformer encoder as its core component. The encoder is responsible for encoding the input sequence, converting it into a continuous vector representation, and using a multi-head attention mechanism, enabling the model to focus on information at different positions in the input sequence in parallel, capturing rich semantic features.
[0038] Specifically, the first search statement is input into the semantic analysis model for deep semantic feature analysis to obtain the first semantic vector.
[0039] For example, the training process of the semantic analysis model includes:
[0040] Based on a pre-constructed data knowledge graph, sample retrieval statements and their corresponding actual semantic vectors are obtained. The sample retrieval statements are then input into a preset network model for vectorization processing, and an output semantic vector is obtained based on the output of the preset network model. The training error is determined based on the output semantic vector and the actual semantic vector, and the training error is backpropagated to the preset network model to adjust the network parameters. When a preset convergence condition is met, the training of the preset network model is considered complete, and a semantic analysis model is obtained.
[0041] The data knowledge graph is constructed using collected historical search behavior data. This graph contains various behavioral feedback data of users during the mobile banking search process, enabling better dynamic optimization of the semantic analysis model parameters. The preset network model can refer to a BERT model based on the Transformer architecture. After training, the preset network model, i.e., the semantic analysis model, is used to extract deep semantic features from the user's first search statement, transforming the user input into a first semantic vector.
[0042] Specifically, a data knowledge graph constructed based on user feedback data maps each entity and relation to a low-dimensional vector space to obtain sample retrieval statements and their corresponding semantic vectors. For a triple (h, r, t) (where h is the head entity, r is the relation, and t is the tail entity), the desired outcome is h + r ≈ t.
[0043] The training error can be determined based on the training function, the output semantic vector of the preset network model, and the actual semantic vector. This training error is then backpropagated to the preset network model, adjusting its parameters until a preset convergence condition is met, such as reaching a preset number of iterations or the training error converging. At this point, the training of the preset network model is considered complete, and it can be used as the semantic analysis model. By utilizing feedback information from the user's retrieval process for model training and employing a dynamically adjusted online learning mechanism, the system can continuously optimize based on actual usage, ensuring the accuracy of feature extraction by the semantic analysis model and adapting to the evolving needs of mobile banking services and users.
[0044] It is important to note that the online fine-tuning of the preset network model employs a mini-batch incremental learning approach, inputting new incremental data in each fine-tuning cycle. During training, the mean squared error (MSE) loss function is selected as the training function to measure the difference between the model's output semantic vector and the actual semantic vector. An adaptive moment estimation optimizer is used to update the model parameters, fine-tuning the upper-level parameters related to the semantic vector transformation task. The MSE loss function L... MSE The calculation formula and parameter θ update formula are shown below.
[0045]
[0046] Where n is the number of samples, y true Let y be the true semantic vector of the i-th sample. model The model outputs a semantic vector for its prediction of the i-th sample. β1 is the gradient of the loss function LMSE with respect to the model parameters θ; β2 is the decay coefficient of the first-order momentum, used to control the degree of decay of historical gradient information; m is the decay coefficient of the second-order momentum, used to control the degree of decay of historical gradient squared information. t v is the first-order momentum at time t, used to accumulate gradient information. t Let be the second-order momentum at time t, used to accumulate information about the squared gradient. These are the corrected first-order momentum and second-order momentum, respectively; η is the learning rate, used to control the step size of parameter updates; ε is a constant to prevent the denominator from being zero during calculation; θ t Let be the set of model parameters at time t, which is continuously updated during training.
[0047] By iteratively calculating the gradient and updating the parameters using the above formula, the semantic analysis model can continuously learn knowledge from user feedback data, thus optimizing the model's performance in converting user retrieval input into semantic vectors.
[0048] For example, the process of constructing the data knowledge graph includes: collecting behavioral feedback data during historical mobile banking retrieval processes, wherein the behavioral feedback data includes at least input retrieval data, browsing retrieval results, and clicking detail links; extracting entity relationships based on the behavioral feedback data to obtain an entity set and a relationship set; and constructing a data knowledge graph based on the entity set and the relationship set.
[0049] In this invention, the collection of behavioral feedback data is primarily performed through a feedback data acquisition module. This module mainly comprises three stages: data acquisition, transmission, and processing, used to collect various behavioral feedback data information from users during the mobile banking search process. In the mobile banking application, by binding event listeners, data is collected in real time when users perform key operations such as entering search content, browsing search results, and clicking links on detail pages. In the data transmission stage, message queue technology is used to efficiently and stably send the collected data to the data processing stage. The data in the message queue is then parsed, cleaned, and structured in real time to form a relatively standardized data format, which is then provided to the data fusion module.
[0050] In this invention, entity relationship extraction is primarily performed through a data fusion module. This module comprises four stages: data preparation, entity and relationship extraction, knowledge graph construction, and model fine-tuning. By fusing data from different sources, in different formats, and with different structures, the integrity, accuracy, and usability of the data are improved. The fused data is stored in the form of a knowledge graph, which is then used to fine-tune the semantic analysis model, thereby enabling more accurate identification of user search intent.
[0051] First, through data cleaning and preprocessing methods, user search statements and feedback information are segmented, stop words are removed, and stemming is performed to eliminate noise, duplicate values, and format differences.
[0052] Then, in the entity and relation extraction stage, using a financial-specific entity dictionary and rule-based extraction methods, entities such as financial products and business terms in the text content are quickly identified. Relation extraction is based on relation extraction templates from financial business knowledge, matching and extracting common relations. Simultaneously, dependency parsing tools are used to deeply analyze the dependency relationships between words in the sentence, further uncovering the connections between entities. Let the extracted entity set be E = {e1, e2, e3...e...} k The extracted relation set is R = {r1, r2, r3, ..., r}. l}, relation r i It can be represented as a triple (e i1 r type e i2 ), r type Indicates the type of relation.
[0053] After extraction, the next step is knowledge graph construction. Using an attribute graph model, the extracted entities are treated as nodes, relationships between entities as edges, and corresponding attribute information is added to connect related business information into an organic knowledge network. The knowledge graph is represented by a graph structure G = (V, E), and slave nodes e are added to graph G. i1 To node e i2 The edge, the edge label is r type Based on the collected feedback data, attribute information is added to nodes and edges, and the attribute set of node v∈V is A. v ={a v1 a v2 ...}, the attribute set of edge e∈E is A e ={a e1 a e2 ...}
[0054] S103. Based on the first semantic vector and the pre-constructed Palm Silver knowledge base, determine the semantic similarity score between the first semantic vector and each knowledge data in the Palm Silver knowledge base.
[0055] The PalmBank Knowledge Base stores massive amounts of knowledge data, as well as a corresponding knowledge data vector for each piece of knowledge data. For example, before executing any embodiment of the present invention, each piece of knowledge data d in the knowledge base is pre-loaded... i All of them are transformed into corresponding knowledge data vectors.
[0056] Specifically, the similarity score between each knowledge data and the first semantic vector is calculated, thereby obtaining the semantic similarity score between each first semantic vector and each knowledge data in the Palm Silver Knowledge Base.
[0057] For example, determining the semantic similarity score between the first semantic vector and each knowledge data in the PalmBank knowledge base based on the first semantic vector and the pre-constructed PalmBank knowledge base includes: determining the knowledge data vector corresponding to each knowledge data; and determining the semantic similarity score between the first semantic vector and each knowledge data in the PalmBank knowledge base based on the knowledge data vector and the first semantic vector using a cosine similarity algorithm.
[0058] Specifically, semantic similarity scores can be calculated using the data retrieval module. For the data in the PalmBank knowledge base, vector construction is also required beforehand, transforming each piece of knowledge data in the knowledge base into a corresponding knowledge data vector. The cosine similarity formula is used to measure the similarity between the first semantic vector and the knowledge data vectors, thereby obtaining the semantic similarity score between each piece of knowledge data. The cosine similarity formula is shown below:
[0059]
[0060] Among them, v q It refers to the first semantic vector. It refers to knowledge data vectors.
[0061] S104. Based on the semantic similarity score and preset filtering rules, determine the semantic retrieval result corresponding to the first retrieval statement in the mobile terminal.
[0062] The preset filtering rules include highest score filtering and score threshold filtering.
[0063] Specifically, when the preset filtering rule is the highest score filtering rule, the knowledge data with the highest semantic similarity score is determined as the semantic retrieval result; when the preset filtering rule is the score threshold filtering rule, all knowledge data with semantic similarity scores higher than the score threshold are determined as semantic retrieval results. After determining the semantic retrieval results, the semantic retrieval results are displayed on the mobile banking terminal's display interface so that the searched object can be viewed and detailed.
[0064] The technical solution of this invention involves obtaining a first search statement requested by a user through a mobile banking terminal; extracting deep semantic features from the first search statement using a pre-trained semantic analysis model to obtain a first semantic vector; determining a semantic similarity score between the first semantic vector and each knowledge data in the mobile banking knowledge base based on the first semantic vector and a pre-built mobile banking knowledge base, wherein the mobile banking knowledge base stores a knowledge data vector corresponding to each knowledge data; and determining a semantic retrieval result corresponding to the first search statement in the mobile banking terminal based on the semantic similarity score and preset filtering rules. This invention's technical solution can adapt to diverse user search statements when a user uses a mobile banking terminal to search for bank products or services, achieving a deep understanding of user search input, accurately identifying user intent, and effectively improving the accuracy of mobile banking search results.
[0065] Example 2
[0066] Figure 2 This is a flowchart of a semantic retrieval method for mobile banking provided in Embodiment 2 of the present invention. This embodiment refines the process of obtaining the first semantic vector based on the above embodiments. For example... Figure 2 As shown, the method includes:
[0067] S201. Obtain the first search statement requested by the search object through the mobile banking terminal.
[0068] S202. Input the first search statement into the input layer of the semantic analysis model for vector mapping to construct a statement feature vector.
[0069] Figure 3 This is a schematic diagram of the semantic analysis model provided in Embodiment 2 of the present invention. Figure 3 As shown, the semantic analysis model consists of three layers: an input layer, an encoder layer, and an output layer. Each layer performs a corresponding model task, thereby converting the first search statement into a first semantic vector.
[0070] Specifically, the input layer is used to receive the first semantic retrieval statement input by the user, perform operations such as word embedding, position embedding and sentence embedding on the first retrieval statement to realize vector mapping, and perform feature fusion on the results of the above operations to construct the statement feature vector.
[0071] The step of inputting the first retrieval statement into the input layer of the semantic analysis model for vector mapping to construct a statement feature vector includes:
[0072] The search query is preprocessed by word segmentation to obtain word segments; based on the word embedding mechanism, the word segments of the search query are processed by vector mapping to obtain a first word segmentation vector; based on the position embedding mechanism, the position encoding used to represent the position information of the word segmentation vector is determined according to the first word segmentation vector, and the sentence embedding vectors of multiple search queries are determined according to the position encoding; a sentence feature vector is constructed according to the first word segmentation vector, the position embedding vector and the sentence embedding vector.
[0073] Specifically, after the user inputs the first search query, it is fed into the input layer of the semantic analysis model. The input layer first performs word segmentation preprocessing, dividing the first search query into individual search query segments. Then, word embedding is used to convert each word in the search query into a corresponding word vector. For example, the word vector dimension is d, and the pre-trained word vector matrix E... token ∈R V×d (V is the vocabulary size), the search query will be segmented into words w t Mapped to the corresponding first word segmentation vector e t .
[0074] e t =E token ·one-hot(w t );
[0075] Among them, one-hot(w t ) indicates w t One-hot encoding.
[0076] Since the Transformer itself does not have a natural ability to perceive sequence position information, a position embedding mechanism is introduced at the input layer. By learning the vector representations of different positions, the position information is incorporated into the model to determine the position embedding vector for representing the position information of the token vectors.
[0077] Exemplarily, the position encoding adopts a combined form of sine and cosine functions. For position p, its position encoding vector e p The definition process of the i-th element is as follows:
[0078] PE (p,2i) = sin(p / 10000 2i / d );
[0079] PE (p,2i+1) = cos(p / 10000 2i / d );
[0080] where PE refers to the position encoding of the Transformer model. The main purpose of the position encoding is to inject the order or position information of the elements (such as words, characters, etc.) in the sequence into the model. p: represents the position index of the element in the sequence (for example, the first word is 0, the second word is 1, the third word is 2, and so on). i: represents the dimension index of the position encoding vector (the position encoding vector e p is a d-dimensional vector, and the range of i is 0 <= i < d / 2). d: represents the dimension size of the position encoding vector and the model embedding vector. This allows the position encoding vector to be directly added to the word embedding vector of the corresponding word. PE (p,2i) : the value of the 2i-th dimension of the position encoding vector of position p (i.e., the dimension with an even index). PE (p,2i+1) : the value of the 2i + 1-th dimension of the position encoding vector of position p (i.e., the dimension with an odd index).
[0081] In addition, the sentence embedding mechanism is used to distinguish different sentences or text segments. When the user inputs multiple retrieval statements at once, sentence embedding can help the model identify the identities of different sentences. For the single-sentence retrieval scenario, the sentence embedding vector e s is uniformly assigned as a vector of all zeros.
[0082] The first token vector e t , the position embedding vector e p , and the sentence embedding vector e s are added element-wise for input fusion to obtain the final sentence feature vector X, which is used as the input to the encoder, as follows.
[0083] X = e t + e p + e s ;
[0084] Where X is the statement feature vector, e t It is the first word segmentation vector, e p It is the position embedding vector, e s It is a sentence embedding vector.
[0085] S203. Input the feature vector of the statement into the encoder layer of the semantic analysis model for feature extraction to obtain the feature extraction vector.
[0086] like Figure 3 As shown, the encoder layer consists of multiple stacked multi-head attention mechanisms, a core component of the Transformer architecture. It computes attention in parallel across multiple heads, each with its own unique weight matrix, thus enabling it to simultaneously attend to different semantic information at different positions and capture the semantic dependencies between words within a sentence. Therefore, the encoder layer can extract features based on the sentence's feature vectors to obtain a feature extraction vector.
[0087] The step of inputting the statement feature vector into the encoder layer of the semantic analysis model for feature extraction to obtain a feature extraction vector includes: inputting the statement feature vector into a multi-head attention mechanism for multi-head parallel attention calculation to obtain a feature attention result; performing linear transformation and concatenation on the feature attention result to obtain a feature extraction result; performing layer normalization on the feature extraction result to obtain a feature extraction vector; and returning to the multi-head parallel attention calculation step, inputting the feature extraction vector into the multi-head attention mechanism for cyclic operation processing until a preset termination condition is met.
[0088] Specifically, the statement feature vector is input into a multi-head attention mechanism. The multi-head attention mechanism performs parallel attention calculations on the statement feature vectors to obtain the feature attention results, as shown below:
[0089] head i =Attention(XW i Q XW i K XW i V );
[0090]
[0091] MultiHead(Q,K,V)=Concat(head1,...,head h W O ;
[0092] Among them, head i This is the output of the i-th attention head. The weight matrix for the query, key, and value of the i-th attention head is used to project the input into different subspaces;
[0093] Attention is a self-attention mechanism that calculates word associations using a Query-Key-Value (QKV) matrix, where Q, K, and V represent the query vector, key vector, and value vector, respectively. k Let K be the dimension of the key vector, and softmax be the activation function that converts the attention scores into a probability distribution.
[0094] W O The weight matrix is used to perform a linear transformation on the outputs of multiple attention heads. `Concat` is a concatenation operation that joins the outputs of multiple attention heads along their dimensions to obtain the final output of the multi-head attention mechanism, `MultiHead(Q,K,V)`, which is the feature extraction result. After obtaining the feature extraction result from the multi-head attention output, it is then subjected to layer normalization to obtain the feature extraction vector.
[0095] It should be noted that the encoder layer, by stacking multiple such Transformer modules, iteratively extracts and transforms features from the feature extraction vector, gradually learning a higher level of semantic representation.
[0096] S204. Input the feature extraction vector into the output layer of the semantic analysis model to perform dimensional transformation and obtain the first semantic vector.
[0097] like Figure 3 As shown, the output layer includes a pooling layer and a projection layer. The output layer can obtain the first semantic vector by performing feature extraction and dimensionality transformation on the feature extraction vector.
[0098] The step of inputting the feature extraction vector into the output layer of the semantic analysis model for dimensional transformation to obtain the first semantic vector includes: performing pooling processing on the feature extraction vector to obtain a pooled feature vector; and performing dimensional transformation processing on the pooled feature vector to obtain the first semantic vector.
[0099] It's important to explain that the self-attention output is a sequence of word vectors, which need to be aggregated into a single vector. BERT adds a special marker [CLS] at the beginning of the sentence, and its final vector represents the sentence. A CLS pooling layer is used to extract the feature vector corresponding to the special marker [CLS] from the last layer output of the encoder, obtaining a pooled feature vector. A fully connected layer transforms the dimensionality of the pooled feature vector output from the pooling layer, ultimately outputting a first semantic vector with fixed dimensions, used for semantic matching in mobile banking user retrieval scenarios.
[0100] S205. Based on the first semantic vector and the pre-constructed Palm Silver knowledge base, determine the semantic similarity score between the first semantic vector and each knowledge data in the Palm Silver knowledge base.
[0101] S206. Based on the semantic similarity score and preset filtering rules, determine the semantic retrieval result corresponding to the first retrieval statement in the mobile terminal.
[0102] The technical solution of this invention involves inputting the first search statement into the input layer of the semantic analysis model for vector mapping to construct a statement feature vector; inputting the statement feature vector into the encoder layer of the semantic analysis model for feature extraction to obtain a feature extraction vector; and inputting the feature extraction vector into the output layer of the semantic analysis model for dimensional transformation to obtain a first semantic vector. This process transforms the user's search input into a semantic vector, achieving a deep understanding of the user's search input. Furthermore, by calculating semantic similarity, the solution matches data in the Palm Silver Knowledge Base to provide search results that meet the user's actual needs.
[0103] Example 3
[0104] Figure 4 This is a schematic diagram of the structure of a palm-based semantic retrieval device provided in Embodiment 3 of the present invention. Figure 4 As shown, the device includes:
[0105] The retrieval statement acquisition module 301 is used to acquire the first retrieval statement requested by the retrieval object through the mobile banking terminal.
[0106] The statement vector conversion module 302 is used to extract deep semantic features from the first retrieval statement based on a pre-trained semantic analysis model to obtain a first semantic vector.
[0107] The similarity score determination module 303 is used to determine the semantic similarity score between the first semantic vector and each knowledge data in the Palm Silver Knowledge Base based on the first semantic vector and the pre-built Palm Silver Knowledge Base, wherein the Palm Silver Knowledge Base stores the knowledge data vector corresponding to each knowledge data.
[0108] The retrieval result determination module 304 is used to determine the semantic retrieval result corresponding to the first retrieval statement in the mobile terminal according to the semantic similarity score and the preset filtering rules, wherein the preset filtering rules include the highest score filtering and the score threshold filtering.
[0109] The technical solution of this invention involves obtaining a first search statement requested by a user through a mobile banking terminal; extracting deep semantic features from the first search statement using a pre-trained semantic analysis model to obtain a first semantic vector; determining a semantic similarity score between the first semantic vector and each knowledge data in the mobile banking knowledge base based on the first semantic vector and a pre-built mobile banking knowledge base, wherein the mobile banking knowledge base stores a knowledge data vector corresponding to each knowledge data; and determining a semantic retrieval result corresponding to the first search statement in the mobile banking terminal based on the semantic similarity score and preset filtering rules. This invention's technical solution can adapt to diverse user search statements when a user uses a mobile banking terminal to search for bank products or services, achieving a deep understanding of user search input, accurately identifying user intent, and effectively improving the accuracy of mobile banking search results.
[0110] Optionally, the statement vector transformation module 302 includes:
[0111] The first statement processing unit is used to input the first retrieval statement into the input layer of the semantic analysis model for vector mapping and to construct a statement feature vector.
[0112] The second statement processing unit is used to input the statement feature vector into the encoder layer of the semantic analysis model for feature extraction to obtain the feature extraction vector.
[0113] The third processing unit of the statement is used to input the feature extraction vector into the output layer of the semantic analysis model for dimensional transformation to obtain the first semantic vector.
[0114] Optionally, the first statement processing unit is used for:
[0115] The search statement is preprocessed by word segmentation to obtain the search statement word segmentation.
[0116] Based on the word embedding mechanism, the search statement is segmented into words and then processed by vector mapping to obtain the first segmentation vector;
[0117] Based on the position embedding mechanism, a position code representing the position information of the word segmentation vector is determined according to the first word segmentation vector, and a sentence embedding vector of multiple search statements is determined according to the position code.
[0118] A sentence feature vector is constructed based on the first word segmentation vector, the position embedding vector, and the sentence embedding vector.
[0119] Optionally, the second statement processing unit is used for:
[0120] The feature vector of the statement is input into a multi-head attention mechanism to perform multi-head parallel attention calculation and obtain the feature attention result;
[0121] The feature attention results are linearly transformed and concatenated to obtain the feature extraction results.
[0122] The feature extraction results are then subjected to layer normalization to obtain the feature extraction vector.
[0123] Returning to the multi-head parallel attention calculation step, the feature extraction vector is input into the multi-head attention mechanism for cyclic processing until the preset termination condition is met.
[0124] Optionally, the third statement processing unit is used for:
[0125] The extracted feature vector is pooled to obtain a pooled feature vector.
[0126] The pooled feature vector is subjected to dimensionality transformation to obtain the first semantic vector.
[0127] Optionally, the similarity score determination module 303 is specifically used for:
[0128] Determine the knowledge data vector corresponding to each of the aforementioned knowledge data;
[0129] Based on the cosine similarity algorithm, the semantic similarity score between the first semantic vector and each knowledge data in the Palm Silver Knowledge Base is determined according to the knowledge data vector and the first semantic vector.
[0130] Optionally, the apparatus further includes an analysis model training module. Specifically, the analysis model training module is used for:
[0131] Based on a pre-constructed data knowledge graph, obtain the sample retrieval statement and the actual semantic vector corresponding to the sample retrieval statement;
[0132] The sample retrieval statement is input into a preset network model for vectorization processing, and an output semantic vector is obtained based on the output of the preset network model.
[0133] The training error is determined based on the output semantic vector and the actual semantic vector, and the training error is backpropagated to the preset network model to adjust the network parameters in the preset network model.
[0134] When the preset convergence condition is met, the training of the preset network model is considered complete, and the semantic analysis model is obtained.
[0135] The palm bank semantic retrieval device provided in the embodiments of the present invention can execute the palm bank semantic retrieval method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0136] Example 4
[0137] Figure 5 A schematic diagram of an electronic device 10 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0138] like Figure 5 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0139] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0140] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as the Palm Credit Semantic Retrieval method.
[0141] In some embodiments, the PalmBank semantic retrieval method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the PalmBank semantic retrieval method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to execute the PalmBank semantic retrieval method by any other suitable means (e.g., by means of firmware).
[0142] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0143] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0144] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0145] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0146] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0147] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0148] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0149] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A semantic retrieval method for bank accounts, characterized in that, Applied to mobile banking terminals, including: Obtain the first search statement requested by the mobile banking terminal for the target object; Based on the pre-trained semantic analysis model, the first retrieval statement is subjected to deep semantic feature extraction to obtain the first semantic vector. Based on the first semantic vector and the pre-built Palm Silver knowledge base, determine the semantic similarity score between the first semantic vector and each knowledge data in the Palm Silver knowledge base, wherein the Palm Silver knowledge base stores the knowledge data vector corresponding to each knowledge data. Based on the semantic similarity score and preset filtering rules, the semantic search result corresponding to the first search statement is determined in the mobile terminal. The preset filtering rules include highest score filtering and score threshold filtering.
2. The method according to claim 1, characterized in that, The step of extracting deep semantic features from the first search statement to obtain a first semantic vector includes: The first retrieval statement is input into the input layer of the semantic analysis model for vector mapping to construct a statement feature vector. The feature vector of the statement is input into the encoder layer of the semantic analysis model for feature extraction to obtain the feature extraction vector; The feature extraction vector is input into the output layer of the semantic analysis model for dimensional transformation to obtain the first semantic vector.
3. The method according to claim 2, characterized in that, The step of inputting the first retrieval statement into the input layer of the semantic analysis model for vector mapping to construct a statement feature vector includes: The search statement is preprocessed by word segmentation to obtain the search statement word segmentation. Based on the word embedding mechanism, the search statement is segmented into words and then processed by vector mapping to obtain the first segmentation vector; Based on the position embedding mechanism, a position code for representing the position information of the word segmentation vector is determined according to the first word segmentation vector, and a sentence embedding vector for multiple search statements is determined according to the position code. A sentence feature vector is constructed based on the first word segmentation vector, the position embedding vector, and the sentence embedding vector.
4. The method according to claim 2, characterized in that, The step of inputting the statement feature vector into the encoder layer of the semantic analysis model for feature extraction to obtain the feature extraction vector includes: The feature vector of the statement is input into a multi-head attention mechanism to perform multi-head parallel attention calculation and obtain the feature attention result; The feature attention results are linearly transformed and concatenated to obtain the feature extraction results. The feature extraction results are then subjected to layer normalization to obtain the feature extraction vector. Returning to the multi-head parallel attention calculation step, the feature extraction vector is input into the multi-head attention mechanism for cyclic processing until the preset termination condition is met.
5. The method according to claim 2, characterized in that, The step of inputting the feature extraction vector into the output layer of the semantic analysis model for dimensionality transformation to obtain the first semantic vector includes: The extracted feature vector is pooled to obtain a pooled feature vector. The pooled feature vector is subjected to dimensionality transformation to obtain the first semantic vector.
6. The method according to claim 1, characterized in that, The step of determining the semantic similarity score between the first semantic vector and each knowledge data in the pre-constructed PalmBank knowledge base, based on the first semantic vector and the pre-constructed PalmBank knowledge base, includes: Determine the knowledge data vector corresponding to each of the aforementioned knowledge data; Based on the cosine similarity algorithm, the semantic similarity score between the first semantic vector and each knowledge data in the Palm Silver Knowledge Base is determined according to the knowledge data vector and the first semantic vector.
7. The method according to claim 1, characterized in that, The training process of the semantic analysis model includes: Based on a pre-constructed data knowledge graph, obtain the sample retrieval statement and the actual semantic vector corresponding to the sample retrieval statement; The sample retrieval statement is input into a preset network model for vectorization processing, and an output semantic vector is obtained based on the output of the preset network model. The training error is determined based on the output semantic vector and the actual semantic vector, and the training error is backpropagated to the preset network model to adjust the network parameters in the preset network model. When the preset convergence condition is met, the training of the preset network model is considered complete, and the semantic analysis model is obtained.
8. A palm-sized semantic retrieval device, characterized in that, Applied to mobile banking terminals, including: The search statement acquisition module is used to acquire the first search statement requested by the search object through the mobile banking terminal. The statement vector conversion module is used to extract deep semantic features from the first retrieval statement based on a pre-trained semantic analysis model to obtain a first semantic vector. The similarity score determination module is used to determine the semantic similarity score between the first semantic vector and each knowledge data in the Palm Silver Knowledge Base based on the first semantic vector and the pre-built Palm Silver Knowledge Base, wherein the Palm Silver Knowledge Base stores the knowledge data vector corresponding to each knowledge data. The retrieval result determination module is used to determine the semantic retrieval result corresponding to the first retrieval statement in the mobile terminal based on the semantic similarity score and preset filtering rules, wherein the preset filtering rules include the highest score filtering and the score threshold filtering.
9. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the Palm Bank semantic retrieval method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that are used to cause a processor to execute the palm-printed semantic retrieval method according to any one of claims 1-7.