A Method and Device for Predicting Gas Station Customer Behavior Based on a Knowledge Graph

By applying a knowledge graph-based method in gas stations, in-depth analysis of historical customer data is solved, and the problem that traditional management systems cannot accurately predict customer needs is achieved, achieving more accurate behavior prediction and service optimization.

CN119831114BActive Publication Date: 2025-06-20ZHEJIANG ZHEJIANG PETROLEUM COMPREHENSIVE ENERGY SALES CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510309637.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-17
Publication Date
2025-06-20
Estimated Expiration
2045-03-17

AI Technical Summary

Technical Problem

The traditional gas station management system lacks in-depth analysis of customer behavior data, which leads to the inability to accurately predict customers' potential needs and thus fail to provide better services.

Method used

Using a knowledge graph-based method, information extraction is performed on the historical customer data of the gas station, semantic vectors and part-of-speech vectors are generated, and triplets are extracted to construct knowledge graphs, and in-depth analysis is performed based on the preset behavior prediction model.

Benefits of technology

Through in-depth analysis of customer behavior, more accurate customer behavior prediction results are achieved, and oil inventory can be accurately adjusted, capital flow can be optimized, customers' potential needs and service quality can be improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119831114B_ABST
    Figure CN119831114B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of gas stations, and discloses a method and device for predicting customer behavior in gas stations based on a knowledge graph. The method includes performing information extraction processing on historical customer data in a gas station to obtain semantic vectors and part-of-speech vectors; performing fusion processing on the semantic vectors and part-of-speech vectors to obtain fusion vectors; extracting at least two triples from the fusion vectors, and constructing a knowledge graph according to all the triples; and obtaining a prediction result based on the knowledge graph and a preset behavior prediction model. The present application effectively utilizes customer data through the fusion of vectors, obtains a more accurate prediction result of customer behavior, and then can accurately adjust the oil product inventory according to the prediction result to optimize the cash flow, meet the potential needs of customers, and improve the service quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical fields of natural language processing and Internet applications, and particularly to a method and device for predicting gas station customer behavior based on a knowledge graph. Background Art

[0002] With the diversity of customer behavior and the rapid changes in the market, in order to provide better services to customers, predicting customer behavior is particularly important. Traditional gas station management systems mostly rely on basic membership management and manual services. These systems often lack the analysis of customer behavior data, resulting in the inability to accurately predict customers' potential needs and thus unable to provide better services. For example, the formulation of promotions and preferential policies often lacks pertinence and flexibility.

[0003] However, existing solutions that can predict customer behavior mostly adopt simple prediction methods based on historical purchase data and do not conduct in-depth analysis as a whole by combining other behavior data of customers, which limits the accuracy and effectiveness of customer behavior prediction. Summary of the Invention

[0004] To solve the problem of poor prediction effect of gas station customer behavior mentioned above, embodiments of this application provide a method and device for predicting gas station customer behavior based on a knowledge graph, and the technical solutions are as follows:

[0005] In a first aspect, embodiments of this application provide a method for predicting gas station customer behavior based on a knowledge graph, including:

[0006] Performing information extraction processing on historical customer data in a gas station to obtain semantic vectors and part-of-speech vectors;

[0007] Performing fusion processing on the semantic vectors and part-of-speech vectors to obtain fusion vectors;

[0008] Extracting at least two triples from the fusion vectors and constructing a knowledge graph according to all the triples;

[0009] Obtaining a prediction result based on the knowledge graph and a preset behavior prediction model.

[0010] In an optional solution of the first aspect, performing information extraction processing on historical customer data in a gas station to obtain semantic vectors and part-of-speech vectors includes:

[0011] Inputting the historical customer data in the gas station into a pre-trained language model to obtain semantic vectors; wherein, the pre-trained language model is trained by sample data and sample semantic vectors corresponding to the sample data;

[0012] Performing splitting processing on the historical customer data to obtain at least two word segments;

[0013] Obtain the part-of-speech tags corresponding to each word segment based on a preset part-of-speech table; wherein, the preset part-of-speech table includes at least two word segments and the part-of-speech tags corresponding to the word segments;

[0014] Obtain a part-of-speech vector according to all the word segments and the part-of-speech tags corresponding to the word segments.

[0015] In another alternative solution of the first aspect, perform a fusion process on the semantic vector and the part-of-speech vector to obtain a fusion vector, including:

[0016] Input the part-of-speech vector into a preset convolutional model to obtain a node vector; wherein, the preset convolutional model is trained by sample part-of-speech vectors and the node vectors corresponding to the sample part-of-speech vectors;

[0017] Perform a fusion process on the semantic vector and the node vector through a cross-attention algorithm to obtain a fusion vector.

[0018] In another alternative solution of the first aspect, extract at least two triples from the fusion vector, including:

[0019] Perform entity recognition processing on the fusion vector through a preset neural network model to obtain an entity result; wherein, the preset neural network model is trained by sample fusion vectors and the sample entity results corresponding to the sample fusion vectors;

[0020] Perform relation extraction processing on the fusion vector through a preset deep learning model to obtain a relation result; wherein, the preset deep learning model is trained by sample fusion vectors and the sample relation results corresponding to the sample fusion vectors;

[0021] Construct triples based on the entity result and the relation result.

[0022] In another alternative solution of the first aspect, construct triples based on the entity result and the relation result, including:

[0023] Determine a first entity set and a second entity set based on the entity types in the entity result; wherein, the entity result includes at least two entities and the entity types corresponding to each entity;

[0024] Determine an initial relation set according to the first entity set and the second entity set; wherein, the initial relation set includes at least two relation words;

[0025] Perform a screening process on the initial relation set based on the relation result to obtain a target relation set; wherein, the relation result includes at least two relation words, and the target relation set includes the relation words common to the relation result and the initial relation set;

[0026] Construct triples based on the first entity set, the second entity set, and the target relationship set.

[0027] In another alternative of the first aspect, based on the knowledge graph and a preset behavior prediction model, obtain a prediction result, including:

[0028] Obtain refueling time data and fuel type data corresponding to the data to be predicted in the knowledge graph, and serialize the refueling time data and the fuel type data;

[0029] Input the serialized refueling time data into the preset behavior prediction model to obtain a refueling time series; wherein, the preset behavior prediction model is trained by sample serialized data and sample sequences;

[0030] Input the serialized fuel type data into the preset behavior prediction model to obtain a fuel type sequence;

[0031] Based on the refueling time series and the fuel type sequence, obtain the prediction result.

[0032] In another alternative of the first aspect, the prediction result includes a predicted fuel type, a predicted refueling volume corresponding to the predicted fuel type, and a predicted refueling time;

[0033] After obtaining the prediction result based on the knowledge graph and the preset behavior prediction model, it further includes:

[0034] Obtain the current inventory corresponding to the predicted fuel type, and determine the expected inventory according to the current inventory and the predicted refueling volume corresponding to the predicted fuel type;

[0035] Adjust the inventory corresponding to the predicted fuel type based on the predicted refueling time, so that the current inventory and the expected inventory are consistent before the predicted refueling time.

[0036] In a second aspect, an embodiment of the present application provides a gas station customer behavior prediction device based on a knowledge graph, including:

[0037] A first processing module, configured to perform information extraction processing on historical customer data in the gas station to obtain a semantic vector and a part-of-speech vector;

[0038] A second processing module, configured to perform fusion processing on the semantic vector and the part-of-speech vector to obtain a fusion vector;

[0039] A third processing module, configured to extract at least two triples from the fusion vector and construct a knowledge graph according to all the triples;

[0040] A fourth processing module, configured to obtain a prediction result based on the knowledge graph and a preset behavior prediction model.

[0041] In a third aspect, an embodiment of the present application further provides a gas station customer behavior prediction device based on a knowledge graph, including a processor and a memory;

[0042] The processor is connected to the memory;

[0043] The memory is used to store executable program codes;

[0044] The processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to implement the gas station customer behavior prediction method based on the knowledge graph provided in the first aspect or any implementation manner of the first aspect of the embodiments of the present application.

[0045] In a fourth aspect, an embodiment of the present application provides a computer storage medium, which stores a computer program. The computer program includes program instructions. When the program instructions are executed by a processor, the gas station customer behavior prediction method provided in the first aspect or any implementation manner of the first aspect of the embodiments of the present application can be implemented.

[0046] The beneficial effects brought by the technical solutions provided in some embodiments of this specification at least include:

[0047] In the process of predicting the behavior of gas station customers based on the knowledge graph, by extracting semantic vectors and part-of-speech vectors from historical customer data, and then performing fusion processing on these two vectors to fully consider the semantic information and part-of-speech information in the historical customer data, so as to extract triples for constructing the knowledge graph according to the fusion vector obtained by the fusion processing, and combining the knowledge graph and a preset behavior prediction model for in-depth analysis, a more accurate customer behavior prediction result is obtained. Furthermore, the oil product inventory can be accurately adjusted according to the prediction result to optimize the cash flow, meeting the potential needs of customers and improving the service quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0049] Figure 1 It is the overall flowchart of a gas station customer behavior prediction method based on a knowledge graph provided by an embodiment of the present application;

[0050] Figure 2 It is the overall flowchart of a method for constructing a knowledge graph provided by an embodiment of the present application;

[0051] Figure 3 A structural schematic diagram of a gas station customer behavior prediction device based on a knowledge graph provided by an embodiment of the present application;

[0052] Figure 4 Another structural schematic diagram of a gas station customer behavior prediction device based on a knowledge graph provided by an embodiment of the present application. Detailed implementation manners

[0053] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application.

[0054] In the following description, the terms "first" and "second" are only for the purpose of description and cannot be construed as indicating or implying relative importance. The following description provides multiple embodiments of the present application, and different embodiments can be replaced or combined. Therefore, the present application can also be considered to include all possible combinations of the same and / or different embodiments described. Thus, if one embodiment includes features A, B, and C, and another embodiment includes features B and D, then the present application should also be considered to include embodiments containing all other possible combinations of A, B, C, and D, although such embodiments may not be explicitly described in the following content.

[0055] The following description provides examples and does not limit the scope, applicability, or examples set forth in the claims. Changes can be made to the functions and arrangements of the described elements without departing from the scope of the content of the present application. Each example can appropriately omit, substitute, or add various processes or components. For example, the described method can be executed in a different order from the described order, and various steps can be added, omitted, or combined. In addition, the features described in some examples can be combined into other examples.

[0056] Please refer to Figure 1 , Figure 1 which shows an overall flowchart of a gas station customer behavior prediction method based on a knowledge graph provided by an embodiment of the present application.

[0057] As Figure 1 shown, the gas station customer behavior prediction method based on a knowledge graph can at least include the following steps:

[0058] Step 101: Perform information extraction processing on historical customer data in a gas station to obtain semantic vectors and part-of-speech vectors.

[0059] In the embodiments of the present application, the gas station customer behavior prediction method based on the knowledge graph can be but is not limited to being applied on mobile terminals, servers or cloud platforms. In the process of predicting gas station customer behavior based on the knowledge graph, semantic vectors and part-of-speech vectors are extracted from historical customer data, and then these two vectors are fused to fully consider the semantic information and part-of-speech information in the historical customer data. Thus, triples for constructing the knowledge graph can be extracted from the fused vector, and in-depth analysis is performed in combination with this knowledge graph and a preset behavior prediction model to obtain a more accurate customer behavior prediction result. Furthermore, the oil product inventory can be accurately adjusted according to the prediction result to optimize the cash flow, meeting the potential needs of customers and improving the service quality.

[0060] Specifically, in the process of predicting gas station customer behavior based on the knowledge graph, information extraction processing can be first performed on the obtained historical customer data in the gas station. The purpose is to extract a semantic vector containing the semantic information in the historical customer data and a part-of-speech vector containing the part-of-speech information in the historical customer data. The implementation process can be but is not limited to the following 4 steps:

[0061] (1) Use a word segmentation tool (such as jieba) to split the text data into words or phrases;

[0062] (2) Use a part-of-speech tagging tool or library (such as NLTK, spaCy, jieba, HanLP, etc.) to perform part-of-speech tagging on each word after word segmentation, that is, assign a label representing its grammatical role to each word, such as noun (NN), verb (VB), adjective (JJ), etc.;

[0063] (3) Use a pre-computed part-of-speech co-occurrence matrix to generate a part-of-speech vector. Among them, the part-of-speech co-occurrence matrix is a statistical method used to represent the frequency or probability of different part-of-speech categories co-occurring in the text, which can reveal the distribution pattern of parts of speech in the text and the correlation between them, and is a tool for studying language structure, performing grammatical analysis or assisting other natural language processing tasks;

[0064] (4) Use a pre-trained word embedding model (such as Word2Vec model, GloVe model, etc.) or a more advanced context-sensitive model (such as BERT model, RoBERTa model, etc.) to generate semantic vectors of words. These models can capture the context meaning of words and provide richer semantic representations.

[0065] It can be understood that historical customer data mainly consists of text data such as customer feedback, evaluations, and purchase records, and can be obtained through the gas station's point-of-sale (POS) system, membership system, online questionnaires, and social media platforms.

[0066] It should be noted that jieba is a popular Chinese word segmentation library. It can not only perform word segmentation on Chinese texts but also support part-of-speech tagging. Among them, word segmentation refers to splitting continuous text into individual words, and part-of-speech tagging is to assign a specific part-of-speech tag to each word segmentation result, such as noun (n), verb (v), adjective (a), etc.

[0067] As an option in the embodiments of the present application, information extraction processing is performed on historical customer data in a gas station to obtain a semantic vector and a part-of-speech vector, including:

[0068] Input the historical customer data in the gas station into a pre-trained language model to obtain a semantic vector; among them, the pre-trained language model is trained by sample data and sample semantic vectors corresponding to the sample data;

[0069] Perform splitting processing on the historical customer data to obtain at least two word segmentations;

[0070] Obtain the part-of-speech tag corresponding to each word segmentation based on a preset part-of-speech table; among them, the preset part-of-speech table includes at least two word segmentations and part-of-speech tags corresponding to the word segmentations;

[0071] Obtain a part-of-speech vector according to all word segmentations and part-of-speech tags corresponding to the word segmentations.

[0072] Specifically, in the process of obtaining a semantic vector and a part-of-speech vector from historical customer data, the historical customer data in the gas station can be first input into a pre-trained language model (such as the RoBERTa-WWM model), and then the corresponding semantic vector can be obtained. Among them, the pre-trained language model is trained by sample data and sample semantic vectors corresponding to the sample data.

[0073] Next, splitting processing can be performed on the historical customer data. The implementation method can be but is not limited to splitting the historical customer data through the maximum matching method or the minimum segmentation method to obtain word segmentations (i.e., words or phrases), or splitting the historical customer data through word segmentation tools such as jieba, THULAC, HanLP, etc. to obtain word segmentations.

[0074] After that, the part-of-speech tag corresponding to each word segmentation can be queried and obtained from the preset part-of-speech table. Among them, the preset part-of-speech table includes at least two word segmentations and part-of-speech tags corresponding to each word segmentation. For example, when the historical customer data is "Good service attitude, reasonable price.", the word segmentation results are: "service", "attitude", "good", ",", "price", "reasonable", ".", and the part-of-speech tags are in turn: "noun", "noun", "adjective", "punctuation mark", "noun", "adjective", "punctuation mark".

[0075] After obtaining all the segmented words and their corresponding part-of-speech tags, a One-Hot encoding vector (i.e., word vector and tag vector) can be created for each word and each part-of-speech tag respectively. Then, as needed, the word vector and the tag vector can be simply concatenated or combined in other ways to form a composite vector, which is the part-of-speech vector.

[0076] It should be noted that One-Hot encoding is a method of converting categorical variables into numerical features that can be understood by machine learning models. For the part-of-speech tags in the part-of-speech tagging task, the basic idea of One-Hot encoding is to create a vector for each unique part-of-speech category. The length of the vector is equal to the total number of part-of-speech categories, and each position in the vector represents a part-of-speech category. In such a vector, only one position has a value of 1, indicating which category the current word belongs to, and the values of the remaining positions are all 0. Taking a common set of part-of-speech tags as an example, if there are 5 basic part-of-speech categories: noun (Noun, N), verb (Verb, V), adjective (Adjective, Adj), adverb (Adverb, Adv), preposition (Preposition, P). A simple One-Hot encoding method could be: noun (N): [1, 0, 0, 0, 0], verb (V): [0, 1, 0, 0, 0], adjective (Adj): [0, 0, 1, 0, 0], adverb (Adv): [0, 0, 0, 1, 0], preposition (P): [0, 0, 0, 0, 1]. If a word is tagged as "adjective", then its part-of-speech One-Hot encoding vector is [0, 0, 1, 0, 0]. Similarly, the One-Hot encoding method can also be used to encode words to form word vectors.

[0077] Step 102: Perform fusion processing on the semantic vector and the part-of-speech vector to obtain a fusion vector.

[0078] Specifically, after obtaining the semantic vector and the part-of-speech vector, the semantic vector and the part-of-speech vector can be weighted and summed, but not limited to, through preset weight values to obtain a fusion vector. Its calculation formula is: x*A + y*B = C, where A is the semantic vector, B is the part-of-speech vector, C is the fusion vector, x is the weight value of the semantic vector, and y is the weight value of the part-of-speech vector.

[0079] It can be understood that the fusion vector contains not only the semantic information but also the part-of-speech information in the historical customer data.

[0080] As another option in the embodiments of the present application, performing fusion processing on the semantic vector and the part-of-speech vector to obtain a fusion vector includes:

[0081] Input the part-of-speech vector into a preset convolutional model to obtain a node vector; wherein, the preset convolutional model is trained by sample part-of-speech vectors and corresponding node vectors.

[0082] Perform a fusion process on the semantic vector and the node vector through a cross-attention algorithm to obtain a fusion vector.

[0083] Specifically, in the process of fusing the semantic vector and the part-of-speech vector, the part-of-speech vector can be first input into a preset convolutional model (such as a graph convolutional network model GCN), and then a node vector can be obtained. Among them, the preset convolutional model is trained by sample part-of-speech vectors and corresponding node vectors.

[0084] Next, the semantic vector and the node vector can be fused through a cross-attention algorithm, and then a fusion vector can be obtained. Among them, the cross-attention algorithm is mainly used to process the interaction between two different sequences or feature sets (which can be represented by vectors), that is, the elements of one sequence allocate attention to the elements of another sequence to extract relevant information. This process can be understood as: calculating which parts of Y are most relevant to X based on the elements in X, and generating a new representation Z according to these correlation weights. In this solution, the semantic vector is X, the part-of-speech vector is Y, and the fusion vector is Z.

[0085] Step 103: Extract at least two triples from the fusion vector and construct a knowledge graph based on all the triples.

[0086] Specifically, after obtaining the fusion vector, the triples can be extracted from the fusion vector through the following 3 steps:

[0087] (1) Entity recognition: First, a named entity recognition (NER) model (such as a BiLSTM-CRF model, a BERT-CRF model, etc.) can be used to identify the entities in the text data represented by the fusion vector. Among them, the named entity recognition model can identify entities such as person names, locations, and organizations from the vector formed by the text data and label their categories.

[0088] (2) Relationship extraction: Next, a relationship extraction (RE) model can be used to determine the relationships between entities. Among them, the relationship extraction model can extract the relationship types between entities from the vector formed by a sentence containing two or more entities.

[0089] (3) Construct triples: Finally, combine the recognized entities and relationships into triples, and the combination method can be: (entity 1, relationship, entity 2). For example, when there is a piece of historical customer data saying "I am willing to refuel only when the oil price does not exceed 6 yuan per liter.", the entities that can be recognized from its corresponding fusion vector are: customer (recognized through the pronoun "I"), oil price, and 6 yuan per liter. The relationship that can be extracted is: customer → willing to refuel → when the oil price does not exceed 6 yuan per liter. Thus, the triple that can be constructed is: (customer, condition for willing to refuel, oil price not exceeding 6 yuan per liter).

[0090] It should be noted that in this triple, "customer" is the subject, expressing a kind of willingness or behavioral tendency; "condition for willing to refuel" is the relationship, describing the conditions under which the customer will perform a specific behavior; "oil price not exceeding 6 yuan per liter" is the object, indicating the specific content of this condition.

[0091] It can be understood that such triples are helpful for understanding the customer's sensitivity to oil prices and its impact on refueling decisions. For gas stations or policymakers, such information is very valuable and can help them formulate pricing strategies or promotional activities that better meet market demands.

[0092] Further, after determining the triples, a knowledge graph can be constructed based on all the triples. Among them, the construction method can be but is not limited to: first establish a connection with the graph database Neo4j through the Py2neo library, and import all the triples into the Neo4j database for storage. Then, through the graph.create() function in the Py2neo library, create the basic structure of the knowledge graph: nodes and edges, where nodes represent entities and edges represent relationships.

[0093] For example, if the attributes of the nodes include the basic information of the customer, the attributes of the edges include the amount and frequency of transactions, and potential associations and patterns between entities (such as the relationship between customer age and transaction amount) are discovered through graph reasoning techniques, then a node with the label Customer can be created first (this label indicates that the subject of this node is the customer), and the customer information can be passed as an attribute to this node. Then, an edge TRANSACTION representing the transaction can be created, and the amount and frequency of the transaction can be used as the attributes of this edge. Furthermore, through the MATCH clause of the Cypher language, customer nodes that meet the conditions (such as the total transaction amount of all customers over 25 years old) and their related transaction edges can be found, and then the RETURN clause can be used to return the customer name and transaction total amount.

[0094] In the above manner, the py2neo library can be used to construct and query complex knowledge graphs with the Neo4j database, so as to achieve in-depth analysis and reasoning of historical customer data, and improve the accurate prediction of the potential needs of gas station customers.

[0095] As another option of the embodiment of the present application, at least two triples are extracted from the fusion vector, including:

[0096] The fusion vector is processed by a preset neural network model for entity recognition to obtain an entity result; wherein, the preset neural network model is trained by sample fusion vectors and corresponding sample entity results;

[0097] The fusion vector is processed by a preset deep learning model for relationship extraction to obtain a relationship result; wherein, the preset deep learning model is trained by sample fusion vectors and corresponding sample relationship results;

[0098] Based on the entity result and the relationship result, a triple is constructed.

[0099] Specifically, after obtaining the fusion vector, the fusion vector can be used as input data and input into a preset neural network model (such as the BERT model), and then the implementation result of the above-mentioned entity recognition step, that is, the entity result, can be obtained.

[0100] Then, the fusion vector can also be used as input data of a preset deep learning model (such as the Transformer model), and the corresponding output data of the model, that is, the relationship result, can be obtained.

[0101] It should be noted that the preset neural network model is trained by sample fusion vectors and corresponding sample entity results; the preset deep learning model is trained by sample fusion vectors and corresponding sample relationship results.

[0102] After that, the entities and relationships that can form triples can be determined from the obtained entity results and relationship results, and triples are constructed in the combination mode of (entity 1, relationship, entity 2).

[0103] As another option of the embodiment of the present application, based on the entity result and the relationship result, a triple is constructed, including:

[0104] A first entity set and a second entity set are determined based on the entity types in the entity result; wherein, the entity result includes at least two entities and the entity type corresponding to each entity;

[0105] Based on the first entity set and the second entity set, an initial relationship set is determined; wherein, the initial relationship set includes at least two relationship words;

[0106] Screen the initial relationship set based on the relationship result to obtain the target relationship set; among them, the relationship result includes at least two relationship words, and the target relationship set includes the relationship words common to the relationship result and the initial relationship set.

[0107] Construct triples based on the first entity set, the second entity set, and the target relationship set.

[0108] Specifically, in the process of constructing triples according to the entity result and the relationship result, the first entity set and the second entity set can be selected from the entity result according to the entity type in the entity result, where the entity result includes at least two entities and the entity type corresponding to each entity.

[0109] It can be understood that the entity type represents the role type played by the entity in the text data, that is, the subject or the object. The entities in the first entity set are all entities that act as the subject or the subject in the historical customer data, and the entities in the second entity set are all entities that act as the object or the object in the historical customer data. For example, in the above example of historical customer data "When the oil price does not exceed 6 yuan per liter, I am willing to refuel.", "I" is the subject (that is, the first entity), and "the oil price does not exceed 6 yuan per liter" is the object (that is, the second entity).

[0110] It should be noted that when the sentence pattern is relatively simple, the subject in the sentence is the first entity, and the object is the second entity; when the sentence pattern is relatively complex (such as the above-mentioned existence of the adverbial "when..."), the subject or the object does not necessarily correspond to the first entity or the second entity. The method of distinguishing the first entity and the second entity is mainly based on the entity type to which each entity belongs in the data, and the entity type is calculated by the model and is included in the entity result.

[0111] Then, after determining the first entity and the second entity, the relationship corresponding to the first entity and the second entity can be determined according to the first entity set and the second entity set, and an initial relationship set is formed, where the initial relationship set includes at least two relationship words. For example, if there are a first entity A, a second entity B, and a second entity C, there is a relationship 1 between A and B, and its relationship word is X, and there is a relationship 2 between A and C, and its relationship word is Y, then the initial relationship set is {X, Y}.

[0112] After that, the initial relationship set can be screened according to the relationship result, and the relationship words common to the relationship result and the initial relationship set are used as the elements in the target relationship set, so as to obtain the target relationship set, so as to ensure that the relationship words existing in the target relationship set are all obtained by relationship extraction based on historical customer data, and there are corresponding entities in the first entity set or the second entity set.

[0113] After obtaining the target relation set, triples can be constructed based on the first entity set, the second entity set, and the target relation set. The construction method can be, but is not limited to: using the entities in the first entity set as entity 1, using the entities in the second entity set as entity 2, using the relation words in the target relation set as the relation, and constructing triples in the combination of (entity 1, relation, entity 2).

[0114] It should be noted that the relation words here can be, but are not limited to, single Chinese characters, words, or phrases.

[0115] Step 104: Obtain a prediction result based on the knowledge graph and a preset behavior prediction model.

[0116] Specifically, after constructing the knowledge graph, data related to the object to be predicted (such as a certain customer A) (such as nodes, edges, attributes, or weights on the edges, etc.) can be first obtained from the knowledge graph, and this data is input into a preset behavior prediction model (such as the BiLSTM-CRF model), and then the output data of the model, that is, the prediction result, can be obtained. For example, data such as the node of customer A and the edges related to this node (such as transaction amount, fuel type, etc.), and the attributes of this node (such as age, gender, vehicle information, etc.) are input into the BiLSTM-CRF model, then the model analyzes the purchase behavior pattern of customer A (such as the highest refueling frequency on Friday and the most refueling times with No. 92 fuel), and predicts the future refueling time (such as next Friday) and fuel type (such as No. 92 fuel), etc., and then takes it as the prediction result.

[0117] As another alternative of the embodiment of the present application, obtaining a prediction result based on the knowledge graph and a preset behavior prediction model includes:

[0118] Obtain refueling time data and fuel type data corresponding to the data to be predicted in the knowledge graph, and perform serialization processing on the refueling time data and the fuel type data;

[0119] Input the serialized refueling time data into a preset behavior prediction model to obtain a refueling time series; wherein, the preset behavior prediction model is trained by sample serialized data and sample sequences;

[0120] Input the serialized fuel type data into a preset behavior prediction model to obtain a fuel type sequence;

[0121] Obtain a prediction result based on the refueling time series and the fuel type sequence.

[0122] Specifically, in the process of obtaining a prediction result based on a knowledge graph and a preset behavior prediction model, the refueling time data (such as the historical refueling time data of a certain customer) and the fuel type data (such as all fuel types that a certain customer has refueled and the corresponding refueling times) corresponding to the data to be predicted (such as a certain customer) can be first obtained from the knowledge graph, and then the refueling time data and the fuel type data can be serialized.

[0123] It can be understood that data serialization is the process of converting a data structure (such as the data structure of nodes and edges in a knowledge graph) or object state into a format that can be stored or transmitted, which can but is not limited to using several common data serialization methods such as JSON serialization method, XML serialization method, and MessagePack in Python. The specific method selection depends on the use of the data and the required compatibility.

[0124] Then, the serialized refueling time data and fuel type data can be sequentially input into a preset behavior prediction model (such as a BiLSTM-CRF model) to obtain the corresponding refueling time sequence and fuel type sequence. Among them, the preset behavior prediction model is trained by sample serialized data and sample sequences.

[0125] After that, the prediction result can be obtained according to the obtained refueling time sequence and fuel type sequence. For example, when the data obtained through the knowledge graph shows that the probability distribution of a certain customer's refueling time within a week is: Monday: 0.2; Tuesday: 0.1; Wednesday: 0.9; Thursday: 0.1; Friday: 0.4; Saturday: 0.3; Sunday: 0.2, then the refueling time sequence can be [0.2, 0.1, 0.9, 0.1, 0.4, 0.3, 0.2]. Similarly, the fuel type sequence can be [10, 0, 0], where 10 represents that No. 92 gasoline has been refueled 10 times within a certain period of time, and the remaining two 0s represent that No. 95 gasoline and No. 98 gasoline have been refueled 0 times respectively. Then the prediction result corresponding to this example can be: This customer tends to refuel No. 92 gasoline on Wednesday.

[0126] It should be noted that the probability distribution of refueling time within a week can be obtained by counting the refueling time data of multiple weeks. For example, if a certain customer refuels on Tuesday and Friday for three consecutive weeks, then the corresponding refueling time sequence can be [0, 0.5, 0, 0, 0.5, 0, 0].

[0127] As another alternative of the embodiment of the present application, the prediction result includes the predicted fuel type, the predicted refueling volume corresponding to the predicted fuel type, and the predicted refueling time;

[0128] After obtaining the prediction result based on the knowledge graph and the preset behavior prediction model, it further includes:

[0129] Obtain the current inventory corresponding to the predicted fuel type, and determine the desired inventory based on the current inventory and the predicted refueling volume corresponding to the predicted fuel type;

[0130] Adjust the inventory corresponding to the predicted fuel type based on the predicted refueling time, so that the current inventory is consistent with the desired inventory before the predicted refueling time.

[0131] Specifically, the prediction results may include the predicted fuel type of the customer, the predicted refueling volume corresponding to the predicted fuel type, and the predicted refueling time, etc. After obtaining the prediction results according to the knowledge graph and the preset behavior prediction model, the current inventory corresponding to the predicted fuel type can be obtained first, and the desired inventory can be calculated based on the current inventory and the predicted refueling volume. Furthermore, the inventory corresponding to the predicted fuel type can be adjusted according to the predicted refueling time, so that the current inventory is consistent with the desired inventory before the predicted refueling time, to ensure that there is enough fuel in the gas station to provide to the customer before the predicted refueling time.

[0132] It can be understood that if the prediction results are that the predicted fuel types of two customers are both No. 92 gasoline, the predicted refueling volumes are 40 liters and 50 liters respectively, the predicted refueling time is Wednesday, the current day is Monday, and the current inventory is 20 liters, then the desired inventory is at least 90 liters, and at least 70 liters of No. 92 gasoline need to be added before Wednesday to make the inventory reach 90 liters or more, so as to ensure that both customers can refuel smoothly on Wednesday and provide satisfactory service to the customers.

[0133] In addition, exclusive refueling discount coupons can also be pushed to the customers on the eve of the predicted refueling time to encourage the customers to refuel at the predicted refueling time, thereby improving the customer experience and the operation efficiency of the gas station.

[0134] It should be noted that the data in the knowledge graph is not static. It is possible but not limited to obtaining new customer data at fixed intervals and establishing a new knowledge graph or updating the old knowledge graph based on the new customer data. By using the real-time transaction data and feedback information of the customers, the knowledge graph is dynamically adjusted to reflect the latest changes in customer behavior and the evolution of the market environment, improving the accuracy and practicality of the knowledge graph.

[0135] Please refer to Figure 2 , Figure 2 which shows the overall flowchart of a method for constructing a knowledge graph provided by an embodiment of the present application.

[0136] As Figure 2 shown, the method for constructing the knowledge graph includes at least the following 5 steps:

[0137] (1)Obtain data from various systems: Transaction records of customers can be obtained through the Point of Sale (POS) system of the gas station, including information such as purchase time, type of oil product, purchase quantity, price, etc.; personal information of customers, such as age, gender, vehicle information, etc., can be obtained through the membership system of the gas station; feedback and evaluation information of customers can be obtained through online questionnaires and social media platforms.

[0138] (2)Preprocess the data: Integrate the data obtained in step (1), store it in the relational database MongoDB, and use the primary key to associate the transaction records of customers in the POS system with their personal information in the membership management system to provide a basis for subsequent analysis. After that, it is also necessary to clean the data collected in (1), such as using regular expressions to remove duplicate records, correct error information, and handle missing values. Then, the data can be formatted, converting unstructured data into structured data for subsequent analysis. The processed data exhibits standardized characteristics, ensuring the consistency of information in different data sources, such as date format, oil product code, etc. In addition, it is also necessary to perform word segmentation, stop word removal, etc. on the obtained text data;

[0139] (3)Perform entity recognition and relationship extraction on the preprocessed data: Combine the RoBERTa-WWM model with the Graph Convolutional Network (GCN) to perform feature fusion on the preprocessed data to achieve entity recognition and relationship extraction;

[0140] (4)Construct triples through the identified entities and the extracted relationships: Based on the identified entities, determine entity 1 as the subject and entity 2 as the object, and find the extracted relationship corresponding to entity 1 and entity 2. Then, a triple in the form of (entity 1, relationship, entity 2) can be formed by the three;

[0141] (5)Construct a knowledge graph according to the triples: Through the Py2neo library and the graph database Neo4j, create nodes and edges corresponding to the triples to construct a knowledge graph, and add attributes to the nodes and edges in the knowledge graph. The attributes of the nodes can include the basic information of the customers, and the attributes of the edges can include the amount and frequency of transactions, etc.

[0142] Figure 3 This is a schematic structural diagram of a gas station customer behavior prediction device provided by an embodiment of the present application.

[0143] As Figure 3 shown, the gas station customer behavior prediction device based on the knowledge graph can at least include a first processing module 301, a second processing module 302, a third processing module 303, and a fourth processing module 304, where:

[0144] The first processing module 301 is configured to perform information extraction processing on historical customer data in a gas station to obtain a semantic vector and a part-of-speech vector;

[0145] The second processing module 302 is configured to perform fusion processing on the semantic vector and the part-of-speech vector to obtain a fusion vector;

[0146] The third processing module 303 is configured to extract at least two triples from the fusion vector and construct a knowledge graph based on all the triples;

[0147] The fourth processing module 304 is configured to obtain a prediction result based on the knowledge graph and a preset behavior prediction model.

[0148] In some possible embodiments, performing information extraction processing on historical customer data in a gas station to obtain a semantic vector and a part-of-speech vector includes:

[0149] The first processing module 301 is specifically configured to:

[0150] Input the historical customer data in the gas station into a pre-trained language model to obtain a semantic vector; wherein, the pre-trained language model is trained by sample data and sample semantic vectors corresponding to the sample data;

[0151] Perform splitting processing on the historical customer data to obtain at least two word segments;

[0152] Obtain a part-of-speech tag corresponding to each word segment based on a preset part-of-speech table; wherein, the preset part-of-speech table includes at least two word segments and part-of-speech tags corresponding to the word segments;

[0153] Obtain a part-of-speech vector according to all the word segments and the part-of-speech tags corresponding to the word segments.

[0154] In some possible embodiments, performing fusion processing on the semantic vector and the part-of-speech vector to obtain a fusion vector includes:

[0155] The second processing module 302 is specifically configured to:

[0156] Input the part-of-speech vector into a preset convolutional model to obtain a node vector; wherein, the preset convolutional model is trained by sample part-of-speech vectors and node vectors corresponding to the sample part-of-speech vectors;

[0157] Perform fusion processing on the semantic vector and the node vector through a cross-attention algorithm to obtain a fusion vector.

[0158] In some possible embodiments, extracting at least two triples from the fusion vector includes:

[0159] The third processing module 303 is specifically configured to:

[0160] Perform entity recognition processing on the fusion vector through a preset neural network model to obtain an entity result; wherein, the preset neural network model is trained by sample fusion vectors and corresponding sample entity results;

[0161] Perform relation extraction processing on the fusion vector through a preset deep learning model to obtain a relation result; wherein, the preset deep learning model is trained by sample fusion vectors and corresponding sample relation results;

[0162] Construct a triple based on the entity result and the relation result.

[0163] In some possible embodiments, constructing a triple based on the entity result and the relation result includes:

[0164] The third processing module 303 is specifically configured to:

[0165] Determine a first entity set and a second entity set based on the entity types in the entity result; wherein, the entity result includes at least two entities and the entity type corresponding to each entity;

[0166] Determine an initial relation set according to the first entity set and the second entity set; wherein, the initial relation set includes at least two relation words;

[0167] Perform screening processing on the initial relation set based on the relation result to obtain a target relation set; wherein, the relation result includes at least two relation words, and the target relation set includes the relation words common to the relation result and the initial relation set;

[0168] Construct a triple based on the first entity set, the second entity set, and the target relation set.

[0169] In some possible embodiments, obtaining a prediction result based on a knowledge graph and a preset behavior prediction model includes:

[0170] The fourth processing module 304 is specifically configured to:

[0171] Obtain refueling time data and fuel type data corresponding to the data to be predicted in the knowledge graph, and serialize the refueling time data and the fuel type data;

[0172] Input the serialized refueling time data into the preset behavior prediction model to obtain a refueling time series; wherein, the preset behavior prediction model is trained by sample serialized data and sample sequences;

[0173] Input the serialized fuel type data into the preset behavior prediction model to obtain a fuel type series;

[0174] Based on the refueling time series and the fuel type series, a prediction result is obtained.

[0175] In some possible embodiments, the prediction result includes a predicted fuel type, a predicted refueling volume corresponding to the predicted fuel type, and a predicted refueling time;

[0176] After obtaining the prediction result based on the knowledge graph and the preset behavior prediction model, it further includes:

[0177] The fourth processing module 304 is specifically configured to:

[0178] Obtain the current inventory corresponding to the predicted fuel type, and determine the desired inventory based on the current inventory and the predicted refueling volume corresponding to the predicted fuel type;

[0179] Adjust the inventory corresponding to the predicted fuel type based on the predicted refueling time, so that the current inventory and the desired inventory are consistent before the predicted refueling time.

[0180] Please refer to Figure 4 , Figure 4 which shows a schematic structural diagram of another gas station customer behavior prediction device based on a knowledge graph provided by an embodiment of the present application.

[0181] As Figure 4 shown, the gas station customer behavior prediction device 400 based on the knowledge graph may include at least one processor 401, at least one network interface 404, a user interface 403, a memory 405, and at least one communication bus 402.

[0182] Among them, the communication bus 402 can be used to realize the connection and communication of the above-mentioned various components.

[0183] Among them, the user interface 403 may include buttons, and the optional user interface may further include a standard wired interface and a wireless interface.

[0184] Among them, the network interface 404 may include, but is not limited to, a Bluetooth module, an NFC module, a Wi-Fi module, etc.

[0185] Among them, the processor 401 may include one or more processing cores. The processor 401 connects various parts within the entire knowledge graph-based gas station customer behavior prediction device 400 through various interfaces and lines, and executes various functions of the knowledge graph-based gas station customer behavior prediction device 400 and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 405, and by calling the data stored in the memory 405. Optionally, the processor 401 may be implemented in at least one hardware form of DSP, FPGA, or PLA. The processor 401 may integrate one or a combination of several of CPU, GPU, and modem, etc. Among them, the CPU mainly processes the operating system, user interface, application programs, etc.; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 401 and may be implemented separately by a single chip.

[0186] Among them, the memory 405 may include RAM and may also include ROM. Optionally, the memory 405 includes a non-transitory computer-readable medium. The memory 405 can be used to store instructions, programs, codes, code sets, or instruction sets. The memory 405 may include a program storage area and a data storage area. Among them, the program storage area may store instructions for implementing the operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store the data involved in the above-mentioned various method embodiments. The memory 405 may optionally also be at least one storage device located far from the aforementioned processor 401. As Figure 4 shown, the memory 405, as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a knowledge graph-based gas station customer behavior prediction application program.

[0187] Specifically, the processor 401 may be used to call the knowledge graph-based gas station customer behavior prediction application program stored in the memory 405 and specifically perform the following operations:

[0188] Perform information extraction processing on the historical customer data in the gas station to obtain semantic vectors and part-of-speech vectors;

[0189] Perform fusion processing on the semantic vectors and part-of-speech vectors to obtain a fusion vector;

[0190] Extract at least two triples from the fusion vector and construct a knowledge graph based on all the triples;

[0191] Based on the knowledge graph and a preset behavior prediction model, obtain a prediction result.

[0192] The present application also provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the steps of the above method are implemented. Among them, the computer-readable storage medium may include, but is not limited to, any type of disk, including floppy disks, optical disks, DVDs, CD-ROMs, microdrives, and magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, DRAMs, VRAMs, flash memory devices, magnetic cards or optical cards, nano-systems (including molecular memory ICs), or any type of medium or device suitable for storing instructions and / or data.

[0193] It should be noted that, for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present application is not limited by the described action sequence, because according to the present application, certain steps can be adopted in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the present application.

[0194] In the above embodiments, the descriptions of the respective embodiments have their own emphases. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0195] In several embodiments provided by the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some service interfaces. The indirect coupling or communication connection of the device or unit can be in an electrical or other form.

[0196] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place, or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0197] In addition, the functional units in each embodiment of the present application can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.

[0198] When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on such an understanding, the technical solution of the present application, in essence, 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 and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in various embodiments of the present application. The aforementioned memory includes: USB flash drives, read-only memory (ROM), random access memory (RAM), external hard drives, magnetic disks, or optical discs, etc., all kinds of media that can store program codes.

[0199] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing relevant hardware through a program. The program can be stored in a computer-readable memory, and the memory can include: flash drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs, etc.

[0200] The above are only exemplary embodiments of the present disclosure and should not be used to limit the scope of the present disclosure. That is, any equivalent changes and modifications made in accordance with the teachings of the present disclosure still fall within the scope covered by the present disclosure. After considering the specification and practicing the present disclosure, those skilled in the art will readily think of other embodiments of the present disclosure. The present application aims to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common general knowledge or conventional technical means in the technical field not described in the present disclosure. The specification and the embodiments are only regarded as exemplary, and the scope and spirit of the present disclosure are defined by the claims.

Claims

1. A gas station customer behavior prediction method based on knowledge graph, characterized in that: include: Perform information extraction on historical customer data at gas stations to obtain semantic vectors and part-of-speech vectors; Fusing the semantic vector and the part-of-speech vector to obtain a fused vector; Extracting at least two triplets from the fusion vector, and constructing a knowledge graph based on all the triplets; Obtaining prediction results based on the knowledge graph and the preset behavior prediction model; The fusing the semantic vector and the part-of-speech vector to obtain a fused vector includes: Inputting the part-of-speech vector into a preset convolutional model to obtain a node vector; wherein the preset convolutional model is trained by a sample part-of-speech vector and a node vector corresponding to the sample part-of-speech vector; The semantic vector and the node vector are fused by a cross attention algorithm to obtain a fused vector.

2. The method according to claim 1, characterized in that The information extraction process of the historical customer data in the gas station to obtain the semantic vector and the part-of-speech vector includes: Inputting historical customer data of the gas station into a pre-trained language model to obtain a semantic vector; wherein the pre-trained language model is trained by sample data and a sample semantic vector corresponding to the sample data; Splitting the historical customer data to obtain at least two segmented words; Acquire a part-of-speech tag corresponding to each of the participles based on a preset part-of-speech table; wherein the preset part-of-speech table includes at least two of the participles and the part-of-speech tags corresponding to the participles; A part-of-speech vector is obtained according to all the participles and the part-of-speech tags corresponding to the participles.

3. The method according to claim 1, characterized in that The extracting at least two triplets from the fused vector comprises: Performing entity recognition processing on the fusion vector through a preset neural network model to obtain an entity result; wherein the preset neural network model is trained by a sample fusion vector and a sample entity result corresponding to the sample fusion vector; Performing relationship extraction processing on the fusion vector through a preset deep learning model to obtain a relationship result; wherein the preset deep learning model is trained by the sample fusion vector and the sample relationship result corresponding to the sample fusion vector; A triple is constructed based on the entity result and the relationship result.

4. The method according to claim 3, characterized in that The constructing a triple based on the entity result and the relationship result includes: Determine a first entity set and a second entity set based on entity types in the entity results; wherein the entity results include at least two entities and an entity type corresponding to each of the entities; Determine an initial relationship set according to the first entity set and the second entity set; wherein the initial relationship set includes at least two relationship words; The initial relationship set is screened based on the relationship result to obtain a target relationship set; wherein the relationship result includes at least two relationship words, and the target relationship set includes the relationship words common to the relationship result and the initial relationship set; The triple is constructed based on the first entity set, the second entity set, and the target relationship set.

5. The method according to claim 1, characterized in that The prediction result is obtained based on the knowledge graph and the preset behavior prediction model, including: Obtaining refueling time data and oil type data corresponding to the data to be predicted in the knowledge graph, and serializing the refueling time data and the oil type data; Inputting the serialized refueling time data into a preset behavior prediction model to obtain a refueling time sequence; wherein the preset behavior prediction model is obtained by training the sample serialized data and the sample sequence; Inputting the serialized oil type data into the preset behavior prediction model to obtain an oil type sequence; Based on the refueling time series and the oil type series, a prediction result is obtained.

6. The method according to claim 1, characterized in that The prediction result includes a predicted oil type, a predicted refueling amount corresponding to the predicted oil type, and a predicted refueling time; After obtaining the prediction result based on the knowledge graph and the preset behavior prediction model, the method further includes: Acquire the current inventory corresponding to the predicted oil type, and determine the expected inventory according to the current inventory and the predicted refueling amount corresponding to the predicted oil type; The inventory corresponding to the predicted oil type is adjusted based on the predicted refueling time so that the current inventory amount is consistent with the expected inventory amount before the predicted refueling time.

7. A gas station customer behavior prediction device based on knowledge graph, characterized in that: include: The first processing module is used to extract information from the historical customer data of the gas station to obtain semantic vectors and part-of-speech vectors; A second processing module is used to fuse the semantic vector and the part-of-speech vector to obtain a fused vector; A third processing module, used to extract at least two triples from the fusion vector, and construct a knowledge graph based on all the triples; A fourth processing module, used to obtain a prediction result based on the knowledge graph and a preset behavior prediction model; The second processing module is specifically used for: Inputting the part-of-speech vector into a preset convolutional model to obtain a node vector; wherein the preset convolutional model is trained by the sample part-of-speech vector and the node vector corresponding to the sample part-of-speech vector; The semantic vector and node vector are fused through the cross attention algorithm to obtain a fused vector.

8. A gas station customer behavior prediction device based on knowledge graph, characterized in that: including a processor and a memory; The processor is connected to the memory; The memory is used to store executable program code; The processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on a computer or a processor, the computer or the processor executes the steps of the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method and system for processing multi-source information in construction process of underground powerhouse of pumped storage power station

    CN116975256A

  • System user behavior prediction analysis method, system and equipment based on time sequence knowledge graph

    CN118410173A