A data processing method, device and storage medium

CN115204868BActive Publication Date: 2026-07-03TENCENT TECHNOLOGY (SHENZHEN) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2021-04-09
Publication Date
2026-07-03

Smart Images

  • Figure CN115204868B_ABST
    Figure CN115204868B_ABST
Patent Text Reader

Abstract

This application discloses a data processing method, apparatus, and storage medium. It involves acquiring transaction information; then treating transaction objects and transaction platforms as network nodes, and connecting these nodes based on the transaction information to obtain a heterogeneous network; performing node traversal within the heterogeneous network to obtain meta-paths; and representing these meta-paths using vectors to obtain node vectors. Finally, it classifies transaction objects based on the distance between node vectors to obtain objects of the target type. This achieves an AI-based merchant identification process. Due to the wide distribution of transaction platforms, the coverage of transaction objects is guaranteed, and the vector representation involved in the identification process is based on the occurrence of transaction behavior, improving the accuracy of vector representation and object type identification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a data processing method, apparatus, and storage medium. Background Technology

[0002] With the rapid development of internet technology, people have increasingly higher requirements for the security of online transactions. Since merchants can set up transactions on different internet platforms, the security evaluation of merchants is particularly important.

[0003] Generally, black and white merchants can be identified through association analysis. This mainly involves creating a graph where nodes are merchants and edges represent relationships between merchants, established by common trading partners or shareholders. This is a homogeneous network. Then, graph algorithms or other classifiers are used to classify the nodes (merchants) in the graph.

[0004] However, the edges in the graph established by common trading partners describe indirect relationships after being abstracted from the trading partners, which can cause some information distortion and affect the accuracy of abnormal object identification.

[0005] Application content

[0006] In view of this, this application provides a data processing method that can effectively improve the accuracy of abnormal object identification.

[0007] The first aspect of this application provides a data processing method, which can be applied to a system or program in a terminal device that includes data processing functions, specifically including:

[0008] Obtain transaction information between trading partners and trading platforms;

[0009] The transaction object and the transaction platform are used as network nodes, and the network nodes are connected based on the association between the transaction object and the transaction platform indicated in the transaction information to obtain a heterogeneous network.

[0010] Based on a preset path category, nodes are traversed in the heterogeneous network to obtain a meta-path. The starting and ending nodes of the path in the preset path category have the same node type.

[0011] The meta-path is used to represent the data into vectors to obtain the node vectors corresponding to the network nodes.

[0012] The transaction objects are classified based on the distance between the node vectors, and the abnormal objects in the transaction objects are identified based on the classification results.

[0013] Optionally, in some possible implementations of this application, the step of using the transaction object and the transaction platform as network nodes, and connecting the network nodes based on the association between the transaction object and the transaction platform indicated in the transaction information to obtain a heterogeneous network, includes:

[0014] The transaction object is designated as a merchant node in the network nodes, and the transaction platform is designated as a platform node in the network nodes;

[0015] The merchant node and the platform node are connected based on the association between the transaction object and the transaction platform indicated in the transaction information to determine the first network edge;

[0016] Based on the association between the transaction object and the transaction platform indicated in the transaction information, the nodes that have a jump relationship with the platform nodes are connected to determine the second network edge;

[0017] The heterogeneous network is obtained based on the merchant node, the platform node, the first network edge, and the second network edge.

[0018] Optionally, in some possible implementations of this application, the step of traversing nodes in the heterogeneous network based on a preset path category to obtain a meta-path includes:

[0019] The merchant's starting node and the platform's starting node are determined based on the preset path category;

[0020] The merchant's path is obtained by traversing nodes in the heterogeneous network based on the merchant's starting node and stopping when the ending node is the transaction object.

[0021] The platform path is obtained by traversing nodes in the heterogeneous network based on the starting node of the platform and stopping when the ending node is the transaction platform.

[0022] The meta-path is determined based on the merchant path and the platform path.

[0023] Optionally, in some possible implementations of this application, the step of performing vector representation based on the meta-path to obtain the node vector corresponding to the network node includes:

[0024] The starting node in the metapath is taken as the center node, and the ending node in the metapath is taken as the adjacent node.

[0025] The central node is represented by a vector based on a preset algorithm to maximize the probability of occurrence of the adjacent nodes, and the node vector corresponding to the network node is obtained based on the objective function.

[0026] Optionally, in some possible implementations of this application, the step of representing the central node as a vector based on a preset algorithm to maximize the probability of occurrence of the adjacent nodes, and obtaining the node vector corresponding to the network node based on an objective function, includes:

[0027] The center node is represented by a vector based on the preset algorithm to obtain the center vector;

[0028] The adjacent nodes are represented by vectors based on the preset algorithm to obtain adjacent vectors;

[0029] Based on the objective function, the inner product of the center vector and the adjacent vector is obtained, and the probability of occurrence of the adjacent node is calculated using a logistic regression model to maximize the probability of occurrence of the adjacent node, and the node vector corresponding to the network node is obtained.

[0030] Optionally, in some possible implementations of this application, the method further includes:

[0031] Non-adjacent nodes are obtained using negative sampling.

[0032] The objective function is updated by minimizing the probability of the occurrence of the non-adjacent nodes.

[0033] Optionally, in some possible implementations of this application, classifying the transaction objects based on the distance between the node vectors and identifying abnormal objects in the transaction objects based on the classification results includes:

[0034] The target vector is input into the classifier to determine the sample category corresponding to the target vector;

[0035] Node vectors whose distance from the target vector meets a threshold condition are determined, and the classification result is obtained by classifying the samples based on the sample categories;

[0036] Black sample merchants in the classification results are identified as abnormal objects in the transaction objects.

[0037] Optionally, in some possible implementations of this application, the method further includes:

[0038] Identify the black sample platform in the classification results;

[0039] Transaction objects whose distance from the node vector corresponding to the black sample platform is less than a preset value are considered as abnormal objects.

[0040] Optionally, in some possible implementations of this application, the method further includes:

[0041] Identify the users who have a transaction relationship with the aforementioned transaction object;

[0042] The transaction users are used as network nodes to update the heterogeneous network;

[0043] Based on the preset path category, node traversal is performed in the updated heterogeneous network to obtain the updated meta-path. The starting node and the ending node of the path in the preset path category have the same node type.

[0044] The updated node vectors are obtained by representing the updated meta-paths with vectors.

[0045] The process of identifying the transaction user, the transaction object, or the transaction platform is based on the distance between the updated node vectors.

[0046] Optionally, in some possible implementations of this application, the method further includes:

[0047] Obtain the transaction parameters between the transaction user and the transaction object;

[0048] The network edges formed by the transaction user and the transaction object are weighted based on the transaction parameters to update the heterogeneous network.

[0049] Optionally, in some possible implementations of this application, the trading platform is a public account, the preset path category includes the path through which trading objects are associated with the public account and the jump path between public accounts, and the number of trading objects is greater than the number of public accounts.

[0050] Optionally, in some possible implementations of this application, the data processing method is applied to a blockchain device, which is a node in a blockchain.

[0051] A second aspect of this application provides a data processing apparatus, comprising:

[0052] The acquisition unit is used to acquire transaction information between the trading object and the trading platform;

[0053] A connection unit is used to treat the transaction object and the transaction platform as network nodes, and to connect the network nodes based on the association between the transaction object and the transaction platform indicated in the transaction information, so as to obtain a heterogeneous network.

[0054] A traversal unit is used to traverse nodes in the heterogeneous network based on a preset path category to obtain a meta-path, wherein the starting node and the ending node of the path in the preset path category have the same node type.

[0055] A representation unit is used to perform vector representation based on the meta-path to obtain the node vector corresponding to the network node;

[0056] The identification unit is used to classify the transaction objects based on the distance between the node vectors, and to identify abnormal objects in the transaction objects based on the classification results.

[0057] Optionally, in some possible implementations of this application, the connection unit is specifically used to treat the transaction object as a merchant node in the network node and the transaction platform as a platform node in the network node;

[0058] The connection unit is specifically used to connect the merchant node and the platform node based on the association between the transaction object and the transaction platform indicated in the transaction information, so as to determine the first network edge;

[0059] The connection unit is specifically used to connect nodes that have a jump relationship with each other on the platform based on the association between the transaction object and the transaction platform indicated in the transaction information, so as to determine the second network edge;

[0060] The connection unit is specifically used to obtain the heterogeneous network based on the merchant node, the platform node, the first network edge, and the second network edge.

[0061] Optionally, in some possible implementations of this application, the roaming unit is specifically used to determine the merchant starting node and the platform starting node based on the preset path category;

[0062] The traversal unit is specifically used to traverse nodes in the heterogeneous network based on the merchant's starting node, and to stop when the ending node is the transaction object, so as to obtain the merchant's path.

[0063] The traversal unit is specifically used to traverse nodes in the heterogeneous network based on the platform's starting node, and to stop when the terminating node is the transaction platform, so as to obtain the platform path.

[0064] The roaming unit is specifically used to determine the meta-path based on the merchant path and the platform path.

[0065] Optionally, in some possible implementations of this application, the representation unit is specifically used to take the starting node in the meta-path as the center node and the ending node in the meta-path as the adjacent node.

[0066] The representation unit is specifically used to perform vector representation of the central node based on a preset algorithm to maximize the occurrence probability of the adjacent nodes, and to obtain the node vector corresponding to the network node based on the objective function.

[0067] Optionally, in some possible implementations of this application, the representation unit is specifically used to perform vector representation of the center node based on the preset algorithm to obtain the center vector;

[0068] The representation unit is specifically used to perform vector representation on the adjacent nodes based on the preset algorithm to obtain adjacent vectors;

[0069] The representation unit is specifically used to obtain the inner product of the center vector and the adjacent vector based on the objective function, and to calculate the occurrence probability of the adjacent node using a logistic regression model, so as to maximize the occurrence probability of the adjacent node, and to obtain the node vector corresponding to the network node.

[0070] Optionally, in some possible implementations of this application, the representation unit is specifically used to obtain non-adjacent nodes by using negative sampling;

[0071] The representation unit is specifically used to update the objective function by minimizing the occurrence probability of the non-adjacent nodes.

[0072] Optionally, in some possible implementations of this application, the identification unit is specifically used to input the target vector into a classifier to determine the sample category corresponding to the target vector;

[0073] The identification unit is specifically used to determine the node vector whose distance from the target vector meets the threshold condition, so as to obtain the classification result by classifying the sample category;

[0074] The identification unit is specifically used to identify black sample merchants in the classification results as abnormal objects in the transaction objects.

[0075] Optionally, in some possible implementations of this application, the identification unit is specifically used to determine the black sample platform in the classification result;

[0076] The identification unit is specifically used to identify transaction objects whose distance from the node vector corresponding to the black sample platform is less than a preset value as abnormal objects.

[0077] Optionally, in some possible implementations of this application, the identification unit is specifically used to identify transaction users who have a transaction relationship with the transaction object;

[0078] The identification unit is specifically used to identify the transaction user as the network node in order to update the heterogeneous network;

[0079] The identification unit is specifically used to perform node traversal in the updated heterogeneous network based on the preset path category to obtain the updated meta-path, wherein the starting node and the ending node of the path in the preset path category have the same node type.

[0080] The identification unit is specifically used to perform vector representation based on the updated meta-path to obtain the updated node vector;

[0081] The identification unit is specifically used to identify the transaction user, the transaction object, or the transaction platform based on the distance between the updated node vectors.

[0082] Optionally, in some possible implementations of this application, the identification unit is specifically used to obtain transaction parameters between the transaction user and the transaction object;

[0083] The identification unit is specifically used to weight the network edges formed by the transaction user and the transaction object based on the transaction parameters, so as to update the heterogeneous network.

[0084] A third aspect of this application provides a computer device, comprising: a memory, a processor, and a bus system; the memory is used to store program code; the processor is used to execute the data processing method described in the first aspect or any one of the first aspects according to instructions in the program code.

[0085] A fourth aspect of this application provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the data processing method described in the first aspect or any one of the first aspects.

[0086] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the data processing method provided in the first aspect or various optional implementations thereof.

[0087] As can be seen from the above technical solutions, the embodiments of this application have the following advantages:

[0088] This process involves acquiring transaction information between trading partners and trading platforms; then, treating these partners and platforms as network nodes and connecting them based on the relationships indicated in the transaction information to create a heterogeneous network; further, node traversal within the heterogeneous network is performed based on preset path categories to obtain meta-paths, where the starting and ending nodes of these paths correspond to the same node type; and finally, vector representation is generated from the meta-paths to obtain the node vectors corresponding to the network nodes. The trading partners are then classified based on the distance between node vectors, and the classification results are used to identify anomalous objects within the trading partners. This achieves merchant identification based on a heterogeneous network. The wide distribution of trading platforms ensures comprehensive coverage of trading partners, and the vector representation involved in the identification process is based on the occurrence of transaction behavior, improving the accuracy of vector representation and the accuracy of anomalous object identification. Attached Figure Description

[0089] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0090] Figure 1 Network architecture diagram for data processing system operation;

[0091] Figure 2 A flowchart illustrating a data processing process is provided in this application embodiment.

[0092] Figure 3 A flowchart illustrating a data processing method provided in an embodiment of this application;

[0093] Figure 4 A schematic diagram illustrating a data processing method provided in an embodiment of this application;

[0094] Figure 5 A flowchart illustrating another data processing method provided in this application embodiment;

[0095] Figure 6 A schematic diagram illustrating a scenario of another data processing method provided in an embodiment of this application;

[0096] Figure 7 A flowchart illustrating another data processing method provided in this application embodiment;

[0097] Figure 8 A schematic diagram illustrating a scenario of another data processing method provided in an embodiment of this application;

[0098] Figure 9 This is a schematic diagram of the structure of a data processing apparatus provided in an embodiment of this application;

[0099] Figure 10 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application;

[0100] Figure 11 This application provides a schematic diagram of the structure of a server according to an embodiment of the present application.

[0101] Figure 12A A data sharing system provided in this application embodiment;

[0102] Figure 12B The composition of a blockchain provided in this application embodiment;

[0103] Figure 12C This is a schematic diagram of input information for a blockchain node provided in an embodiment of this application. Detailed Implementation

[0104] This application provides a data processing method and related apparatus, which can be applied to systems or programs in terminal devices that include data processing functions. The method involves acquiring transaction information between a trading object and a trading platform; then treating the trading object and trading platform as network nodes and connecting these nodes based on the association relationships indicated in the transaction information to obtain a heterogeneous network; further, node traversal is performed within the heterogeneous network based on preset path categories to obtain meta-paths, where the starting and ending nodes of the path in the preset path category correspond to the same node type; vector representation is then performed based on the meta-paths to obtain the node vectors corresponding to the network nodes; finally, trading objects are classified based on the distance between node vectors, and abnormal objects are identified based on the classification results. This achieves merchant identification based on a heterogeneous network. Due to the wide distribution of trading platforms, the coverage of trading objects is guaranteed, and the vector representation involved in the identification process is based on the occurrence of transaction behavior, improving the accuracy of vector representation and the accuracy of abnormal object identification.

[0105] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “corresponding to,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0106] It should be understood that the data processing method provided in this application can be applied to systems or programs in terminal devices that include data processing functions, such as interactive dramas. Specifically, the data processing system can run on, for example,... Figure 1 In the network architecture shown, such as Figure 1 The diagram shown is a network architecture diagram of the data processing system. As can be seen, the data processing system can provide data processing services to multiple information sources. Specifically, it generates corresponding transaction information through transaction operations on the terminal side, enabling the server to collect, identify, and classify this transaction information. This can be understood as... Figure 1 The document illustrates various terminal devices, which can be computer devices. In real-world scenarios, more or fewer types of terminal devices may participate in the data processing. The specific number and types depend on the actual scenario and are not limited here. Figure 1 The example shows one server, but in real-world scenarios, multiple servers can be involved, especially in scenarios involving multi-model training and interaction. The specific number of servers depends on the actual scenario.

[0107] In this embodiment, the server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, etc., but is not limited to these. The terminal and server can be directly or indirectly connected via wired or wireless communication, and the terminal and server can be connected to form a blockchain network; this application does not impose any restrictions.

[0108] It is understood that the aforementioned data processing system can run on personal mobile terminals, such as as an interactive drama application, or it can run on a server, or it can run on third-party devices to provide data processing to obtain the processing results of the information source data. The specific data processing system can run in the aforementioned devices as a program, or it can run as a system component in the aforementioned devices, or it can run as a cloud service program. The specific operating mode depends on the actual scenario and is not limited here.

[0109] With the rapid development of internet technology, people have increasingly higher requirements for the security of online transactions. Since merchants can set up transactions on different internet platforms, the security evaluation of merchants is particularly important.

[0110] Generally, merchant identification can be achieved through machine learning. Machine learning (ML) is a multidisciplinary field involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory, and many other disciplines. It specifically studies how computers can simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to endow computers with intelligence; its applications span all areas of artificial intelligence. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and instructional learning.

[0111] Specifically, black and white merchant mining is carried out through association analysis. This mainly involves establishing a graph where nodes are all merchants and edges are connections between merchants, i.e., a homogeneous network, through common trading partners or common shareholders. Then, graph algorithms or other classifiers are used to classify the nodes (merchants) in the graph.

[0112] However, the number of merchants covered by the graph established by common shareholders is very small, and the edges in the graph established by common trading partners describe indirect relationships after being abstracted by the trading partners, which will cause some information distortion. It is easy to create super nodes like Pinduoduo and JD.com, which have too many users and too many associated merchants. But in fact, the edges between these merchants are meaningless, thus affecting the accuracy of abnormal object identification.

[0113] To address the aforementioned problems, this application proposes a data processing method, which is applied to... Figure 2 In the data processing workflow framework shown, such as Figure 2The diagram shown illustrates a data processing flowchart provided in this application. Users generate corresponding transaction information on the server side through transaction operations on the terminal side. Through transaction association, merchants are linked to their associated public accounts (including mini-programs, web pages, apps, etc.) and public accounts that redirect to the transaction, resulting in a heterogeneous graph containing both public account and merchant nodes. Metapath2vec is then used to obtain the representation of each node in this heterogeneous network, and a classifier is used to classify the merchant vectors as black or white. This application assumes that black and white merchants will have their own associations through public accounts.

[0114] It is understood that the method provided in this application can be a program written as processing logic in a hardware system, or a data processing device that implements the aforementioned processing logic through integration or external connection. As one implementation, the data processing device acquires transaction information between the transaction object and the transaction platform; then, it treats the transaction object and the transaction platform as network nodes and connects these network nodes based on the association between them indicated in the transaction information to obtain a heterogeneous network; further, it performs node traversal within the heterogeneous network based on preset path categories to obtain meta-paths, where the starting and ending nodes of the path in the preset path category correspond to the same node type; and it performs vector representation based on the meta-paths to obtain the node vectors corresponding to the network nodes; then, it classifies the transaction objects based on the distance between the node vectors and identifies abnormal objects within the transaction objects based on the classification results. This achieves a merchant identification process based on a heterogeneous network. Because the transaction platforms are widely distributed, the coverage of transaction objects is guaranteed, and the vector representation involved in the identification process is based on the occurrence of transaction behavior, improving the accuracy of vector representation and the accuracy of abnormal object identification.

[0115] The solutions provided in this application relate to machine learning technology in artificial intelligence, and are specifically illustrated through the following embodiments:

[0116] Based on the above process architecture, the data processing methods in this application will be described below. Please refer to [link / reference]. Figure 3 , Figure 3 The flowchart illustrates a data processing method provided in this application embodiment. This management method can be executed by a terminal device, a server, or both. This application embodiment includes at least the following steps:

[0117] 301. Obtain transaction information between the trading partner and the trading platform.

[0118] In this embodiment, the transaction counterparty can be a merchant, an individual, or other entity that can act as a transaction participant. The following embodiment uses a merchant as an example for illustration. The transaction information between the merchant and the trading platform can be real-time data from banks or online trading platforms, or data collected periodically from the aforementioned sources. The specific information source depends on the actual scenario.

[0119] Specifically, the trading platform can be presented in the form of terminal applications such as official accounts, mini programs, web pages, and apps. Here, we will take official accounts as an example for explanation.

[0120] 302. Treat the trading objects and trading platforms as network nodes, and connect the network nodes based on the association between the trading objects and trading platforms indicated in the trading information to obtain a heterogeneous network.

[0121] In this embodiment, a heterogeneous network containing two types of nodes, namely merchants and official accounts, needs to be constructed based on the merchant's transaction information. The edges of the heterogeneous network refer to the transactions between users and merchants through the official account.

[0122] Specifically, the construction of a heterogeneous network can begin by designating the transaction object as the merchant node and the transaction platform as the platform node. Then, based on the association between the transaction object and the transaction platform indicated in the transaction information, the merchant node and the platform node are connected to determine the first network edge. Furthermore, based on the association between the transaction object and the transaction platform indicated in the transaction information, nodes with jump relationships between them are connected to determine the second network edge. Finally, the heterogeneous network is obtained based on the merchant node, platform node, first network edge, and second network edge.

[0123] In one possible scenario, there is a heterogeneous network. , Represents a node. Represents an edge. Indicates the type of node. There are two types of nodes in this network: Indicates merchants, This refers to a public account; it has two types of edges: This indicates transactions between a user and the merchant that occurred on the official WeChat account. This indicates the redirection between official accounts during user transactions.

[0124] Furthermore, the traversal paths between nodes need to be obtained through metapath2vec, and then the traversal paths need to be modeled to obtain the hidden representation vectors of the nodes. Finally, the representation vectors of the merchants are input into the classifier to complete the classification of black and white merchants.

[0125] 303. Perform node traversal in a heterogeneous network based on a preset path category to obtain a meta-path.

[0126] In this embodiment, the starting and ending nodes of the paths in the preset path categories have the same node type, which ensures that the end nodes of the meta-path are all merchants or platforms, so as to ensure the consistency of the subsequent vector representation. Specifically, the meta-path is a path composed of a series of relation sequences between vertices of different types, and the vertex is the node in the heterogeneous network; for example, meta-path 1 is merchant 1-official account 2-merchant 2, that is, there is a transaction relationship between merchant 1 and official account 2, and there is also a transaction relationship between merchant 2 and official account 2.

[0127] Specifically, the merchant's starting node and the platform's starting node can be determined first based on the preset path category; then, the merchant's starting node can be used to traverse nodes in the heterogeneous network, and the stopping point is when the terminating node is the transaction object, so as to obtain the merchant's path; and the platform's starting node can be used to traverse nodes in the heterogeneous network, and the stopping point is when the terminating node is the transaction platform, so as to obtain the platform's path; and then the meta-path can be determined based on the merchant's path and the platform's path.

[0128] Understandably, given the significant difference between the number of public accounts and merchants in heterogeneous networks, directly using a node random walk approach might lead to edges generated by a larger number of nodes dominating, resulting in inaccurate representation learning. Therefore, the aforementioned meta-path random walk method should be used to ensure the accuracy of subsequent vector representations.

[0129] In one possible scenario, the meta-path is a random walk, which specifies the type of nodes visited in each step of the path. And the path must be symmetrical, that is .like Figure 4 As shown, Figure 4 This is a schematic diagram of a data processing method provided in an embodiment of this application. The diagram shows the composition of a merchant-official account heterogeneous network and the preset path categories. The preset path categories are two types: "MGM" represents the path where a merchant is associated with another merchant through an official account, while "GG" represents the jump association between official accounts.

[0130] 304. Represent the network nodes using vectors based on the metapaths to obtain the node vectors corresponding to the network nodes.

[0131] In this embodiment, the vector representation of the metapath can be based on the metapath2vec representation vector learning process. That is, firstly, the starting node in the metapath is taken as the center node and the ending node in the metapath is taken as the neighboring node; then, the center node is represented by a vector based on a preset algorithm to maximize the probability of the occurrence of neighboring nodes, and the node vector corresponding to the network node is obtained based on the objective function.

[0132] Specifically, after obtaining the metapath, the node representation vectors can be obtained using the skip-gram algorithm (the default algorithm). The skip-gram algorithm corresponds to the model representation, which includes an input layer, a hidden layer, and an output layer. The input layer encodes information such as merchants and public accounts corresponding to the nodes to obtain an encoding sequence. The hidden layer adjusts the weights of the encoding sequence generated by the input layer to adjust it to the target dimension encoding vector. The output layer is a logistic regression model, where each node outputs a probability between 0 and 1 based on the target dimension encoding vector. The objective function of representation learning maximizes the probability of adjacent nodes appearing, ensuring that the nodes at both ends of the metapath are of the same type. This objective function can be:

[0133]

[0134] in, express Among the neighboring nodes, those belonging to the node category The set of nodes, Represents a node. Indicates the category of the node. Indicates parameters The probability that ct is a neighboring node of v.

[0135] Specifically, for the process of maximizing the probability of neighboring nodes, the center node can first be represented by a vector based on a preset algorithm to obtain the center vector; then, the neighboring nodes can be represented by vectors based on the preset algorithm to obtain the neighboring vectors; then, the inner product of the center vector and the neighboring vectors can be obtained based on the objective function, and the probability of the occurrence of neighboring nodes can be calculated using a logistic regression model to maximize the probability of the occurrence of neighboring nodes and obtain the node vector corresponding to the network node.

[0136] Specifically, that is It can be obtained by performing a softmax (logistic regression model) on the inner product of the center vector and its neighboring vectors. That is, the logistic regression model assigns a probability value to the output classification result of each node, representing the likelihood that the node belongs to each category. The specific formula is as follows:

[0137]

[0138] in, express As the representation vector of the central node, express Since each node is a neighboring node, its final representation vector is the representation vector of each node when it is the center node.

[0139] Optionally, the above embodiments use metapath2vec to model nodes. Metapath2vec uses meta-path-based random walks to construct the heterogeneous neighborhood of each node, and then uses a Skip-Gram model to embed the vertices. During the modeling process, when using softmax to calculate the probability of neighboring nodes, the operation is performed consistently for all node categories. However, this can be replaced with metapath2vec++, which can simultaneously model both structural and semantic relationships in heterogeneous networks. That is, it performs softmax on nodes within the same category separately, calculating the probability that node v in a certain category appears as a neighbor node, thereby improving computational efficiency.

[0140] Optionally, since skip-gram requires calculating the probability of each pair of adjacent nodes, to simplify the calculation, non-adjacent nodes can be negatively sampled to save computational resources. Therefore, non-adjacent nodes can be obtained by negative sampling; then, the objective function is updated by minimizing the probability of non-adjacent nodes. Thus, the objective function can also be written as:

[0141]

[0142] in, Represents the sigmoid function; Right now In this case, minimizing the probability means minimizing the negative nodes (non-adjacent nodes).

[0143] It is understandable that, since adjacent nodes are in the minority and non-adjacent nodes are in the majority, finding... Therefore, we have the formula below that starts with argmax. So the first one It is positive; that is...

[0144] 305. Classify transaction objects based on the distance between node vectors, and identify abnormal objects in the transaction objects based on the classification results.

[0145] In this embodiment, a classifier can be used to identify node vectors to determine whether a node vector is a black sample or a white sample. The classifier can be XBGoost, logistic regression, etc., and the classifier is trained under supervision using a training set labeled as black samples or white samples.

[0146] Specifically, for the merchant identification process, the target vector is first input into the classifier to determine the sample category corresponding to the target vector; then, the node vectors whose distance from the target vector meets the threshold condition are determined, so as to obtain the classification result by classifying the sample category; then, black sample merchants in the classification result are identified as abnormal objects in the transaction objects.

[0147] Understandably, after obtaining the representation vector of each node, the distance between two vectors represents the similarity between the two nodes. For example, if merchant M1 and merchant M2 are close in distance, it means that the two merchants conduct transactions through similar public accounts; if public accounts G1 and G2 are close, it means that the two public accounts have transaction redirection, or the merchants conducting transactions on these two public accounts are similar; if merchant M1 is similar to public account G1, it means that the merchant has a transaction association with the public account, or a merchant (or public account) strongly associated with the merchant has a transaction association with public account G1.

[0148] Specifically, for calculating the distance between node vector representations, cosine similarity can be used. This involves treating two vectors as two line segments in space, both originating from the origin and pointing in different directions. The cosine of the angle between the two vectors is then used to measure their cosine similarity. Alternatively, Euclidean distance can be used, which represents node vectors in space and measures the absolute straight-line distance between points in space. The specific distance calculation method depends on the actual scenario and is not limited here.

[0149] In one possible scenario, abnormal objects can also be identified based on black sample platforms. Specifically, if merchant M1 is similar to public account G1, it indicates a transactional relationship between the merchant and the public account, or a merchant (or public account) strongly associated with the merchant has a transactional relationship with public account G1. First, black sample platforms are identified in the classification results; then, transaction objects whose distance to the node vector corresponding to the black sample platform is less than a preset value are considered abnormal objects, thereby improving the accuracy of abnormal object identification.

[0150] Understandably, for merchant nodes, the aforementioned representation vector is a implicit similarity representation, which can be used to classify merchants as black or white. Specifically, the node's vector representation can be input into a classifier (such as XBGoost, logistic regression, etc.) for supervised classification, with the specific model category depending on the actual scenario.

[0151] Optionally, since the transaction process between merchants and the platform involves different parameters such as amount and number of transactions, the edges in the heterogeneous network can be weighted according to these parameters to update the corresponding vector representation. That is, firstly, the transaction parameters between the transaction user and the transaction object (including but not limited to the number of times, amount or proportion) are taken; then, the network edges composed of the transaction user and the transaction object are weighted based on the transaction parameters to update the heterogeneous network and adjust the vector representation of the network nodes. For example, the more transaction amount or the more transactions between merchant M1 and public account G1, the more similar they are, thereby improving the accuracy of merchant identification.

[0152] As described in the above embodiments, the process involves acquiring transaction information between the trading object and the trading platform; then, using the trading object and the trading platform as network nodes and connecting these nodes based on the association between them as indicated in the transaction information, to obtain a heterogeneous network; further, node traversal is performed within the heterogeneous network based on a preset path category to obtain a meta-path, where the starting and ending nodes of the path in this preset path category correspond to the same node type; vector representation is then performed based on the meta-path to obtain the node vectors corresponding to the network nodes; finally, the trading objects are classified based on the distance between the node vectors, and abnormal objects are identified based on the classification results. This achieves merchant identification based on a heterogeneous network. Due to the wide distribution of trading platforms, the coverage of trading objects is guaranteed, and the vector representation involved in the identification process is based on the occurrence of transaction behavior, improving the accuracy of vector representation and the accuracy of abnormal object identification.

[0153] Since merchants also have transaction relationships at the user level, user-level nodes can be added based on the above embodiments. This scenario is explained below. Please refer to... Figure 5 , Figure 5 A flowchart illustrating another data processing method provided in this application embodiment, which includes at least the following steps:

[0154] 501. Identify the trading users who have a trading relationship with the trading merchants.

[0155] In this embodiment, user nodes (transaction users) can be added to the heterogeneous network, such as... Figure 6 As shown, Figure 6 This is a schematic diagram illustrating another data processing method provided in an embodiment of this application; that is, the edges in the heterogeneous network can be extended to "user-merchant" edges, "user-official account" edges, and "user-user" edges. It has wider coverage, more information, and the meta-path can also be extended, thereby improving the identification range of merchants, official accounts, or users.

[0156] 502. Use transaction users as network nodes to update heterogeneous networks.

[0157] In this embodiment, the process of updating the heterogeneous network is as follows: Figure 6 The scenario shown involves adding a user node at the level above the merchant node and using the transaction information between the user and the merchant as an edge to associate the nodes.

[0158] 503. Based on the preset path category, perform node traversal in the updated heterogeneous network to obtain the updated meta-path.

[0159] In this embodiment, the starting and ending nodes of the paths in the preset path categories have the same node type, that is, the same user node, the same merchant node, and the same public account node.

[0160] 504. Represent the updated metapath as a vector to obtain the updated node vector.

[0161] In this embodiment, the process of vectorizing the metapath is described in [reference]. Figure 3 The description of step 304 in the illustrated embodiment will not be repeated here.

[0162] 505. The process of identifying transaction users, transaction merchants, or transaction platforms based on the distance between the updated node vectors.

[0163] In this embodiment, the distance between node vectors indicates the similarity between nodes. If merchant M1 and merchant M2 are close in distance, it means that these two merchants conduct transactions through similar public accounts. If public accounts G1 and G2 are close in distance, it means that these two public accounts have transaction redirection, or that the merchants conducting transactions on these two public accounts are similar. If merchant M1 is similar to public account G1, it means that the merchant and the public account have a transaction association, or that a merchant (or public account) strongly associated with the merchant has a transaction association with public account G1. If merchant M1 is close to user C1, it means that the merchant and the user have a transaction association, or that a merchant (or user) strongly associated with the merchant has a transaction association with user G1.

[0164] Optionally, transaction parameters between trading users and trading merchants can be obtained; then, the network edges formed by trading users and trading merchants can be weighted based on the transaction parameters to update the heterogeneous network, thereby ensuring the accuracy of the vector representation.

[0165] As can be seen from the above embodiments, the classification of black sample merchants can yield associated abnormal merchants, or the classification of black sample users and black sample public accounts can yield associated abnormal merchants, thus ensuring the accuracy of the classification.

[0166] The data processing process will be explained below in conjunction with the end-user's operation process, such as... Figure 7 As shown, Figure 7 A flowchart illustrating another data processing method provided in this application embodiment, which includes at least the following steps:

[0167] 701. Initiate a transaction process in response to the target operation.

[0168] In this embodiment, the target operation can be a payment operation in a merchant, which can be promoted through a public WeChat account.

[0169] 702. Determine the category information of the trading merchant corresponding to the transaction process.

[0170] In this embodiment, determining the category information of the merchant corresponding to the transaction process triggers the server to identify the type of the merchant. This identification process can be initiated immediately. Figure 3 or Figure 5 The process of the illustrated embodiment can also be based on Figure 3 or Figure 5 The process of searching and traversing after generating the list of abnormal merchants improves the efficiency of identification.

[0171] 703. The process of executing transactions based on category information.

[0172] In this embodiment, for scenarios where a user conducts a transaction with a merchant associated with a public account, such as... Figure 8 As shown, Figure 8 This is a schematic diagram illustrating another data processing method provided in an embodiment of this application. The diagram shows that when a user conducts a transaction with a merchant associated with a public account on a terminal, clicking "Confirm Transaction" (A1) triggers the server to determine the type of merchant involved in the transaction. If the merchant is determined to be normal, "Transaction Successful" (A2) is displayed, and the transaction proceeds normally; if the merchant is determined to be abnormal, "Transaction Risk Exists" (A3) is displayed, and the transaction is prohibited.

[0173] The above embodiments can ensure the security of transactions between users and merchants associated with official accounts, and avoid the occurrence of transaction risk scenarios among users in various types of official accounts.

[0174] To better implement the above-described solutions of the embodiments of this application, related apparatus for implementing the above solutions is also provided below. Please refer to... Figure 9 , Figure 9 This is a schematic diagram of a data processing apparatus provided in an embodiment of this application. The data processing apparatus 900 includes:

[0175] Acquisition unit 901 is used to acquire transaction information between the trading object and the trading platform;

[0176] The connection unit 902 is used to treat the transaction object and the transaction platform as network nodes, and to connect the network nodes based on the association between the transaction object and the transaction platform indicated in the transaction information, so as to obtain a heterogeneous network.

[0177] The traversal unit 903 is used to traverse nodes in the heterogeneous network based on a preset path category to obtain a meta-path, wherein the starting node and the ending node of the path in the preset path category have the same node type.

[0178] The representation unit 904 is used to perform vector representation based on the meta-path to obtain the node vector corresponding to the network node;

[0179] The identification unit 905 is used to classify the transaction object based on the distance between the node vectors, and to identify abnormal objects in the transaction object based on the classification results.

[0180] Optionally, in some possible implementations of this application, the connection unit 902 is specifically used to treat the transaction object as a merchant node in the network node and the transaction platform as a platform node in the network node;

[0181] The connection unit 902 is specifically used to connect the merchant node and the platform node based on the association between the transaction object and the transaction platform indicated in the transaction information, so as to determine the first network edge;

[0182] Based on the association between the transaction object and the transaction platform indicated in the transaction information, the connection unit 902 is specifically used to connect nodes with a jump relationship between the platform nodes, so as to determine the second network edge;

[0183] The connection unit 902 is specifically used to obtain the heterogeneous network based on the merchant node, the platform node, the first network edge, and the second network edge.

[0184] Optionally, in some possible implementations of this application, the roaming unit 903 is specifically used to determine the merchant starting node and the platform starting node based on the preset path category;

[0185] The traversal unit 903 is specifically used to traverse nodes in the heterogeneous network based on the merchant's starting node, and to stop when the ending node is the transaction object, so as to obtain the merchant's path.

[0186] The traversing unit 903 is specifically used to traverse nodes in the heterogeneous network based on the platform's starting node, and to stop when the ending node is the transaction platform, so as to obtain the platform path.

[0187] The roaming unit 903 is specifically used to determine the meta-path based on the merchant path and the platform path.

[0188] Optionally, in some possible implementations of this application, the representation unit 904 is specifically used to take the starting node in the meta-path as the center node and the ending node in the meta-path as the adjacent node.

[0189] The representation unit 904 is specifically used to perform vector representation of the central node based on a preset algorithm to maximize the occurrence probability of the adjacent nodes, and to obtain the node vector corresponding to the network node based on the objective function.

[0190] Optionally, in some possible implementations of this application, the representation unit 904 is specifically used to perform vector representation on the center node based on the preset algorithm to obtain the center vector;

[0191] The representation unit 904 is specifically used to perform vector representation on the adjacent nodes based on the preset algorithm to obtain adjacent vectors;

[0192] The representation unit 904 is specifically used to obtain the inner product of the center vector and the adjacent vector based on the objective function, and to calculate the occurrence probability of the adjacent node using a logistic regression model, so as to maximize the occurrence probability of the adjacent node, and obtain the node vector corresponding to the network node.

[0193] Optionally, in some possible implementations of this application, the representation unit 904 is specifically used to obtain non-adjacent nodes by using negative sampling;

[0194] The representation unit 904 is specifically used to update the objective function by minimizing the occurrence probability of the non-adjacent nodes.

[0195] Optionally, in some possible implementations of this application, the identification unit 905 is specifically used to input the target vector into a classifier to determine the sample category corresponding to the target vector;

[0196] The identification unit 905 is specifically used to determine the node vector whose distance from the target vector meets the threshold condition, so as to obtain the classification result by classifying the sample category;

[0197] The identification unit 905 is specifically used to identify black sample merchants in the classification results as abnormal objects in the transaction objects.

[0198] Optionally, in some possible implementations of this application, the identification unit 905 is specifically used to determine the black sample platform in the classification result;

[0199] The identification unit 905 is specifically used to identify transaction objects whose distance from the node vector corresponding to the black sample platform is less than a preset value as abnormal objects.

[0200] Optionally, in some possible implementations of this application, the identification unit 905 is specifically used to identify transaction users who have a transaction relationship with the transaction object;

[0201] The identification unit 905 is specifically used to identify the transaction user as the network node in order to update the heterogeneous network;

[0202] The identification unit 905 is specifically used to perform node traversal in the updated heterogeneous network based on the preset path category to obtain the updated meta-path, wherein the starting node and the ending node of the path in the preset path category have the same node type.

[0203] The identification unit 905 is specifically used to perform vector representation based on the updated meta-path to obtain the updated node vector;

[0204] The identification unit 905 is specifically used to identify the transaction user, the transaction object, or the transaction platform based on the distance between the updated node vectors.

[0205] Optionally, in some possible implementations of this application, the identification unit 905 is specifically used to obtain transaction parameters between the transaction user and the transaction object;

[0206] The identification unit 905 is specifically used to weight the network edges formed by the transaction user and the transaction object based on the transaction parameters in order to update the heterogeneous network.

[0207] This process involves acquiring transaction information between trading partners and trading platforms; then, treating these partners and platforms as network nodes and connecting them based on the relationships indicated in the transaction information to create a heterogeneous network; further, node traversal within the heterogeneous network is performed based on preset path categories to obtain meta-paths, where the starting and ending nodes of these paths correspond to the same node type; and finally, vector representation is generated from the meta-paths to obtain the node vectors corresponding to the network nodes. The trading partners are then classified based on the distance between node vectors, and the classification results are used to identify anomalous objects within the trading partners. This achieves merchant identification based on a heterogeneous network. The wide distribution of trading platforms ensures comprehensive coverage of trading partners, and the vector representation involved in the identification process is based on the occurrence of transaction behavior, improving the accuracy of vector representation and the accuracy of anomalous object identification.

[0208] This application also provides a terminal device, such as... Figure 10 The diagram shown is a structural schematic of another terminal device provided in an embodiment of this application. For ease of explanation, only the parts related to the embodiment of this application are shown. For specific technical details not disclosed, please refer to the method section of the embodiment of this application. The terminal can be any terminal device including mobile phones, tablets, personal digital assistants (PDAs), point-of-sale (POS) terminals, in-vehicle computers, etc. Taking a mobile phone as an example:

[0209] Figure 10 This is a block diagram illustrating a portion of the structure of a mobile phone related to the terminal provided in the embodiments of this application. (Reference) Figure 10 The mobile phone includes components such as a radio frequency (RF) circuit 1010, a memory 1020, an input unit 1030, a display unit 1040, a sensor 1050, an audio circuit 1060, a wireless fidelity (WiFi) module 1070, a processor 1080, and a power supply 1090. Those skilled in the art will understand that... Figure 10 The mobile phone structure shown does not constitute a limitation on the mobile phone and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0210] The following is combined Figure 10 A detailed introduction to each component of a mobile phone:

[0211] The RF circuit 1010 can be used for receiving and transmitting signals during information transmission or calls. Specifically, it receives downlink information from the base station and processes it with the processor 1080; additionally, it transmits uplink data to the base station. Typically, the RF circuit 1010 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier (LNA), and a duplexer. Furthermore, the RF circuit 1010 can also communicate wirelessly with networks and other devices. The aforementioned wireless communication can use any communication standard or protocol, including but not limited to Global System for Mobile Communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, and Short Message Service (SMS).

[0212] The memory 1020 can be used to store software programs and modules. The processor 1080 executes various mobile phone functions and data processing by running the software programs and modules stored in the memory 1020. The memory 1020 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory 1020 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0213] The input unit 1030 can be used to receive input numerical or character information, and generate key signal inputs related to user settings and function control of the mobile phone. Specifically, the input unit 1030 may include a touch panel 1031 and other input devices 1032. The touch panel 1031, also known as a touch screen, can collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel 1031, as well as air touch operations within a certain range on the touch panel 1031), and drive the corresponding connection devices according to a pre-set program. Optionally, the touch panel 1031 may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch position and the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, sends it to the processor 1080, and can receive and execute commands sent by the processor 1080. Furthermore, the touch panel 1031 can be implemented using various types of sensors, including resistive, capacitive, infrared, and surface acoustic wave sensors. In addition to the touch panel 1031, the input unit 1030 may also include other input devices 1032. Specifically, these other input devices 1032 may include, but are not limited to, one or more of the following: a physical keyboard, function keys (such as volume control buttons, power buttons, etc.), a trackball, a mouse, and a joystick.

[0214] The display unit 1040 can be used to display information input by the user or information provided to the user, as well as various menus of the mobile phone. The display unit 1040 may include a display panel 1041, which may optionally be configured as a liquid crystal display (LCD), organic light-emitting diode (OLED), or similar form. Further, a touch panel 1031 may cover the display panel 1041. When the touch panel 1031 detects a touch operation on or near it, it transmits the information to the processor 1080 to determine the type of touch event. Subsequently, the processor 1080 provides corresponding visual output on the display panel 1041 according to the type of touch event. Although in Figure 10 In this embodiment, the touch panel 1031 and the display panel 1041 are two separate components to realize the input and output functions of the mobile phone. However, in some embodiments, the touch panel 1031 and the display panel 1041 can be integrated to realize the input and output functions of the mobile phone.

[0215] The mobile phone may also include at least one sensor 1050, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor. The ambient light sensor can adjust the brightness of the display panel 1041 according to the ambient light level, and the proximity sensor can turn off the display panel 1041 and / or backlight when the phone is moved to the ear. As a type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes). When stationary, it can detect the magnitude and direction of gravity and can be used for applications that recognize the phone's posture (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition-related functions (such as pedometer, taps), etc. Other sensors that may be configured in the mobile phone, such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors, will not be described in detail here.

[0216] The audio circuit 1060, speaker 1061, and microphone 1062 provide an audio interface between the user and the mobile phone. The audio circuit 1060 converts the received audio data into electrical signals and transmits them to the speaker 1061, where the speaker 1061 converts them into sound signals for output. On the other hand, the microphone 1062 converts the collected sound signals into electrical signals, which are then received by the audio circuit 1060, converted into audio data, and then processed by the processor 1080 before being transmitted via the RF circuit 1010 to, for example, another mobile phone, or the audio data can be output to the memory 1020 for further processing.

[0217] WiFi is a short-range wireless transmission technology. Through the WiFi module 1070, mobile phones can help users send and receive emails, browse web pages, and access streaming media, providing users with wireless broadband internet access. Although Figure 10 The WiFi module 1070 is shown, but it is understandable that it is not a necessary component of the mobile phone and can be omitted as needed without changing the nature of the application.

[0218] The processor 1080 is the control center of the mobile phone, connecting various parts of the phone through various interfaces and lines. It executes various functions and processes data by running or executing software programs and / or modules stored in the memory 1020 and calling data stored in the memory 1020. Optionally, the processor 1080 may include one or more processing units; optionally, the processor 1080 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the aforementioned modem processor may also not be integrated into the processor 1080.

[0219] The mobile phone also includes a power supply 1090 (such as a battery) that supplies power to various components. Optionally, the power supply can be logically connected to the processor 1080 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system.

[0220] Although not shown, mobile phones may also include a camera, Bluetooth module, etc., which will not be described in detail here.

[0221] In this embodiment of the application, the processor 1080 included in the terminal also has the function of performing the various steps of the page processing method described above.

[0222] This application also provides a server; please refer to [link / reference]. Figure 11 , Figure 11 This is a schematic diagram of a server structure provided in an embodiment of this application. The server 1100 can vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 1122 (e.g., one or more processors) and memory 1132, and one or more storage media 1130 (e.g., one or more mass storage devices) for storing application programs 1142 or data 1144. The memory 1132 and storage media 1130 can be temporary or persistent storage. The program stored in the storage media 1130 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the server. Furthermore, the CPU 1122 may be configured to communicate with the storage media 1130 and execute the series of instruction operations in the storage media 1130 on the server 1100.

[0223] Server 1100 may also include one or more power supplies 1126, one or more wired or wireless network interfaces 1150, one or more input / output interfaces 1158, and / or one or more operating systems 1141, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0224] The steps performed by the management device in the above embodiments can be based on this Figure 11 The server structure shown.

[0225] This application also provides a computer-readable storage medium storing data processing instructions, which, when executed on a computer, cause the computer to perform the aforementioned actions. Figures 2 to 8 The steps performed by the data processing apparatus in the method described in the illustrated embodiment.

[0226] This application also provides a computer program product including data processing instructions, which, when run on a computer, causes the computer to perform the aforementioned actions. Figures 2 to 8 The steps performed by the data processing apparatus in the method described in the illustrated embodiment.

[0227] This application also provides a data processing system, which may include... Figure 9 The data processing apparatus described in the embodiments, or Figure 10 The terminal device in the described embodiments, or Figure 11 The server described.

[0228] In one possible scenario, the network resource management method of this application is applied to a blockchain device, i.e., the terminal or server is a blockchain device, and the blockchain device is a node in the blockchain, as described below with reference to the accompanying drawings; see also Figure 12A The data sharing system 1200 shown refers to a system for data sharing between nodes. This system may include multiple nodes 1201, which can refer to various clients within the system. Each node 1201, during normal operation, receives input information and maintains the shared data within the system based on this information. To ensure interoperability within the system, information connections exist between nodes, allowing for information transmission. For example, when any node in the system receives input information, other nodes obtain this input information according to a consensus algorithm and store it as part of the shared data, ensuring consistency across all nodes.

[0229] Each node in the data sharing system has a corresponding node identifier, and each node can also store the node identifiers of other nodes in the data sharing system. This allows for the subsequent broadcasting of generated blocks to other nodes in the data sharing system based on their node identifiers. Each node can maintain a node identifier list as shown in the table below, storing the node name and node identifier in this list. The node identifier can be an IP (Internet Protocol) address or any other information that can be used to identify the node. Table 1 only uses IP addresses as an example.

[0230] Table 1. Correspondence between node names and node identifiers

[0231] Node Name Node identifier Node 1 117.114.151.174 Node 2 117.116.189.145 … … Node N 119.123.789.258

[0232] Each node in the data-sharing system stores the same blockchain. A blockchain consists of multiple blocks; see [link to blockchain documentation]. Figure 12B A blockchain consists of multiple blocks. The genesis block includes a block header and a block body. The block header stores input information feature values, version number, timestamp, and difficulty value, while the block body stores the input information. The next block after the genesis block takes the genesis block as its parent block. The next block also includes a block header and a block body. The block header stores the input information feature values ​​of the current block, the block header feature values ​​of the parent block, version number, timestamp, and difficulty value, and so on. This ensures that the block data stored in each block is related to the block data stored in the parent block, guaranteeing the security of the input information in the blocks.

[0233] When generating the individual blocks in the blockchain, see Figure 12C When a node in the blockchain receives input information, it verifies the input information. After verification, it stores the input information in a memory pool and updates its hash tree used to record the input information. Then, it updates the timestamp to the time the input information was received and tries different random numbers multiple times to calculate the feature value, ensuring that the calculated feature value satisfies the following formula:

[0234]

[0235] Wherein, SHA256 is the feature value algorithm used to calculate the feature value; version (version number) is the version information of the relevant block protocol in the blockchain; prev_hash is the block header feature value of the parent block of the current block; merkle_root is the feature value of the input information; ntime is the update time of the update timestamp; nbits is the current difficulty, which is a fixed value for a period of time and is determined again after exceeding the fixed time period; x is a random number; TARGET is the feature value threshold, which can be determined based on nbits.

[0236] Thus, when a random number satisfying the above formula is calculated, the information can be stored accordingly, generating a block header and a block body to obtain the current block. Subsequently, the node where the blockchain resides sends the newly generated block to other nodes in its data sharing system based on the node identifiers of other nodes in the data sharing system. The other nodes then verify the newly generated block and add it to their stored blockchain after verification.

[0237] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0238] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.

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

[0240] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0241] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. 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 storage medium and includes several instructions to cause a computer device (which may be a personal computer, a data processing device, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0242] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A data processing method, characterized in that, include: Obtain transaction information between trading partners and trading platforms; The transaction object is designated as a merchant node in the network nodes, and the transaction platform is designated as a platform node in the network nodes; The merchant node and the platform node are connected based on the association between the transaction object and the transaction platform indicated in the transaction information to determine the first network edge; Based on the association between the transaction object and the transaction platform indicated in the transaction information, the nodes that have a jump relationship with the platform nodes are connected to determine the second network edge; A heterogeneous network is obtained based on the merchant node, the platform node, the first network edge, and the second network edge; Based on a preset path category, nodes are traversed in the heterogeneous network to obtain a meta-path. The preset path category includes paths through which transaction objects are associated with the transaction platform and jump paths between the transaction platforms. The starting node and the ending node of the path in the preset path category have the same node type. The starting node in the metapath is taken as the center node, and the ending node in the metapath is taken as the adjacent node. The central node is represented by a vector based on a preset algorithm to maximize the probability of occurrence of the adjacent nodes, and the node vector corresponding to the network node is obtained based on the objective function. The transaction objects are classified based on the distance between the node vectors, and the abnormal objects in the transaction objects are identified based on the classification results.

2. The method according to claim 1, characterized in that, The step of traversing nodes in the heterogeneous network based on a preset path category to obtain a meta-path includes: The merchant's starting node and the platform's starting node are determined based on the preset path category; The merchant's path is obtained by traversing nodes in the heterogeneous network based on the merchant's starting node and stopping when the ending node is the transaction object. The platform path is obtained by traversing nodes in the heterogeneous network based on the starting node of the platform and stopping when the ending node is the transaction platform. The meta-path is determined based on the merchant path and the platform path.

3. The method according to claim 1, characterized in that, The step of representing the central node using a preset algorithm to maximize the probability of occurrence of the adjacent nodes, and obtaining the node vector corresponding to the network node based on the objective function, includes: The center node is represented by a vector based on the preset algorithm to obtain the center vector; The adjacent nodes are represented by vectors based on the preset algorithm to obtain adjacent vectors; Based on the objective function, the inner product of the center vector and the adjacent vector is obtained, and the probability of occurrence of the adjacent node is calculated using a logistic regression model to maximize the probability of occurrence of the adjacent node, and the node vector corresponding to the network node is obtained.

4. The method according to claim 1, characterized in that, The method further includes: Non-adjacent nodes are obtained using negative sampling. The objective function is updated by minimizing the probability of the occurrence of the non-adjacent nodes.

5. The method according to claim 1, characterized in that, The process of classifying the transaction objects based on the distance between the node vectors and identifying abnormal objects within the transaction objects based on the classification results includes: The target vector is input into the classifier to determine the sample category corresponding to the target vector; Node vectors whose distance from the target vector meets a threshold condition are determined, and the classification result is obtained by classifying the samples based on the sample categories; Black sample merchants in the classification results are identified as abnormal objects in the transaction objects.

6. The method according to claim 5, characterized in that, The method further includes: Identify the black sample platform in the classification results; Transaction objects whose distance from the node vector corresponding to the black sample platform is less than a preset value are considered as abnormal objects.

7. The method according to any one of claims 1-6, characterized in that, The method further includes: Identify the users who have a transaction relationship with the aforementioned transaction object; The transaction users are used as network nodes to update the heterogeneous network; Based on the preset path category, node traversal is performed in the updated heterogeneous network to obtain the updated meta-path. The starting node and the ending node of the path in the preset path category have the same node type. The updated node vectors are obtained by representing the updated metapaths into vectors. The process of identifying the transaction user, the transaction object, or the transaction platform is based on the distance between the updated node vectors.

8. The method according to claim 7, characterized in that, The method further includes: Obtain the transaction parameters between the transaction user and the transaction object; The network edges formed by the transaction user and the transaction object are weighted based on the transaction parameters to update the heterogeneous network.

9. The method according to claim 1, characterized in that, The trading platform is a public WeChat account. The preset path categories include paths through which trading objects are associated with the public WeChat account and jump paths between public WeChat accounts. The number of trading objects is greater than the number of public WeChat accounts.

10. The method according to claim 1, characterized in that, The data processing method is applied to a blockchain device, which is a node in a blockchain.

11. A data processing apparatus, characterized in that, include: The acquisition unit is used to acquire transaction information between the trading object and the trading platform; A connection unit is used to designate the transaction object as a merchant node in the network nodes and the transaction platform as a platform node in the network nodes; The connection unit is further configured to connect the merchant node and the platform node based on the association between the transaction object and the transaction platform indicated in the transaction information, so as to determine the first network edge; The connection unit is further configured to connect nodes that have a jump relationship with each other on the platform nodes based on the association between the transaction object and the transaction platform indicated in the transaction information, so as to determine the second network edge; The connection unit is further configured to obtain a heterogeneous network based on the merchant node, the platform node, the first network edge, and the second network edge; The roaming unit is used to roam nodes in the heterogeneous network based on a preset path category to obtain a meta-path. The preset path category includes paths through which transaction objects are associated with the transaction platform and jump paths between the transaction platforms. The starting node and the ending node of the path in the preset path category have the same node type. The representation unit is used to take the starting node in the metapath as the center node and the ending node in the metapath as the adjacent node. The representation unit is further configured to perform vector representation of the central node based on a preset algorithm to maximize the occurrence probability of the adjacent nodes, and obtain the node vector corresponding to the network node based on the objective function. The identification unit is used to classify the transaction objects based on the distance between the node vectors, and to identify abnormal objects in the transaction objects based on the classification results.

12. The apparatus according to claim 11, characterized in that, The traveling unit is specifically used for: The merchant's starting node and the platform's starting node are determined based on the preset path category; The merchant's path is obtained by traversing nodes in the heterogeneous network based on the merchant's starting node and stopping when the ending node is the transaction object. The platform path is obtained by traversing nodes in the heterogeneous network based on the starting node of the platform and stopping when the ending node is the transaction platform. The meta-path is determined based on the merchant path and the platform path.

13. The apparatus according to claim 11, characterized in that, The representation unit is specifically used for: The center node is represented by a vector based on the preset algorithm to obtain the center vector; The adjacent nodes are represented by vectors based on the preset algorithm to obtain adjacent vectors; Based on the objective function, the inner product of the center vector and the adjacent vector is obtained, and the probability of occurrence of the adjacent node is calculated using a logistic regression model to maximize the probability of occurrence of the adjacent node, and the node vector corresponding to the network node is obtained.

14. The apparatus according to claim 11, characterized in that, The representation unit is specifically used for: Non-adjacent nodes are obtained using negative sampling. The objective function is updated by minimizing the probability of the occurrence of the non-adjacent nodes.

15. A computer device, characterized in that, The computer device includes a processor and memory: The memory is used to store program code; the processor is used to execute the data processing method according to any one of claims 1 to 10 according to the instructions in the program code.

16. A computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the data processing method according to any one of claims 1 to 10.

17. A computer program product, characterized in that, The method includes computer instructions stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions to cause the computer device to perform the data processing method according to any one of claims 1 to 10.