User data processing method and device, equipment, medium and product
By constructing a heterogeneous network and building an independent semantic space for each relation type, and optimizing the vector distance based on the triplet loss function, the problem of low accuracy of node representation in heterogeneous networks is solved, thereby improving the accuracy and coverage of the credit card recommendation system.
Patent Information
- Application Number
- CN202511749672.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-26
- Publication Date
- 2026-03-03
AI Technical Summary
Existing recommendation schemes struggle to effectively uncover deep semantic relationships and topological features between nodes in heterogeneous networks, resulting in insufficient accuracy and coverage in credit card recommendation systems. Traditional methods also face problems such as high-dimensional sparsity and semantic incompatibility during feature extraction and semantic fusion.
A heterogeneous network is constructed, which is partitioned and mapped to the semantic space of the corresponding relation type through triples. The vector distance between the head node and the tail node in the semantic space is optimized based on the triple loss function, thereby improving the discriminability and semantic consistency of the node vectorized representation.
It improves the accuracy of user data processing and the precision of credit card recommendations, ensuring semantic consistency and coverage of recommendation results.
Smart Images

Figure CN121599757A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence, and in particular to a method, apparatus, device, medium and product for processing user data. Background Technology
[0002] With the rapid development of internet finance, the types and number of credit card products have exploded, leaving users facing information overload when choosing a product that suits their needs. Banks and financial institutions urgently need intelligent recommendation solutions that accurately match users with credit card products based on multi-dimensional data such as historical behavior, credit records, and spending habits, thereby improving user experience and product conversion rates.
[0003] In this scenario, a heterogeneous network comprising user nodes, credit card product nodes, transaction behavior nodes, and credit scoring nodes becomes the core data structure for characterizing the relationship between users and products. Existing recommendation solutions largely rely on traditional collaborative filtering or rule engines, which struggle to effectively uncover deep semantic relationships and topological features between nodes in the heterogeneous network, resulting in low accuracy in user data processing. Summary of the Invention
[0004] This application provides a method, apparatus, device, medium, and product for processing user data, in order to improve the accuracy of user data processing.
[0005] Firstly, this application provides a method for processing user data, including:
[0006] User data for target and candidate users is acquired, and a heterogeneous network is constructed based on this data. User data includes attribute and behavioral data, and the heterogeneous network includes user nodes and credit card product nodes. Multi-type edge relationships between nodes in the heterogeneous network are partitioned into triples, with each triple including a head node, a relationship type, and a tail node. The head and tail nodes in the triples are mapped to the semantic space of the corresponding relationship type. The vector distance between the head and tail nodes in the semantic space is optimized based on the triple loss function to update the vectorized representation of each node in the heterogeneous network. Based on the updated node vectorized representation, the similarity between target user nodes and candidate user nodes is calculated, and the data processing result is determined based on the similarity.
[0007] Secondly, this application provides a user data processing apparatus, comprising:
[0008] The acquisition module is used to acquire user data of target users and candidate users, and construct a heterogeneous network based on the user data. The user data includes attribute data and behavioral data, and the heterogeneous network includes user nodes and credit card product nodes. The processing module is used to partition the multi-type edge relationships between nodes in the heterogeneous network into triples. Each triple includes a head node, a relationship type, and a tail node. The head node and tail node in the triple are mapped to the semantic space of the corresponding relationship type. The vector distance between the head node and the tail node in the semantic space is optimized based on the triple loss function to update the vectorized representation of each node in the heterogeneous network. The determination module is used to calculate the similarity between target user nodes and candidate user nodes based on the updated node vectorized representation, and determine the data processing result based on the similarity.
[0009] Thirdly, this application provides an electronic device, including: a processor and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the above method.
[0010] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the above-described method.
[0011] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the method described above.
[0012] The user data processing method, apparatus, device, medium, and product provided in this application include: acquiring user data of target users and candidate users, and constructing a heterogeneous network based on the user data; partitioning the multi-type edge relationships between nodes in the heterogeneous network into triples; mapping the head node and tail node in the triples to the semantic space of the corresponding relationship type, and optimizing the vector distance between the head node and tail node in the semantic space based on the triple loss function; and calculating the similarity between target user nodes and candidate user nodes based on the updated node vectorized representation to determine the data processing result. The solution in this application, by constructing a heterogeneous network and building an independent semantic space for each relationship type, optimizes the vector distance based on the triple loss function, thereby improving the discriminative power and semantic consistency of the node vectorized representation and thus enhancing the accuracy of data processing. Attached Figure Description
[0013] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0014] Figure 1A flowchart illustrating the user data processing method provided in this application embodiment;
[0015] Figure 2 A flowchart illustrating the user data processing method provided in this application embodiment;
[0016] Figure 3 A flowchart illustrating the user data processing method provided in this application embodiment;
[0017] Figure 4 A flowchart illustrating the user data processing method provided in this application embodiment;
[0018] Figure 5 A flowchart illustrating the user data processing method provided in this application embodiment;
[0019] Figure 6 A flowchart illustrating the user data processing method provided in this application embodiment;
[0020] Figure 7 This is a schematic diagram of the structure of a user data processing device provided in an embodiment of this application;
[0021] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0022] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0023] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0024] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of the relevant data all comply with the relevant laws, regulations, and standards of the relevant countries and regions, have taken necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation access points for users to choose to authorize or refuse.
[0025] Furthermore, the technical solution involved in this application, which involves big data analysis of user information (including but not limited to personal biometrics, identity data, consumption data, asset data, electronic terminal operation data, etc.) and the use of artificial intelligence technology for automated decision-making, and makes decisions that have a significant impact on personal rights based on the results of automated decision-making, provides users with corresponding operation entry points for users to choose to agree to or reject the results of automated decision-making; if the user chooses to reject, the process will proceed to the expert decision-making process.
[0026] It should be noted that the user data processing methods, apparatus, equipment, media and products provided in this application can be used in the field of artificial intelligence, or in any field other than artificial intelligence. This application does not limit the application fields of the user data processing methods, apparatus, equipment, media and products.
[0027] The specific application scenario of this application is in the field of personalized customer services in the financial industry, especially the intelligent recommendation system of banks based on user behavior data and network structure characteristics.
[0028] With the rapid development of internet finance, the types and number of credit card products have exploded, leaving users facing information overload when choosing a product that suits their needs. Banks and financial institutions urgently need intelligent recommendation solutions that accurately match users with credit card products based on multi-dimensional data such as historical behavior, credit records, and spending habits, thereby improving user experience and product conversion rates. In this scenario, heterogeneous networks (including user nodes, credit card product nodes, transaction behavior nodes, credit scoring nodes, etc.) become the core data structure for characterizing user-product relationships.
[0029] Existing recommendation solutions largely rely on traditional collaborative filtering or rule engines, making it difficult to effectively mine deep semantic relationships and topological features between nodes in heterogeneous networks. For example, user nodes may be connected to other nodes in the network through various types of edges, such as "holding-credit card products," "transaction-merchant category," and "credit-score rating." However, existing methods struggle to uniformly handle these heterogeneous relationships, resulting in insufficient accuracy and coverage of recommendation results. Furthermore, the diversity of node and edge types in heterogeneous networks exposes traditional methods to problems such as high-dimensional sparsity and semantic incompatibility during feature extraction and semantic fusion. Therefore, a deep learning method capable of fusing multi-source features and resolving semantic conflicts is urgently needed to improve the performance of credit card recommendation systems.
[0030] Existing technologies mainly address the problem of heterogeneous network representation learning through three main approaches. One approach is the walk-based heterogeneous network representation learning method: This method performs structured walks in the heterogeneous network using predefined meta-paths (such as "user-transaction-merchant-product") to generate context sequences of nodes, and then uses models such as the Skip-Gram Model of Word Embeddings (Skip-Gram) to learn node embeddings. Its advantage lies in preserving the network's topology, but it suffers from the following problems: it relies on manually defined meta-paths, making it difficult to cover the complex semantic relationships in heterogeneous networks; it fails to distinguish the semantic differences between different edge types, leading to semantic conflicts in node representations (e.g., the association between user nodes and "credit score" nodes and "merchant category" nodes is forcibly mapped to the same vector space); and the sampling strategy favors high-frequency edge types, resulting in the loss of semantic information for low-frequency edge type nodes.
[0031] Another approach is a decomposition-based heterogeneous network representation learning method. This method splits the heterogeneous network into multiple subnetworks (such as user-product subnetworks and user-merchant subnetworks), learns the embedding representations of each subnetwork, and then generates the final node representation through aggregation strategies (such as concatenation and weighted summation). Its limitations are: subnetwork partitioning may destroy the global structural information of the original network; and the aggregation strategy lacks the ability to dynamically adjust the semantic weights of different subnetworks, leading to the dilution of key semantic information.
[0032] Another approach is a deep learning-based method for learning heterogeneous network representations. This method directly models the various types of nodes and edge relationships in heterogeneous networks through graph neural networks or self-attention mechanisms. Although it can learn node representations end-to-end, it has the following drawbacks: high computational complexity, making it difficult to handle large-scale heterogeneous networks; and the lack of a dedicated mapping mechanism for the semantic differences of heterogeneous edges, resulting in a mixture of semantic information from different edge types in the node representation.
[0033] The aforementioned problems result in lower accuracy of node representations in heterogeneous networks, which in turn leads to lower accuracy of data processing results.
[0034] The technical content provided in this application aims to solve the above-mentioned technical problems of the prior art. The user data processing method, apparatus, device, medium, and product provided in the embodiments of this application include: acquiring user data of target users and candidate users, and constructing a heterogeneous network based on the user data; partitioning the multi-type edge relationships between nodes in the heterogeneous network into triples; mapping the head node and tail node in the triples to the semantic space of the corresponding relationship type, and optimizing the vector distance between the head node and tail node in the semantic space based on the triple loss function; calculating the similarity between target user nodes and candidate user nodes based on the updated node vectorized representation to determine the data processing result. The solution of this application, by constructing a heterogeneous network and building an independent semantic space for each relationship type, and then optimizing the vector distance based on the triple loss function, improves the distinguishability and semantic consistency of the node vectorized representation, thereby improving the accuracy of data processing.
[0035] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0036] Figure 1 This is a flowchart illustrating the user data processing method provided in the embodiments of this application, as shown below. Figure 1 As shown, the method includes the following steps:
[0037] S101. Obtain user data of target users and candidate users, and construct a heterogeneous network based on the user data; wherein, user data includes attribute data and behavioral data, and the heterogeneous network includes user nodes and credit card product nodes;
[0038] S102. Perform triplet partitioning on the multi-type edge relationships between nodes in the heterogeneous network. Each triplet includes a head node, a relationship type, and a tail node. Map the head node and tail node in the triplet to the semantic space of the corresponding relationship type. Optimize the vector distance between the head node and the tail node in the semantic space based on the triplet loss function to update the vectorized representation of each node in the heterogeneous network.
[0039] S103. Based on the updated node vectorization representation, calculate the similarity between the target user node and the candidate user node, and determine the data processing result based on the similarity.
[0040] In practical applications, the execution subject of this method can be a user data processing device, which can be implemented in various ways. For example, it can be implemented through a computer program, such as application software; or it can be implemented as a medium storing the relevant computer program, such as a cloud drive; or it can be implemented through a physical device that integrates or installs the relevant computer program, such as a chip.
[0041] In some embodiments, the specific definitions of target users and candidate users depend on the specific application scenario. Specifically, target users typically refer to a group of users known to possess specific attributes, such as a user group already flagged as showing high interest or high value in a particular type of product—essentially a standard or reference group. Candidate users, on the other hand, refer to a large group of users that need to be evaluated or screened; they are potential target users. The goal is to identify individuals from these candidate users who are most similar to the target users, thereby accomplishing tasks such as precision marketing or potential customer discovery.
[0042] For example, the attribute data in user data mainly includes the user's static characteristics, such as age, income level, occupation type, education background, credit score, place of residence and marital status. This information provides a basic profile of the user, which helps in classification and hierarchical analysis.
[0043] For example, behavioral data involves a user's dynamic activities, such as the frequency of credit card transactions, the distribution of spending amounts, the timeliness of repayments, the history of credit report inquiries, records of using other financial products, and logs of online behaviors such as clicking or applying for new products.
[0044] Optionally, in addition to attribute and behavioral data, user data may also include information from other dimensions, such as social network information like the credit status of associated users, real-time geolocation data, economic indicators, or third-party data sources like employment market trends. This additional data can enrich the representation of heterogeneous networks and improve the comprehensiveness and accuracy of the model.
[0045] In some embodiments, when constructing a heterogeneous network based on user data, entities, such as users and credit card products, are first extracted from the raw data as nodes. Then, edges are defined according to interaction relationships, such as a user applying for a product, a user owning a product, or a user being associated with a transaction event. The construction process involves data cleaning, entity parsing, and relationship mapping to ensure that each node represents an independent entity, and edges capture multiple types of connections, such as "application" relationships or "consumption" relationships, thereby forming a graph structure containing various nodes and edges to support subsequent vectorized representation learning.
[0046] In some optional embodiments, the heterogeneous network can include not only user nodes and credit card product nodes, but also other node types to enhance the network's expressive power. For example, transaction behavior nodes represent specific consumption events, credit scoring nodes represent changes in a user's credit rating, or merchant nodes are associated with consumption locations. These additional nodes can more precisely depict the complex interactions between users and products. For instance, connecting users and products through transaction behavior nodes can indirectly reflect consumption preferences, thereby improving the accuracy of similarity calculations and making the heterogeneous network more representative and practical.
[0047] In some embodiments, the multi-type edge relationships between nodes are typically determined based on business logic and actual interactions in the data. For example, relationship types are extracted from user behavior logs, such as "user applies for a credit card product," "user repays a bank," or "user queries a credit report." The definition of these relationship types needs to incorporate domain knowledge to ensure that each edge has clear semantics, such as classifying edges as application relationships, ownership relationships, or influence relationships. Their existence and frequency are verified through data to avoid noise, thereby enabling the heterogeneous network to truly reflect the multi-dimensional connections between users and products.
[0048] Furthermore, when partitioning multi-type edge relationships into triples, each triple consists of a head node, a relationship type, and a tail node. For example, a specific triple could have a user node as the head node, an application as the relationship type, and a credit card product node as the tail node, forming an instance like (User A, Application, Credit Card Product X). The partitioning process requires traversing all edges in the heterogeneous network, transforming each edge into a triple form, and ensuring the consistency of relationship types, such as including both positive and negative relationships to cover bidirectional interactions, thereby providing structured input for semantic space mapping.
[0049] In some embodiments, when mapping the head and tail nodes in a triple to the semantic space of the corresponding relation type, an embedding method such as the TransE model is typically used. Each node and relation type is represented as a low-dimensional vector, and an optimization process is employed to make the head node vector plus the relation vector approximately equal to the tail node vector. Based on a triple loss function, such as maximizing the similarity of positive samples and minimizing the similarity of negative samples, the vector distance is optimized, thereby updating the vectorized representation of each node in the heterogeneous network, ensuring that neighboring nodes in the semantic space reflect real-world similarities.
[0050] For example, triplet loss functions may include margin-based loss functions, such as the marginal ranking loss used in TransE, which requires that the distance between positive triplets be less than the distance between negative triplets by at least one marginal value; or other variants such as loss functions of TransH or TransR, which improve the robustness and representational power of the model by projecting to adapt to the semantic space of different relation types, thereby effectively optimizing the distribution of node vectors.
[0051] In some embodiments, when calculating the similarity between target user nodes and candidate user nodes based on the updated node vectorization representation, common methods include cosine similarity or Euclidean distance. These measures quantify the degree of proximity in the vector space. Specifically, the vectors of the target user and candidate users are first extracted, and then their similarity scores are calculated using mathematical formulas. High scores indicate that the candidate user is highly similar to the target user in attributes or behaviors, thus providing a basis for subsequent processing.
[0052] It is understandable that determining data processing results based on similarity means using the calculated similarity score for business decisions. For example, candidate users with high similarity scores can be marked as potential target users, and personalized credit card products can be recommended or they can be included in targeted marketing campaigns. This processing result helps optimize resource allocation, such as prioritizing reaching high-potential users, or it can be used for risk control, such as identifying abnormal cases with significant deviations from target user behavior, thereby improving overall business efficiency.
[0053] In this example, a knowledge graph embedding method is used to mitigate semantic conflicts in heterogeneous networks. Specifically, the knowledge graph embedding model defines an independent mapping matrix for each type of edge relationship (such as "transaction" and "credit"), mapping nodes from a unified node space to the semantic space of the specific relationship. For example, in the "user-transaction-merchant" edge, the vectors of the user node and the merchant node are brought closer in the "transaction" semantic space, while in the "user-credit-rating" edge, the vectors of the user node and the rating node are brought closer in the "credit" semantic space. Through optimization of the triplet loss function, the model enforces that the vector distance of correct triplets (such as user A-transaction-merchant B) is less than that of incorrect triplets (such as user A-transaction-rating C), thereby eliminating semantic interference between different types of edges in the unified vector space.
[0054] The introduction of this technique improves the semantic accuracy of node representations. In the credit card recommendation scenario, the semantic relationship between user nodes and the "transaction-merchant" edge is modeled independently, while the semantic relationship between the "credit-score" edge is also preserved independently, avoiding recommendation bias caused by semantic mixing in traditional methods. For example, when user A has a low credit score, the association between them and high-limit credit card products is suppressed in the "credit" semantic space, thus avoiding incorrect recommendations. At the same time, user A's transaction preferences are accurately captured in the "transaction" semantic space, ensuring the semantic consistency of the recommendation results.
[0055] The user data processing method provided in this application includes: acquiring user data of target users and candidate users, and constructing a heterogeneous network based on the user data; partitioning the multi-type edge relationships between nodes in the heterogeneous network into triples; mapping the head node and tail node in the triples to the semantic space of the corresponding relationship type, and optimizing the vector distance between the head node and tail node in the semantic space based on the triple loss function; and calculating the similarity between target user nodes and candidate user nodes based on the updated node vectorized representation to determine the data processing result. The solution in this application, by constructing a heterogeneous network and building an independent semantic space for each relationship type, optimizes the vector distance based on the triple loss function, thereby improving the discriminative power and semantic consistency of the node vectorized representation and thus enhancing the accuracy of data processing.
[0056] Figure 2 This is a flowchart illustrating the user data processing method provided in the embodiments of this application, as shown below. Figure 2 As shown, S102 optimizes the vector distance between the head node and the tail node in the semantic space based on the triplet loss function, specifically including:
[0057] S201. Obtain the set of correct triples and the set of incorrect triples. The set of correct triples contains actual node relationships, and the set of incorrect triples contains non-existent node relationships.
[0058] S202. Calculate the vector distance between the head node and the tail node in a correct triplet, and the vector distance between the head node and the tail node in an incorrect triplet.
[0059] S203. Adjust the mapping matrix parameters through optimization algorithms to make the vector distance of correct triples less than the vector distance of incorrect triples.
[0060] In some embodiments, in the user and credit card product scenario, the correct set of triples refers to the combination of real-existing node relationships extracted from a heterogeneous network. These triples are constructed based on actual user data, such as interactions between users and products confirmed from historical records. For example, a specific example could be a triple (user A, application, credit card product X) with the user node as the head node, the application as the relationship type, and the credit card product node as the tail node. This indicates that user A did indeed initiate an application for product X. Data sources include transaction logs or application forms.
[0061] Correspondingly, the set of erroneous triples contains unreal or negatively sampled relationships, used for contrastive learning during training. For example, it can be generated by randomly replacing the head or tail node, such as (User B, owns, credit card product Y), but in the actual data, User B does not own the product. Thus, it serves as a negative sample during the optimization process to help the model distinguish between valid and invalid connections.
[0062] In some embodiments, when calculating vector distance, it is typically based on the low-dimensional vector representation of nodes in the semantic space. For example, each node is mapped to a fixed-length vector through embedding methods, and then a distance metric such as Euclidean distance or cosine distance is used to quantify the proximity between the head and tail nodes. Specifically, during the optimization process, for each triple, the vectors of the head and tail nodes are first obtained, and then a selected distance formula is applied. For example, in the TransE model, the distance is often defined as the difference norm between the head node vector plus the relation vector and the tail node vector, which is then used in the loss function to compare the relative distance between positive and negative samples.
[0063] It should be noted that the mapping matrix parameters refer to the transformation matrices used in the semantic space mapping process. These parameters project the original features of the nodes onto a relation-specific low-dimensional space. For example, each relation type may correspond to an independent mapping matrix, which is used to adjust the vector representation to adapt to different relation semantics.
[0064] In some embodiments, optimization algorithms such as stochastic gradient descent or adaptive moment estimation are used to adjust these matrix parameters by iteratively calculating the gradient of the loss function and updating the matrix values to minimize the vector distance of correct triples while maximizing the distance of incorrect triples. Specifically, the algorithm calculates gradients based on batch data and employs learning rate scheduling to stabilize the training process, thereby progressively optimizing the mapping matrix so that the semantic space better captures the true relationships between nodes.
[0065] The scheme in this example improves the discriminative power of node vector representation by introducing a triplet loss function to optimize semantic space mapping, making vector distance more reflective of real-world relationships and thus improving the accuracy of similarity calculation.
[0066] Figure 3This is a flowchart illustrating the user data processing method provided in the embodiments of this application, as shown below. Figure 3 As shown, before performing triplet partitioning on the multi-type edge relationships between nodes in the heterogeneous network in S102, the following steps are also included:
[0067] S301. Determine the number of different types of edges in the heterogeneous network, and prioritize the edge types according to the number of edges.
[0068] S302. Based on the priority sorting results, adjust the traversal strategy to prioritize sampling nodes corresponding to low-frequency edge types; wherein, the traversal strategy is used for sampling of triplet partitioning.
[0069] In some embodiments, determining the number of different types of edges in a heterogeneous network requires traversing the entire network structure and performing a statistical distribution analysis of edge types. Specifically, it is necessary to first parse all established connections in the network graph, such as predefined relationship types like "user applies for product", "user owns product", and "user conducts transaction", and then count the total frequency of each relationship type.
[0070] In practical applications, when prioritizing edges based on their number, a strategy of assigning higher priority to low-frequency edge types is usually adopted. This is because in real-world data, some interactions, such as "users querying credit reports," may be far less frequent than "users' daily consumption." To avoid model training relying too heavily on high-frequency edges and resulting in insufficient modeling of sparse relationships, it is necessary to sort the edges according to the inverse ratio of their counts or similar rules, marking the relationship types that occur less frequently as high priority to ensure the balance of subsequent sampling processes.
[0071] Understandably, adjusting the walk strategy based on priority ranking results means dynamically changing the probability weight of selecting the next edge when performing random walks through the network to generate node sequences. Specifically, during the sampling walk for triple partitioning, when multiple edges of different types are available from a given node, the probability of selecting edges pointing to low-frequency edge types is significantly increased. For example, for a user node, if the edge "conduct a high-risk transaction" is a low-frequency, high-priority type, the walk strategy will have a higher probability of proceeding along this edge to the corresponding high-risk transaction event node, rather than heading towards the high-frequency edge "conduct daily consumption." This adjustment ensures that low-frequency edges and their associated nodes are more fully covered in the generated walk path.
[0072] In some embodiments, the walking strategy for sampling triple partitioning refers to generating a large number of node sequences by performing a series of biased random walks on the graph structure. These sequences essentially capture the connection patterns between nodes in the network. Subsequently, these sequences are split into consecutive or skipping node pairs or triples. For example, a walking path "User A -> Application -> Product X -> Occurred -> Time T" can be parsed into multiple triples, such as (User A, Application, Product X) and (Product X, Occurred, Time T), thereby providing a rich and diverse training sample base for subsequent vectorized representation learning.
[0073] The scheme in this example improves the uniformity of network structure coverage during the sampling process by dynamically adjusting the walking strategy based on edge frequency priority ranking. This makes the subsequently generated triple training set better represent various relationships and enhances the ability of node vectorization to capture low-frequency semantic information, thereby improving the discriminativeness and accuracy of similarity calculation.
[0074] Figure 4 This is a flowchart illustrating the user data processing method provided in the embodiments of this application, as shown below. Figure 4 As shown, the adjustment of the roaming strategy in S302 specifically includes:
[0075] S401. Obtain real-time behavioral data of target users and candidate users. Real-time behavioral data includes recent transaction records and browsing history.
[0076] S402. Dynamically adjust the edge type sampling weights based on real-time behavior data to generate a hybrid walk sequence.
[0077] In practical applications, real-time behavioral data of target users and candidate users can be obtained by integrating real-time data stream processing platforms. These platforms continuously monitor and capture event streams from user-end application interfaces, transaction gateways, or website interaction logs to determine real-time behavioral data.
[0078] In some embodiments, the key difference between real-time behavioral data and the behavioral data mentioned in step S101 lies in timeliness and scope. The behavioral data in S101 is usually batch-processed historical data used to build the initial static heterogeneous network, while the real-time behavioral data here specifically refers to the latest user activity records generated at or near the time of model operation, such as transaction records and product detail page browsing history that occurred in the past few hours or minutes. These data reflect the latest changes in user intent and interests, and their processing flow emphasizes low latency to ensure that the heterogeneous network can respond to dynamic changes in a timely manner.
[0079] In some optional embodiments, behavioral data may include, in addition to recent transaction records and browsing history, usage frequency of specific functions within the mobile application, clicks and responses to marketing push messages, real-time credit card limit inquiries, online customer service consultation records, geolocation check-in information, and interactive behaviors related to financial products on social media.
[0080] In some embodiments, the step of dynamically adjusting the sampling weight of edge types based on real-time behavioral data first generates a real-time behavioral summary and counts the frequency or importance score of different edge types appearing in a recent time window. For example, if the real-time data stream shows that the edge type "users browse high-end products" appears frequently in a short period of time, the sampling weight of this edge type will be increased accordingly in the walk strategy, so that the random walk process has a higher probability of following the path representing the user's latest interests.
[0081] Furthermore, the generation of hybrid walk sequences combines basic walks based on the static network structure with preference walks influenced by real-time behavior weights, thereby producing node sequences that contain both long-term stable relationships and short-term dynamic patterns. These sequences are ultimately used to cut into triples that better reflect the current user state.
[0082] The solution presented in this example improves the responsiveness and adaptability of the walking strategy to the latest user behavior patterns by dynamically adjusting the walking sampling weights based on real-time behavioral data. This allows the generated hybrid walking sequence to integrate historical and real-time information, thereby enhancing the timeliness of node vectorization representation.
[0083] Figure 5 This is a flowchart illustrating the user data processing method provided in the embodiments of this application, as shown below. Figure 5 As shown, after generating the mixed walking sequence in S402, the following steps are also included:
[0084] S501. Embed the mixed walking sequence into the node model and calculate the similarity between the target node and its neighboring nodes;
[0085] S502. Reduce computational complexity by using a negative sampling strategy to generate a low-dimensional dense vector representation of the node; whereby the low-dimensional dense vector representation serves as the initial vectorized representation of the node, which is used for subsequent triplet loss function optimization.
[0086] In this example, inputting the hybrid walk sequences into the node embedding model means using walk-based graph representation learning methods, such as the Skip-gram model, to process these sequences. Each hybrid walk sequence is an ordered list of node IDs, reflecting the co-occurrence relationships of nodes in the network. The model uses each node in the sequence as the target node and treats the nodes within its context window as neighboring nodes. It calculates the dot product or cosine value between the embedding vector of the target node and the embedding vectors of its neighboring nodes through a neural network to measure their similarity. The training objective is to maximize the similarity between the target node and its actual neighboring nodes, so that nodes that co-occur in the walk sequence are close to each other in the vector space. This process teaches a preliminary semantic representation for each node.
[0087] Furthermore, reducing computational complexity through a negative sampling strategy is an optimized alternative to address the high cost of traditional functions that compute the probability distribution of all nodes. When generating low-dimensional dense vector representations of nodes, for each positive sample pair (target node, neighbor node), the probability distribution over the entire node set is not computed. Instead, a small number of nodes not appearing in the current context window are randomly sampled as negative samples. The model simultaneously optimizes the objective, namely maximizing the similarity of positive sample pairs and minimizing the similarity between the target node and these negative sample nodes. In this way, only the vectors of the target node, positive sample neighbor nodes, and a small number of negative sample nodes need to be updated, greatly reducing the computational cost required for each parameter update, thereby efficiently generating low-dimensional dense vector representations of all nodes.
[0088] It is understandable that using low-dimensional dense vector representations as initial vectorized representations of nodes for subsequent optimization means that the node embeddings generated in this step are not the final result, but a high-quality initialization point. These vectors have captured the preliminary similarity relationships of nodes in the network structure (including mixed information from static and real-time behavioral influences). In subsequent steps, these initial vectors will be fed into the optimization stage based on the triplet loss function, which further utilizes the explicit relational semantics between nodes (such as "apply" and "own") for fine-tuning. The newly added concepts of "node embedding model" and "negative sampling" are closely related to the previous concepts of "walking strategy" and "triples". The sequence generated by the walking strategy is the input of the node embedding model, and the initial vectors output by the embedding model serve as the starting point for the optimization of the triplet loss function.
[0089] The scheme in this example combines hybrid walk sequences with a negative sampling strategy to generate node initial vectors, which improves the efficiency of representation learning and enables node vectors to capture the local structure of the network more efficiently. In addition, by effectively compressing complex graph data into a low-dimensional space, it lays a stable foundation for subsequent relation-based fine optimization.
[0090] Figure 6This is a flowchart illustrating the user data processing method provided in the embodiments of this application, as shown below. Figure 6 As shown, after mapping the head and tail nodes of the triples to the semantic space of the corresponding relation type in S202, it also includes:
[0091] S601. Extract the attribute features and structural features of the head node. The attribute features include user age and credit score, and the structural features include the type of neighboring nodes.
[0092] S602. Input the attribute features and structural features into the fully connected neural network to generate a comprehensive representation vector.
[0093] For example, extracting the attribute features of the head node involves directly obtaining the corresponding field values or category labels from the user data table. For instance, for a user node, attribute features include structured information such as age, income, and credit score. In practical applications, these features can be standardized or normalized to eliminate the influence of units.
[0094] For example, extracting structural features requires analyzing the local topological connections of the node in the heterogeneous network. This can be done by querying the set of its directly connected neighboring nodes, counting the frequency of different node types (such as credit card product nodes and merchant nodes), or calculating neighbor-based metrics (such as node degree centrality). This quantifies the network structure information into feature vectors, which, together with attribute features, constitute a multi-perspective description of the node.
[0095] In some embodiments, when inputting attribute features and structural features into a fully connected neural network to generate a comprehensive representation vector, the two types of feature vectors need to be concatenated and fused into a high-dimensional input vector. This fused vector is then fed into a fully connected neural network containing multiple hidden layers. Each layer introduces a nonlinear transformation through an activation function such as ReLU, and learns higher-order interactions between features layer by layer. The output layer dimension of the network is set to the size of the target low-dimensional space, ultimately generating a dense comprehensive representation vector.
[0096] It should be noted that the logic of S601 and S602 lies in enhancing and refining the node vectors obtained from the initial mapping in S202. S202 primarily relies on relation triples for semantic space mapping, with its learning objective focusing on relational constraints between nodes. S601 and S602, on the other hand, introduce the node's own attribute information and broader local structural information, using a fully connected neural network for feature fusion and transformation. The comprehensive representation vector generated by S601 / S602 can be seen as a further optimization and enrichment of the vectorized representation produced in S202, incorporating not only relational semantics but also the node's own static attributes and network structural context.
[0097] The solution presented in this example improves the completeness of node representation information by extracting and fusing node attributes and structural features to generate a comprehensive representation vector. This makes the node representation no longer solely dependent on relational context, thus enabling the final node vector to more comprehensively depict the essence of the node. This, in turn, enhances the ability to distinguish between target users and candidate users in subsequent similarity measurements.
[0098] The user data processing method provided in this application includes: acquiring user data of target users and candidate users, and constructing a heterogeneous network based on the user data; partitioning the multi-type edge relationships between nodes in the heterogeneous network into triples; mapping the head node and tail node in the triples to the semantic space of the corresponding relationship type, and optimizing the vector distance between the head node and tail node in the semantic space based on the triple loss function; and calculating the similarity between target user nodes and candidate user nodes based on the updated node vectorized representation to determine the data processing result. The solution in this application, by constructing a heterogeneous network and building an independent semantic space for each relationship type, optimizes the vector distance based on the triple loss function, thereby improving the discriminative power and semantic consistency of the node vectorized representation and thus enhancing the accuracy of data processing.
[0099] Figure 7 This is a schematic diagram of the structure of the user data processing device provided in the embodiments of this application, as shown below. Figure 7 As shown, the device includes:
[0100] The acquisition module 71 is used to acquire user data of target users and candidate users, and to construct a heterogeneous network based on the user data; wherein, the user data includes attribute data and behavioral data, and the heterogeneous network includes user nodes and credit card product nodes;
[0101] Processing module 72 is used to partition the multi-type edge relationships between nodes in the heterogeneous network into triplets. Each triplet includes a head node, a relationship type, and a tail node. The head node and tail node in the triplet are mapped to the semantic space of the corresponding relationship type. The vector distance between the head node and the tail node in the semantic space is optimized based on the triplet loss function to update the vectorized representation of each node in the heterogeneous network.
[0102] The determination module 73 is used to calculate the similarity between the target user node and the candidate user node based on the updated node vectorization representation, and to determine the data processing result based on the similarity.
[0103] In practical applications, there are various ways to implement user data processing devices. For example, they can be implemented through computer programs, such as application software; or they can be implemented as media storing relevant computer programs, such as cloud storage; or they can be implemented through physical devices that integrate or install relevant computer programs, such as chips.
[0104] In some embodiments, the specific definitions of target users and candidate users depend on the specific application scenario. Specifically, target users typically refer to a group of users known to possess specific attributes, such as a user group already flagged as showing high interest or high value in a particular type of product—essentially a standard or reference group. Candidate users, on the other hand, refer to a large group of users that need to be evaluated or screened; they are potential target users. The goal is to identify individuals from these candidate users who are most similar to the target users, thereby accomplishing tasks such as precision marketing or potential customer discovery.
[0105] For example, the attribute data in user data mainly includes the user's static characteristics, such as age, income level, occupation type, education background, credit score, place of residence and marital status. This information provides a basic profile of the user, which helps in classification and hierarchical analysis.
[0106] For example, behavioral data involves a user's dynamic activities, such as the frequency of credit card transactions, the distribution of spending amounts, the timeliness of repayments, the history of credit report inquiries, records of using other financial products, and logs of online behaviors such as clicking or applying for new products.
[0107] Optionally, in addition to attribute and behavioral data, user data may also include information from other dimensions, such as social network information like the credit status of associated users, real-time geolocation data, economic indicators, or third-party data sources like employment market trends. This additional data can enrich the representation of heterogeneous networks and improve the comprehensiveness and accuracy of the model.
[0108] In some embodiments, when constructing a heterogeneous network based on user data, entities, such as users and credit card products, are first extracted from the raw data as nodes. Then, edges are defined according to interaction relationships, such as a user applying for a product, a user owning a product, or a user being associated with a transaction event. The construction process involves data cleaning, entity parsing, and relationship mapping to ensure that each node represents an independent entity, and edges capture multiple types of connections, such as "application" relationships or "consumption" relationships, thereby forming a graph structure containing various nodes and edges to support subsequent vectorized representation learning.
[0109] In some optional embodiments, the heterogeneous network can include not only user nodes and credit card product nodes, but also other node types to enhance the network's expressive power. For example, transaction behavior nodes represent specific consumption events, credit scoring nodes represent changes in a user's credit rating, or merchant nodes are associated with consumption locations. These additional nodes can more precisely depict the complex interactions between users and products. For instance, connecting users and products through transaction behavior nodes can indirectly reflect consumption preferences, thereby improving the accuracy of similarity calculations and making the heterogeneous network more representative and practical.
[0110] In some embodiments, the multi-type edge relationships between nodes are typically determined based on business logic and actual interactions in the data. For example, relationship types are extracted from user behavior logs, such as "user applies for a credit card product," "user repays a bank," or "user queries a credit report." The definition of these relationship types needs to incorporate domain knowledge to ensure that each edge has clear semantics, such as classifying edges as application relationships, ownership relationships, or influence relationships. Their existence and frequency are verified through data to avoid noise, thereby enabling the heterogeneous network to truly reflect the multi-dimensional connections between users and products.
[0111] Furthermore, when partitioning multi-type edge relationships into triples, each triple consists of a head node, a relationship type, and a tail node. For example, a specific triple could have a user node as the head node, an application as the relationship type, and a credit card product node as the tail node, forming an instance like (User A, Application, Credit Card Product X). The partitioning process requires traversing all edges in the heterogeneous network, transforming each edge into a triple form, and ensuring the consistency of relationship types, such as including both positive and negative relationships to cover bidirectional interactions, thereby providing structured input for semantic space mapping.
[0112] In some embodiments, when mapping the head and tail nodes in a triple to the semantic space of the corresponding relation type, an embedding method such as the TransE model is typically used. Each node and relation type is represented as a low-dimensional vector, and an optimization process is employed to make the head node vector plus the relation vector approximately equal to the tail node vector. Based on a triple loss function, such as maximizing the similarity of positive samples and minimizing the similarity of negative samples, the vector distance is optimized, thereby updating the vectorized representation of each node in the heterogeneous network, ensuring that neighboring nodes in the semantic space reflect real-world similarities.
[0113] For example, triplet loss functions may include margin-based loss functions, such as the marginal ranking loss used in TransE, which requires that the distance between positive triplets be less than the distance between negative triplets by at least one marginal value; or other variants such as loss functions of TransH or TransR, which improve the robustness and representational power of the model by projecting to adapt to the semantic space of different relation types, thereby effectively optimizing the distribution of node vectors.
[0114] In some embodiments, when calculating the similarity between target user nodes and candidate user nodes based on the updated node vectorization representation, common methods include cosine similarity or Euclidean distance. These measures quantify the degree of proximity in the vector space. Specifically, the vectors of the target user and candidate users are first extracted, and then their similarity scores are calculated using mathematical formulas. High scores indicate that the candidate user is highly similar to the target user in attributes or behaviors, thus providing a basis for subsequent processing.
[0115] It is understandable that determining data processing results based on similarity means using the calculated similarity score for business decisions. For example, candidate users with high similarity scores can be marked as potential target users, and personalized credit card products can be recommended or they can be included in targeted marketing campaigns. This processing result helps optimize resource allocation, such as prioritizing reaching high-potential users, or it can be used for risk control, such as identifying abnormal cases with significant deviations from target user behavior, thereby improving overall business efficiency.
[0116] In this example, a knowledge graph embedding method is used to mitigate semantic conflicts in heterogeneous networks. Specifically, the knowledge graph embedding model defines an independent mapping matrix for each type of edge relationship (such as "transaction" and "credit"), mapping nodes from a unified node space to the semantic space of the specific relationship. For example, in the "user-transaction-merchant" edge, the vectors of the user node and the merchant node are brought closer in the "transaction" semantic space, while in the "user-credit-rating" edge, the vectors of the user node and the rating node are brought closer in the "credit" semantic space. Through optimization of the triplet loss function, the model enforces that the vector distance of correct triplets (such as user A-transaction-merchant B) is less than that of incorrect triplets (such as user A-transaction-rating C), thereby eliminating semantic interference between different types of edges in the unified vector space.
[0117] The introduction of this technique improves the semantic accuracy of node representations. In the credit card recommendation scenario, the semantic relationship between user nodes and the "transaction-merchant" edge is modeled independently, while the semantic relationship between the "credit-score" edge is also preserved independently, avoiding recommendation bias caused by semantic mixing in traditional methods. For example, when user A has a low credit score, the association between them and high-limit credit card products is suppressed in the "credit" semantic space, thus avoiding incorrect recommendations. At the same time, user A's transaction preferences are accurately captured in the "transaction" semantic space, ensuring the semantic consistency of the recommendation results.
[0118] The user data processing apparatus provided in this application acquires user data of target users and candidate users, and constructs a heterogeneous network based on the user data; it performs triplet partitioning on the multi-type edge relationships between nodes in the heterogeneous network; it maps the head node and tail node in the triplet to the semantic space of the corresponding relationship type, and optimizes the vector distance between the head node and tail node in the semantic space based on the triplet loss function; based on the updated node vectorized representation, it calculates the similarity between the target user node and the candidate user node to determine the data processing result. The solution in this application, by constructing a heterogeneous network and building an independent semantic space for each relationship type, optimizes the vector distance based on the triplet loss function, thereby improving the discriminativeness and semantic consistency of the node vectorized representation and thus enhancing the accuracy of data processing.
[0119] As yet another example, processing module 72 is specifically used for:
[0120] Obtain the set of correct triples and the set of incorrect triples. The set of correct triples contains actual node relationships, and the set of incorrect triples contains non-existent node relationships.
[0121] Calculate the vector distance between the head node and the tail node in a correct triplet, and the vector distance between the head node and the tail node in an incorrect triplet;
[0122] By optimizing the algorithm and adjusting the parameters of the mapping matrix, the vector distance of correct triples is made smaller than the vector distance of incorrect triples.
[0123] As yet another example, processing module 72 is also used for:
[0124] Determine the number of different types of edges in the heterogeneous network, and prioritize the edge types according to the number of edges;
[0125] Based on the priority ranking results, the traversal strategy is adjusted to prioritize sampling nodes corresponding to low-frequency edge types; the traversal strategy is used for sampling of triplet partitioning.
[0126] As yet another example, processing module 72 is specifically used for:
[0127] Acquire real-time behavioral data of target users and candidate users, including recent transaction records and browsing history;
[0128] The edge type sampling weights are dynamically adjusted based on real-time behavioral data to generate a hybrid walk sequence.
[0129] As yet another example, processing module 72 is also used for:
[0130] The mixed walking sequence is input into the node embedding model, and the similarity between the target node and its neighboring nodes is calculated;
[0131] The computational complexity is reduced by using a negative sampling strategy to generate a low-dimensional dense vector representation of the node; the low-dimensional dense vector representation serves as the initial vectorized representation of the node and is used for subsequent optimization of the triplet loss function.
[0132] As yet another example, processing module 72 is also used for:
[0133] Extract the attribute features and structural features of the head node. The attribute features include user age and credit score, and the structural features include the type of neighboring nodes.
[0134] The attribute features and structural features are input into a fully connected neural network to generate a comprehensive representation vector.
[0135] The user data processing device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.
[0136] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 8 As shown, the electronic device provided in this embodiment includes a processor 291 and a memory 292; it may also include a communication interface 293 and a bus 294. The processor 291, memory 292, and communication interface 293 can communicate with each other via the bus 294. The communication interface 293 can be used for information transmission. The processor 291 can call logical instructions in the memory 292 to execute the method described above.
[0137] Furthermore, the logic instructions in the aforementioned memory 292 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium.
[0138] The memory 292, as a computer-readable storage medium, can be used to store software programs and computer-executable programs, such as program instructions / modules corresponding to the methods in the embodiments of this application. The processor 291 executes functional applications and data processing by running the software programs, instructions, and modules stored in the memory 292, that is, it implements the methods in the above method examples.
[0139] The memory 292 may include a program storage area and a data storage area. The program storage area may store the operating system and application programs required for at least one function; the data storage area may store data created based on the use of the terminal device. Furthermore, the memory 292 may include high-speed random access memory and may also include non-volatile memory.
[0140] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the methods described in the above embodiments.
[0141] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the method described in the above embodiments.
[0142] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application.
[0143] It should be further noted that although the steps in the flowchart are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowchart may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0144] It should be understood that the above-described device embodiments are merely illustrative, and the device of this application can also be implemented in other ways. For example, the division of units / modules in the above embodiments is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units, modules, or components may be combined, or integrated into another system, or some features may be ignored or not executed.
[0145] Furthermore, unless otherwise specified, the functional units / modules in the various embodiments of this application can be integrated into one unit / module, or each unit / module can exist physically separately, or two or more units / modules can be integrated together. The integrated units / modules described above can be implemented in hardware or as software program modules.
[0146] If the integrated unit / module is implemented as a software program module and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.
[0147] In the above embodiments, the descriptions of each embodiment have their own emphasis. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments. The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification.
[0148] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
[0149] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A method for processing user data, characterized in that, include: Acquire user data of target users and candidate users, and construct a heterogeneous network based on the user data; wherein, the user data includes attribute data and behavioral data, and the heterogeneous network includes user nodes and credit card product nodes; The heterogeneous network is divided into triplet partitions for the multi-type edge relationships between nodes. Each triplet includes a head node, a relationship type, and a tail node. The head node and tail node in the triplet are mapped to the semantic space of the corresponding relationship type. The vector distance between the head node and the tail node in the semantic space is optimized based on the triplet loss function to update the vectorized representation of each node in the heterogeneous network. Based on the updated node vectorization representation, the similarity between the target user node and the candidate user node is calculated, and the data processing result is determined based on the similarity.
2. The method according to claim 1, characterized in that, The optimization of the vector distance between the head node and the tail node in the semantic space based on the triplet loss function specifically includes: Obtain a set of correct triples and a set of incorrect triples, wherein the set of correct triples contains actual node relationships and the set of incorrect triples contains non-existent node relationships; Calculate the vector distance between the head node and the tail node in a correct triplet, and the vector distance between the head node and the tail node in an incorrect triplet; By optimizing the algorithm and adjusting the parameters of the mapping matrix, the vector distance of correct triples is made smaller than the vector distance of incorrect triples.
3. The method according to claim 1, characterized in that, Before performing triplet partitioning on the multi-type edge relationships between nodes in the heterogeneous network, the method further includes: Determine the number of different types of edges in the heterogeneous network, and prioritize the edge types according to the number of edges; Based on the priority ranking results, the traversal strategy is adjusted to prioritize sampling nodes corresponding to low-frequency edge types; wherein, the traversal strategy is used for sampling of triplet partitioning.
4. The method according to claim 3, characterized in that, The adjustment of the roaming strategy specifically includes: Acquire real-time behavioral data of the target user and the candidate user, including recent transaction records and browsing history; The edge type sampling weights are dynamically adjusted based on the real-time behavior data to generate a hybrid walk sequence.
5. The method according to claim 4, characterized in that, After generating the hybrid walking sequence, the process further includes: The hybrid walking sequence is input into the node embedding model to calculate the similarity between the target node and its neighboring nodes; The computational complexity is reduced by using a negative sampling strategy to generate a low-dimensional dense vector representation of the node; wherein, the low-dimensional dense vector representation serves as the initial vectorized representation of the node and is used for subsequent triplet loss function optimization.
6. The method according to any one of claims 1-5, characterized in that, After mapping the head and tail nodes of the triples to the semantic space of the corresponding relation type, the process also includes: Extract the attribute features and structural features of the head node. The attribute features include user age and credit score, and the structural features include neighbor node types. The attribute features and structural features are input into a fully connected neural network to generate a comprehensive representation vector.
7. A user data processing apparatus, characterized in that, include: The acquisition module is used to acquire user data of target users and candidate users, and construct a heterogeneous network based on the user data; wherein, the user data includes attribute data and behavioral data, and the heterogeneous network includes user nodes and credit card product nodes; The processing module is used to partition the multi-type edge relationships between nodes in the heterogeneous network into triples, each triple including a head node, a relationship type, and a tail node; map the head node and tail node in the triple to the semantic space of the corresponding relationship type; optimize the vector distance between the head node and the tail node in the semantic space based on the triple loss function to update the vectorized representation of each node in the heterogeneous network. The determination module is used to calculate the similarity between the target user node and the candidate user node based on the updated node vectorization representation, and determine the data processing result based on the similarity.
8. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-6.
10. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method of any one of claims 1-6.