A Method and System for Constructing and Running Directed Cyclic Customer Journey Graphs Based on Node Encapsulation

CN122570784APending Publication Date: 2026-08-14MINSHENG BANKING CORP
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-19
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

该类组织方式适用于步骤顺序固定、分支较少的简单场景,但对于客户旅程中普遍存在的如下情况,存在明显不足:客户可能在后续阶段重新返回前序阶段;客户可能因不同状态分流到多个后续处理路径;多个分支在后续阶段可能重新汇合;同一流程可能需要在客户旅程的不同位置被重复复用;某些流程需要保持独立的运行周期、运行启停控制和执行属性

Benefits of technology

[0020] The beneficial effects of this invention are as follows: By adopting a directed cyclic graph structure to replace the traditional linear or tree-like process, this invention enables a unified expression of complex customer journey relationships such as loops, backflows, and branching/merging, overcoming the limitations of existing technologies in modeling complex journeys. By establishing node encapsulation objects and decoupling nodes from specific business processes through mapping identifiers, the graph structure layer and the process logic layer become independent of each other. The same process can be reused by multiple nodes, and there is no need to rebuild the overall graph structure when replacing or adjusting the process, significantly improving the maintainability and scalability of the system. By storing the customer journey graph definition, node information, edge relationships, and runtime data pool in a structured table format in a relational database, the redundancy and consistency problems caused by path-expanded storage are avoided, improving data maintenance efficiency and query performance. Through the mechanism of writing customer objects into the runtime data pool after node execution and having them asynchronously read by subsequent nodes according to edge relationships, unified distribution and decoupled scheduling of runtime data between nodes are achieved, supporting state splitting, multi-path concurrency, and loop migration control, ultimately effectively improving the operational efficiency and flexibility of complex customer journeys.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122570784A_ABST
    Figure CN122570784A_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for constructing and operating a directed cyclic customer journey graph based on node encapsulation. The method includes establishing a node encapsulation object for each key node, wherein the node encapsulation object is associated with a specific business process through a process mapping identifier; constructing a customer journey graph based on multiple node encapsulation objects and the directed relationships between nodes, wherein the customer journey graph allows for back edges, thus forming a directed cyclic graph. This invention replaces traditional linear or tree-like processes with a directed cyclic graph structure, thereby enabling a unified expression of complex customer journey relationships such as loops, backflows, and branching / merging, overcoming the limitations of existing technologies in modeling complex journeys; by establishing node encapsulation objects and decoupling nodes from specific business processes through mapping identifiers, the graph structure layer and the process logic layer are independent of each other, and the same process can be reused by multiple nodes, significantly improving the maintainability and scalability of the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of customer journey business process control technology, and more specifically, to a method and system for constructing and operating a directed and cyclic customer journey graph based on node encapsulation. Background Technology

[0002] Currently, financial institutions have built numerous customer service and marketing processes around scenarios such as customer characteristics, customer behavior events, and changes in product status. However, most of the processes in existing systems are independent and scattered, usually focusing on a single event, a single characteristic, or a single process stage, lacking the overall organizational capability to manage customers from the initial stage to subsequent stages.

[0003] Existing customer journey management methods typically organize processes using linear workflows, tree-like workflows, or by directly connecting multiple workflows. While these methods are suitable for simple scenarios with fixed step sequences and few branches, they are clearly insufficient for common customer journey scenarios such as: customers may return to previous stages in later stages; customers may be diverted to multiple subsequent processing paths due to different states; multiple branches may converge again in later stages; the same workflow may be reused at different points in the customer journey; and some workflows need to maintain independent runtime cycles, start / stop controls, and execution attributes. In these situations, if linear path expansion or tree-like structures are still used, it usually requires redefining workflows, writing additional external control logic, or adding a large number of intermediate jump configurations, resulting in complex workflow organization, redundant definitions, high maintenance costs, and difficulty in uniformly expressing complex customer journey structures.

[0004] In summary, the existing technology has the following drawbacks: 1. Insufficient ability to express complex journey structures: Existing linear and tree-like processes cannot directly express complex customer journeys with features such as loops, re-entries, retries, phased return visits, multi-branch concurrency, and branch merging. For journeys with back-edge relationships, traditional methods usually have to be implemented by repeatedly defining process segments or adding extra scripts to bypass them, which increases the complexity of the definition.

[0005] 2. Severe coupling between process definition and structural organization: Existing solutions typically treat specific business processes directly as the operational units in the journey structure, with no effective separation between the graph structure layer and the process logic layer. Consequently, when the execution cycle, running status, start / stop attributes, or control parameters of a process change, the journey structure definition often needs to be adjusted accordingly, reducing process reusability and system scalability.

[0006] 3. Relational databases have low storage and maintenance efficiency: If complex customer journeys are stored in a relational database using a path expansion approach, the same process node will be repeatedly defined in different paths, path relationships will be redundantly stored, consistency during graph updates will be difficult to guarantee, and it will also be detrimental to quickly querying upstream and downstream relationships of nodes, specific node states, and path migration relationships. In this invention, the node encapsulation structure and customer journey graph structure can be stored in a general relational database in the form of structured records.

[0007] 4. Inconsistent runtime interaction mechanisms between nodes: During the execution of a complex customer journey, the result of one node needs to be passed to one or more subsequent nodes. If there is a lack of a unified runtime data interaction structure, it is easy to form direct coupling calls between processes, making it difficult to support asynchronous scheduling, state diversion, multi-path distribution, and runtime tracing.

[0008] Therefore, providing a technical solution that can efficiently express complex customer journey relationships in computer systems, support process reuse, support cyclic migration, and is suitable for database storage and system scheduling has become an urgent technical problem to be solved. Summary of the Invention

[0009] To address the aforementioned technical problems in related technologies, this invention proposes a method and system for constructing and operating a directed cyclic customer journey graph based on node encapsulation. This method enables complex customer journeys to be uniformly modeled using a directed cyclic graph approach. By using a node encapsulation mechanism, the graph structure layer and the process logic layer are decoupled. Simultaneously, it can efficiently store and query customer journey graphs in relational databases and supports the orderly distribution and cyclic migration of operational data between nodes. This improves the structural expression capability, storage and maintenance efficiency, and operational scheduling capability of complex customer journeys, overcoming the aforementioned shortcomings of existing technologies.

[0010] To achieve the above-mentioned technical objectives, the technical solution of the present invention is implemented as follows: A method for constructing and running a directed cyclic customer journey graph based on node encapsulation includes the following steps: S1 defines the customer journey and the key nodes of the customer journey; S2 establishes a node encapsulation object for each key node, and the node encapsulation object is associated with a specific business process through a process mapping identifier; S3 constructs a customer journey graph based on multiple node encapsulation objects and the directed relationships between nodes, wherein the customer journey graph allows back edges, thus forming a directed cyclic graph; S4 stores the customer journey graph, the node encapsulation object, and the directed edge relationships between nodes in a relational database; When a client object enters a node, S5 triggers the execution of the corresponding specific business process based on the process mapping identifier encapsulated by that node. After the node described in S6 completes its execution, the client object is written into one or more running data pools associated with that node based on the execution result. The data pools are used as the input source for downstream nodes. The S7 successor node reads the client object from the running data pool that matches it, according to the directed edge relationship with the aforementioned node, and continues execution.

[0011] Furthermore, the node encapsulation object includes at least the following fields: NodeID for uniquely identifying the node in the customer journey graph, GraphID for identifying the customer journey graph to which the node belongs, StreamID for identifying the specific process encapsulated, NextNodeList for recording the set of successor nodes, OutDegree for recording the out-degree of the node, NodeType for distinguishing node types, RouteRule for defining the routing rules corresponding to different execution results, EnableFlag for recording the start and stop status of the node, and Version for recording the version of the node definition; wherein, when StreamID points to a specific process, it means that the Node has completed the encapsulation of that process.

[0012] Furthermore, the customer journey graph includes at least the following fields: GraphID for uniquely identifying a customer journey graph, CustTravelID for identifying the corresponding customer journey definition, HeadNode for identifying the logical entry node, GraphVersion for recording the graph definition version, and GraphStatus for recording the graph start and stop status.

[0013] Furthermore, each edge corresponding to the directed edge relationship includes at least the following fields: EdgeID (unique edge identifier), FromNodeID (predecessor node identifier), ToNodeID (successor node identifier), ConditionCode (edge ​​condition code), Priority (edge ​​priority), RouteType (for identifying edge type), and EnableFlag (edge ​​start / stop status); wherein, the edge type includes ordinary migration edge, back edge, concurrent distribution edge, or merging edge.

[0014] Furthermore, the relational database includes at least the following data tables: The customer journey graph definition table stores GraphID, CustTravelID, HeadNode, GraphVersion, and GraphStatus. The node definition table stores NodeID, GraphID, StreamID, NodeType, RouteRule, EnableFlag, and Version. The edge relationship table stores EdgeID, FromNodeID, ToNodeID, ConditionCode, Priority, RouteType, and EnableFlag. The node-process mapping table is used to store the mapping relationship between nodes and specific processes; The data pool table is used to store customer runtime data to be distributed after the node has been executed; The node execution results table is used to record the execution results and status of the client in each node.

[0015] Furthermore, the running data pool includes at least the following fields: PoolRecordID, CustomerID, SourceNodeID, TargetNodeID, Customer's current status code (StateCode), CreateTime, ProcessFlag, and RetryCount.

[0016] Furthermore, in step S5, the encapsulation of a specific business process by a node does not change the operation control attributes of the process itself; the operation control attributes include the process's independent execution time, execution cycle, start / stop, and operation control parameters.

[0017] Furthermore, in step S7, the successor node reads the running data pool records that match itself through real-time monitoring, periodic polling, or batch scheduling.

[0018] Furthermore, it also includes loop migration and termination control steps: when there is a back edge in the customer journey graph, the customer object re-enters the existing node in the graph after meeting specific state conditions to form a loop migration; when the customer object reaches the end node, has no valid successor node, reaches the maximum number of loops, or meets the exit condition, the operation of the customer object in the current customer journey graph ends.

[0019] A system for constructing and running a directed cyclic customer journey graph based on node encapsulation, for implementing the method, the system comprising: The journey definition module is used to receive customer journey definition information and define the customer journey and its key nodes. The node encapsulation module is used to create node encapsulation objects and establish the mapping relationship between nodes and specific processes; The graph building module is used to build customer journey graphs based on node relationships and supports the formation of directed cyclic graph structures. The graph storage module is used to persistently store customer journey graph definitions, node definitions, edge relationships, and process mapping relationships in a relational database. The graph verification module is used to verify the legality of the graph structure. The verification includes node uniqueness verification, entry node legality verification, edge relationship legality verification, back edge legality verification, and unreachable node check. The scheduling module is used to identify the entry node when a customer-triggered event arrives and schedule the execution of the process encapsulated in the corresponding node. The data pool management module is used to maintain the data pool records required for runtime data interaction between nodes, including client writes, reads, status updates, and processing tags; The node routing module is used to determine the target successor node of a client object based on the node execution result, status label, and edge relationship rules. The loop control module is used to support the backflow, reentry, loop count control, and termination control of client objects in a directed loop graph.

[0020] The beneficial effects of this invention are as follows: By adopting a directed cyclic graph structure to replace the traditional linear or tree-like process, this invention enables a unified expression of complex customer journey relationships such as loops, backflows, and branching / merging, overcoming the limitations of existing technologies in modeling complex journeys. By establishing node encapsulation objects and decoupling nodes from specific business processes through mapping identifiers, the graph structure layer and the process logic layer become independent of each other. The same process can be reused by multiple nodes, and there is no need to rebuild the overall graph structure when replacing or adjusting the process, significantly improving the maintainability and scalability of the system. By storing the customer journey graph definition, node information, edge relationships, and runtime data pool in a structured table format in a relational database, the redundancy and consistency problems caused by path-expanded storage are avoided, improving data maintenance efficiency and query performance. Through the mechanism of writing customer objects into the runtime data pool after node execution and having them asynchronously read by subsequent nodes according to edge relationships, unified distribution and decoupled scheduling of runtime data between nodes are achieved, supporting state splitting, multi-path concurrency, and loop migration control, ultimately effectively improving the operational efficiency and flexibility of complex customer journeys. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1This is a schematic diagram of a customer journey business scenario according to an embodiment of the present invention; Figure 2 This is a schematic diagram of a directed and cyclic customer journey diagram structure according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the inter-node runtime interaction based on a data pool, according to an embodiment of the present invention. Detailed Implementation

[0023] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention are within the scope of protection of the present invention.

[0024] like Figure 1-3 As shown in the embodiment of the present invention, a method for constructing and running a directed and cyclic customer journey graph based on node encapsulation involves first defining the customer journey and key nodes within it; creating a node encapsulation object for each key node, with each encapsulation object associated with a specific business process through a process mapping identifier; then constructing a customer journey graph based on multiple nodes and the directed relationships between them, wherein the customer journey graph allows for back edges, thus forming a directed and cyclic graph; subsequently, storing the customer journey graph, node objects, and node relationships in a relational database; during runtime, nodes execute according to their encapsulated processes, and write customer objects into the corresponding runtime data pool based on the node execution results, and subsequent nodes read customer objects from the runtime data pool to continue execution, thereby realizing the graph-based organization and operation of complex customer journeys. Specifically, the method includes the following steps: Step S1: Define the customer journey and key milestones The system receives user-defined customer journey information and identifies multiple key nodes within that journey. These key nodes represent different processing stages, business stages, status stages, event triggers, or service triggers within the customer journey. For example, in a financial product purchase and renewal scenario, the customer journey may include key nodes such as customer browsing, customer signing, product maturity, and product renewal.

[0025] Step S2: Create a node encapsulation object For each key node, a Node encapsulation object is created. This Node encapsulation object is not directly equivalent to the business process itself, but exists as a structured node entity in the graph structure. It points to a specific process through a process mapping relationship, thereby achieving a higher-level encapsulation of the specific process. In a preferred embodiment, the Node encapsulation object includes at least the following fields: NodeID: used to uniquely identify a node in the customer journey graph; GraphID: used to identify the customer journey graph to which the node belongs; StreamID: used to identify the specific process encapsulated by the node; NextNodeList: used to record the set of successor nodes of the node; OutDegree: used to record the out-degree of the node; NodeType: used to distinguish between entry nodes, ordinary nodes, convergence nodes, loop nodes, or end nodes. RouteRule: Defines routing rules for different execution results; EnableFlag: Records node start / stop status; Version: Records node definition version. StreamID corresponds to a specific process identifier. When StreamID points to a specific process, it indicates that the Node has encapsulated that process.

[0026] Corresponding Node data structure: Node:{ NodeID: N001_IDGraphID: GraphA_ID StreamID:StreamANextNodeList:[N002,N003]OutDegree: 2 NodeType: NORMALRouteRule: RuleAEnableFlag: 1Version: V1} Step S3: Build a customer journey map A customer journey graph (Graph) is constructed based on multiple node-encapsulated objects and the relationships between nodes. The Graph represents the structural relationships of the entire customer journey, rather than the specific process logic itself. In a preferred embodiment, the customer journey graph includes at least the following fields: GraphID: uniquely identifies a customer journey graph; CustTravelID: identifies the corresponding customer journey definition; HeadNode: identifies the logical entry node of the customer journey graph; GraphVersion: records the graph definition version; GraphStatus: records the graph's start / stop status.

[0027] Corresponding data structure: Graph:{ GraphID: GraphA_IDCustTravelID: CustTravelA_ID HeadNode:N001GraphVersion: V1 GraphStatus: ENABLE} Step S4: Establish directed edge relationships between nodes Configure directed edge relationships for nodes in the customer journey graph to describe the successor-successor relationships, state distribution relationships, and routing relationships between nodes. In a preferred embodiment, each edge includes at least the following fields: EdgeID: unique edge identifier; FromNodeID: predecessor node identifier; ToNodeID: successor node identifier; ConditionCode: edge condition code; Priority: edge priority; RouteType: edge type, used to identify normal migration edge, back edge, concurrent distribution edge, or merge edge; EnableFlag: edge start / stop status.

[0028] Step S5: Form a directed cyclic graph This invention allows any node's successor node to point to any existing node in the graph, including the current node's predecessor node, ancestor path node, or existing nodes in other branches, thereby allowing back edges to appear in the graph and forming a directed cyclic graph.

[0029] In the above manner, the present invention can express the following complex relationships: after a customer fails to process at a certain node, it returns to the upstream node to reprocess; after a customer completes a certain stage, it re-enters another existing stage; after running through multiple branches, the customer rejoins; and the customer passes through some nodes multiple times during the journey lifecycle.

[0030] Step S6: Relational Database Storage The customer journey graph definition information, node encapsulation information, edge relationship information, and runtime interaction information are stored in a relational database, which can be MySQL or other general-purpose relational databases. In a preferred embodiment, the system includes at least the following data tables: a customer journey graph definition table for storing GraphID, CustTravelID, HeadNode, GraphVersion, and GraphStatus; a node definition table for storing NodeID, GraphID, StreamID, NodeType, RouteRule, EnableFlag, and Version; an edge relationship table for storing EdgeID, FromNodeID, ToNodeID, ConditionCode, Priority, RouteType, and EnableFlag; a node-to-process mapping table for storing the mapping relationship between nodes and specific processes; a data pool table for storing customer runtime data to be distributed after node execution; and a node runtime result table for recording the execution results and status of customers in each node.

[0031] Using the above approach, it is not necessary to expand and store the entire customer journey path as a whole. Instead, a persistent representation of complex customer journeys is achieved through a combination of graph definitions, node definitions, and edge relationships, thereby reducing data redundancy and improving maintenance consistency.

[0032] Step S7: Node Execution When a customer object enters a node, the system retrieves the specific process encapsulated within that node based on its StreamID and triggers the execution of the corresponding process. This process can be a service process, a marketing process, a decision-making process, a reach process, or other business processes. In this invention, the encapsulation of a process by a node does not alter the process's own operational control attributes; that is, the process retains its independent execution time, execution cycle, start / stop, and operational control parameters.

[0033] Step S8: Nodes interact through a data pool. After a node completes execution, the system writes the customer object into one or more data pools based on the node execution result, status tag, or condition judgment result. The data pool serves as the input source for downstream nodes, thereby enabling runtime data interaction between nodes. In a preferred embodiment, the data pool includes at least the following fields: PoolRecordID: data pool record identifier; CustomerID: customer identifier; SourceNodeID: source node identifier; TargetNodeID: target node identifier; StateCode: current customer status code; CreateTime: write time; ProcessFlag: processing status flag; RetryCount: number of retries. The data pool can be implemented using a database table, file system, or other searchable data carrier.

[0034] Step S9: The successor node reads the data pool and continues execution. Each successor node reads the data pool record that matches it according to the edge relationship definition between itself and the preceding nodes, and uses the customer object in the data pool as the input customer for the process encapsulated by the successor node to continue execution. In a preferred embodiment, the successor node can read the data pool record that matches it through real-time monitoring, timed polling, or batch scheduling, and trigger the corresponding process execution. In this way, nodes do not need to make direct, tightly coupled functional calls, but instead achieve data distribution and scheduling through an intermediate runtime data structure.

[0035] Step S10: Loop Migration and Termination Control When a back edge exists in the customer journey graph, a customer object can re-enter an existing node in the graph after meeting certain state conditions, thus forming a cyclical migration. To prevent infinite loops, in a preferred embodiment, the system also sets loop control rules, including but not limited to: a maximum loop count limit; a maximum runtime limit; exit condition determination rules; and an automatic termination rule when there are no successor nodes. When a customer object reaches the end node, has no valid successor node, reaches the maximum loop count, or meets the exit condition, the customer object's operation in the current customer journey graph ends.

[0036] A system for constructing and running a directed and cyclic customer journey graph based on node encapsulation, comprising: 1. Journey Definition Module: Used to receive customer journey definition information and define the customer journey and its key nodes.

[0037] 2. Node encapsulation module Used to create node encapsulation objects and establish the mapping relationship between nodes and specific processes.

[0038] 3. Graph Construction Module Used to build customer journey graphs based on node relationships and supports the formation of directed cyclic graph structures.

[0039] 4. Graph storage module Used to persistently store customer journey graph definitions, node definitions, edge relationships, and process mapping relationships in a relational database.

[0040] 5. Graph Verification Module Used to verify the legality of graph structures, including node uniqueness, entry node legality, edge relationship legality, back edge legality, and unreachable node checks.

[0041] 6. Run the scheduling module Used to identify entry nodes when a customer-triggered event arrives, and to schedule the execution of the process encapsulated in the corresponding node.

[0042] 7. Data Pool Management Module The data pool records used to maintain the runtime data interaction between nodes include client writes, reads, status updates, and processing tags.

[0043] 8. Node Routing Module It is used to determine the target successor node of a client object based on the node execution result, status label, and edge relationship rules.

[0044] 9. Loop Control Module Used to support backflow, reentry, loop count control, and termination control for client objects in directed cyclic graphs.

[0045] Through the collaborative work of the above modules, this invention enables the construction, storage, scheduling, and operation of customer journey graphs. Each of these modules can be implemented by one or more processors calling program instructions from memory, and corresponds to the steps of journey definition, node encapsulation, graph construction, graph storage, node scheduling, result distribution, data pool management, node routing, and loop control in the aforementioned method implementation.

[0046] To facilitate understanding of the above technical solutions of the present invention, the following detailed description of the above technical solutions of the present invention will be provided through specific usage methods.

[0047] Example 1: Customer Journey Map for Product Purchase and Renewal The following describes the construction and operation method of this invention using a specific scenario.

[0048] In the scenario of purchasing and reinvesting financial products, a customer journey map is first defined, which includes the following key nodes: Node N1: Customer browsing; Node N2: Customer signing up; Node N3: Product maturity; Node N4: Product reinvestment.

[0049] The system creates node encapsulation objects for the above nodes and establishes the following mapping relationships: N1 is mapped to the browsing process StreamA; N2 is mapped to the contract signing process StreamB; N3 is mapped to the expired service process StreamC; and N4 is mapped to the renewal process StreamD.

[0050] The system then configures the node relationships as follows: N1 → N2; N2 → N3; N3 → N4; N4 → N3 or N2. The edge from N4 to N3 or N2 is a back edge, therefore the entire customer journey graph is a directed cyclic graph.

[0051] During runtime, when a customer browses, the system identifies the customer and enters the entry node N1, executing the browsing process StreamA. If the process result meets the signing trigger condition, the customer is written to the data pool pointing to N2. N2 reads the corresponding data pool and executes the signing process StreamB. After the signing is completed, the customer is written to the corresponding data pool pointing to N3 or other nodes according to the signing result. When the product expires, the system enters N4 to execute the renewal process. When the customer successfully renews the investment and enters the next product holding period, the customer can re-enter the existing nodes in the graph along the back edge of N4 → N3 or N4 → N2, thereby realizing the closed-loop journey operation.

[0052] Example 2: State Splitting and Data Pool Interaction In another implementation, node A encapsulates a customer determination process. This process can generate two different states: State A1: subsequent marketing conditions are met; State A2: marketing conditions are not met, but a service recovery process is required.

[0053] After execution at node A, the system distributes traffic based on customer status: customers in status A1 are written to data pool P1; customers in status A2 are written to data pool P2. Subsequent node B is associated with data pool P1, and subsequent node C is associated with data pool P2. Therefore: node B reads customer objects from data pool P1 and executes the marketing process encapsulated by node B; node C reads customer objects from data pool P2 and executes the service recovery process encapsulated by node C.

[0054] In this way, the present invention achieves a unified connection between the execution result of a node and the input of the subsequent node, avoiding the coupling problem caused by direct calls between nodes.

[0055] Example 3: Preservation of Original Process Execution Control Attributes by Node Encapsulation In this invention, nodes are used to encapsulate specific processes at a higher level, but do not change the process's own operational control attributes. For example, node N10 encapsulates process StreamX, and node N11 can also encapsulate another instance or version of process StreamX. Although N10 and N11 are located in different positions in the graph, process StreamX still maintains its own independent running cycle, execution time, start / stop control, and running parameter configuration, and is not forcibly modified due to changes in the journey graph structure.

[0056] Therefore, the present invention can achieve: decoupling of graph structure definition and process execution logic; reuse of the same process by multiple nodes; no need to rebuild the graph structure as a whole when replacing the node mapping process; and independent maintenance of the process layer and graph structure layer.

[0057] In summary, by employing the above-mentioned technical solutions of this invention, a directed cyclic graph structure is used to replace the traditional linear or tree-like processes, thereby enabling a unified expression of complex customer journey relationships such as loops, backflows, and branching / merging, overcoming the limitations of existing technologies in modeling complex journeys. By establishing node encapsulation objects and decoupling nodes from specific business processes through mapping identifiers, the graph structure layer and the process logic layer become independent of each other. The same process can be reused by multiple nodes, and there is no need to rebuild the overall graph structure when replacing or adjusting the process, significantly improving the maintainability and scalability of the system. By storing the customer journey graph definition, node information, edge relationships, and runtime data pool in a structured table format in a relational database, redundancy and consistency issues caused by path-expanded storage are avoided, improving data maintenance efficiency and query performance. Through the mechanism of writing customer objects into the runtime data pool after node execution and having them asynchronously read by subsequent nodes according to edge relationships, unified distribution and decoupled scheduling of runtime data between nodes are achieved, supporting state splitting, multi-path concurrency, and loop migration control, ultimately effectively improving the operational efficiency and flexibility of complex customer journeys.

[0058] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for constructing and running a directed cyclic customer journey graph based on node encapsulation, characterized in that, Includes the following steps: S1 defines the customer journey and the key nodes of the customer journey; S2 establishes a node encapsulation object for each key node, and the node encapsulation object is associated with a specific business process through a process mapping identifier; S3 constructs a customer journey graph based on multiple node encapsulation objects and the directed relationships between nodes, wherein the customer journey graph allows back edges, thus forming a directed cyclic graph; S4 stores the customer journey graph, the node encapsulation object, and the directed edge relationships between nodes in a relational database; When a client object enters a node, S5 triggers the execution of the corresponding specific business process based on the process mapping identifier encapsulated by that node. After the node described in S6 completes its execution, the client object is written into one or more running data pools associated with that node based on the execution result. The data pools are used as the input source for downstream nodes. The S7 successor node reads the client object from the running data pool that matches it, according to the directed edge relationship with the aforementioned node, and continues execution.

2. The method for constructing and running a directed cyclic customer journey graph based on node encapsulation according to claim 1, characterized in that, The node encapsulation object includes at least the following fields: NodeID for uniquely identifying the node in the customer journey graph, GraphID for identifying the customer journey graph to which the node belongs, StreamID for identifying the specific process encapsulated, NextNodeList for recording the set of successor nodes, OutDegree for recording the node's out-degree, NodeType for distinguishing node types, RouteRule for defining routing rules corresponding to different execution results, EnableFlag for recording the node's start / stop status, and Version for recording the node's defined version; wherein, when StreamID points to a specific process, it means that the Node has completed the encapsulation of that process.

3. The method for constructing and running a directed cyclic customer journey graph based on node encapsulation according to claim 1, characterized in that, The customer journey graph includes at least the following fields: GraphID for uniquely identifying a customer journey graph, CustTravelID for identifying the corresponding customer journey definition, HeadNode for identifying the logical entry node, GraphVersion for recording the graph definition version, and GraphStatus for recording the graph start and stop status.

4. The method for constructing and running a directed cyclic customer journey graph based on node encapsulation according to claim 1, characterized in that, Each edge corresponding to the directed edge relationship includes at least the following fields: EdgeID (unique edge identifier), FromNodeID (predecessor node identifier), ToNodeID (successor node identifier), ConditionCode (edge ​​condition code), Priority (edge ​​priority), RouteType (for identifying edge type), and EnableFlag (edge ​​start / stop status); wherein, the edge type includes ordinary migration edge, back edge, concurrent distribution edge, or merging edge.

5. The method for constructing and running a directed cyclic customer journey graph based on node encapsulation according to claim 1, characterized in that, The relational database shall include at least the following data tables: The customer journey graph definition table stores GraphID, CustTravelID, HeadNode, GraphVersion, and GraphStatus. The node definition table stores NodeID, GraphID, StreamID, NodeType, RouteRule, EnableFlag, and Version. The edge relationship table stores EdgeID, FromNodeID, ToNodeID, ConditionCode, Priority, RouteType, and EnableFlag. The node-process mapping table is used to store the mapping relationship between nodes and specific processes; The data pool table is used to store customer runtime data to be distributed after the node has been executed; The node execution results table is used to record the execution results and status of the client in each node.

6. The method for constructing and running a directed cyclic customer journey graph based on node encapsulation according to claim 1, characterized in that, The running data pool includes at least the following fields: PoolRecordID, CustomerID, SourceNodeID, TargetNodeID, Customer's current status code (StateCode), CreateTime, ProcessFlag, and RetryCount.

7. The method for constructing and running a directed cyclic customer journey graph based on node encapsulation according to claim 1, characterized in that, In step S5, the encapsulation of a specific business process by a node does not change the operation control attributes of the process itself; the operation control attributes include the process's independent execution time, execution cycle, start and stop times, and operation control parameters.

8. The method for constructing and running a directed cyclic customer journey graph based on node encapsulation according to claim 1, characterized in that, In step S7, the successor node reads the running data pool records that match itself through real-time monitoring, timed polling, or batch scheduling.

9. The method for constructing and running a directed cyclic customer journey graph based on node encapsulation according to claim 1, characterized in that, It also includes loop migration and termination control steps: when there is a back edge in the customer journey graph, the customer object re-enters the existing node in the graph after meeting certain state conditions, forming a loop migration; When a customer object reaches the end node, has no valid successor node, reaches the maximum number of loops, or meets the exit condition, the operation of that customer object in the current customer journey graph ends.

10. A system for constructing and operating a directed cyclic customer journey graph based on node encapsulation, characterized in that, The system for implementing the method of any one of claims 1 to 9 comprises: The journey definition module is used to receive customer journey definition information and define the customer journey and its key nodes. The node encapsulation module is used to create node encapsulation objects and establish the mapping relationship between nodes and specific processes; The graph building module is used to build customer journey graphs based on node relationships and supports the formation of directed cyclic graph structures. The graph storage module is used to persistently store customer journey graph definitions, node definitions, edge relationships, and process mapping relationships in a relational database. The graph verification module is used to verify the legality of the graph structure. The verification includes node uniqueness verification, entry node legality verification, edge relationship legality verification, back edge legality verification, and unreachable node check. The scheduling module is used to identify the entry node when a customer-triggered event arrives and schedule the execution of the process encapsulated in the corresponding node. The data pool management module is used to maintain the data pool records required for runtime data interaction between nodes, including client writes, reads, status updates, and processing tags; The node routing module is used to determine the target successor node of a client object based on the node execution result, status label, and edge relationship rules. The loop control module is used to support the backflow, reentry, loop count control, and termination control of client objects in a directed loop graph.