Information recommendation method and device, equipment, storage medium and program product
By obtaining the feature vectors of user characteristics and question information, combining intention and demand entity recognition, and outputting response information, the problem that static data analysis model is difficult to identify personalized user needs is solved, and the efficiency and accuracy of information recommendation are improved.
Patent Information
- Application Number
- CN202411792172.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-03-18
AI Technical Summary
Banks’ customer information systems rely on static data analysis models, making it difficult to accurately identify and respond to dynamically changing personalized user needs, resulting in low accuracy and efficiency of replying to question information.
By obtaining the user feature vector of the target user and the text feature vector of the question information, combining the intention recognition and the demand entity recognition, the response information for the question information is output.
It improves the efficiency and accuracy of information recommendation, improves the user experience, and better meets personalized user needs.
Smart Images

Figure CN119647576A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to an information recommendation method, device, equipment, storage medium and program product. Background Art
[0002] In today's digital age, banks' operating scenarios are becoming increasingly complex and diverse. Whether in online channels such as mobile banking applications, online banking platforms, or offline business outlets, banks face a large number of users' questions every day. In such business scenarios, banks need to accurately understand the questions raised by users in order to provide effective answers and appropriate services. At present, banks' customer information systems usually rely on static data analysis models to understand the questions raised by users. This static data analysis model is often built based on pre-set rules and algorithms. To a certain extent, it can reflect the user's general needs based on the user's basic information, past transaction records and other data. However, this approach of relying on static data analysis models has obvious shortcomings. In today's era of increasingly prominent personalized needs, user needs are changing dynamically. Each user has unique financial conditions, consumption habits, investment preferences and other factors, which will change with time, market environment and personal life status. Static data analysis models are unable to identify such dynamically changing personalized user needs.
[0003] Therefore, how to improve the accuracy and efficiency of replying to question information is an urgent problem to be solved. Summary of the invention
[0004] The present application provides an information recommendation method, device, equipment, storage medium and program product to solve the technical problem of low accuracy and efficiency of replying question information.
[0005] In a first aspect, the present application provides an information recommendation method, comprising:
[0006] Acquire a user feature vector of a target user and a text feature vector of question information from the target user, wherein the user feature vector represents at least one of a behavior feature, a preference feature, and a demand feature of the target user;
[0007] Obtaining an intention recognition result of the question information according to the user feature vector and the text feature vector;
[0008] Obtaining a requirement entity recognition result of the question information according to the text feature vector;
[0009] According to the intention recognition result and the requirement entity recognition result, response information for the question information is output.
[0010] In a second aspect, the present application provides an information recommendation device, comprising:
[0011] An acquisition module, used to acquire a user feature vector of a target user and a text feature vector of a question information from the target user, wherein the user feature vector represents at least one of a behavior feature, a preference feature, and a demand feature of the target user;
[0012] A first processing module, configured to obtain an intention recognition result of the question information according to the user feature vector and the text feature vector;
[0013] A second processing module is used to obtain a requirement entity recognition result of the question information according to the text feature vector;
[0014] A control module is used to output response information to the question information according to the intention recognition result and the requirement entity recognition result.
[0015] In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;
[0016] The memory stores computer-executable instructions;
[0017] The processor executes the computer-executable instructions stored in the memory to implement the method as described in the first aspect.
[0018] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method described in the first aspect.
[0019] In a fifth aspect, the present application provides a computer program product, which, when executed by a processor, is used to implement the method as described in the first aspect.
[0020] The information recommendation method, apparatus, device, storage medium and program product provided by the present application obtain a user feature vector of a target user and a text feature vector of question information from the target user, obtain an intent recognition result of the question information based on the user feature vector and the text feature vector, obtain a requirement entity recognition result of the question information based on the text feature vector, and output response information for the question information based on the intent recognition result and the requirement entity recognition result, thereby combining the two factors of the user feature of the target user and the question information to obtain response information for the question information of the target user, thereby improving the efficiency and accuracy of information recommendation and enhancing the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0022] Figure 1 A schematic diagram of a scenario for information recommendation provided in an embodiment of the present application;
[0023] Figure 2 A flowchart of an information recommendation method provided in an embodiment of the present application;
[0024] Figure 3 A flowchart of another information recommendation method provided in an embodiment of the present application;
[0025] Figure 4 A flowchart of another information recommendation method provided in an embodiment of the present application;
[0026] Figure 5 A flowchart of another information recommendation method provided in an embodiment of the present application;
[0027] Figure 6 A flowchart of another information recommendation method provided in an embodiment of the present application;
[0028] Figure 7 A flowchart of another information recommendation method provided in an embodiment of the present application;
[0029] Figure 8 A schematic diagram of the structure of an information recommendation device provided in an embodiment of the present application;
[0030] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0031] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0032] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0033] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with the relevant laws, regulations and standards of the relevant countries and regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0034] In addition, this application involves conducting big data analysis of user information (including but not limited to personal biometrics, identity data, consumption data, asset data, electronic terminal operation data, etc.), and using artificial intelligence technology to make automated decisions, and making technical solutions that have a significant impact on personal rights and interests based on the results of automated decisions. The application provides users with corresponding operation entrances for them to choose to agree or reject the results of automated decisions; if the user chooses to reject, the expert decision-making process will be entered.
[0035] It should be noted that the information recommendation method, device, equipment, storage medium and program product provided in this application can be used in the field of artificial intelligence technology, and can also be used in any field outside the field of artificial intelligence technology. The application field of the information recommendation method, device, equipment, storage medium and program product in this application is not limited.
[0036] At present, the customer information system of banks usually relies on static data analysis models to understand the questions raised by users. Although this method can reflect the regular needs of users to a certain extent, it is unable to identify the dynamic and personalized needs of users. In addition, traditional data analysis methods also have certain limitations when processing data involving complex relationships between multiple entities, making it difficult to fully and carefully describe the real needs of customers.
[0037] Therefore, how to improve the accuracy and efficiency of replying to question information is an urgent problem to be solved.
[0038] With the deepening development of digital transformation, banking services have expanded from traditional counter services to online platforms, such as mobile banking applications, social media channels (such as WeChat official accounts), etc. These platforms not only simplify user operation processes and improve service efficiency, but also generate a large amount of data resources through users' online behaviors. These data contain a variety of valuable information such as users' basic information, transaction habits, service preferences, etc., providing banks with opportunities to deeply understand customer needs.
[0039] In view of this, the present application provides an information recommendation method, which obtains a user feature vector of a target user and a text feature vector of question information from the target user, obtains an intent recognition result of the question information based on the user feature vector and the text feature vector, obtains a requirement entity recognition result of the question information based on the text feature vector, and outputs response information for the question information based on the intent recognition result and the requirement entity recognition result, thereby combining the two factors of the user characteristics of the target user and the question information to obtain response information for the question information of the target user, thereby improving the efficiency and accuracy of information recommendation and enhancing the user experience.
[0040] Figure 1 A schematic diagram of a scenario for information recommendation provided in an embodiment of the present application. Figure 1 As shown, the scenario includes: information recommendation equipment and terminal equipment.
[0041] The information recommendation device is a terminal device with data processing functions, such as a computer, mobile phone or other computing device with computing functions, or a server of a bank system. The information recommendation device may be deployed with software or program code for running the information recommendation method, and respond to user question information through the software or program code. The terminal device may be, for example, a user's computer, mobile phone, tablet computer or other electronic device, or a bank's counter machine or other device.
[0042] The information recommendation device receives question information sent by the terminal device, determines response information of the question information according to the question information and the user who asks the question information, and outputs the response information, thereby realizing information recommendation for the question information.
[0043] The execution subject of the information recommendation method provided in this application can be Figure 1 The information recommendation device mentioned in the above may be a processing chip of the information recommendation device, or may be software or program code for implementing the information recommendation method. When the execution subject is the information recommendation device, the information recommendation device may be equipped with software or program code for running the information recommendation method, and information recommendation is performed for the question information through the software or program code.
[0044] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0045] Figure 2 The following is a flow chart of an information recommendation method provided in an embodiment of the present application. Figure 2As shown, the method may include:
[0046] S201 : Obtain a user feature vector of a target user and a text feature vector of question information from the target user.
[0047] Among them, the user feature vector represents at least one of the target user's behavioral characteristics, preference characteristics, and demand characteristics. For example, the user's behavioral characteristics such as the frequency and duration of browsing web pages, the user's preference for a certain type of goods, the user's preference for the way of response, and other preference characteristics, and the user's demand characteristics such as whether there is a demand for a certain business or a certain type of product. Optionally, the user feature vector can also be generated based on the user's age, gender, income level, occupation and other user information, so as to obtain a user portrait that can be used to analyze user characteristics. The text feature vector is used to represent the feature representation of the question information, for example, it can be formed by combining the words in the question information with the vector representation.
[0048] In a possible implementation, the user feature vector of the target user can be obtained through a user knowledge graph including the target user, and the text feature vector can be obtained through the received question information of the target user. Among them, the user knowledge graph includes at least one of the behavioral characteristics, preference characteristics, and demand characteristics of each user. The user knowledge graph can be pre-built based on the user information, historical transaction records, historical interactive behaviors and other data of each user, and a knowledge graph including multiple entities such as users, products, and services is generated. According to the target user. Through the target user and the user knowledge graph, the user feature vector of the target user can be extracted from the user knowledge graph. Alternatively, the user knowledge graph can be a knowledge graph generated in real time by obtaining the user information, historical transaction records, historical interactive behaviors and other data of the target user after receiving the question information of the target user.
[0049] In another possible implementation, various behavior data of the target user, such as login time, operation records, preference data, demand data, etc., can be collected, and then these data can be quantified and vectorized to form a user feature vector. For the text feature vector of the question information, the question information can be first segmented and decomposed into multiple words. Then a one-hot vector is constructed for each word, and these one-hot vectors are combined into a text feature vector through a dimensionality reduction algorithm (such as principal component analysis, factor analysis, etc.).
[0050] Optionally, after collecting user information, historical transaction records, historical interactive behaviors and other data, you can also perform preprocessing operations on these data. For example, through preprocessing operations such as data cleaning, deduplication, and format unification, you can obtain data that is convenient for subsequent processing, thereby improving data accuracy and the efficiency of subsequent processing.
[0051] S202: Obtain intention recognition results of the question information according to the user feature vector and the text feature vector.
[0052] Among them, the intention recognition result represents the recognition result of the purpose behind the question information, for example, whether the question is for querying product information, seeking help or other intentions.
[0053] In a possible implementation, the user feature vector and the text feature vector may be fused, and then the intent recognition process may be performed based on the fused vector to obtain the intent recognition result of the question information. For example, the user feature vector and the text feature vector may be spliced to achieve fusion (for example, the user feature vector and the text feature vector may be spliced in a certain order) to generate a target splicing vector for intent recognition. Then, the intent recognition process may be performed based on the target splicing vector to obtain the intent recognition result of the question information.
[0054] In another possible implementation, the intent recognition process can be performed based on the user feature vector and the text feature vector respectively to obtain the intent recognition result obtained based on the user feature vector and the intent recognition result obtained based on the text feature vector. Then, based on the intent recognition result obtained based on the user feature vector and the intent recognition result obtained based on the text feature vector, a comprehensive analysis is performed to obtain the intent recognition result of the question information.
[0055] S203: Obtain a requirement entity recognition result of the question information according to the text feature vector.
[0056] Among them, the demand entity recognition result refers to the entity content related to the demand identified from the question information. For example, in the question "What is my credit score", "credit score" is the demand entity recognition result.
[0057] Specifically, a requirement entity dictionary can be established, which contains various possible requirement entities. Each character vector in the text feature vector is matched with the entity in the requirement entity dictionary to calculate the similarity. A similarity threshold is set. When the similarity exceeds the threshold, it is considered that the part corresponding to the character vector belongs to a certain requirement entity. By traversing the entire text feature vector, all matching requirement entities are determined, thereby obtaining the requirement entity recognition result.
[0058] S204. Output response information to the question information based on the intention recognition result and the requirement entity recognition result.
[0059] Among them, the response information is the answer content given to the user's question information based on the intention recognition results and the demand entity recognition results. For example, if the intention is to query product information and the demand entity is a certain business of the bank, the response information can be the detailed content of the business, etc.
[0060] In one possible implementation, a rule engine can be built, in which response rules for different combinations of intent and demand entities are predefined. The corresponding rules are searched in the rule engine according to the intent recognition results and the demand entity recognition results. Response information is generated according to the found rules. For example, the rule may be that when the intent is to seek help and the demand entity is a certain function, the response information is the usage guide of the function.
[0061] In another possible implementation, the first demand entity that matches the intent recognition result can be first obtained from the demand entity recognition result. For example, if the intent recognition result is to query the interest rate, and there are multiple entities in the demand entity recognition result, then the product entity related to the interest rate query is the first demand entity. Then associate the first demand entity with the intent recognition result to obtain the information to be queried. For example, the product name and the intention to query the price are associated to form the information to be queried such as "query the interest rate of [business name]". Finally, according to the information to be queried, the preset recommended information library is queried to obtain and output the response information. The preset recommended information library can be a database that stores product information, service information, etc., and the matching information is found and output by querying the database.
[0062] The method provided in the embodiment of the present application obtains a user feature vector of a target user and a text feature vector of question information from the target user, obtains an intent recognition result of the question information based on the user feature vector and the text feature vector, obtains a requirement entity recognition result of the question information based on the text feature vector, and outputs response information for the question information based on the intent recognition result and the requirement entity recognition result, thereby combining the two factors of the user characteristics of the target user and the question information to obtain response information for the question information of the target user, thereby improving the efficiency and accuracy of information recommendation and enhancing the user experience.
[0063] Next, taking obtaining a user feature vector from a user knowledge graph as an example, how to obtain the user feature vector of the target user in the aforementioned step S201 is described in detail. Figure 3 A flowchart of another information recommendation method provided in an embodiment of the present application. Figure 3 As shown, the aforementioned step S201 includes:
[0064] S301. Obtain the user knowledge graph corresponding to the target user.
[0065] The user knowledge graph is a knowledge system about users represented by a graph structure. The nodes in the user knowledge graph can represent entities such as users, products, and services. The edges in the user knowledge graph represent the relationship between entities, such as the user purchased a certain product, the user used a certain service, etc. The user knowledge graph includes at least one of the behavior characteristics, preference characteristics, and demand characteristics of each user.
[0066] Among them, the user knowledge graph can be a knowledge graph that is pre-built based on the user information, historical transaction records, historical interactive behaviors and other data of each user, including multiple entities such as users, products, and services. In this case, the user knowledge graph corresponding to the target user can be directly obtained based on the target user (for example, the target user's identifier). Alternatively, the user knowledge graph can be a knowledge graph that is instantly built and generated based on the user information, historical transaction records, historical interactive behaviors and other data of the target user obtained after receiving the question information of the target user.
[0067] Taking the user knowledge graph as an example, one possible implementation method is to collect user-related data from multiple existing data sources. These data sources can be the user management system, transaction system, customer relationship management system, etc. within the bank. The collected data is cleaned and preprocessed to remove noise data and data with inconsistent formats. Then, a knowledge graph construction tool (such as Neo4j, etc.) is used to construct a user knowledge graph based on the entity and relationship information in the data. Finally, the corresponding user knowledge graph is located and obtained in the constructed knowledge graph through the unique identifier of the target user.
[0068] Another possible implementation method is to obtain user information, product information, and service information, where the user information includes at least one of user identity information, user historical transaction information, and online interactive information. User information may include user identity information such as user name, age, and gender, user historical transaction information such as the name of the service handled, transaction time, and transaction amount, and online interactive information such as user evaluation and historical browsing pages. Product information may include product name, function, etc., and service information includes service type, service provider, etc. A user knowledge graph is constructed based on user information, product information, service information, and the interactive relationship between the user and the product information and service information. For example, if a user handles a certain business product, an edge representing a purchase relationship is established between the node representing the user and the node representing the business product. The constructed user knowledge graph is then stored in a database, and the corresponding user knowledge graph is obtained from the database through the identifier of the target user (such as the user ID).
[0069] S302: Extract the user feature vector of the target user from the user knowledge graph.
[0070] One possible implementation method is to define a set of meta-paths related to user features, such as a meta-path such as "user-purchase-product-belongs-category", which indicates that the category to which the product purchased by the user belongs may be related to the user's features. For the target user node in the user knowledge graph, feature extraction is performed along the defined meta-path. For example, the number and frequency of nodes of different categories reached by the target user along the meta-path of "user-purchase-product-belongs-category" are counted, and these statistical information are combined into a vector as the user feature vector of the target user.
[0071] Another possible implementation method is to perform graph embedding processing on the user knowledge graph to obtain the user feature vector of each user in the user knowledge graph, and then obtain the target feature vector of the target user from the user feature vectors of each user in the user knowledge graph according to the target user. In this implementation method, the above process can be implemented specifically through the following sub-steps:
[0072] S3021. Perform graph embedding processing on the user knowledge graph to obtain the user feature vector of each user in the user knowledge graph.
[0073] Graph embedding processing is a technology that maps graph structured data (user knowledge graph in this application) to a low-dimensional vector space, so that the vector representation of the nodes in the graph (the nodes in this application are entities such as users, services, products, etc.) in the low-dimensional space can retain certain information in the graph structure, such as the relationship between nodes.
[0074] For example, the user knowledge graph can be embedded based on the Node2vec algorithm to obtain the user feature vector of each user in the user knowledge graph. The Node2vec algorithm is a graph embedding algorithm based on random walks. First, a random walk is performed on the user knowledge graph. For each node (user node or other related node), a walk path of a fixed length is set, for example, the length is 8. Starting from each node, neighbor nodes are randomly selected for walks according to a certain transition probability. This transition probability can be determined based on the weight of the edge (if any) or the degree of the node (the number of edges connected to the node). A series of node sequences will be generated during the walk. Then, based on these node sequences, the user feature vector of each user in the user knowledge graph is obtained using a trained machine learning model (such as the Skip-Gram model).
[0075] Alternatively, the user knowledge graph can be embedded based on the TransE model to obtain the user feature vector of each user in the user knowledge graph. The training process of the TransE model is as follows: First, the entity vector representation can be defined, that is, assuming that there is a entities, you can construct a matrix ,in Represents the dimension of the embedding space, with a unique Then, we define the relation vector representation, that is, assuming that different relationships, then construct a Size Relationship Matrix , the relationship matrix Each row in the dimensional vector. After that, the triples and scoring functions are defined. The TransE model evaluates the effectiveness of the triples by calculating the distance between the head entity vector and the relationship vector in the user knowledge graph and the tail entity vector. Specifically, for each triple , the score function of the TransE model is shown in formula (1):
[0076] (1)
[0077] in represents the embedding vector of the head entity in the user knowledge graph (head), represents the embedding vector (tail) of the tail entity in the user’s knowledge graph, The embedding vector (relation) representing the relationship in the user’s knowledge graph. Represents a triple By judging the scoring function of the user knowledge graph, the TransE model is iteratively optimized to obtain a trained TransE model, and the user knowledge graph is embedded by the TransE model to obtain the user feature vector of each user in the user knowledge graph.
[0078] S3022. According to the target user, obtain the user feature vector of the target user from the user feature vectors of each user in the user knowledge graph.
[0079] One possible implementation method is to search for the user feature vector of the target user based on an index. When generating the user feature vectors of each user, an index structure can be established for each user feature vector, and the key of the index can be a unique identifier of the user (such as a user ID). When it is necessary to obtain the user feature vector of the target user, the identifier of the target user is directly used to perform a search operation in the index structure. For example, if the index structure is a hash table, the hash value is calculated using the ID of the target user, and then the corresponding user feature vector is found in the hash table.
[0080] Another possible implementation method is to search for the user feature vector of the target user based on traversal comparison. For example, the user feature vectors of all users can be traversed, and each user feature vector can be associated and stored with an identifier representing the identity of the user. During the traversal process, the identifier of each user is compared with the identifier of the target user. When a user feature vector matching the identifier of the target user is found, it is the user feature vector of the target user.
[0081] The method provided in the embodiment of the present application obtains the user knowledge graph corresponding to the target user, performs graph embedding processing on the user knowledge graph, obtains the user feature vector of each user in the user knowledge graph, and obtains the user feature vector of the target user from the user feature vectors of each user in the user knowledge graph according to the target user, enriches the question background of the question information with user characteristics, improves the accuracy of demand identification, and thus better meets the user's personalized service needs.
[0082] Next, how to obtain the text feature vector of the question information from the target user in the aforementioned step S201 is described in detail. Figure 4 A flowchart of another information recommendation method provided in an embodiment of the present application is shown below. Figure 4 As shown, the aforementioned step S201 may specifically include:
[0083] S401: Obtain question information from a target user.
[0084] The question information may be obtained from a bank client (such as an application client on a mobile phone, a small program, etc.), a web page, or a bank staff. For example, the target user may input the question information on the bank client or web page, or ask the staff the question information. When the question information is obtained from the bank staff, the staff may input the question information into the staff's terminal device, and obtain the question information by receiving the question information from the target user sent by the terminal device. This application does not limit how to obtain the question information.
[0085] S402: Extracting text feature vectors from question information using a language recognition model.
[0086] The question information can be segmented, and then the feature vector of each segmented word can be extracted according to the segmentation result, and then the text feature vector of the question information can be obtained according to the feature vector of each segmented word. The language recognition model can be, for example, a BERT model, a Word2Vec model or other language recognition model. The specific method of extracting the text feature vector from the question information through these language recognition models can refer to the prior art and will not be described in detail here.
[0087] exist Figure 4Based on the example of extracting text feature vectors from question information through the BERT model, the intention recognition result of the question information obtained in the above step S202 can be obtained based on the user feature vector and the text feature vector. Figure 5 The implementation shown is implemented. Figure 5 A flowchart of another information recommendation method provided in an embodiment of the present application is shown below. Figure 5 As shown, the aforementioned step S202 may specifically include:
[0088] S501: Generate a target concatenated vector for intent recognition according to a user feature vector and a text feature vector.
[0089] Obtaining customer feature embedding vectors through the TransE model After that, embed it with the text features Perform concatenation to obtain the target concatenation vector for intent recognition Assumptions The dimension is m, The dimension is the hidden layer dimension of the BERT model ,but The dimension is m+n, and the target concatenation vector The calculation method is shown in formula (2):
[0090] (2)
[0091] S502: Obtain an intention recognition result of the question information according to the target splicing vector.
[0092] One possible implementation method is to use a pre-trained convolutional neural network model, a support vector machine model, etc., and take the target splicing vector as input to output an intent recognition result corresponding to the target splicing vector.
[0093] Another possible implementation method is to process the target concatenated vector through a multi-layer perceptron algorithm and a softmax function to obtain the intent recognition results corresponding to the user feature vector and the text feature vector. This implementation method can be implemented through the following sub-steps:
[0094] S5021. Process the target concatenation vector using a multi-layer perceptron algorithm to generate a first processing result, wherein the first processing result includes feature information related to the intent recognition result.
[0095] Multilayer Perceptron (MLP) is a feedforward artificial neural network model, which consists of an input layer, one or more hidden layers, and an output layer. Neurons are fully connected, that is, each neuron is connected to all neurons in the adjacent layers. For example, when processing text-related tasks, the number of neurons in the input layer can be determined according to the dimension of the input vector (here is the target concatenated vector), the number of neurons in the hidden layer can be set according to the complexity of the task and experience, and the number of neurons in the output layer is related to the feature information to be extracted.
[0096] The target concatenation vector Pass it into the multi-layer perceptron for further processing and output to obtain the vector , the vector That is, it is the first processing result including feature information related to the intention recognition result.
[0097] S5022. Use the softmax function to process the first processing result to generate an intent recognition result.
[0098] The softmax function is a function that maps a K-dimensional vector (i.e., the dimension of the first processing result, which is related to the number of intent categories) to a probability distribution. Assume that the first processing result is a vector , where n is the number of intent categories. For each element ,calculate
[0099]
[0100] So we get the vector ,in represents the probability of the i-th intent category, and the intent category corresponding to the element with the largest probability in vector y is taken as the intent recognition result.
[0101] Next, how to obtain the requirement entity recognition result of the question information according to the text feature vector in the aforementioned step S203 is described in detail. Figure 6 A flowchart of another information recommendation method provided in an embodiment of the present application is shown below. Figure 6 As shown, the aforementioned step S203 may specifically include:
[0102] S601. Obtain encoding information of a text feature vector.
[0103] The encoding information is the internal representation or related parameters contained in the text feature vector under a specific encoding method. For example, if the text feature vector is generated by a certain neural network model (such as a Transformer model), its encoding information may include information such as the hidden layer state and position encoding of the model.
[0104] For example, when the text feature vector is generated by a pre-trained deep learning model (such as BERT), the output of the model contains multiple parts, and the encoding information related to the text features can be directly obtained from the output of the model. For example, the last hidden state output by the BERT model can be regarded as the encoding information of the text feature vector. This part of the information is extracted from the output result of the model and stored in memory for subsequent steps to use.
[0105] S602. Obtain the character vectors corresponding to each character in the text feature vector according to the encoding information.
[0106] Among them, the character vectors are related to the number of demand entities. The character vector is a vector representation corresponding to a single character in the text, and its dimension and value are related to the number of demand entities. For example, if the demand entity is a product name, the vector value of the character vector may be determined according to factors such as the frequency of occurrence of the product name in the corpus and the semantic relationship with other product names. If the encoding information is a matrix containing all the character information of the text (for example, each row corresponds to the encoding of a character), then each row of this matrix can be directly used as a character vector. For encoding information that is not represented in matrix form, character vectors can be obtained through some conversion operations. For example, if the encoding information is a serialized vector and the start and end positions of each character in the vector are known (according to the encoding rule), then this serialized vector can be split according to the positions to obtain the character vectors corresponding to each character.
[0107] Exemplarily, the character vectors of each character in the question information can be calculated through a neural network. Each character vector is an N*2-dimensional vector, where N is the number of entity types, and 2 corresponds to the start sequence and end sequence of the character.
[0108] S603. Obtain the start position probability and end position probability when each character vector belongs to each demand entity according to each character vector.
[0109] The start position probability represents the probability that a certain character vector is the start position of a certain demand entity type in the text, and the end position probability represents the probability that a certain character vector is the end position of a certain demand entity type in the text. For example, for the demand entity type "credit score", calculate the probability that the character "信" is the start position and the character "分" is the end position belonging to "credit score" respectively.
[0110] For example, you can first build a probability model, which can be based on a neural network (such as a recurrent neural network) or a statistical model. Enter the character vector as input into this probability model. If it is a model based on a neural network, the model will output two values (or two vectors) after a series of hidden layer calculations, representing the starting position probability and the ending position probability respectively. For example, for a character vector, the model outputs a starting position probability of 0.3 and an ending position probability of 0.6, indicating that the character vector has a 0.3 probability of being the starting position of the required entity type in the text and a 0.6 probability of being the ending position.
[0111] For example, the i-th character is predicted to be the required entity type ,in, The probability of the starting position and the probability of the ending position of the character are expressed as , , the probability of the starting position and the probability of the ending position of the character can be calculated as shown in the following formula (3) and formula (4):
[0112] (3)
[0113] (4)
[0114] in, It is The vector representation of characters, that is, the word embedding vector after the BERT model. , are weight vector and bias respectively, which can be set according to actual needs. For the text feature vector corresponding to the question information, the above calculation can finally output a The probability matrix of Represents the text sequence length of the text feature vector (that is, the number of characters in the text feature vector), Indicates the number of required entity types.
[0115] S604: Determine the target demand entity corresponding to each character vector according to the start position probability and / or the end position probability that is greater than or equal to a preset probability threshold.
[0116] The preset probability threshold is used to determine whether the character vector belongs to the starting position or the ending position of the required entity type. For example, the preset probability threshold can be set to 0.5. If the starting position probability of a character vector is greater than or equal to 0.5, it is considered that the character vector may be the starting position of the required entity.
[0117] When the probability of the starting position and / or ending position of a character vector is greater than or equal to the preset probability threshold, the starting position and / or ending position of the character vector is considered The class requires the entity type boundary, marking the character as belonging to The class requirement entity type, for example, can be marked as 1, thereby determining the requirement entity type to which the character belongs.
[0118] S605. Obtain a requirement entity recognition result according to the target requirement entity corresponding to all character vectors in the text feature vector.
[0119] The demand entity types corresponding to the characters are combined to form a set or arranged in a certain order into a result list as the demand entity recognition result corresponding to the question information.
[0120] The method provided by the embodiment of the present application obtains the encoding information of the text feature vector, obtains the character vector corresponding to each character in the text feature vector according to the encoding information, obtains the starting position probability and the ending position probability when each character vector belongs to each demand entity according to each character vector, and determines the target demand entity corresponding to each character vector according to the starting position probability and / or the ending position probability greater than or equal to a preset probability threshold. According to the target demand entity corresponding to all the character vectors in the text feature vector, the demand entity recognition result is obtained to obtain which demand entities the question information corresponds to, and provide a data basis for subsequently determining the response information corresponding to the question information according to the demand entity and intention recognition results, thereby further improving the accuracy of information recommendation.
[0121] Next, how to output the response information to the question information according to the intention recognition result and the requirement entity recognition result in the aforementioned step S204 is described in detail. Figure 7 A flowchart of another information recommendation method provided in an embodiment of the present application is shown below. Figure 7 As shown, the aforementioned step S204 may specifically include:
[0122] S701. Obtain a first requirement entity that matches the intention recognition result from the requirement entity recognition result.
[0123] The requirement entity recognition result is a collection of entity contents related to the requirement identified from the question information. For example, in a banking business scenario, if the question information is "I want to check my credit card bill", the requirement entity recognition result may be "credit card bill", "I (the user himself)", etc. The intent recognition result represents the recognition result of the purpose behind the question information. For example, in the above banking business scenario, the intent recognition result is "check the bill". The first requirement entity is the entity in the requirement entity recognition result that matches the intent recognition result.
[0124] First, obtain the requirement entity recognition results and intent recognition results. For example, the requirement entity recognition results are ["credit card bill", "savings account", "loan business"], and the intent recognition result is "query bill". Then, the first requirement entity that matches the intent recognition result is determined through predefined matching rules. In the banking business scenario, the predefined matching rule may be to match the "query bill" intent with the requirement entity containing the word "bill", so in this example, "credit card bill" is the first requirement entity.
[0125] S702: Associating the first demand entity with the intention recognition result to obtain the information to be queried.
[0126] The information to be queried is the information obtained by combining the first demand entity and the intent recognition result and used to query the preset recommended information library. For example, in banking business, if the first demand entity is "credit card bill" and the intent recognition result is "query bill", the information to be queried may be "query the credit card bill of [user ID]".
[0127] Combine the first demand entity with the intent recognition result in a predefined association. In the banking business scenario, assume that there is a template mechanism. For the intent of "query bill" and the first demand entity of "credit card bill", the template may be "query [first demand entity] of [user ID]". Get the unique identifier of the target user (such as user ID), fill it into the template, and get the information to be queried "query
[12345] 's credit card bill" (assuming the user ID is 12345).
[0128] S703: Query a preset recommendation information database according to the information to be queried to obtain and output the response information.
[0129] The preset recommendation information base is a pre-built database that stores information related to banking services, such as various account information, transaction records, business rules, etc. The response information is the answer given to the user's question information based on the intent recognition results and the demand entity recognition results. For example, in banking services, if you query a credit card bill, the response information may be bill details including the bill amount, repayment date, etc.
[0130] The information to be queried is used as the query condition to perform a query operation in the preset recommended information library. For example, in a relational database, SQL statements can be used for querying. The query results are formatted and output to the user as response information. For example, if the query result is a record containing fields such as bill amount and repayment date, the server organizes this information into a format that is easy for users to understand (such as "Your credit card bill amount is [X] yuan, and the repayment date is [specific date]") and then sends it to the user.
[0131] Figure 8 This is a schematic diagram of the structure of an information recommendation device provided in an embodiment of the present application. Figure 8 As shown, the information recommendation device may include: an acquisition module 11 , a first processing module 12 , a second processing module 13 , and a control module 14 .
[0132] The acquisition module 11 is used to acquire a user feature vector of a target user and a text feature vector of question information from the target user, wherein the user feature vector represents at least one of a behavior feature, a preference feature, and a demand feature of the target user.
[0133] The first processing module 12 is used to obtain the intention recognition result of the question information according to the user feature vector and the text feature vector.
[0134] The second processing module 13 is used to obtain a requirement entity recognition result of the question information according to the text feature vector.
[0135] The control module 14 is used to output response information to the question information according to the intention recognition result and the requirement entity recognition result.
[0136] Optionally, the acquisition module 11 is specifically configured to acquire a user knowledge graph corresponding to the target user and extract a user feature vector of the target user from the user knowledge graph.
[0137] Optionally, the acquisition module 11 is specifically used to perform graph embedding processing on the user knowledge graph to obtain the user feature vector of each user in the user knowledge graph. According to the target user, the user feature vector of the target user is obtained from the user feature vectors of each user in the user knowledge graph.
[0138] Optionally, the acquisition module 11 is specifically configured to acquire question information from the target user and extract the text feature vector from the question information using a language recognition model.
[0139] Optionally, the first processing module 12 is specifically configured to generate a target concatenated vector for intent recognition based on the user feature vector and the text feature vector, and obtain an intent recognition result of the question information based on the target concatenated vector.
[0140] Optionally, the first processing module 12 is specifically configured to process the target concatenated vector using a multi-layer perceptron algorithm to generate a first processing result, wherein the first processing result includes feature information related to the intent recognition result. The first processing result is processed using a softmax function to generate the intent recognition result.
[0141] Optionally, the second processing module 13 is specifically used to obtain the encoding information of the text feature vector. According to the encoding information, the character vector corresponding to each character in the text feature vector is obtained, and the character vector is related to the number of demand entities. According to each character vector, the starting position probability and the ending position probability when each character vector belongs to each demand entity are obtained. According to the starting position probability and / or the ending position probability greater than or equal to a preset probability threshold, the target demand entity corresponding to each character vector is determined. According to the target demand entity corresponding to all the character vectors in the text feature vector, the demand entity recognition result is obtained.
[0142] Optionally, the acquisition module 11 is specifically used to acquire user information, product information, and service information. The user knowledge graph is constructed based on the user information, product information, service information, and the interaction relationship between the user and the product information and service information, respectively. The user information includes at least one of user identity information, user historical transaction information, and online interaction information.
[0143] Optionally, the control module 14 is specifically configured to obtain a first requirement entity matching the intention recognition result in the requirement entity recognition result, associate the first requirement entity with the intention recognition result, and obtain the information to be queried. According to the information to be queried, query and obtain the response information in a preset recommendation information library and output the response information.
[0144] The information recommendation device provided in the embodiment of the present application can execute the information recommendation method in the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0145] Fig. 9 The structure diagram of an electronic device provided in an embodiment of the present application. The electronic device is used to execute the information recommendation method mentioned above, for example, it can be the electronic device with data processing function mentioned above. Fig. 9 As shown, the electronic device 900 may include: at least one processor 901 , a memory 902 , and a communication interface 903 .
[0146] The memory 902 is used to store programs. Specifically, the programs may include program codes, and the program codes include computer operation instructions.
[0147] The memory 902 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0148] The processor 901 is used to execute the computer-executable instructions stored in the memory 902 to implement the method described in the above method embodiment. The processor 901 may be a CPU, or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.
[0149] The processor 901 can communicate and interact with external devices through the communication interface 903, and the external devices can be, for example, the aforementioned terminal devices. In specific implementation, if the communication interface 903, the memory 902, and the processor 901 are implemented independently, the communication interface 903, the memory 902, and the processor 901 can be interconnected through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc., but it does not mean that there is only one bus or one type of bus.
[0150] Optionally, in a specific implementation, if the communication interface 903, the memory 902 and the processor 901 are integrated on a chip, the communication interface 903, the memory 902 and the processor 901 can communicate through an internal interface.
[0151] The present application also provides a computer-readable storage medium, which may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program codes. Specifically, the computer-readable storage medium stores program instructions, and the program instructions are used for the methods in the above embodiments.
[0152] The present application also provides a program product, which includes an execution instruction, which is stored in a readable storage medium. At least one processor of a computing device can read the execution instruction from the readable storage medium, and at least one processor executes the execution instruction so that the computing device implements the above information recommendation method.
[0153] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present application.
[0154] It should be further noted that, although the various steps in the flowchart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowchart may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0155] It should be understood that the above-mentioned device embodiments are only illustrative, and the device of the present application can also be implemented in other ways. For example, the division of units / modules in the above-mentioned embodiments is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units, modules or components can be combined, or can be integrated into another system, or some features can be ignored or not executed.
[0156] In addition, unless otherwise specified, each functional unit / module in each embodiment of the present application may be integrated into one unit / module, each unit / module may exist physically separately, or two or more units / modules may be integrated together. The above-mentioned integrated unit / module may be implemented in the form of hardware or in the form of a software program module.
[0157] If the integrated unit / module is implemented in the form of hardware, the hardware may be a digital circuit, an analog circuit, etc. The physical implementation of the hardware structure includes but is not limited to transistors, memristors, etc. Unless otherwise specified, the processor may be any appropriate hardware processor, such as a CPU, a GPU, an FPGA, a DSP, an ASIC, etc. Unless otherwise specified, the storage unit may be any appropriate magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory (RRAM), a dynamic random access memory (DRAM), a static random access memory (SRAM), an enhanced dynamic random access memory (EDRAM), a high-bandwidth memory (HBM), a hybrid memory cube (HMC), etc.
[0158] If the integrated unit / module is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.
[0159] In the above embodiments, the description of each embodiment has its own emphasis. For the part not described in detail in a certain embodiment, please refer to the relevant description of other embodiments. The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0160] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0161] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. An information recommendation method, characterized in that: include: Acquire a user feature vector of a target user and a text feature vector of question information from the target user, wherein the user feature vector represents at least one of a behavior feature, a preference feature, and a demand feature of the target user; Obtaining an intention recognition result of the question information according to the user feature vector and the text feature vector; Obtaining a requirement entity recognition result of the question information according to the text feature vector; According to the intention recognition result and the requirement entity recognition result, response information for the question information is output.
2. The method according to claim 1, characterized in that The step of obtaining a user feature vector of a target user includes: Obtaining a user knowledge graph corresponding to the target user; A user feature vector of the target user is extracted from the user knowledge graph.
3. The method according to claim 2, characterized in that The step of extracting the user feature vector of the target user from the user knowledge graph includes: Performing graph embedding processing on the user knowledge graph to obtain a user feature vector of each user in the user knowledge graph; According to the target user, a user feature vector of the target user is obtained from the user feature vectors of each user in the user knowledge graph.
4. The method according to claim 1, characterized in that The text feature vector of the question information from the target user includes: Obtaining question information from the target user; The text feature vector is extracted from the question information using a language recognition model.
5. The method according to claim 4, characterized in that Obtaining the intention recognition result of the question information according to the user feature vector and the text feature vector includes: Generating a target concatenated vector for intent recognition according to the user feature vector and the text feature vector; An intent recognition result of the question information is obtained according to the target splicing vector.
6. The method according to claim 5, characterized in that The obtaining, according to the target splicing vector, an intention recognition result of the question information includes: Processing the target concatenated vector using a multi-layer perceptron algorithm to generate a first processing result, wherein the first processing result includes feature information related to the intent recognition result; The first processing result is processed by using a softmax function to generate the intent recognition result.
7. The method according to claim 4, characterized in that The step of obtaining the requirement entity recognition result of the question information according to the text feature vector includes: Obtaining encoding information of the text feature vector; According to the encoding information, obtaining a character vector corresponding to each character in the text feature vector, wherein the character vector is related to the number of required entities; According to each of the character vectors, obtaining a starting position probability and an ending position probability when each of the character vectors belongs to each of the demand entities; Determine the target demand entity corresponding to each of the character vectors according to the starting position probability and / or the ending position probability that is greater than or equal to a preset probability threshold; The requirement entity recognition result is obtained according to the target requirement entity corresponding to all the character vectors in the text feature vector.
8. The method according to claim 2, characterized in that: The obtaining of the user knowledge graph corresponding to the target user includes: Obtaining user information, product information, and service information, wherein the user information includes at least one of user identity information, user historical transaction information, and online interaction information; The user knowledge graph is constructed based on the user information, product information, service information, and the interaction relationship between the user and the product information and service information respectively.
9. The method according to any one of claims 1 to 8, characterized in that The step of outputting response information to the question information according to the intention recognition result and the requirement entity recognition result includes: Acquire a first requirement entity matching the intention recognition result in the requirement entity recognition result; Associating the first demand entity with the intention recognition result to obtain the information to be queried; The response information is obtained and outputted by searching a preset recommendation information database according to the information to be queried.
10. An information recommendation device, characterized in that: include: An acquisition module, used to acquire a user feature vector of a target user and a text feature vector of a question information from the target user, wherein the user feature vector represents at least one of a behavior feature, a preference feature, and a demand feature of the target user; A first processing module, configured to obtain an intention recognition result of the question information according to the user feature vector and the text feature vector; A second processing module is used to obtain a requirement entity recognition result of the question information according to the text feature vector; A control module is used to output response information to the question information according to the intention recognition result and the requirement entity recognition result.
11. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 9 when executed by a processor.
13. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 9 when being executed by a processor.