Customer profiling method and system based on knowledge graph
Patent Information
- Application Number
- CN202410002232.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-02
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2044-01-02
Smart Images

Figure CN118093865B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of natural language technology, and in particular to a customer profiling method and system based on knowledge graph. Background Art
[0002] As people's pace of life gradually accelerates and the online car-hailing industry continues to prosper, the ride-sharing business in the online car-hailing industry has quickly opened up the market with its affordable prices, low-carbon travel and mutual help.
[0003] The ride-sharing business also often faces problems such as the mismatch between the itinerary plans of customers and car owners, which requires customers and car owners to frequently check whether the itinerary plans have been updated in the app, and then choose whether to take the ride based on the updated itinerary plans. This requires users to spend a long time to check.
[0004] Therefore, the existing online car-hailing business has the problem of cumbersome customer operations. Summary of the invention
[0005] The present invention aims to solve one of the technical problems in the related art at least to a certain extent. To this end, the present invention provides a customer profiling method and system based on knowledge graph.
[0006] In a first aspect, the present invention provides a customer profiling method based on a knowledge graph, the method comprising:
[0007] Obtain the customer's historical travel records and the corresponding post-ride evaluation for each historical travel record;
[0008] Determining the customer's preferred itinerary based on the historical itinerary records;
[0009] Determining a route knowledge graph of the customer based on the customer's preferred itinerary;
[0010] Performing text analysis on the post-trip evaluation to obtain a customer profile of the customer, wherein the customer profile is the customer's emotional stance towards the trip;
[0011] According to the route knowledge graph and the customer portrait, the travel plan and vehicle owner constraint information pushed to the customer are determined.
[0012] Furthermore, the performing text analysis on the post-ride evaluation to obtain the customer profile of the customer includes:
[0013] Extracting a first entity of the same entity type as a target entity from the post-ride evaluation, wherein the target entity is an entity corresponding to a specific target, and the entity type includes a place entity and a person entity;
[0014] Calculating similarity between the first entity and the target entity to obtain a first similarity, wherein the first similarity includes at least one of syllable similarity, glyph similarity, and word meaning similarity;
[0015] Calculating target scores of the first entity and the target entity according to the first similarity;
[0016] In the case where the target score is greater than a relevance score threshold, determining the post-multiplication evaluation as a relevant text for the specific target;
[0017] Based on the relevant text of the specific target, a customer profile of the customer is obtained.
[0018] Further, extracting a first entity of the same entity type as the target entity from the post-multiplication evaluation includes:
[0019] Encoding the multiplied evaluation to obtain a feature vector matrix;
[0020] The characteristic vector matrix is decoded using a conditional random vector field to obtain an optimal annotation label sequence, where the optimal annotation label sequence includes the first entity.
[0021] Further, in the case where the first similarity includes the syllable similarity, the glyph similarity and the word meaning similarity, the formula for calculating the target scores of the first entity and the target entity according to the first similarity is as follows:
[0022] ;
[0023] in, represents the target score, Indicates whether the entity names of the first entity and the target entity are the same. If they are the same, then The value of is 1, otherwise the value is 0; , , The value range of .
[0024] Further, when the first similarity includes the syllable similarity and the first entity and the target entity have the same number of characters, similarity calculation is performed on the first entity and the target entity to obtain the first similarity, including:
[0025] Calculating the syllable similarity between the first syllable of the first entity and the second syllable of the target entity;
[0026] In the case where the first entity includes a plurality of the first syllables and the target entity includes a plurality of the second syllables, a plurality of the syllable similarities are obtained, and the position of the first syllable corresponding to each syllable similarity in the first entity is the same as the position of the second syllable in the target entity;
[0027] An average value of the plurality of syllable similarities is determined as the first similarity.
[0028] Further, when the first similarity includes the glyph similarity and the first entity and the target entity have the same number of characters, similarity calculation is performed on the first entity and the target entity to obtain the first similarity, including:
[0029] Calculating the cosine similarity of a first feature vector and a second feature vector to obtain a glyph similarity between the first character and the second character, wherein the first feature vector is a feature vector corresponding to a binary image of the first character of the first entity, and the second feature vector is a feature vector corresponding to a binary image of the second character of the target entity;
[0030] In the case where the first entity includes a plurality of the first characters and the target entity includes a plurality of the second characters, a plurality of the glyph similarities are obtained, and the position of the first character corresponding to each glyph similarity in the first entity is the same as the position of the second character in the target entity;
[0031] An average value of the plurality of glyph similarities is determined as the first similarity.
[0032] Further, in the case where the first similarity includes the word meaning similarity, similarity calculation is performed on the first entity and the target entity to obtain the first similarity, including:
[0033] constructing the first entity and the target entity as the post-multiplication evaluation pair;
[0034] Encode the post-multiplication evaluation pair using a BERT pre-trained model to obtain a plurality of third feature vectors, each of the third feature vectors corresponding to a character in the post-multiplication evaluation pair;
[0035] Inputting the fourth eigenvector into a multi-layer perceptron to obtain a first floating point number, wherein the fourth eigenvector is a eigenvector corresponding to the first entity in the third eigenvector;
[0036] The first floating point number is processed by using a sigmoid function to obtain the first similarity.
[0037] In the embodiment of the present application, the main improvements are as follows: (1) text analysis is performed on the post-trip evaluation to obtain the customer portrait of the customer. (2) similarity is calculated between the first entity and the target entity. (3) a formula for calculating the target score of the first entity and the target entity is calculated. (4) the cosine similarity of the first feature vector and the second feature vector is calculated to obtain the glyph similarity of the first character and the second character; the syllable similarity between the first syllable of the first entity and the second syllable of the target entity is calculated.
[0038] The knowledge graph-based customer profiling method and system provided in the embodiment of the present invention obtains the customer's historical travel records and the post-ride evaluations corresponding to each historical travel record; determines the customer's preferred itinerary based on the historical travel records; determines the customer's route knowledge graph based on the customer's preferred itinerary; performs text analysis on the post-ride evaluation to obtain the customer's customer portrait, which is the customer's emotional stance on the itinerary; and determines the itinerary plan pushed to the customer and the customer preference information pushed to the car owner based on the route knowledge graph and the customer portrait. In this way, due to the addition of the customer portrait, that is, the customer's emotional stance on the itinerary, assisted by the route knowledge graph, the itinerary plan pushed to the customer is determined, thereby simplifying the customer's operation steps. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0040] Figure 1 is a flow chart of a customer profiling method based on knowledge graph according to an embodiment of the present invention;
[0041] Figure 2 It is a structural diagram of a customer profiling system based on knowledge graph in an embodiment of the present invention. DETAILED DESCRIPTION
[0042] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0043] Natural Language Processing (NLP) is an important direction in the fields of computer science and artificial intelligence. It mainly studies various theories and methods that can achieve effective communication between people and computers using natural language. Natural language processing is a science that integrates linguistics, computer science, and mathematics. Therefore, research in this field will involve natural language, that is, the language people use in daily life, so it is closely related to the study of linguistics, but there are important differences. Natural language processing is not a general study of natural language, but the development of computer systems that can effectively realize natural language communication, especially the software systems therein. Therefore, it is part of computer science.
[0044] Knowledge Graph is a modern theory that achieves the purpose of multidisciplinary integration by combining the theories and methods of applied mathematics, graphics, information visualization technology, information science and other disciplines with metrological citation analysis, co-occurrence analysis and other methods, and using visual graphs to vividly display the core structure, development history, frontier fields and overall knowledge architecture of the discipline. It describes knowledge resources and their carriers through visualization technology, and mines, analyzes, constructs, draws and displays knowledge and their interrelationships.
[0045] Figure 1 : is a flow chart of a customer profiling method based on a knowledge graph according to an embodiment of the present invention, the method comprising:
[0046] Step 101, obtaining the customer's historical travel records and the post-ride evaluation corresponding to each historical travel record;
[0047] Step 102: Determine the customer's preferred itinerary based on the historical itinerary record;
[0048] Step 103: Determine the route knowledge graph of the customer according to the customer's preferred itinerary;
[0049] Step 104: Perform text analysis on the post-trip evaluation to obtain a customer profile of the customer, where the customer profile is the customer's emotional stance toward the trip;
[0050] Step 105: Determine the travel plan to be pushed to the customer and the customer preference information to be pushed to the car owner based on the route knowledge graph and the customer portrait.
[0051] It should be understood that the above customer preference information can be understood as: do not chat with customers and do not play music in the car, etc.
[0052] The knowledge graph-based customer profiling method and system provided in the embodiment of the present invention obtains the customer's historical travel records and the post-ride evaluations corresponding to each historical travel record; determines the customer's preferred itinerary based on the historical travel records; determines the customer's route knowledge graph based on the customer's preferred itinerary; performs text analysis on the post-ride evaluation to obtain the customer's customer portrait, which is the customer's emotional stance on the itinerary; and determines the itinerary plan pushed to the customer and the customer preference information pushed to the car owner based on the route knowledge graph and the customer portrait. In this way, due to the addition of the customer portrait, that is, the customer's emotional stance on the itinerary, assisted by the route knowledge graph, the itinerary plan pushed to the customer is determined, thereby simplifying the customer's operation steps.
[0053] Furthermore, in some embodiments, performing text analysis on the post-ride evaluation to obtain a customer profile of the customer includes:
[0054] Extracting a first entity of the same entity type as a target entity from the post-ride evaluation, wherein the target entity is an entity corresponding to a specific target, and the entity type includes a place entity and a person entity;
[0055] Calculating similarity between the first entity and the target entity to obtain a first similarity, wherein the first similarity includes at least one of syllable similarity, glyph similarity, and word meaning similarity;
[0056] Calculating target scores of the first entity and the target entity according to the first similarity;
[0057] In the case where the target score is greater than a relevance score threshold, determining the post-multiplication evaluation as a relevant text for the specific target;
[0058] Based on the relevant text of the specific target, a customer profile of the customer is obtained.
[0059] In the embodiment of the present application, the accuracy of obtaining customer portraits can be improved through the above method.
[0060] Further, extracting a first entity of the same entity type as the target entity from the post-multiplication evaluation includes:
[0061] Encoding the multiplied evaluation to obtain a feature vector matrix;
[0062] The characteristic vector matrix is decoded using a conditional random vector field to obtain an optimal annotation label sequence, where the optimal annotation label sequence includes the first entity.
[0063] In the embodiment of the present application, the accuracy of obtaining customer portraits can be improved through the above method.
[0064] Further, in the case where the first similarity includes the syllable similarity, the glyph similarity and the word meaning similarity, the formula for calculating the target scores of the first entity and the target entity according to the first similarity is as follows:
[0065] ;
[0066] in, represents the target score, Indicates whether the entity names of the first entity and the target entity are the same. If they are the same, then The value of is 1, otherwise the value is 0; , , The value range of .
[0067] In the embodiment of the present application, the accuracy of obtaining customer portraits can be improved through the above method.
[0068] Further, when the first similarity includes the syllable similarity and the first entity and the target entity have the same number of characters, similarity calculation is performed on the first entity and the target entity to obtain the first similarity, including:
[0069] Calculating the syllable similarity between the first syllable of the first entity and the second syllable of the target entity;
[0070] In the case where the first entity includes a plurality of the first syllables and the target entity includes a plurality of the second syllables, a plurality of the syllable similarities are obtained, and the position of the first syllable corresponding to each syllable similarity in the first entity is the same as the position of the second syllable in the target entity;
[0071] An average value of the plurality of syllable similarities is determined as the first similarity.
[0072] In the embodiment of the present application, the accuracy of obtaining customer portraits can be improved through the above method.
[0073] Further, when the first similarity includes the glyph similarity and the first entity and the target entity have the same number of characters, similarity calculation is performed on the first entity and the target entity to obtain the first similarity, including:
[0074] Calculating the cosine similarity of a first feature vector and a second feature vector to obtain a glyph similarity between the first character and the second character, wherein the first feature vector is a feature vector corresponding to a binary image of the first character of the first entity, and the second feature vector is a feature vector corresponding to a binary image of the second character of the target entity;
[0075] In the case where the first entity includes a plurality of the first characters and the target entity includes a plurality of the second characters, a plurality of the glyph similarities are obtained, and the position of the first character corresponding to each glyph similarity in the first entity is the same as the position of the second character in the target entity;
[0076] An average value of the plurality of glyph similarities is determined as the first similarity.
[0077] In the embodiment of the present application, the accuracy of obtaining customer portraits can be improved through the above method.
[0078] Further, in the case where the first similarity includes the word meaning similarity, similarity calculation is performed on the first entity and the target entity to obtain the first similarity, including:
[0079] constructing the first entity and the target entity as the post-multiplication evaluation pair;
[0080] Encode the post-multiplication evaluation pair using a BERT pre-trained model to obtain a plurality of third feature vectors, each of the third feature vectors corresponding to a character in the post-multiplication evaluation pair;
[0081] Inputting the fourth eigenvector into a multi-layer perceptron to obtain a first floating point number, wherein the fourth eigenvector is a eigenvector corresponding to the first entity in the third eigenvector;
[0082] The first floating point number is processed by using a sigmoid function to obtain the first similarity.
[0083] In the embodiment of the present application, the accuracy of obtaining customer portraits can be improved through the above method.
[0084] In a second aspect, an embodiment of the present invention provides a customer profiling system based on a knowledge graph, the system comprising:
[0085] An acquisition module 201 is used to acquire the customer's historical travel records and the post-ride evaluation corresponding to each historical travel record;
[0086] A first determination module 202, configured to determine the customer's preferred itinerary based on the historical itinerary record;
[0087] A second determination module 203 is used to determine the route knowledge graph of the customer according to the preferred itinerary of the customer;
[0088] The obtaining module 204 is used to perform text analysis on the post-trip evaluation to obtain a customer profile of the customer, wherein the customer profile is the customer's emotional stance towards the trip;
[0089] The third determination module 205 is used to determine the trip plan to be pushed to the customer and the customer preference information to be pushed to the car owner based on the route knowledge graph and the customer portrait.
[0090] Furthermore, the obtaining module comprises:
[0091] A first extraction submodule is used to extract a first entity of the same entity type as a target entity from the post-ride evaluation, wherein the target entity is an entity corresponding to a specific target, and the entity type includes a place entity and a person entity;
[0092] A first calculation submodule is used to calculate the similarity between the first entity and the target entity to obtain a first similarity, wherein the first similarity includes at least one of syllable similarity, glyph similarity and word meaning similarity;
[0093] A second calculation submodule, configured to calculate target scores of the first entity and the target entity according to the first similarity;
[0094] A first determination submodule, configured to determine the post-multiplication evaluation as a relevant text of the specific target when the target score is greater than a relevance score threshold;
[0095] A submodule is obtained, which is used to obtain a customer profile of the customer based on the relevant text of the specific target.
[0096] Furthermore, the first extraction submodule is further used for:
[0097] Encoding the multiplied evaluation to obtain a feature vector matrix;
[0098] The characteristic vector matrix is decoded using a conditional random vector field to obtain an optimal annotation label sequence, where the optimal annotation label sequence includes the first entity.
[0099] Furthermore, the first calculation submodule is further used for:
[0100] Calculating the syllable similarity between the first syllable of the first entity and the second syllable of the target entity;
[0101] In the case where the first entity includes a plurality of the first syllables and the target entity includes a plurality of the second syllables, a plurality of the syllable similarities are obtained, and the position of the first syllable corresponding to each syllable similarity in the first entity is the same as the position of the second syllable in the target entity;
[0102] An average value of the plurality of syllable similarities is determined as the first similarity.
[0103] Furthermore, the first calculation submodule is further used for:
[0104] Calculating the cosine similarity of a first feature vector and a second feature vector to obtain a glyph similarity between the first character and the second character, wherein the first feature vector is a feature vector corresponding to a binary image of the first character of the first entity, and the second feature vector is a feature vector corresponding to a binary image of the second character of the target entity;
[0105] In the case where the first entity includes a plurality of the first characters and the target entity includes a plurality of the second characters, a plurality of the glyph similarities are obtained, and the position of the first character corresponding to each glyph similarity in the first entity is the same as the position of the second character in the target entity;
[0106] An average value of the plurality of glyph similarities is determined as the first similarity.
[0107] Furthermore, the first calculation submodule is further used for:
[0108] constructing the first entity and the target entity as the post-multiplication evaluation pair;
[0109] Encode the post-multiplication evaluation pair using a BERT pre-trained model to obtain a plurality of third feature vectors, each of the third feature vectors corresponding to a character in the post-multiplication evaluation pair;
[0110] Inputting the fourth eigenvector into a multi-layer perceptron to obtain a first floating point number, wherein the fourth eigenvector is a eigenvector corresponding to the first entity in the third eigenvector;
[0111] The first floating point number is processed by using a sigmoid function to obtain the first similarity.
Claims
1. A customer profiling method based on knowledge graph, characterized in that: The method comprises: Obtain the customer's historical travel records and the corresponding post-ride evaluation for each historical travel record; Determining the customer's preferred itinerary based on the historical itinerary records; Determining a route knowledge graph of the customer based on the customer's preferred itinerary; Performing text analysis on the post-trip evaluation to obtain a customer profile of the customer, wherein the customer profile is the customer's emotional stance towards the trip; Determine, based on the route knowledge graph and the customer portrait, a trip plan to be pushed to the customer and customer preference information to be pushed to the car owner; The performing text analysis on the post-ride evaluation to obtain the customer profile of the customer includes: Extracting a first entity of the same entity type as a target entity from the post-ride evaluation, wherein the target entity is an entity corresponding to a specific target, and the entity type includes a place entity and a person entity; Calculating similarity between the first entity and the target entity to obtain a first similarity, wherein the first similarity includes at least one of syllable similarity, glyph similarity, and word meaning similarity; Calculating target scores of the first entity and the target entity according to the first similarity; In the case where the target score is greater than a relevance score threshold, determining the post-multiplication evaluation as a relevant text for the specific target; Based on the relevant text of the specific target, a customer profile of the customer is obtained.
2. The method according to claim 1, characterized in that The step of extracting a first entity having the same entity type as the target entity from the post-multiplication evaluation comprises: Encoding the multiplied evaluation to obtain a feature vector matrix; The characteristic vector matrix is decoded using a conditional random vector field to obtain an optimal annotation label sequence, where the optimal annotation label sequence includes the first entity.
3. The method according to claim 2, characterized in that In the case where the first similarity includes the syllable similarity, the glyph similarity and the word meaning similarity, the formula for calculating the target scores of the first entity and the target entity according to the first similarity is as follows: Among them, Sij represents the target score, sname represents whether the entity names of the first entity and the target entity are the same. If they are the same, the value of sname is 1, otherwise the value is 0; the value ranges of α, β, and γ are all (0,1].
4. The method according to claim 2, characterized in that: When the first similarity includes the syllable similarity and the first entity and the target entity have the same number of characters, similarity calculation is performed on the first entity and the target entity to obtain the first similarity, including: Calculating the syllable similarity between the first syllable of the first entity and the second syllable of the target entity; In the case where the first entity includes a plurality of the first syllables and the target entity includes a plurality of the second syllables, a plurality of the syllable similarities are obtained, and the position of the first syllable corresponding to each syllable similarity in the first entity is the same as the position of the second syllable in the target entity; An average value of the plurality of syllable similarities is determined as the first similarity.
5. The method according to claim 2, characterized in that: When the first similarity includes the glyph similarity and the first entity and the target entity have the same number of characters, similarity calculation is performed on the first entity and the target entity to obtain the first similarity, including: Calculating the cosine similarity of a first feature vector and a second feature vector to obtain a glyph similarity between the first character and the second character, wherein the first feature vector is a feature vector corresponding to a binary image of the first character of the first entity, and the second feature vector is a feature vector corresponding to a binary image of the second character of the target entity; In the case where the first entity includes a plurality of the first characters and the target entity includes a plurality of the second characters, a plurality of the glyph similarities are obtained, and the position of the first character corresponding to each glyph similarity in the first entity is the same as the position of the second character in the target entity; An average value of the plurality of glyph similarities is determined as the first similarity.
6. The method according to claim 2, characterized in that In the case where the first similarity includes the word meaning similarity, performing similarity calculation on the first entity and the target entity to obtain the first similarity includes: constructing the first entity and the target entity as the post-multiplication evaluation pair; Encode the post-multiplication evaluation pair using a BERT pre-trained model to obtain a plurality of third feature vectors, each of the third feature vectors corresponding to a character in the post-multiplication evaluation pair; Inputting the fourth eigenvector into a multi-layer perceptron to obtain a first floating point number, wherein the fourth eigenvector is a eigenvector corresponding to the first entity in the third eigenvector; The first floating point number is processed by using a sigmoid function to obtain the first similarity.
7. A customer profiling system based on knowledge graph, the system implementing the method as claimed in claim 1, characterized in that: The system comprises: An acquisition module is used to obtain the customer's historical travel records and the post-ride evaluation corresponding to each historical travel record; A first determination module, configured to determine the customer's preferred itinerary based on the historical itinerary record; A second determination module is used to determine the route knowledge graph of the customer according to the preferred itinerary of the customer; An obtaining module is used to perform text analysis on the post-ride evaluation to obtain a customer profile of the customer, wherein the customer profile is the customer's emotional stance towards the trip; The third determination module is used to determine the travel plan pushed to the customer and the customer preference information pushed to the car owner based on the route knowledge graph and the customer portrait.
8. The customer profiling system based on knowledge graph according to claim 7 is characterized in that: The obtaining module comprises: A first extraction submodule is used to extract a first entity of the same entity type as a target entity from the post-ride evaluation, wherein the target entity is an entity corresponding to a specific target, and the entity type includes a place entity and a person entity; A first calculation submodule is used to calculate the similarity between the first entity and the target entity to obtain a first similarity, wherein the first similarity includes at least one of syllable similarity, glyph similarity and word meaning similarity; A second calculation submodule, configured to calculate target scores of the first entity and the target entity according to the first similarity; A first determination submodule, configured to determine the post-multiplication evaluation as a relevant text of the specific target when the target score is greater than a relevance score threshold; A submodule is obtained, which is used to obtain a customer profile of the customer based on the relevant text of the specific target.
9. The customer profiling system based on knowledge graph according to claim 8, characterized in that: The first extraction submodule is also used for: The post-multiplication evaluation is encoded to obtain a feature vector matrix; the feature vector matrix is decoded using a conditional random vector field to obtain an optimal annotation label sequence, wherein the optimal annotation label sequence includes the first entity.
