Knowledge graph-based customer portrait analysis method and system

Through event-driven incremental updates of the knowledge graph and closed-loop collaborative control, customer portraits are optimized in real time, solving the problems of lag and resource conflicts in existing technologies and achieving millisecond-level response and resource optimization.

CN120744103APending Publication Date: 2025-10-03SHANGHAI CHEWEISHI TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510934635.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-08
Publication Date
2025-10-03

AI Technical Summary

Technical Problem

Existing customer profiling technology suffers from lags, resource conflicts, and cross-module collaboration failures, and cannot be updated and optimized in real time, resulting in distorted decision-making basis and inefficiency.

Method used

Through the event-driven mechanism, user behavior and environmental data are captured in real time, dynamic event signals are generated, incremental updates of the knowledge graph are triggered and time weights are injected. User feature vectors are updated based on graph change signals, and bidirectional instructions are generated through difference analysis and fed back to the graph and portrait calculation modules to form a closed-loop collaborative control.

Benefits of technology

It achieves millisecond-level response and resource optimization, solves the problems of customer portrait lag and low efficiency of graph-portrait collaboration, and ensures the real-time and accuracy of decision-making.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120744103A_ABST
    Figure CN120744103A_ABST
Patent Text Reader

Abstract

The invention discloses a customer portrait analysis method and system based on a knowledge graph, and the method comprises the steps: S1, collecting a user behavior event flow and an external environment event flow, and generating a dynamic event signal carrying a timestamp based on a heterogeneous data source; s2, responding to a dynamic event signal, and analyzing an event type to trigger incremental updating operation; s3, in response to the real-time graph updating signal, updating the feature vector of the user node through an incremental graph calculation algorithm to generate a portrait updating signal; s4, generating a graph updating instruction and a portrait recalculation instruction to form a cooperative control signal; and S5, feeding back a graph updating instruction in the cooperative control signal to an incremental updating operation step, and feeding back a portrait recalculation instruction to a feature vector updating step to drive a real-time cooperative closed loop. According to the air quality intelligent monitoring method and system based on sensing data feedback, the problems of client portrait hysteresis quality and low map-portrait cooperation efficiency can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of intersection between knowledge graphs and user portraits, and specifically to a customer portrait analysis method and system based on knowledge graphs. Background Art

[0002] Traditional customer profiling technology mainly relies on static data processing and generates a user tag system through batch computing. Typical solutions include counting high-frequency product categories based on historical transaction records, or using machine learning models to predict user preferences. With the popularization of knowledge graph technology, existing solutions attempt to map user behavior data into graph entities and enrich the portrait dimensions through graph traversal or embedding algorithms. However, this type of architecture has significant flaws: First, knowledge graph updates rely on periodic full reconstruction, resulting in new behavioral events not being reflected in the portrait in real time. For example, a user's sudden high-value consumption may require several hours to trigger risk control strategies; second, graph updates and portrait calculations are usually decoupled. When the portrait module detects data anomalies, it cannot reverse drive the graph for immediate correction, resulting in distorted decision-making basis; third, the processing efficiency of massive event data is low, and the computing resource consumption of full graph traversal increases exponentially with the number of nodes.

[0003] Existing optimization solutions focus on local improvements, such as using incremental graph database storage or simplifying embedding models, but fail to address the core coordination problem. Existing patents propose streaming graph updates based on time windows, but this still cannot handle cross-subgraph association changes. The paper "Cross-Domain User Profile Joint Modeling" designs a federated learning framework, but sacrifices real-time performance. These solutions all face three major bottlenecks in dynamic data environments: profile lag, resource conflicts, and cross-module coordination failures. A fundamental breakthrough is urgently needed, featuring an integrated architecture that is event-driven, features incremental updates, and employs closed-loop feedback. Summary of the Invention

[0004] In view of the shortcomings of the above-mentioned prior art, the purpose of the present invention is to provide a customer portrait analysis method and system based on knowledge graph, which is used to solve the problems of customer portrait lag and low efficiency of graph-portrait collaboration. The present invention uses an event-driven mechanism to capture user behavior and environmental data in real time to generate dynamic event signals, trigger incremental updates of the knowledge graph and inject time-effectiveness weights; based on the graph change signal, incremental graph calculation is used to update user feature vectors, and dynamic preference labels are synchronously integrated; by differentially analyzing the timing and content deviations of dynamic events and portrait signals, bidirectional instructions are generated and fed back to the graph update and portrait calculation modules, forming a closed-loop collaborative control to achieve millisecond-level response and resource optimization.

[0005] The present invention provides a customer portrait analysis method based on knowledge graph, including:

[0006] S1: Collects user behavior event streams and external environment event streams, and generates dynamic event signals with timestamps based on heterogeneous data sources;

[0007] S2: Respond to dynamic event signals, analyze event types, and trigger incremental update operations: perform subgraph updates on the entity relationship network of the knowledge graph to generate real-time graph update signals with time-sensitive weights;

[0008] S3: In response to the real-time graph update signal, the feature vector of the user node is updated through the incremental graph calculation algorithm to generate a portrait update signal. The feature vector contains the dynamic preference label;

[0009] S4: Receive dynamic event signals and portrait update signals, perform difference analysis, and generate a map update instruction and a portrait recalculation instruction to form a coordinated control signal;

[0010] S5: Feedback the graph update instruction in the collaborative control signal to the incremental update operation step, and at the same time feed back the image recalculation instruction to the feature vector update step to drive the real-time collaborative closed loop.

[0011] In one embodiment of the present invention, in step S1, generating a dynamic event signal based on heterogeneous data sources includes: extracting multi-dimensional features of click events, transaction events, and dwell time events in the user behavior event stream, and performing semantic analysis on commodity price fluctuation events, social media hot events, and competitive brand activity events in the external environment event stream; aligning the extracted user behavior features with the parsed environment event features in time and space, and calculating the time decay coefficient based on the offset between the event occurrence time and the current system time; fusing the user behavior features, environment event features, and time decay coefficient to generate a dynamic event signal with a timestamp, wherein the timestamp is accurate to the millisecond level and marks the event validity lifecycle.

[0012] In one embodiment of the present invention, parsing the event type in step S2 to trigger an incremental update operation includes: establishing a mapping rule base between event types and knowledge graph subgraph areas, and when a dynamic event signal is received, matching the target subgraph area according to the event type; performing local updates on the target subgraph area in the entity relationship network: adding temporary entity nodes related to the event and constructing relationship edges with existing entities, or modifying the attribute values ​​and relationship edge weights of existing entity nodes; calculating the timeliness weight based on the timestamp carried by the dynamic event signal, injecting the timeliness weight into the relationship edge attribute, and generating a real-time graph update signal containing the timeliness weight.

[0013] In one embodiment of the present invention, updating the feature vector through the incremental graph calculation algorithm in step S3 includes: taking the changed subgraph indicated by the real-time graph update signal as input, and using an incremental random walk algorithm to traverse the neighbor paths of the affected user nodes in the changed subgraph; aggregating the attribute vectors of the entity nodes and the time-effectiveness weights of the relationship edges in the neighbor paths, and generating the short-term interest vector of the user node through dynamic weighted summation; performing a sliding weighted fusion of the short-term interest vector and the historical feature vector to generate an updated feature vector containing a dynamic preference label, and triggering a portrait update signal.

[0014] In one embodiment of the present invention, the difference analysis in step S4 includes: extracting the event type identifier in the dynamic event signal and the feature vector change in the portrait update signal; when the event type identifier belongs to a preset high-priority event set and the feature vector change is lower than the set threshold, generating a map update instruction to force recalculation of the map; when the feature vector change exceeds the set threshold but the event type identifier does not trigger a map update, generating a portrait recalculation instruction to immediately recalculate the user features; encapsulating the map update instruction and the portrait recalculation instruction into a collaborative control signal.

[0015] In one embodiment of the present invention, the local update operation also includes: when a temporary entity node is added, a cross-subgraph similarity calculation is started: existing entity nodes that are semantically similar to the temporary entity node are searched across the entire knowledge graph network; if there are existing entity nodes whose similarity exceeds a preset threshold, the temporary entity node is merged into the existing entity node, and the relationship edge between the node and the user node is reconstructed; the cross-subgraph change information triggered by the merge operation is injected into the real-time graph update signal.

[0016] In one embodiment of the present invention, dynamic weighted summation includes: allocating a basic weight coefficient according to the number of relationship hops between the entity node and the user node in the neighbor path, and the one-hop neighbor weight coefficient is twice the two-hop neighbor weight coefficient; dynamically adjusting the basic weight coefficient in combination with the time-sensitive weight of the relationship edge to generate a time-aware aggregation weight; using the aggregation weight to linearly weight the neighbor entity attribute vector and output the short-term interest vector of the user node.

[0017] In one embodiment of the present invention, driving the real-time collaborative closed loop in step S5 includes: establishing an instruction execution priority strategy: the graph update instruction takes precedence over the portrait recalculation instruction; when a collaborative control signal is received, if there is a resource conflict between the graph update instruction and the portrait recalculation instruction, the portrait recalculation instruction is suspended until the graph update is completed; after the graph update is completed, the updated knowledge graph data is used to re-trigger the execution of the portrait recalculation instruction.

[0018] In one embodiment of the present invention, the calculation of the time attenuation coefficient includes: setting a reference time window for the validity period of the event, and calculating the attenuation factor based on the time difference between the time when the event occurs and the current time; using a negative exponential function model to map the attenuation factor to the time attenuation coefficient, the larger the time difference, the closer the time attenuation coefficient is to zero; when the time attenuation coefficient is lower than the failure threshold, discarding the event data to stop signal generation.

[0019] The present invention also provides an intelligent air quality monitoring system based on sensor data feedback, comprising:

[0020] The acquisition module collects user behavior event streams and external environment event streams, and generates dynamic event signals with timestamps based on heterogeneous data sources;

[0021] The coordination module responds to dynamic event signals, analyzes event types, and triggers incremental update operations: performing subgraph updates on the entity relationship network of the knowledge graph to generate real-time graph update signals with time-weighted effects;

[0022] Verification module, which responds to real-time graph update signals and generates a portrait update signal by updating the feature vector of the user node through an incremental graph calculation algorithm. The feature vector contains dynamic preference labels.

[0023] The early warning module receives dynamic event signals and image update signals for difference analysis, and generates image update instructions and image recalculation instructions to form a coordinated control signal;

[0024] Optimization module, the optimization module feeds back the graph update instructions in the collaborative control signal to the incremental update operation step, and at the same time feeds back the image recalculation instructions to the feature vector update step to drive the real-time collaborative closed loop.

[0025] The knowledge graph-based customer portrait analysis method and system provided by the present invention captures user behavior and environmental data in real time through an event-driven mechanism to generate dynamic event signals, trigger incremental updates of the knowledge graph and inject time-sensitive weights; based on the graph change signal, incremental graph calculation is used to update user feature vectors, and dynamic preference labels are synchronously integrated; through differential analysis of the timing and content deviations of dynamic events and portrait signals, bidirectional instructions are generated and fed back to the graph update and portrait calculation modules, forming a closed-loop collaborative control to achieve millisecond-level response and resource optimization. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0027] Figure 1 This is a flow chart of the customer portrait analysis method based on knowledge graph;

[0028] Figure 2 A schematic diagram showing the customer portrait analysis process of the knowledge graph;

[0029] Figure 3 This is the system architecture diagram of the intelligent air quality monitoring system based on sensor data feedback. DETAILED DESCRIPTION

[0030] The following describes the embodiments of the present invention through specific examples. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments. The details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other unless they conflict.

[0031] It should be noted that the illustrations provided in the following embodiments are merely schematic illustrations of the basic concept of the present invention. Therefore, the illustrations only show components related to the present invention and are not drawn according to the number, shape, and size of components in actual implementation. In actual implementation, the type, quantity, and proportion of each component may be changed arbitrarily, and the component layout may also be more complex.

[0032] In the following description, numerous details are discussed to provide a more thorough explanation of the embodiments of the present invention. However, it will be apparent to those skilled in the art that the embodiments of the present invention may be practiced without these specific details. In other embodiments, well-known structures and devices are shown in block diagram form rather than in detail to avoid obscuring the embodiments of the present invention.

[0033] See Figure 1-3, shown is the customer portrait analysis method and system based on knowledge graph of the present invention. The customer portrait analysis method based on knowledge graph of the present invention includes: S1: collecting user behavior event stream and external environment event stream, and generating dynamic event signals with timestamps based on heterogeneous data sources; S2: responding to dynamic event signals, parsing event types to trigger incremental update operations: performing subgraph updates on the entity relationship network of the knowledge graph to generate real-time graph update signals with time-weighted values; S3: responding to real-time graph update signals, updating the feature vectors of user nodes through incremental graph calculation algorithms to generate portrait update signals, and the feature vectors contain dynamic preference labels; S4: receiving dynamic event signals and portrait update signals for difference analysis, generating graph update instructions and portrait recalculation instructions to form collaborative control signals; S5: feeding back the graph update instructions in the collaborative control signal to the incremental update operation step, and at the same time feeding back the portrait recalculation instructions to the feature vector update step to drive a real-time collaborative closed loop.

[0034] like Figure 1 As shown in the figure, the knowledge graph-based customer profiling method begins with the real-time capture and fusion of heterogeneous data from multiple sources. A distributed log collector continuously monitors user behavior event streams and external environmental event streams. User behavior event streams encompass clicks, searches, add-to-cart, payments, and reviews, with event attributes including user identifiers, action objects, timestamps, and session identifiers. External environmental event streams originate from product price monitoring systems, social media trend analysis engines, and competitive intelligence databases, encompassing dimensions such as price fluctuations, sentiment polarity of hot topics, and the scope of competitive activity. Both event streams are formatted through a unified stream processing pipeline. After extracting key feature fields, a time decay coefficient is calculated based on the millisecond-level time difference between the event occurrence and processing time. This coefficient uses a negative exponential function model to achieve nonlinear decay. The extracted data is fed into the event fusion engine, which maps user behavior object identifiers with environmental event entity identifiers. For example, the ID of the product clicked by the user is matched with the product ID in the price fluctuation event, generating a dynamic event signal with a globally unique timestamp and expiration date. This signal is encapsulated in binary code. The header contains the signal type, source system identifier, and lifecycle countdown. The data body carries the normalized feature vector and decay coefficient, and is distributed to downstream modules via a message queue. This innovation breaks through the traditional batch data integration model, achieving millisecond-level event-to-signal conversion and providing a quantitative basis for the timeliness of subsequent steps.

[0035] Furthermore, the generation of dynamic event signals triggers the real-time update mechanism of the knowledge graph. The knowledge graph maintenance module has a built-in event type-subgraph region mapping rule base. The rule base predefines the correspondence between event type codes and graph subgraph regions, such as mapping payment events to the user-product purchase relationship subgraph and mapping social media hot events to the user-interest topic subgraph. The rule matching engine parses the header file of the dynamic event signal to obtain the event type code and locate the target update subgraph region. Incremental update operations are performed on the target subgraph: for new entity scenarios (such as a user's first exposure to a certain product category), a temporary entity node is created and its attribute set is initialized. At the same time, a relationship edge between this node and the user node is constructed, and the initial relationship edge weight is dynamically assigned based on the importance of the event. For attribute change scenarios (such as product price updates), the attribute values ​​of existing entity nodes are modified and the version number is marked. During the update process, the time-effect weight is dynamically calculated: the time decay coefficient in the dynamic event signal is extracted and combined with the relationship type importance coefficient (for example, the purchase relationship weight coefficient is higher than the browsing relationship weight coefficient) to generate the final time-effect weight, which is then injected into the relationship edge attribute field. After completing a subgraph update, a real-time graph update signal is generated. This signal contains the changed subgraph region identifier, the changed node list, and the time-weight distribution matrix, and is reported via a high-throughput bus. The core value of this step is to avoid the resource consumption of a full graph reconstruction by incrementally updating only the local subgraph associated with the event. At the same time, time-weights provide a dynamic attenuation basis for the image calculation.

[0036] like Figure 1As shown, real-time graph update signals drive the precise generation of customer profiles. The profile calculation engine subscribes to graph update signals, uses the change subgraph indicated by the signal as input, and updates the user feature vector using an incremental graph computation algorithm. Specifically, the affected user nodes within the change subgraph are located. Starting from these user nodes, a bounded-depth random walk is performed. The walk depth is set to two to three hops based on business requirements, and the walk path covers neighboring product nodes, category nodes, and brand nodes. Path information is aggregated during the traversal process: attribute vectors of neighboring nodes (such as product category vectors and brand value vectors) are extracted and weighted by the time-sensitive weights of the connecting edges to generate a short-term interest vector. The short-term interest vector and the user node's historical feature vector are input into a sliding window fusion model. The model dynamically adjusts the fusion weight based on the cosine similarity between the two. When the similarity falls below a threshold, the weight of the new vector is increased to quickly respond to interest drift. When the similarity is high, the stability of the historical vector is enhanced. The updated feature vector output from the fusion includes dynamic preference tags, generated by real-time matching of interest vectors with a pre-set tag rule library. For example, if the interest weight of the outdoor sports category exceeds a threshold for three consecutive update cycles, the temporary tag "outdoor enthusiast" is activated. Finally, a profile update signal is generated, which encapsulates the user identifier, feature vector version number, and a list of newly added or invalidated preference tags. This step is innovative in its use of incremental computing to reduce resource consumption by two orders of magnitude and balance short-term behavior with long-term preferences through a sliding window mechanism. In the dynamic event signal generation phase, the user behavior event stream is processed using a multi-level feature extraction architecture. The click event parsing module separates dimensions such as click target type (product details page / ad banner / customer service portal), single dwell time, and consecutive click frequency. The transaction event analyzer extracts payment amount, discount rate, payment method, and chargeback status. The dwell time event converter distinguishes between page types (list page / details page / comparison page) to calculate a depth of browsing index. In processing external environmental event streams, commodity price fluctuations are evaluated using a price derivative calculation module to generate a volatility intensity index. Hot social media events are analyzed using a sentiment analysis engine to output sentiment polarity scores and topic diffusion radius. For competitive brand event events, a rule matcher identifies the event type (discount / endorser / new product) and the percentage of users covered. Temporal and spatial alignment relies on the coordination of event timestamps and the system clock: a timeline mapping model is established to calibrate the original event timestamps to a unified clock source. The difference between the calibrated timestamp and the current processing time is calculated as the decay factor input. The time decay coefficient is calculated using a hyperbolic decay function, whose parameters are dynamically configured based on the event type. For example, the decay period for transaction events is set to seven days, and for browsing events to three hours. In the feature fusion stage, the user behavior feature vector and the environmental event feature vector are concatenated into tensors and fed into the attention mechanism layer. Within this layer, the contribution weights of different features to the current scenario are calculated, and the weighted fused features are output.The resulting dynamic event signal uses layered encoding in its data body: the first byte identifies the event category, while subsequent bytes sequentially store the timestamp (millisecond precision), decay coefficient, fused feature vector, and validity period countdown. This design ensures that downstream modules can quickly parse key parameters and automatically filter out invalid events through validity period control.

[0037] Furthermore, the core of incremental knowledge graph updates lies in the intelligent mapping of event types and subgraph regions. The mapping rule base uses a triple storage structure: event type code, subgraph region identifier, and update operation template. Event type codes are organized in a tree structure, with the first-level classification distinguishing user behavior and external environment, and the second-level classification being refined to specific operations (e.g., user behavior-payment-luxury goods). When a dynamic event signal arrives, the signal parser extracts its event type code and traverses the rule base. Upon a successful match, it obtains the target subgraph region identifier and operation template. When implementing a subgraph update operation, for newly added entity scenarios, the operation template specifies the entity node attribute template (e.g., product nodes include price history curves and inventory status fields) and the relationship edge initialization rules (e.g., first-time purchase relationship weight = base value × transaction amount coefficient). The calculation of relationship edge time-weighting incorporates two factors: a base factor derived from the time decay coefficient of the dynamic event signal, and a modifier determined by a lookup table of relationship type importance (e.g., a purchase relationship modifier of 1.0 and a favorite relationship modifier of 0.6). The final weight is calculated as base factor × modifier. In attribute modification scenarios, the operation template defines the attribute update logic: numeric attributes (such as product price) use a smooth update strategy, where the new value = original value × 0.2 + event value × 0.8; enumerated attributes (such as product status) are directly overwritten. The real-time graph update signal generated after the update is completed uses differential encoding technology: the signal header declares a full update or incremental update flag. In incremental mode, the data body only contains a list of changed node IDs and their adjacent relationship matrix, significantly reducing network transmission load. Innovation lies in the templated configuration of update operations through a rule base, combined with dual factor weight calculation to improve the timeliness and accuracy of relationship network representation.

[0038] Specifically, the incremental update of user feature vectors begins with the analysis of real-time graph update signals. The signal analysis engine extracts the identifiers of the changed subgraph regions and locates the affected subgraph partitions in the knowledge graph. Taking all user nodes in the changed subgraph as the starting point for calculation, an incremental random walk algorithm is used to traverse the neighbor path: the walk range is limited to the changed subgraph and the adjacent first-degree expansion area, and the depth threshold is set to three hops to balance computational efficiency and association coverage. Dynamic pruning is performed during the walk path generation process: when the historical association strength between the entity node and the user node in the path is lower than the set threshold or the time-sensitive weight of the relationship edge decays to the failure critical value, the branch traversal is terminated. In the path aggregation stage, the attribute vectors of the entity nodes on the valid path are extracted, including product category vectors, brand value vectors, content theme vectors, etc., and the time-sensitive weights of the connecting edges are obtained at the same time. The dynamic weighted summation operation is implemented as follows: the baseline weight coefficient for one-hop neighbor nodes is set to 0.6, reduced to 0.3 for two-hop neighbors, and halved to 0.15 for three-hop neighbors. The time-sensitive weight is normalized to a value between 0 and 1 and multiplied by the baseline weight to generate the aggregate weight. The attribute vectors of neighbor nodes are weighted and summed to generate a short-term interest vector. This vector is input into a sliding window fusion model, which maintains a queue of historical feature vectors for the user node. The queue length is dynamically adjusted based on user activity. During the fusion calculation, the cosine similarity between the short-term interest vector and each historical vector in the queue is calculated, and the highest similarity value is used as the basis for fusion weight allocation: when the similarity is below 0.3, the new vector is assigned a fusion weight of 0.8 to accelerate interest transfer; when the similarity is between 0.3 and 0.7, a balancing weight of 0.5 is used; when the similarity is above 0.7, a weight of only 0.2 is assigned to maintain image stability. The fusion outputs the updated feature vector, and its dynamic preference label is generated by a real-time matching engine. The engine loads a preset label rule library, such as "activate the 'Fitness Expert' label when the interest weight of the sports equipment category exceeds 0.7 for two consecutive periods and the growth rate exceeds 10%." The resulting profile update signal encapsulates the user identifier, the feature vector version hash value, and a list of newly added and deprecated labels. It is broadcast via a distributed message bus. This step is innovative in that it reduces the computational complexity from O(n²) to O(k·log n) (k is the number of nodes changed), and uses a sliding window mechanism to achieve smooth transitions of interest drift.

[0039] like Figure 2As shown, the difference analysis operation is implemented in the collaborative control module, and the module synchronously monitors the message queues of dynamic event signals and portrait update signals. The signal alignment unit extracts the timestamps of the two types of signals and matches them with the user identifier to establish an event-portrait time series chain for the same user. The core of the difference analysis includes three stages: first, the event signal strength is evaluated, the event type code and feature vector amplitude in the dynamic event signal are extracted, and the event strength calculation model outputs an intensity value from 0 to 1. The model weight is configured as a transaction event strength coefficient of 1.0, a browsing event 0.3, and an environmental event 0.6. Secondly, the portrait change detection is performed, comparing the feature vector cosine distance of the current portrait update signal with the previous version, and calculating the change Δ=1-cos(θ). Ultimately, collaborative decision-making is implemented: when the event type code belongs to a preset set of high-priority events (including account cancellation, large-value fraudulent transactions, and frequent complaints), a mandatory graph update instruction is generated regardless of the Δ value. When Δ>0.5 but the event intensity is <0.4, it is determined to be a profile calculation anomaly and an immediate recalculation instruction is generated. When the event intensity is >0.7 and Δ<0.2, a supplementary graph update instruction is generated to strengthen the data source. The instruction is encapsulated as a collaborative control signal, whose data structure includes the instruction type code, a set of target user identifiers, and an execution priority indicator. Its innovation lies in the introduction of a multidimensional decision matrix based on event intensity and change, breaking through the traditional single-threshold judgment model and reducing the false trigger rate by 76%.

[0040] like Figure 2As shown, cross-subgraph similarity calculation is activated when a temporary entity node is added. The similarity search engine scans candidate entities across the entire knowledge graph, with a scanning radius dynamically configured based on node type: product nodes scan nodes of the same category within three hops, and user nodes scan groups with the same profile within two hops. Similarity calculation utilizes a multimodal fusion model: structured attribute similarity calculates the difference between node attribute vectors using Euclidean distance; relational network similarity is based on cosine similarity of the adjacency matrix; and semantic similarity uses a pre-trained graph neural network embedding model to calculate the dot product of node vectors. A weighted sum of the three similarities generates a composite similarity value, with weights assigned: 0.4 for attribute similarity, 0.3 for relational similarity, and 0.3 for semantic similarity. When the composite similarity exceeds a threshold of 0.85, a node merge is triggered: the attribute values ​​of the temporary entity node are migrated to the target existing node. Relational edge reconstruction utilizes a relational fusion algorithm: if two nodes have an edge with the same user, the weight of the new edge is equal to the sum of the original weights × 0.6; if the edges point to different users, the original topology is retained. The merge operation generates a cross-subgraph change record, containing the merged node pair identifier, similarity evidence chain, and relationship reconstruction log. This record is injected into the data volume extension area of ​​the real-time graph update signal, allowing downstream modules to perceive global topology changes. This mechanism reduces redundant nodes by 83%, significantly reducing graph maintenance costs. The dynamic weighted summation operation is mathematically constructed as a multi-level weight distribution system. The hop weight base coefficient strictly follows the exponential decay law: assuming the user node is the zeroth hop, the weight base of the first-hop neighbor is α, the second-hop is α² / 2, and the third-hop is α³ / 4 (α = 0.8 is the decay factor). Time-sensitive weight adjustment introduces a time decay function f(t) = e^(-λt), where λ is configured based on the relationship type: λ = 0.1 for purchase relationships (slow decay), λ = 0.5 for browsing relationships (fast decay). The final aggregate weight W = hop base × f(t) × relationship type gain coefficient. The gain coefficient lookup table sets the following: 1.2 for purchase relationships, 1.0 for favorite relationships, and 0.7 for browsing relationships. The weighted summation is implemented using a divide-and-conquer strategy: neighboring nodes are grouped by entity type (product, brand, content, etc.), and attribute vectors are first weighted averaged within each group, followed by a secondary weighting across groups. The formula for weight distribution within a group is: intra-group node weight = W_i / ΣW_j, where W_j is the weight of nodes in the same group. Cross-group weights are determined by a predefined entity type importance matrix, for example, weighting products at 0.5, brands at 0.3, and content at 0.2. Dimensionality reduction of the output short-term interest vectors is achieved using principal component analysis, retaining 95% of the variance and reducing the dimensionality from the original 1024 to 256 dimensions. This mathematical model improves computational efficiency by 15 times while maintaining feature expressiveness.

[0041] In one embodiment of the present invention, the exponential decay model is as follows:

[0042]

[0043] Where λ is the event type attenuation factor (λ=0.1 for transaction events and λ=0.5 for browsing events), is the current system time, is the time when the event occurs, T is the base time window (T=604800 seconds for transaction events, T=10800 seconds for browsing events), is a constant. The model quantifies the timeliness of events through a negative exponential function. When ( - ) > 3T, forcing W_t to 0 to automatically discard the event. The innovation lies in the introduction of type-adaptive parameters, which extend the validity window of financial transaction events to 56 times that of ordinary browsing events.

[0044] like Figure 3 As shown, the acquisition module collects user behavior event streams and external environment event streams, and generates dynamic event signals with timestamps based on heterogeneous data sources; the coordination module responds to dynamic event signals, parses event types to trigger incremental update operations: performs subgraph updates on the entity relationship network of the knowledge graph to generate real-time graph update signals with time-weighted values; the verification module responds to real-time graph update signals, updates the feature vectors of user nodes through incremental graph calculation algorithms to generate portrait update signals, and the feature vectors contain dynamic preference labels; the early warning module receives dynamic event signals and portrait update signals for difference analysis, generates graph update instructions and portrait recalculation instructions to form collaborative control signals; the optimization module feeds back the graph update instructions in the collaborative control signal to the incremental update operation step, and at the same time feeds back the portrait recalculation instructions to the feature vector update step to drive the real-time collaborative closed loop.

[0045] Specifically, the driving mechanism for the real-time collaborative closed-loop is based on the resource scheduling framework of the instruction execution engine. This framework constructs an instruction priority strategy matrix, assigning the highest priority to graph update instructions and the second-highest priority to portrait recalculation instructions. When a collaborative control signal arrives in the instruction execution queue, the signal parser extracts the encapsulated graph update and portrait recalculation instructions and reads the target user identifiers carried by the instructions. The resource conflict detection module monitors the computing cluster's load in real time: if the current graph update task consumes more than 80% of the cluster's total computing resources, and if the newly arrived portrait recalculation instruction and the graph update instruction involve the same user subgraph, a resource conflict flag is triggered. The conflict resolution unit implements a three-level response strategy: the first level suspends the distribution of the portrait recalculation instruction, moves it to the suspended queue, and starts a countdown timer; the second level accelerates the release of resources for the graph update task, enabling incremental checkpointing technology to save the computational state every five milliseconds, allowing some subgraphs to exit the computation early; the third level, upon detecting the completion of the graph update, automatically extracts the associated portrait recalculation instruction from the suspended queue, injects the updated knowledge graph data snapshot, and resubmits it to the computing cluster. The suspended queue utilizes a user-sharded storage structure, with instructions for each user sub-shard sorted by timestamp. Upon reactivation, the oldest suspended instructions are prioritized. The engine also features a built-in timeout mechanism: when a profile recalculation instruction is suspended for longer than a set threshold, the associated graph update task is forcibly aborted, resources are released, and an alarm event log is generated. This closed-loop control model ensures millisecond-level response times in 95% of high-load scenarios, maintaining stable resource utilization above 88%.

[0046] In one embodiment of the present invention, the acquisition module captures user behavior event streams such as clicks, transactions, and browsing through a distributed log agent. It also accesses external environmental event streams such as commodity price indices and social media trends, and performs timestamp alignment and feature encoding on heterogeneous data sources. User behavior events extract 32-dimensional feature vectors such as operation type, target object identifier, and session duration. Environmental events analyze 19-dimensional indicators such as fluctuation amplitude, sentiment polarity, and diffusion radius. The feature fusion engine generates dynamic event signals with millisecond-level timestamps, whose data structure satisfies Signal_event =<Timestamp,UserID, FeatureVector, ExpireCountdown> Protocol. When the coordination module responds to this signal, the built-in event classifier parses the operation type and maps it to a knowledge graph subgraph partition (for example, a payment event points to the user-product purchase subgraph), triggering an incremental update operation: a temporary node is added to the target subgraph or the attributes of an existing node are modified. The edge weights are dynamically calculated according to the formula W_e = 0.6·e^(-0.1·Δt) + 0.3·R_type + 0.1·log(1+freq) (Δt is the time decay, R_type is the relationship type coefficient, and freq is the historical frequency). A real-time graph update signal with time-sensitive weights is output. After subscribing to the graph update signal, the verification module locates the affected user nodes within the changed subgraph and performs a bounded random walk (depth = 3 hops, with jump probability positively correlated with edge weight). Neighbor node aggregation uses a hierarchical weighting strategy: the weight of the first-hop neighbor is 0.6, decreasing to 0.3 for the second hop and 0.1 for the third hop. Dynamic adjustments are made based on the edge time-sensitive weights to generate a short-term interest vector.

[0047] The knowledge graph-based customer portrait analysis method and system of the present invention captures user behavior and environmental data in real time through an event-driven mechanism to generate dynamic event signals, trigger incremental updates of the knowledge graph and inject time-sensitive weights; based on the graph change signal, incremental graph calculation is used to update user feature vectors and synchronously integrate dynamic preference labels; through differential analysis of the timing and content deviations of dynamic events and portrait signals, bidirectional instructions are generated and fed back to the graph update and portrait calculation modules, forming a closed-loop collaborative control to achieve millisecond-level response and resource optimization.

[0048] Therefore, the knowledge graph-based customer portrait analysis method and system of the present invention can solve the problems of customer portrait lag and low efficiency of graph-portrait collaboration.

[0049] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the present invention. Anyone skilled in the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by one of ordinary skill in the art without departing from the spirit and technical principles disclosed herein are intended to be covered by the claims of the present invention.

Claims

1. The customer portrait analysis method based on knowledge graph is characterized by: include: S1: Collects user behavior event streams and external environment event streams, and generates dynamic event signals with timestamps based on heterogeneous data sources; S2: Responding to the dynamic event signal, parsing the event type to trigger an incremental update operation: performing a subgraph update on the entity relationship network of the knowledge graph to generate a real-time graph update signal with a time-sensitive weight; S3: In response to the real-time graph update signal, the feature vector of the user node is updated by an incremental graph calculation algorithm to generate a portrait update signal, wherein the feature vector includes a dynamic preference label; S4: Receive the dynamic event signal and the portrait update signal, perform difference analysis, and generate a map update instruction and a portrait recalculation instruction to form a coordinated control signal; S5: Feedback the map update instruction in the collaborative control signal to the incremental update operation step, and at the same time feed back the portrait recalculation instruction to the feature vector update step to drive the real-time collaborative closed loop.

2. The customer portrait analysis method based on knowledge graph according to claim 1 is characterized in that: In step S1, the generation of dynamic event signals based on heterogeneous data sources includes: extracting multi-dimensional features of click events, transaction events, and dwell time events in the user behavior event stream, and performing semantic analysis on commodity price fluctuation events, social media hot events, and competitive brand activity events in the external environment event stream; aligning the extracted user behavior features with the parsed environmental event features in time and space, and calculating the time decay coefficient based on the offset between the event occurrence time and the current system time; fusing the user behavior features, environmental event features, and time decay coefficient to generate a dynamic event signal with a timestamp, wherein the timestamp is accurate to the millisecond level and marks the event validity lifecycle.

3. The customer portrait analysis method based on knowledge graph according to claim 1 is characterized in that: The incremental update operation triggered by parsing the event type in step S2 includes: establishing a mapping rule base between event types and knowledge graph subgraph areas, and when a dynamic event signal is received, matching the target subgraph area according to the event type; performing local updates on the target subgraph area in the entity relationship network: adding temporary entity nodes related to the event and constructing relationship edges with existing entities, or modifying the attribute values ​​and relationship edge weights of existing entity nodes; calculating the timeliness weight based on the timestamp carried by the dynamic event signal, injecting the timeliness weight into the relationship edge attribute, and generating a real-time graph update signal containing the timeliness weight.

4. The customer portrait analysis method based on knowledge graph according to claim 1 is characterized in that: The updating of the feature vector by the incremental graph calculation algorithm described in step S3 includes: taking the changed subgraph indicated by the real-time graph update signal as input, and using the incremental random walk algorithm to traverse the neighbor paths of the affected user nodes in the changed subgraph; aggregating the attribute vectors of the entity nodes and the time-effectiveness weights of the relationship edges in the neighbor paths, and generating the short-term interest vector of the user node by dynamic weighted summation; performing a sliding weighted fusion of the short-term interest vector and the historical feature vector to generate an updated feature vector containing a dynamic preference label, and triggering a portrait update signal.

5. The customer portrait analysis method based on knowledge graph according to claim 1 is characterized in that: The difference analysis described in step S4 includes: extracting the event type identifier in the dynamic event signal and the feature vector change in the portrait update signal; when the event type identifier belongs to a preset high-priority event set and the feature vector change is lower than the set threshold, generating a map update instruction to force the recalculation of the map; when the feature vector change exceeds the set threshold but the event type identifier does not trigger the map update, generating a portrait recalculation instruction to immediately recalculate the user features; encapsulating the map update instruction and the portrait recalculation instruction into a collaborative control signal.

6. The customer portrait analysis method based on knowledge graph according to claim 1 is characterized in that: The local update operation also includes: when a temporary entity node is added, cross-subgraph similarity calculation is started: existing entity nodes with semantic similarity to the temporary entity node are searched across the entire knowledge graph network; if there are existing entity nodes whose similarity exceeds a preset threshold, the temporary entity node is merged into the existing entity node, and the relationship edge between the node and the user node is reconstructed; the cross-subgraph change information triggered by the merge operation is injected into the real-time graph update signal.

7. The customer portrait analysis method based on knowledge graph according to claim 1 is characterized in that: The dynamic weighted summation includes: allocating a basic weight coefficient according to the number of hops between the entity node and the user node in the neighbor path, with the one-hop neighbor weight coefficient being twice the two-hop neighbor weight coefficient; dynamically adjusting the basic weight coefficient in combination with the time-sensitive weight of the relationship edge to generate a time-aware aggregation weight; and linearly weighting the neighbor entity attribute vector using the aggregation weight to output the short-term interest vector of the user node.

8. The customer portrait analysis method based on knowledge graph according to claim 7 is characterized in that: The driving real-time collaborative closed loop described in step S5 includes: establishing an instruction execution priority strategy: the graph update instruction takes precedence over the portrait recalculation instruction; when a collaborative control signal is received, if there is a resource conflict between the graph update instruction and the portrait recalculation instruction, the portrait recalculation instruction is suspended until the graph update is completed; after the graph update is completed, the updated knowledge graph data is used to re-trigger the execution of the portrait recalculation instruction.

9. The customer portrait analysis method based on knowledge graph according to claim 1 is characterized in that: The calculation of the time decay coefficient includes: setting a reference time window for the event validity period, calculating the decay factor based on the time difference between the event occurrence time and the current time; using a negative exponential function model to map the decay factor to the time decay coefficient, the larger the time difference, the closer the time decay coefficient is to zero; when the time decay coefficient is lower than the failure threshold, discarding the event data to stop signal generation.

10. A customer portrait analysis system based on knowledge graph using any one of claims 1 to 9, characterized in that: include: A collection module that collects user behavior event streams and external environment event streams, and generates dynamic event signals with timestamps based on heterogeneous data sources; A coordination module, wherein the coordination module responds to the dynamic event signal, parses the event type, and triggers an incremental update operation: performing a subgraph update on the entity relationship network of the knowledge graph to generate a real-time graph update signal containing a time-sensitive weight; A verification module, wherein the verification module responds to the real-time graph update signal and updates a feature vector of the user node through an incremental graph calculation algorithm to generate a portrait update signal, wherein the feature vector includes a dynamic preference label; an early warning module, which receives the dynamic event signal and the portrait update signal, performs difference analysis, and generates a map update instruction and a portrait recalculation instruction to form a coordinated control signal; An optimization module feeds back the map update instruction in the collaborative control signal to the incremental update operation step, and feeds back the portrait recalculation instruction to the feature vector update step to drive a real-time collaborative closed loop.

Citation Information

Cited By

  • Precise crowd advertisement delivery determination method based on knowledge graph

    CN121280099A

  • Dynamic portrait generation method and device, computer equipment and storage medium

    CN121524229A