Graph model-based user behavior data analysis and tracking method

By constructing a user behavior graph model and dynamically tracking paths, and using unique identifiers to manage user behavior, the problem of insufficient comprehensiveness and accuracy in existing technologies is solved, achieving more efficient user behavior analysis and identification, and improving the accuracy and efficiency of analysis.

CN121597532APending Publication Date: 2026-03-03INSPUR ZHUOSHU BIG DATA IND DEV CO LTD
0 Cites 0 Cited by

Patent Information

Application Number
CN202511641276.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-11
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

Existing Neo4j-based user behavior analysis methods mostly focus on static relationship analysis, lacking dynamic tracking of user behavior paths and unique identifier management, resulting in incomplete and inaccurate analysis results.

Method used

By constructing a user behavior data graph model, user behavior paths can be dynamically tracked, and unique identifiers can be used to manage and analyze user behavior. This includes generating globally unique user IDs and event IDs, using Neo4j's Cypher statements or Python's py2neo library to construct graph models, and performing path queries and analysis.

Benefits of technology

It improves the accuracy and comprehensiveness of user behavior analysis, enabling more precise identification of user identities and behavioral events, enhancing analysis efficiency, reducing manual operation costs, and promoting data governance to optimize products and services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121597532A_ABST
    Figure CN121597532A_ABST
Patent Text Reader

Abstract

The invention discloses a user behavior data analysis and tracking method based on a graph model, and relates to the field of big data analysis application. The method comprises the steps of 1, deploying a graph database environment; 2, preprocessing the user behavior data and generating a unique identifier; 3, constructing a user behavior graph model: defining nodes: defining the user, the behavior event and the behavior object as the nodes in the graph model, defining a relationship: defining the relationship between the user and the behavior event and the relationship between the behavior event and the behavior object, and constructing the graph model: based on the collected user behavior data, establishing a user behavior graph model; a user behavior graph model is constructed by using a Cypher statement of Neo4j or a py2neo library of Python, and related nodes are connected through edge Edge to form a user behavior path; and 4, dynamically tracking a user behavior path: carrying out path query: dynamically tracking the user behavior path according to the user ID or the event ID by utilizing the graph query capability of Neo4j, and carrying out path analysis: analyzing the queried user behavior path, and mining a user behavior mode and preference information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention discloses a method for user behavior data analysis and tracking based on graph models, which relates to the field of big data analysis applications. Background Technology

[0002] With the rapid development of the Internet, user behavior data has experienced explosive growth. Extracting valuable information from massive amounts of data has become crucial for enterprises to improve user experience and optimize products and services.

[0003] Existing relational databases are inadequate for handling complex relationships and behavioral path analysis, while graph databases such as Neo4j, with their unique graph structure storage method, can more intuitively represent and query complex relationships, thus showing great potential in the field of user behavior analysis.

[0004] However, current Neo4j-based user behavior analysis methods mostly focus on static relationship analysis, lacking dynamic tracking of user behavior paths and unique identifier management, resulting in incomplete and inaccurate analysis results. Summary of the Invention

[0005] This invention provides a user behavior data analysis and tracking method based on a graph model, aiming to solve the problems of insufficient comprehensiveness and accuracy in existing user behavior analysis technologies. By constructing a user behavior data graph model, it dynamically tracks user behavior paths and uses unique identifiers to manage and analyze user behavior, thereby improving the accuracy and comprehensiveness of user behavior analysis.

[0006] The specific solution proposed in this invention is as follows:

[0007] This invention also provides a method for user behavior data analysis and tracking based on a graph model, comprising:

[0008] Step 1: Deploy the graph database environment;

[0009] Step 2: Preprocess user behavior data and generate unique identifiers:

[0010] Collect user behavior data across different platforms and at different times.

[0011] Preprocess the collected user behavior data.

[0012] Generate unique identifiers: Generate a globally unique user ID for each user as a unique identifier across all behavioral data. At the same time, generate an event ID for each behavioral event to track specific behaviors.

[0013] Step 3: Construct a user behavior graph model:

[0014] Define nodes: Define users, behavioral events, and behavioral objects as nodes in the graph model.

[0015] Define relationships: Define the relationships between users and behavioral events, and the relationships between behavioral events and behavioral objects.

[0016] Building a graph model: Based on the collected user behavior data, use Neo4j's Cypher statement or Python's py2neo library to build a user behavior graph model, and connect related nodes through edges to form user behavior paths;

[0017] Step 4: Dynamically track user behavior paths:

[0018] Perform path lookup: Utilize Neo4j's graph query capabilities to dynamically track user behavior paths based on user ID or event ID.

[0019] Perform path analysis: Analyze the user behavior paths retrieved to uncover user behavior patterns and preference information.

[0020] Furthermore, step 1 of the user behavior data analysis and tracking method based on graph models includes: installing the Neo4j graph database environment, installing Python version 3.7 or higher, and configuring the relevant dependencies, including the Flask application framework and the py2neo client library.

[0021] Furthermore, the behavioral data collected in step 2 of the graph model-based user behavior data analysis and tracking method includes click, browsing, and purchase behavior data.

[0022] Preprocessing collected user behavior data includes data cleaning to remove duplicate, invalid, or malformed data and ensure data quality.

[0023] Furthermore, the user behavior data analysis and tracking method based on graph models also includes step 5, which involves managing and applying unique identifiers:

[0024] Unique identifier storage: Store user ID and event ID as node attributes in Neo4j to ensure that each user and each behavior event has a unique identifier.

[0025] Application of unique identifiers: In user behavior analysis and personalized recommendation scenarios, unique identifiers are used for accurate user identification and behavior tracking.

[0026] Furthermore, the user behavior data analysis and tracking method based on graph models also includes step 6: developing automated tools and providing visualization.

[0027] This software utilizes Python to develop automated tools for automating data preprocessing, graph model building, path querying, and analysis. It also leverages Neo4j's visualization capabilities or third-party visualization tools to graphically display user behavior paths and analysis results, thereby improving the readability and usability of the analysis results.

[0028] This invention also provides a user behavior data analysis and tracking device based on a graph model, including a deployment module, a preprocessing module, a graph model management module, and a behavior analysis and tracking module.

[0029] Deployment module deployment graph database environment;

[0030] The preprocessing module preprocesses user behavior data and generates unique identifiers:

[0031] Collect user behavior data across different platforms and at different times.

[0032] Preprocess the collected user behavior data.

[0033] Generate unique identifiers: Generate a globally unique user ID for each user as a unique identifier across all behavioral data. At the same time, generate an event ID for each behavioral event to track specific behaviors.

[0034] The graph model management module builds a user behavior graph model:

[0035] Define nodes: Define users, behavioral events, and behavioral objects as nodes in the graph model.

[0036] Define relationships: Define the relationships between users and behavioral events, and the relationships between behavioral events and behavioral objects.

[0037] Building a graph model: Based on the collected user behavior data, use Neo4j's Cypher statement or Python's py2neo library to build a user behavior graph model, and connect related nodes through edges to form user behavior paths;

[0038] The behavior analysis and tracking module dynamically tracks user behavior paths:

[0039] Perform path lookup: Utilize Neo4j's graph query capabilities to dynamically track user behavior paths based on user ID or event ID.

[0040] Perform path analysis: Analyze the user behavior paths retrieved to uncover user behavior patterns and preference information.

[0041] Furthermore, the deployment module of the user behavior data analysis and tracking device based on a graph model installs the Neo4j graph database environment, installs Python version 3.7 or higher, and configures the relevant dependencies, including the Flask application framework and the py2neo client library.

[0042] Furthermore, the preprocessing module of the graph model-based user behavior data analysis and tracking device collects behavioral data including click, browsing, and purchase behavior data.

[0043] Preprocessing collected user behavior data includes data cleaning to remove duplicate, invalid, or malformed data and ensure data quality.

[0044] Furthermore, the user behavior data analysis and tracking device based on a graph model also includes an identifier management module, which manages and applies unique identifiers:

[0045] Unique identifier storage: Store user ID and event ID as node attributes in Neo4j to ensure that each user and each behavior event has a unique identifier.

[0046] Application of unique identifiers: In user behavior analysis and personalized recommendation scenarios, unique identifiers are used for accurate user identification and behavior tracking.

[0047] Furthermore, the user behavior data analysis and tracking device based on a graph model also includes a tool development module and a display module. The tool development module develops automated tools, and the display module provides visualization. The tool development module develops automated tools based on Python for automating the data preprocessing, graph model construction, path query, and analysis processes. Meanwhile, the display module uses Neo4j's visualization function or third-party visualization tools to display user behavior paths and analysis results in a graphical way, improving the readability and ease of use of the analysis results.

[0048] The advantages of this invention are:

[0049] 1. Improve analytical accuracy: By constructing user behavior graph models and dynamically tracking user behavior paths, we can gain a more comprehensive understanding of user behavior patterns and preferences, thereby improving the accuracy of the analysis.

[0050] 2. Enhance user identification capabilities: By using unique identifiers to manage and track user behavior, it is possible to accurately identify user identities and behavioral events from massive amounts of data.

[0051] 3. Improve analysis efficiency: Through automation tools and visualization functions, the efficiency and effectiveness of user behavior analysis can be greatly improved, and the cost of manual operation can be reduced.

[0052] 4. Facilitating Data Governance: The method of this invention helps enterprises better understand and utilize user behavior data, thereby optimizing products and services and improving user experience and satisfaction. Attached Figure Description

[0053] Figure 1 This is a schematic diagram of the method flow of the present invention. Detailed Implementation

[0054] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments described are not intended to limit the present invention.

[0055] Example 1

[0056] This invention also provides a method for user behavior data analysis and tracking based on a graph model, comprising:

[0057] Step 1: Deploy the graph database environment. This involves installing the Neo4j graph database environment, installing Python 3.7 or later, and configuring the relevant dependencies, including the Flask application framework and the py2neo client library.

[0058] Step 2: Preprocess user behavior data and generate unique identifiers:

[0059] Collect user behavior data across different platforms and at different times, including but not limited to clicks, browsing, and purchases.

[0060] Preprocess the collected user behavior data, including data cleaning: remove duplicate, invalid or malformed data to ensure data quality.

[0061] Generate unique identifiers: Generate a globally unique UserID for each user as a unique identifier across all behavioral data. At the same time, generate an EventID for each behavioral event to track specific behaviors.

[0062] Step 3: Construct a user behavior graph model:

[0063] Define nodes: Define users, behavioral events, and behavioral objects such as products and pages as nodes in the graph model.

[0064] Define relationships: Define the relationships between users and behavioral events, such as "execute" relationships, and the relationships between behavioral events and behavioral objects, such as "act on" relationships.

[0065] Building a graph model: Based on the collected user behavior data, use Neo4j's Cypher statement or Python's py2neo library to build a user behavior graph model, and connect related nodes through edges to form user behavior paths;

[0066] Step 4: Dynamically track user behavior paths:

[0067] Perform path queries: Utilize Neo4j's graph query capabilities to dynamically track user behavior paths based on user ID or event ID. For example, query all behavior paths of a user within a specific time period.

[0068] Conduct path analysis: Analyze the user behavior paths retrieved to uncover user behavior patterns, preferences, and other information. For example, analyze the conversion path from browsing to purchasing.

[0069] Step 5 involves managing and applying the unique identifier:

[0070] Unique identifier storage: Store user ID and event ID as node attributes in Neo4j to ensure that each user and each behavior event has a unique identifier.

[0071] Application of unique identifiers: In user behavior analysis and personalized recommendation scenarios, unique identifiers are used for accurate user identification and behavior tracking.

[0072] In addition, step 6 can be performed to develop automation tools and visualize their functionality:

[0073] This software utilizes Python to develop automated tools for automating data preprocessing, graph model building, path querying, and analysis. It also leverages Neo4j's visualization capabilities or third-party visualization tools to graphically display user behavior paths and analysis results, thereby improving the readability and usability of the analysis results.

[0074] Example 2

[0075] This invention also provides a user behavior data analysis and tracking device based on a graph model, including a deployment module, a preprocessing module, a graph model management module, and a behavior analysis and tracking module.

[0076] Deployment module deployment graph database environment;

[0077] The preprocessing module preprocesses user behavior data and generates unique identifiers:

[0078] Collect user behavior data across different platforms and at different times.

[0079] Preprocess the collected user behavior data.

[0080] Generate unique identifiers: Generate a globally unique user ID for each user as a unique identifier across all behavioral data. At the same time, generate an event ID for each behavioral event to track specific behaviors.

[0081] The graph model management module builds a user behavior graph model:

[0082] Define nodes: Define users, behavioral events, and behavioral objects as nodes in the graph model.

[0083] Define relationships: Define the relationships between users and behavioral events, and the relationships between behavioral events and behavioral objects.

[0084] Building a graph model: Based on the collected user behavior data, use Neo4j's Cypher statement or Python's py2neo library to build a user behavior graph model, and connect related nodes through edges to form user behavior paths;

[0085] The behavior analysis and tracking module dynamically tracks user behavior paths:

[0086] Perform path lookup: Utilize Neo4j's graph query capabilities to dynamically track user behavior paths based on user ID or event ID.

[0087] Perform path analysis: Analyze the user behavior paths retrieved to uncover user behavior patterns and preference information.

[0088] The information interaction and execution process between the modules in the above-mentioned device are based on the same concept as the method embodiment of the present invention, and the specific details can be found in the description in the method embodiment of the present invention, and will not be repeated here.

[0089] Similarly, the advantages of the device of the present invention are:

[0090] 1. Improve analytical accuracy: By constructing user behavior graph models and dynamically tracking user behavior paths, we can gain a more comprehensive understanding of user behavior patterns and preferences, thereby improving the accuracy of the analysis.

[0091] 2. Enhance user identification capabilities: By using unique identifiers to manage and track user behavior, it is possible to accurately identify user identities and behavioral events from massive amounts of data.

[0092] 3. Improve analysis efficiency: Through automation tools and visualization functions, the efficiency and effectiveness of user behavior analysis can be greatly improved, and the cost of manual operation can be reduced.

[0093] 4. Facilitating Data Governance: The method of this invention helps enterprises better understand and utilize user behavior data, thereby optimizing products and services and improving user experience and satisfaction.

[0094] It should be noted that not all steps and modules in the above processes and device structures are mandatory; some steps or modules may be omitted as needed. The execution order of each step is not fixed and can be adjusted as required. The device structures described in the above embodiments can be physical structures or logical structures. That is, some modules may be implemented by the same physical entity, or some modules may be implemented by multiple physical entities, or they may be jointly implemented by certain components in multiple independent devices.

[0095] The above-described embodiments are merely preferred embodiments provided to fully illustrate the present invention, and the scope of protection of the present invention is not limited thereto. Equivalent substitutions or modifications made by those skilled in the art based on the present invention are all within the scope of protection of the present invention. The scope of protection of the present invention is defined by the claims.

Claims

1. A method for user behavior data analysis and tracking based on a graph model, characterized by: include: Step 1: Deploy the graph database environment; Step 2: Preprocess user behavior data and generate unique identifiers: Collect user behavior data across different platforms and at different times. Preprocess the collected user behavior data. Generate unique identifiers: Generate a globally unique user ID for each user as a unique identifier across all behavioral data. At the same time, generate an event ID for each behavioral event to track specific behaviors. Step 3: Construct a user behavior graph model: Define nodes: Define users, behavioral events, and behavioral objects as nodes in the graph model. Define relationships: Define the relationships between users and behavioral events, and the relationships between behavioral events and behavioral objects. Building a graph model: Based on the collected user behavior data, use Neo4j's Cypher statement or Python's py2neo library to build a user behavior graph model, and connect related nodes through edges to form user behavior paths; Step 4: Dynamically track user behavior paths: Perform path lookup: Utilize Neo4j's graph query capabilities to dynamically track user behavior paths based on user ID or event ID. Perform path analysis: Analyze the user behavior paths retrieved to uncover user behavior patterns and preference information.

2. The user behavior data analysis and tracking method based on a graph model according to claim 1, characterized in that step 1 includes: Install the Neo4j graph database environment, and install Python version 3.7 or higher, and configure the relevant dependencies, including the Flask application framework and the py2neo client library.

3. The user behavior data analysis and tracking method based on a graph model according to claim 1, characterized in that: The behavioral data collected in step 2 includes click, browsing, and purchase behavior data. Preprocessing collected user behavior data includes data cleaning to remove duplicate, invalid, or malformed data and ensure data quality.

4. The user behavior data analysis and tracking method based on a graph model according to claim 1, characterized in that: It also includes step 5, which manages and applies the unique identifier: Unique identifier storage: Store user ID and event ID as node attributes in Neo4j to ensure that each user and each behavior event has a unique identifier. Application of unique identifiers: In user behavior analysis and personalized recommendation scenarios, unique identifiers are used for accurate user identification and behavior tracking.

5. The user behavior data analysis and tracking method based on a graph model according to claim 1, characterized in that: It also includes step 6, developing automation tools and providing visual demonstrations: This software utilizes Python to develop automated tools for automating data preprocessing, graph model building, path querying, and analysis. It also leverages Neo4j's visualization capabilities or third-party visualization tools to graphically display user behavior paths and analysis results, thereby improving the readability and usability of the analysis results.

6. A user behavior data analysis and tracking device based on a graph model, characterized in that: It includes a deployment module, a preprocessing module, a graph model management module, and a behavior analysis and tracking module. Deployment module deployment graph database environment; The preprocessing module preprocesses user behavior data and generates unique identifiers: Collect user behavior data across different platforms and at different times. Preprocess the collected user behavior data. Generate unique identifiers: Generate a globally unique user ID for each user as a unique identifier across all behavioral data. At the same time, generate an event ID for each behavioral event to track specific behaviors. The graph model management module builds a user behavior graph model: Define nodes: Define users, behavioral events, and behavioral objects as nodes in the graph model. Define relationships: Define the relationships between users and behavioral events, and the relationships between behavioral events and behavioral objects. Building a graph model: Based on the collected user behavior data, use Neo4j's Cypher statement or Python's py2neo library to build a user behavior graph model, and connect related nodes through edges to form user behavior paths; The behavior analysis and tracking module dynamically tracks user behavior paths: Perform path lookup: Utilize Neo4j's graph query capabilities to dynamically track user behavior paths based on user ID or event ID. Perform path analysis: Analyze the user behavior paths retrieved to uncover user behavior patterns and preference information.

7. The user behavior data analysis and tracking device based on a graph model according to claim 6, characterized in that: The deployment module installs the Neo4j graph database environment, and installs Python version 3.7 or higher, and configures the relevant dependencies, including the Flask application framework and the py2neo client library.

8. The user behavior data analysis and tracking device based on a graph model according to claim 6, characterized in that: The preprocessing module collects behavioral data including click, browsing, and purchase behavior data. Preprocessing collected user behavior data includes data cleaning to remove duplicate, invalid, or malformed data and ensure data quality.

9. A user behavior data analysis and tracking device based on a graph model according to claim 6, characterized in that: It also includes an identifier management module, which manages and applies unique identifiers: Unique identifier storage: Store user ID and event ID as node attributes in Neo4j to ensure that each user and each behavior event has a unique identifier. Application of unique identifiers: In user behavior analysis and personalized recommendation scenarios, unique identifiers are used for accurate user identification and behavior tracking.

10. A user behavior data analysis and tracking device based on a graph model according to claim 6, characterized in that: It also includes a tool development module and a display module. The tool development module develops automated tools, and the display module provides visualization. The tool development module is based on Python to develop automated tools for automating data preprocessing, graph model construction, path querying and analysis processes. Meanwhile, the display module uses Neo4j's visualization function or third-party visualization tools to display user behavior paths and analysis results in a graphical way, improving the readability and ease of use of the analysis results.