Data processing method and device, computer equipment, storage medium and computer program product
By dividing the target time period into sub-time periods and generating a bipartite graph, the problem of waste of computing resources in long-period graph structure data processing is solved, and efficient graph information extraction is achieved.
Patent Information
- Application Number
- CN202310320251.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-23
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2043-03-23
AI Technical Summary
When generating long-period graph structure data, the existing technology needs to consume a lot of computing resources, especially in the time comparison calculation of user and merchant transaction network data, there is a waste of resources.
By dividing the target time period into sub-time periods, a bipartite graph of each sub-time period is generated, and the matching objects of the sub-time periods are associated to obtain the target association graph of the target time period, which is used for graph information processing through graph neural networks. Extraction, avoiding time comparison calculations.
It saves the consumption of computing resources and improves the accuracy and efficiency of graph information extraction.
Smart Images

Figure CN118690053A
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a data processing method, apparatus, computer equipment, storage medium and computer program product. Background Art
[0002] With the development of artificial intelligence technology, graph neural network technology has emerged, which can be used to process graph structured data. When generating graph structured data corresponding to a long period, it usually takes a lot of computing resources. For example, when generating transaction network data between users and merchants corresponding to a long period, it is necessary to rely on the time point when the user and the merchant have a transaction relationship, perform time comparison calculations, and then generate a long-term transaction network. However, time comparison calculations often consume huge computing resources, resulting in a waste of resources. Summary of the invention
[0003] Based on this, it is necessary to provide a data processing method, apparatus, computer equipment, computer-readable storage medium and computer program product that can save computing resources in response to the above technical problems.
[0004] In a first aspect, the present application provides a data processing method. The method comprises:
[0005] Obtain a to-be-processed object set corresponding to a target time period and a target object set associated with the to-be-processed object set;
[0006] Determine the subsets of objects to be processed corresponding to the sub-time periods from the set of objects to be processed, and determine the subsets of target objects corresponding to the sub-time periods from the set of target objects associated with the set of objects to be processed, wherein the sub-time periods are obtained by dividing the target time period;
[0007] Generate a bipartite graph based on the subset of objects to be processed corresponding to each sub-time period and the subset of target objects associated with the subset of objects to be processed, and obtain a sub-bipartite graph corresponding to each sub-time period;
[0008] The matching objects in the sub-bipartite graphs corresponding to each sub-time period are associated to obtain a target association graph corresponding to the target time period. The target association graph is used to extract graph information through a graph neural network.
[0009] In a second aspect, the present application further provides a data processing device. The device comprises:
[0010] A data acquisition module, used to acquire a to-be-processed object set corresponding to a target time period and a target object set associated with the to-be-processed object set;
[0011] A subset determination module is used to determine the subsets of objects to be processed corresponding to each sub-time period from the set of objects to be processed, and to determine the subsets of target objects corresponding to each sub-time period from the set of target objects associated with the set of objects to be processed, wherein each sub-time period is obtained by dividing the target time period;
[0012] A sub-bipartite graph generation module is used to generate a bipartite graph based on the subsets of objects to be processed corresponding to each sub-time period and the subsets of target objects associated with the subsets of objects to be processed, so as to obtain the sub-bipartite graphs corresponding to each sub-time period;
[0013] The bipartite graph association module is used to associate the matching objects in the sub-bipartite graphs corresponding to each sub-time period to obtain a target association graph corresponding to the target time period. The target association graph is used to extract graph information through a graph neural network.
[0014] In one embodiment, the data processing device further includes:
[0015] The merging module is used to merge the sub-bipartite graphs corresponding to each sub-time period according to the time sequence of each sub-time period to obtain a merged bipartite graph, in which the sub-bipartite graphs are not connected; and the merged bipartite graph is used as the target association graph corresponding to the target time period.
[0016] In one of the embodiments, the sub-bipartite graph generation module is also used to determine the current sub-time period from each sub-time period, and obtain the current subset of objects to be processed corresponding to the current sub-time period, and obtain the current target object subset associated with the current subset of objects to be processed; establish each object node pair based on each current object to be processed in the current subset of objects to be processed and the current target object associated with each current object to be processed in the current subset of objects to be processed; aggregate each object node pair to obtain the sub-bipartite graph corresponding to the current sub-time period; traverse each sub-time period in turn to obtain the sub-bipartite graph corresponding to each sub-time period.
[0017] In one of the embodiments, the sub-bipartite graph generation module is also used to determine each repeated node pair and each non-repeated node pair from each object node pair, deduplicate each repeated node pair, and obtain the aggregate node pair corresponding to each repeated node pair; based on each non-repeated node pair and the aggregate node pair, obtain the sub-bipartite graph corresponding to the current sub-time period.
[0018] In one of the embodiments, the bipartite graph association module is also used to calculate the similarity of each object in the sub-bipartite graph corresponding to each sub-time period, and use the objects whose similarity exceeds a preset threshold as matching objects; associate the matching objects in the sub-bipartite graph corresponding to each sub-time period to obtain a target association graph corresponding to the target time period.
[0019] In one embodiment, the bipartite graph association module is further used to determine the same objects from the sub-bipartite graphs corresponding to each sub-time period, and associate the same objects in the sub-bipartite graphs corresponding to each sub-time period to obtain a target association graph corresponding to the target time period.
[0020] In one of the embodiments, the bipartite graph association module is also used to determine the same objects to be processed from the sub-bipartite graphs corresponding to each sub-time period; in the sub-bipartite graphs corresponding to each sub-time period, the same objects to be processed are associated according to the time sequence of each sub-time period to obtain a target association graph corresponding to the target time period.
[0021] In one of the embodiments, the bipartite graph association module is also used to determine the same target object from the sub-bipartite graphs corresponding to each sub-time period; in the sub-bipartite graphs corresponding to each sub-time period, the same target object is associated according to the time sequence of each sub-time period to obtain a target association graph corresponding to the target time period.
[0022] In one of the embodiments, the bipartite graph association module is also used to determine the same objects to be processed and the same target objects from the sub-bipartite graphs corresponding to each sub-time period; in the sub-bipartite graphs corresponding to each sub-time period, the same objects to be processed are associated according to the time sequence of each sub-time period, and in the sub-bipartite graphs corresponding to each sub-time period, the same target objects are associated according to the time sequence of each sub-time period, to obtain a target association graph corresponding to the target time period.
[0023] In one embodiment, the data processing device further includes:
[0024] The classification module is used to input the target association graph into the graph neural network to extract graph information and obtain the semantic representation corresponding to each object node in the target association graph; classify the object nodes based on the semantic representation corresponding to each object node to obtain the category corresponding to each object node.
[0025] In one embodiment, the data processing device further includes:
[0026] A transaction module is used to obtain a user object set and a transaction object set corresponding to a target time period, wherein a transaction relationship exists between the user objects in the user object set and the transaction objects corresponding to the transaction object set; determine the user object subsets corresponding to each sub-time period from the user object set, and determine the transaction object subsets corresponding to each sub-time period from the transaction object set associated with the user object set; generate a bipartite graph based on the user object subsets corresponding to each sub-time period and the transaction object subsets associated with the user object subsets, and obtain a transaction sub-bipartite graph corresponding to each sub-time period; associate matching users in the transaction sub-bipartite graphs corresponding to each sub-time period, and obtain a target transaction graph corresponding to the target time period; input the target transaction graph into an abnormal crowd recognition model to perform abnormal crowd recognition, obtain the abnormality degree corresponding to each user object in the target transaction graph, and determine abnormal user objects from each user object based on the abnormality degree corresponding to each user object.
[0027] In one embodiment, the data processing device further includes:
[0028] A recommendation module is used to obtain a video set corresponding to a target time period and a viewing object set associated with the video set; determine the video subsets corresponding to each sub-time period from the video set, and determine the viewing object subsets corresponding to each sub-time period from the viewing object set associated with the video set; generate a bipartite graph based on the video subsets corresponding to each sub-time period and the viewing object subsets associated with the video subsets, and obtain a video recommendation sub-bipartite graph corresponding to each sub-time period; associate the matching videos in the video recommendation sub-bipartite graph corresponding to each sub-time period, and obtain a target video graph corresponding to the target time period; input the target video graph into a video recommendation model to perform video recommendation calculation, obtain the recommendation degree corresponding to each video in the target video graph, and determine a target recommended video from each video based on the recommendation degree corresponding to each video.
[0029] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0030] Obtain a to-be-processed object set corresponding to a target time period and a target object set associated with the to-be-processed object set;
[0031] Determine the subsets of objects to be processed corresponding to the sub-time periods from the set of objects to be processed, and determine the subsets of target objects corresponding to the sub-time periods from the set of target objects associated with the set of objects to be processed, wherein the sub-time periods are obtained by dividing the target time period;
[0032] Generate a bipartite graph based on the subset of objects to be processed corresponding to each sub-time period and the subset of target objects associated with the subset of objects to be processed, and obtain a sub-bipartite graph corresponding to each sub-time period;
[0033] The matching objects in the sub-bipartite graphs corresponding to each sub-time period are associated to obtain a target association graph corresponding to the target time period. The target association graph is used to extract graph information through a graph neural network.
[0034] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0035] Obtain a to-be-processed object set corresponding to a target time period and a target object set associated with the to-be-processed object set;
[0036] Determine the subsets of objects to be processed corresponding to the sub-time periods from the set of objects to be processed, and determine the subsets of target objects corresponding to the sub-time periods from the set of target objects associated with the set of objects to be processed, wherein the sub-time periods are obtained by dividing the target time period;
[0037] Generate a bipartite graph based on the subset of objects to be processed corresponding to each sub-time period and the subset of target objects associated with the subset of objects to be processed, and obtain a sub-bipartite graph corresponding to each sub-time period;
[0038] The matching objects in the sub-bipartite graphs corresponding to each sub-time period are associated to obtain a target association graph corresponding to the target time period. The target association graph is used to extract graph information through a graph neural network.
[0039] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0040] Obtain a to-be-processed object set corresponding to a target time period and a target object set associated with the to-be-processed object set;
[0041] Determine the subsets of objects to be processed corresponding to the sub-time periods from the set of objects to be processed, and determine the subsets of target objects corresponding to the sub-time periods from the set of target objects associated with the set of objects to be processed, wherein the sub-time periods are obtained by dividing the target time period;
[0042] Generate a bipartite graph based on the subset of objects to be processed corresponding to each sub-time period and the subset of target objects associated with the subset of objects to be processed, and obtain a sub-bipartite graph corresponding to each sub-time period;
[0043] The matching objects in the sub-bipartite graphs corresponding to each sub-time period are associated to obtain a target association graph corresponding to the target time period. The target association graph is used to extract graph information through a graph neural network.
[0044] The above-mentioned data processing method, device, computer equipment, storage medium and computer program product obtain the set of objects to be processed corresponding to the target time period and the set of target objects associated with the set of objects to be processed; determine the subsets of objects to be processed corresponding to each sub-time period from the set of objects to be processed, and determine the subsets of target objects corresponding to each sub-time period from the set of targets associated with the set of objects to be processed, wherein each sub-time period is obtained by dividing the target time period; generate a bipartite graph based on the subsets of objects to be processed corresponding to each sub-time period and the subsets of target objects associated with the subsets of objects to be processed, and obtain the sub-bipartite graphs corresponding to each sub-time period; associate the matching objects in the sub-bipartite graphs corresponding to each sub-time period, and obtain the target association graph corresponding to the target time period, and the target association graph is used to extract graph information through a graph neural network. That is, by generating the sub-bipartite graphs corresponding to each sub-time period, and then associating the matching objects in the sub-bipartite graphs corresponding to each sub-time period, and obtaining the target association graph corresponding to the target time period, time comparison calculation can be avoided, thereby saving the consumption of computing resources, and then the graph information is extracted from the target association graph through the graph neural network, which can improve the accuracy of the extracted information. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 An application environment diagram of a data processing method in an embodiment;
[0046] Figure 2 is a flow chart of a data processing method in one embodiment;
[0047] Figure 3 is a schematic diagram of a merged bipartite graph in a specific embodiment;
[0048] Figure 4 is a schematic diagram of a process of obtaining a sub-bipartite graph in one embodiment;
[0049] Figure 5 A schematic diagram of associating objects to be processed in a specific embodiment;
[0050] Figure 6 A schematic diagram of associating a target object in a specific embodiment;
[0051] Figure 7 A schematic diagram of associating objects in a sub-bipartite graph in a specific embodiment;
[0052] Figure 8 A schematic diagram of a process for determining an abnormal user object in one embodiment;
[0053] Fig. 9 A schematic diagram of a process for determining a target recommended video in one embodiment;
[0054] Fig.10 is a flow chart of a data processing method in a specific embodiment;
[0055] Fig.11 is a structural block diagram of a data processing device in one embodiment;
[0056] Fig.12 is an internal structure diagram of a computer device in one embodiment;
[0057] Fig.13 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0059] The data processing method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other servers. The server 104 obtains the set of objects to be processed corresponding to the target time period uploaded by the terminal 102 and the target object set associated with the set of objects to be processed; the server 104 determines the subsets of objects to be processed corresponding to each sub-time period from the set of objects to be processed, and determines the subsets of targets corresponding to each sub-time period from the set of targets to be processed associated with the set of objects to be processed, and each sub-time period is obtained by dividing the target time period; the server 104 generates a bipartite graph based on the subsets of objects to be processed corresponding to each sub-time period and the subsets of targets associated with the subsets of objects to be processed, and obtains the sub-bipartite graphs corresponding to each sub-time period; the server 104 associates the matching objects in the sub-bipartite graphs corresponding to each sub-time period to obtain the target association graph corresponding to the target time period, and the target association graph is used to extract graph information through a graph neural network. Among them, the terminal 102 can be, but is not limited to, various desktop computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services. The terminal and the server can be directly or indirectly connected via wired or wireless communication, and this application does not limit this.
[0060] In one embodiment, Figure 2 As shown, a data processing method is provided, which is applied to Figure 1 The server in the example is used for explanation. It can be understood that the method can also be applied to the server, and can also be applied to the system including the terminal and the server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0061] S202: Acquire a to-be-processed object set corresponding to a target time period and a target object set associated with the to-be-processed object set.
[0062] Among them, the target time period refers to the time period in which the data for generating the bipartite graph is generated. The target time period can be a pre-set time period, for example, the target time period can be a year, a month, or a day, etc. The target time period can also be a historical time period or a future time period, and can be set according to demand. For example, to generate a bipartite graph of data for a certain historical time period, the target time period is the historical time period. When the data for the bipartite graph to be generated is data for a certain future time period, the target time period is the future time period, and the data for the bipartite graph to be generated is obtained in the future time period.
[0063] The set of objects to be processed includes various objects to be processed. The objects to be processed refer to the objects used when generating a bipartite graph. The objects can be real objects, such as people, objects, etc., or virtual objects, such as virtual products, virtual people, etc. The set of target objects includes various target objects. The target objects refer to the objects used when generating a bipartite graph. The target objects and the objects to be processed are different types of objects. They are objects with association relationships, or objects with interactive relationships, such as transaction relationships, interactive behavior relationships, etc. Each object to be processed has an associated target object. For example, the object to be processed can be a user, and the target object can be a merchant, video, video, image, etc. Different objects to be processed can be associated with the same target object, or with different target objects. The same object to be processed can also be associated with different target objects.
[0064] Specifically, the server can obtain from the database the set of objects to be processed corresponding to the target time period and the set of target objects associated with the set of objects to be processed, that is, the set of target objects also corresponds to the target time period, and the objects to be processed in the set of objects to be processed are associated with the target objects in the set of targets, wherein one object to be processed can be associated with multiple target objects, one object to be processed can be associated with one target object, or multiple objects to be processed can be associated with the same target object. In one embodiment, the objects to be processed in the set of objects to be processed can be represented by the corresponding unique identifier, or by the corresponding attribute feature. The target objects in the set of targets can be represented by the corresponding unique identifier, or by the corresponding attribute feature.
[0065] The server may also obtain the set of objects to be processed corresponding to the target time period uploaded from the terminal and the set of target objects associated with the set of objects to be processed. The server may also obtain the set of objects to be processed corresponding to the target time period sent by the service provider providing data services and the set of target objects associated with the set of objects to be processed. The server may also obtain the set of objects to be processed corresponding to the target time period and the set of target objects associated with the set of objects to be processed from the business service provider.
[0066] S204, determining the subsets of objects to be processed corresponding to the sub-time periods from the set of objects to be processed, and determining the subsets of target objects corresponding to the sub-time periods from the set of target objects associated with the set of objects to be processed, wherein the sub-time periods are obtained by dividing the target time period.
[0067] The sub-time periods refer to the division of the target time period, wherein the target time period can be equally divided into sub-time periods, for example, equally divided according to year, month, and day. The target time period can also be divided irregularly, for example, each sub-time period has a random time length.
[0068] The subset of objects to be processed refers to the set of objects to be processed corresponding to the sub-time period. That is, the time point at which the objects to be processed and the associated target objects are associated is within the sub-time period. The target object subset refers to the set of target objects corresponding to the sub-time period. Each object to be processed in the subset of objects to be processed has an associated target object, and all associated target objects are regarded as the target object subset associated with the subset of objects to be processed.
[0069] Specifically, the server can divide the target time period according to a pre-set division rule to obtain each sub-time period. The division rule can be set according to a time rule or a business condition. Then the server can obtain the data generation time point corresponding to each object to be processed in the set of objects to be processed, divide each object to be processed according to the sub-time period described at the data generation time point, obtain each object to be processed corresponding to each sub-time period, and use each object to be processed corresponding to each sub-time period as a subset of objects to be processed. Wherein, the data generation time point refers to the time point at which the object to be processed and the associated target object generate an association relationship. For example, the transaction time point between the user and the merchant is the time point at which the transaction data corresponding to the user object and the merchant object are generated. Then, the server determines the target object subsets corresponding to each sub-time period from the target object set associated with the set of objects to be processed. The server can also directly determine the target object associated with the object to be processed in each subset of objects to be processed from the target object set according to the association relationship, thereby obtaining the target object subset associated with the subset of objects to be processed, that is, obtaining the target object subset corresponding to each sub-time period.
[0070] S206 , generating a bipartite graph based on the subsets of objects to be processed corresponding to each sub-time period and the subsets of target objects associated with the subsets of objects to be processed, to obtain sub-bipartite graphs corresponding to each sub-time period.
[0071] The sub-bipartite graph refers to a bipartite graph generated according to the subset of objects to be processed and the associated subset of target objects corresponding to the sub-time period, in which the objects to be processed and the target objects are nodes and the associated relationships are edges. The sub-bipartite graph is static.
[0072] Specifically, the server generates a bipartite graph corresponding to each sub-time period in sequence, thereby obtaining a sub-bipartite graph corresponding to each sub-time period. When generating a bipartite graph corresponding to each sub-time period, each object to be processed in the subset of objects to be processed is first taken as a member of a tuple, and then the target object associated with the object to be processed in the tuple is obtained from the target object subset as the other member of the tuple, thereby obtaining a tuple of the bipartite graph, and traversing each object to be processed in the subset of objects to be processed in sequence to obtain each tuple. Then, each tuple is aggregated, and duplicate tuples are removed, thereby obtaining a bipartite graph corresponding to the sub-time period corresponding to the subset of objects to be processed.
[0073] S208, associating the matching objects in the sub-bipartite graphs corresponding to the sub-time periods to obtain a target association graph corresponding to the target time period, and the target association graph is used to extract graph information through a graph neural network.
[0074] Among them, the matching object refers to the object whose matching degree in the sub-bipartite graph corresponding to each sub-time period exceeds the preset matching degree threshold. The preset matching degree threshold can be set according to the needs. The matching degree is obtained by calculating the similarity between objects in different sub-bipartite graphs. The matching object can also be the same object in the sub-bipartite graph corresponding to each sub-time period, that is, there can be the same object in different sub-bipartite graphs, and the same object in different sub-bipartite graphs is used as the matching object. The target association graph is an association relationship graph obtained based on each sub-bipartite graph. There is an edge between the two matching objects in different sub-bipartite graphs in the target association graph, that is, the two matching objects are associated. A graph refers to a data structure containing nodes and edges. Graph neural network is a framework for deep learning to directly learn graph structure data. Each node in the graph can be defined by its features and related nodes (aggregate learning).
[0075] Specifically, the server calculates the matching degree of each object to be processed and the matching degree of the target object from the sub-bipartite graphs corresponding to each sub-time period, determines the matching object according to the matching degree, and then associates the matching objects in the sub-bipartite graphs corresponding to each sub-time period, thereby obtaining a target association graph corresponding to the target time period. The target association graph can then be input into a trained graph neural network for graph information extraction, thereby obtaining the semantic representation corresponding to each object in the target association graph.
[0076] The above data processing method obtains the set of objects to be processed corresponding to the target time period and the target object set associated with the set of objects to be processed; determines the subsets of objects to be processed corresponding to each sub-time period from the set of objects to be processed, and determines the subsets of targets corresponding to each sub-time period from the set of targets to be processed, wherein each sub-time period is obtained by dividing the target time period; generates a bipartite graph based on the subsets of objects to be processed corresponding to each sub-time period and the subsets of targets associated with the subsets of objects to be processed, and obtains the sub-bipartite graphs corresponding to each sub-time period; associates the matching objects in the sub-bipartite graphs corresponding to each sub-time period, and obtains the target association graph corresponding to the target time period, and the target association graph is used to extract graph information through a graph neural network. That is, by generating the sub-bipartite graphs corresponding to each sub-time period, and then associating the matching objects in the sub-bipartite graphs corresponding to each sub-time period, and obtaining the target association graph corresponding to the target time period, time comparison calculation can be avoided, thereby saving the consumption of computing resources, and then the graph information is extracted from the target association graph through the graph neural network, which can improve the accuracy of the extracted information.
[0077] In one embodiment, the data processing method further includes:
[0078] The sub-bipartite graphs corresponding to each sub-time period are merged according to the time sequence of each sub-time period to obtain a merged bipartite graph, in which the sub-bipartite graphs are not connected; the merged bipartite graph is used as the target association graph corresponding to the target time period.
[0079] The merged bipartite graph refers to an association relationship graph obtained by merging the sub-bipartite graphs corresponding to the sub-time periods according to the time sequence of the sub-time periods. The sub-bipartite graphs in the merged bipartite graph are not connected.
[0080] Specifically, the server can merge the sub-bipartite graphs corresponding to each sub-time period according to the time sequence of each sub-time period to obtain a merged bipartite graph, in which the sub-bipartite graphs are not connected; and use the merged bipartite graph as the target association graph corresponding to the target time period. In one embodiment, the server can also directly take the sub-bipartite graphs corresponding to each sub-time period as a whole to obtain the target association graph corresponding to the target time period.
[0081] In a specific embodiment, Figure 3As shown, it is a schematic diagram of the merged bipartite graph, in which the object set A to be processed includes object 1 to be processed, object 2 to be processed, object 3 to be processed and object 4 to be processed. Object 1 to be processed, object 2 to be processed, object 3 to be processed and object 4 to be processed are all associated with target object 5 in target object set B. Among them, the association between object 1 to be processed and object 2 to be processed and target object 5 is the data obtained in the sub-time period March 2020. The association between object 3 to be processed and object 4 to be processed and target object 5 is the data obtained in the sub-time period March 2021. The server also obtains the data of the middle months from March 2020 to March 2021. Then the server generates the sub-bipartite graph corresponding to the sub-time period March 2020, the sub-bipartite graph corresponding to the middle month (not shown in the figure) and the sub-bipartite graph corresponding to the sub-time period March 2021, and then takes the sub-bipartite graph corresponding to March 2020, the sub-bipartite graph corresponding to the middle month and the sub-bipartite graph corresponding to the sub-time period March 2021 as a whole, and obtains the target association graph corresponding to the target time period from March 2020 to the end of March 2021. Among them, since the target object 5 has an association relationship with the object to be processed in different sub-time periods, when the bipartite graph corresponding to the target time period is currently generated, the target object 5 will be used as a node to generate the bipartite graph, which will cause the accuracy of the generated bipartite graph to be reduced. And in the present application, by treating the same node in different periods as different nodes, the accuracy of the generated target association graph can be improved.
[0082] In the above embodiment, the sub-bipartite graphs corresponding to each sub-time period are merged in the time order of each sub-time period to obtain a merged bipartite graph, and then the merged bipartite graph is used as the target association graph corresponding to the target time period, thereby improving the accuracy of the obtained target association graph and further improving the accuracy of downstream task processing.
[0083] In one embodiment, Figure 4 As shown, step 306, based on the subsets of objects to be processed corresponding to each sub-time period and the subsets of target objects associated with the subsets of objects to be processed, a bipartite graph is generated to obtain the sub-bipartite graphs corresponding to each sub-time period, including:
[0084] S402, determining a current sub-time period from each sub-time period, obtaining a current subset of objects to be processed corresponding to the current sub-time period, and obtaining a current subset of target objects associated with the current subset of objects to be processed.
[0085] S404: Establish object node pairs based on current target objects respectively associated with current objects to be processed in the current object subset and current objects to be processed in the current target object subset.
[0086] Among them, the current sub-time period refers to the sub-time period that currently needs to generate a bipartite graph. The current subset of objects to be processed refers to the subset of objects to be processed that currently needs to generate a bipartite graph. The current subset of target objects refers to the subset of target objects that currently needs to generate a bipartite graph. The current object to be processed refers to the object to be processed in the current subset of objects to be processed. The current target object refers to the target object in the current subset of target objects. The object node pair refers to the node pair consisting of the current object to be processed and the associated target object.
[0087] Specifically, the server takes each sub-time period as the current sub-time period in turn. Then the server obtains the current subset of objects to be processed corresponding to the current sub-time period from the database, and obtains the current subset of target objects associated with the current subset of objects to be processed from the database. An object node pair formed by the current object to be processed and the associated current target object is established based on the association relationship between the object to be processed and the target object, that is, the current object to be processed is taken as one node in the node pair, and the current object to be processed and the current target object are associated as the other node in the node pair. All current objects to be processed and the current target object are traversed in turn, so as to obtain each object node pair corresponding to the current sub-time period.
[0088] S406, aggregate each pair of object nodes to obtain a sub-bipartite graph corresponding to the current sub-time period.
[0089] S408, traversing each sub-time period in turn to obtain a sub-bipartite graph corresponding to each sub-time period.
[0090] Specifically, the server aggregates each object node pair, that is, deletes the duplicate object nodes in each object node pair, obtains each object node pair after deduplication, and uses each object node after deduplication as the sub-bipartite graph corresponding to the current sub-time period. Finally, the server traverses each sub-time period in turn, obtains the object node pair corresponding to each sub-time period, and obtains the sub-bipartite graph according to the object node pair corresponding to each sub-time period.
[0091] In the above embodiment, each object node pair is established and then aggregated to obtain a sub-bipartite graph corresponding to each sub-time period, thereby improving the accuracy of the obtained sub-bipartite graph.
[0092] In one embodiment, S402, each object node pair is aggregated to obtain a sub-bipartite graph corresponding to the current sub-time period, including the steps of:
[0093] Determine each repeated node pair and each non-repeated node pair from each object node pair, remove duplicates from each repeated node pair, and obtain the aggregate node pairs corresponding to each repeated node pair; based on each non-repeated node pair and the aggregate node pair, obtain the sub-bipartite graph corresponding to the current sub-time period.
[0094] Among them, a repeated node pair refers to an object node pair in which the objects in the node pair are the same. That is, the repeated node pair has the same object node pair. A non-repeated node pair refers to an object node pair that does not have the same to-be-processed object and the associated target object, that is, the non-repeated node pair is unique and does not have the same object node pair. An aggregated node pair refers to a repeated node pair after aggregation, which is unique and does not have the same object node pair.
[0095] Specifically, the server can find the same object node pair based on the identifier of the object to be processed and the identifier of the target object in each object node pair, that is, the identifier of the object to be processed and the identifier of the target object are the same as the identifier of the object to be processed and the identifier of the target object in another object node pair, then the object node pair is a repeated node pair. At the same time, object node pairs that do not have the same identifier of the object to be processed and the identifier of the target object are regarded as non-repeated node pairs, thereby obtaining each repeated node pair and each non-repeated node pair. Then the server deduplicates each repeated node pair to obtain the aggregate node pair corresponding to each repeated node pair, that is, deletes the repeated node pairs and retains only one of them to obtain the aggregate node pair. Finally, each non-repeated node pair and the aggregate node pair are used as the sub-bipartite graph corresponding to the current sub-time period.
[0096] In the above embodiment, by deduplicating each repeated node pair, the aggregate node pairs corresponding to each repeated node pair are obtained, and based on each non-duplicate node pair and the aggregate node pair, the sub-bipartite graph corresponding to the current sub-time period is obtained, thereby improving the accuracy of the obtained sub-bipartite graph.
[0097] In one embodiment, S208, the matching objects in the sub-bipartite graphs corresponding to the sub-time periods are associated to obtain a target association graph corresponding to the target time period, including:
[0098] The similarity of each object in the sub-bipartite graph corresponding to each sub-time period is calculated, and the objects whose similarity exceeds a preset threshold are taken as matching objects; the matching objects are associated in the sub-bipartite graph corresponding to each sub-time period to obtain a target association graph corresponding to the target time period.
[0099] Among them, the similarity is used to characterize the matching degree of each object in the sub-bipartite graph. The higher the similarity between two objects, the more matching the two objects are. For example, the higher the similarity between two objects to be processed, the more matching the two objects to be processed are. When the similarity is 100%, it means that the two objects to be processed are the same object to be processed.
[0100] Specifically, the server can obtain the attribute information of each object in each sub-bipartite graph, and use a similarity algorithm to calculate the similarity of each object according to the attribute information. The similarity algorithm can be cosine similarity, distance similarity, etc. Among them, the server can calculate the similarity between two objects to be processed, and then calculate the similarity between two target objects in each target object. It is not necessary to calculate the similarity between the object to be processed and the target object, thereby reducing the amount of calculation, saving computing resources, and improving computing efficiency. Among them, the server can convert the attribute information into an attribute vector, and then use the attribute vector to calculate the similarity between the two objects through a distance similarity algorithm. The attribute vector can be obtained by converting the vectorization algorithm or by searching an existing vector dictionary. Then the server compares each similarity with a preset threshold, determines the target similarity whose similarity exceeds the preset threshold, and then calculates the two objects of the target similarity as matching objects. The preset threshold can be a pre-set similarity threshold. That is, the server identifies matching objects from each sub-bipartite graph, and then associates the two matching objects, that is, the matching objects are used as object node pairs, or the matching objects are connected, so as to obtain a target association graph corresponding to the target time period.
[0101] In the above embodiment, by calculating the similarity of each object in the sub-bipartite graph corresponding to each sub-time period, and taking the object whose similarity exceeds the preset threshold as the matching object, the matching objects are then associated in the sub-bipartite graph corresponding to each sub-time period to obtain the target association graph corresponding to the target time period, thereby improving the accuracy of the obtained target association graph.
[0102] In one embodiment, S208, the matching objects in the sub-bipartite graphs corresponding to the sub-time periods are associated to obtain a target association graph corresponding to the target time period, including:
[0103] The same objects are determined from the sub-bipartite graphs corresponding to the sub-time periods, and the same objects are associated in the sub-bipartite graphs corresponding to the sub-time periods to obtain a target association graph corresponding to the target time period.
[0104] Specifically, the server can determine the same object based on the identifier of the object in each sub-bipartite graph. When the identifiers of two objects are the same, the two objects are associated, that is, the two objects with the same identifier are used as an object node pair, and then all the same two objects in each sub-bipartite graph are connected to obtain a target association graph corresponding to the target time period. In one embodiment, when the attribute features of two objects in different sub-bipartite graphs are the same, the attribute features with the same attribute features can also be connected to obtain a target association graph corresponding to the target time period.
[0105] In the above embodiment, by directly determining the same objects from the sub-bipartite graphs corresponding to each sub-time period, and associating the same objects in the sub-bipartite graphs corresponding to each sub-time period, a target association graph corresponding to the target time period is obtained, which can reduce calculations and save computing resources.
[0106] In one embodiment, determining the same objects from the sub-bipartite graphs corresponding to the sub-time periods, and associating the same objects in the sub-bipartite graphs corresponding to the sub-time periods to obtain a target association graph corresponding to the target time period includes the following steps:
[0107] Determine the same objects to be processed from the sub-bipartite graphs corresponding to each sub-time period; associate the same objects to be processed in the sub-bipartite graphs corresponding to each sub-time period according to the time sequence of each sub-time period to obtain a target association graph corresponding to the target time period.
[0108] Specifically, the server uses each sub-bipartite graph as the current sub-bipartite graph according to the time sequence of each sub-time period, and judges whether the objects to be processed in the current sub-bipartite graph are the same as the objects to be processed in other sub-bipartite graphs. When there are objects to be processed that are the same as the objects to be processed in the current sub-bipartite graph in other sub-bipartite graphs, the sub-bipartite graph is connected with the same objects to be processed in the current sub-bipartite graph, wherein the sub-bipartite graph and the current sub-bipartite graph may have multiple identical objects to be processed, and each of the identical objects to be processed is connected. The sub-bipartite graph and the current sub-bipartite graph may also not have the same objects to be processed. In this case, the sub-bipartite graph and the objects to be processed in the current sub-bipartite graph will not be connected. The same objects to be processed in all sub-bipartite graphs are connected according to the time sequence of each sub-time period, that is, when the same object to be processed exists in multiple sub-bipartite graphs, the object to be processed in the previous sub-bipartite graph is connected with the same object to be processed in the next sub-bipartite graph according to the time sequence. Among them, the connection can save the same objects to be processed in the form of object node pairs. When the same objects to be processed in all sub-bipartite graphs are connected, the target association graph corresponding to the target time period is obtained.
[0109] In a specific embodiment, Figure 5As shown, it is a schematic diagram of associating the objects to be processed. Specifically, the generated sub-bipartite graph includes a sub-bipartite graph A corresponding to March 2020 and a sub-bipartite graph B corresponding to April 2020. The sub-bipartite graph A and the sub-bipartite graph B include a user set and a merchant set associated with the user set, wherein the objects to be processed are users and the target objects are merchants. Sub-bipartite graph A includes user 1 and user 2, and merchant 6 associated with user 1 and user 2. Sub-bipartite graph B includes user 2 and user 4, and merchant 5 associated with user 2 and user 4. Then the same user is determined from sub-bipartite graph A and sub-bipartite graph B, that is, user 2. At this time, the same object to be processed in sub-bipartite graph A and sub-bipartite graph B, that is, user 2, is connected to obtain the target association graph from March to April 2020. Then the target association graph can be used to extract user semantic representation, and the user semantic representation can be used to classify users, such as identifying abnormal users and normal users.
[0110] In the above embodiment, by associating the same objects to be processed in the sub-bipartite graphs corresponding to each sub-time period according to the time order of each sub-time period, a target association graph corresponding to the target time period is obtained, thereby improving the accuracy of the obtained target association graph, and further enabling the semantic representation of the objects to be processed obtained in advance through the graph neural network to be more accurate.
[0111] In one embodiment, the same objects are determined from the sub-bipartite graphs corresponding to the sub-time periods, and the same objects are associated in the sub-bipartite graphs corresponding to the sub-time periods to obtain a target association graph corresponding to the target time period, including:
[0112] The same target object is determined from the sub-bipartite graphs corresponding to each sub-time period; the same target object is associated in the sub-bipartite graphs corresponding to each sub-time period according to the time sequence of each sub-time period to obtain a target association graph corresponding to the target time period.
[0113] Specifically, the server uses each sub-bipartite graph as the current sub-bipartite graph according to the time sequence of each sub-time period, and judges whether the target object in the current sub-bipartite graph is the same as the target object in other sub-bipartite graphs. When there is a target object that is the same as the target object in the current sub-bipartite graph in other sub-bipartite graphs, the sub-bipartite graph is connected with the same target object in the current sub-bipartite graph, wherein the sub-bipartite graph and the current sub-bipartite graph may have multiple identical target objects, and each of the identical target objects is connected. The sub-bipartite graph and the current sub-bipartite graph may also not have the same target object. In this case, the sub-bipartite graph and the target object in the current sub-bipartite graph will not be connected. The same target objects in all sub-bipartite graphs are connected according to the time sequence of each sub-time period, that is, when the same target object exists in multiple sub-bipartite graphs, the target object of the previous sub-bipartite graph is connected with the same target object in the next sub-bipartite graph according to the time sequence. Among them, the same target object can be saved in the form of an object node pair for connection. When the same target objects in all sub-bipartite graphs are connected, the target association graph corresponding to the target time period is obtained.
[0114] In a specific embodiment, Figure 6 As shown, it is a schematic diagram for associating target objects. Specifically, the generated sub-bipartite graph includes a sub-bipartite graph C corresponding to May 2020 and a sub-bipartite graph D corresponding to June 2020. The sub-bipartite graph C and the sub-bipartite graph D include a user set and a merchant set associated with the user set, wherein the object to be processed is a user and the target object is a merchant. Sub-bipartite graph C includes user 1 and user 2, and merchant 7 associated with user 1 and user 2. Sub-bipartite graph D includes user 3 and user 4, and merchant 7 associated with user 3 and user 4. Then the same merchant is determined from sub-bipartite graph C and sub-bipartite graph D, that is, merchant 7. At this time, the same target object in sub-bipartite graph C and sub-bipartite graph D, that is, merchant 7, is connected to obtain the target association graph from May to June 2020. Then the target association graph can be used to extract merchant semantic representations, and the merchant semantic representations can be used to classify merchants, such as identifying abnormal merchants and normal merchants.
[0115] In the above embodiment, by associating the same target objects in the sub-bipartite graphs corresponding to each sub-time period according to the time order of each sub-time period, a target association graph corresponding to the target time period is obtained, thereby improving the accuracy of the obtained target association graph, and further enabling the semantic representation of the target object obtained in advance through the graph neural network to be more accurate.
[0116] In one embodiment, the same objects are determined from the sub-bipartite graphs corresponding to the sub-time periods, and the same objects are associated in the sub-bipartite graphs corresponding to the sub-time periods to obtain a target association graph corresponding to the target time period, including:
[0117] The same objects to be processed and the same target objects are determined from the sub-bipartite graphs corresponding to the sub-time periods; the same objects to be processed are associated in the sub-bipartite graphs corresponding to the sub-time periods according to the time sequence of the sub-time periods, and the same target objects are associated in the sub-bipartite graphs corresponding to the sub-time periods according to the time sequence of the sub-time periods to obtain a target association graph corresponding to the target time period.
[0118] Specifically, the server uses each sub-bipartite graph as the current sub-bipartite graph in the time sequence of each sub-time period, and judges whether the target object in the current sub-bipartite graph is the same as the target object in other sub-bipartite graphs, and also judges whether the objects to be processed are the same.
[0119] When there are target objects and objects to be processed that are the same as those in the current sub-bipartite graph in other sub-bipartite graphs, the sub-bipartite graph is connected to the same target object in the current sub-bipartite graph, and at the same time, the sub-bipartite graph is connected to the same object to be processed in the current sub-bipartite graph. Wherein, the sub-bipartite graph and the current sub-bipartite graph may have multiple identical target objects and multiple identical objects to be processed, then each identical target object is connected and each identical object to be processed is connected. The server connects the same target objects in all sub-bipartite graphs in the time sequence of each sub-time period, that is, when the same target object exists in multiple sub-bipartite graphs, the target object of the previous sub-bipartite graph is connected to the same target object in the next sub-bipartite graph in the time sequence. And when the same object to be processed exists in multiple sub-bipartite graphs, the object to be processed of the previous sub-bipartite graph is connected to the same object to be processed in the next sub-bipartite graph in the time sequence. Wherein, the connection can be to save the same target object or the same object to be processed as an object node pair. When the same target objects in all sub-bipartite graphs and all objects to be processed are connected, the target association graph corresponding to the target time period is obtained.
[0120] In a specific embodiment, Figure 7As shown, it is a schematic diagram of associating objects in a sub-bipartite graph. Specifically, the generated sub-bipartite graph includes a sub-bipartite graph E corresponding to July 2020 and a sub-bipartite graph F corresponding to August 2020. The sub-bipartite graph E and the sub-bipartite graph F include a user set and a merchant set associated with the user set, wherein the object to be processed is the user and the target object is the merchant. The sub-bipartite graph E includes user 8 and user 9, and merchant 6 associated with user 8 and user 9. The sub-bipartite graph F includes user 8 and user 3, and merchant 6 associated with user 8 and user 3. Then, the same merchants and the same users are determined from the sub-bipartite graph E and the sub-bipartite graph F, namely merchant 7 and user 3. At this time, the same target objects in the sub-bipartite graph E and the sub-bipartite graph F, namely merchant 7 and user 3, are connected to obtain the target association graph from July to August 2020. Then, the target association graph can be used to extract merchant semantic representations and user semantic representations, and the merchant semantic representations can be used to classify merchants, and the user semantic representations can be used to classify users. For example, abnormal merchants and normal merchants can be identified, as well as abnormal users and abnormal merchants.
[0121] In the above embodiment, by associating the same objects to be processed in the sub-bipartite graphs corresponding to the respective sub-time periods according to the time order of the respective sub-time periods, and associating the same target objects in the sub-bipartite graphs corresponding to the respective sub-time periods according to the time order of the respective sub-time periods, a target association graph corresponding to the target time period is obtained, thereby improving the accuracy of the obtained target association graph, and further enabling the accuracy of the semantic representation of the target objects and the objects to be processed obtained in advance through the graph neural network to be improved.
[0122] In one embodiment, after associating the matching objects in the sub-bipartite graphs corresponding to the sub-time periods to obtain the target association graph corresponding to the target time period, the step further includes:
[0123] The target association graph is input into the graph neural network to extract graph information, and the semantic representation corresponding to each object node in the target association graph is obtained; the object nodes are classified based on the semantic representation corresponding to each object node, and the category corresponding to each object node is obtained.
[0124] The graph neural network is pre-trained using historical data. The semantic representation corresponding to the object node refers to the vector used to represent the semantics of the corresponding object. The category corresponding to the object node refers to the category used to represent the corresponding object, which can be set according to the business scenario, and different business scenarios can set different categories.
[0125] Specifically, the server can use the target association graph as a trained graph neural network, and the graph neural network aggregates through neighbor nodes to obtain the semantic representation corresponding to each object node in the target association graph. The target association graph can be vectorized to obtain the vector corresponding to each object node in the target association graph, and then the vector corresponding to the target association graph is input into the graph neural network. The server then uses the semantic representation corresponding to each object node to classify the object nodes, wherein the semantic representation corresponding to each object node can be linearly transformed and then activated through an activation function to obtain the probability of each category corresponding to each object node, and the category with the largest category probability is selected as the category corresponding to the object node.
[0126] In one embodiment, the weights of the edges in the target association graph can also be obtained to obtain the graph to be input, and then the target association graph with the weights is input into the trained graph neural network to extract graph information, and the target semantic representation corresponding to each object node in the target association graph is obtained, which can make the target semantic representation more accurate. Then the target semantic representation is used for classification, which can improve the accuracy of classification. Among them, the weights of the edges in the target association graph can be determined according to the association relationship between the object nodes. For example, the weights between the transaction object nodes can be determined according to the number of transactions corresponding to the transaction relationship. The weights of the edges in the target association graph can also be randomly generated. For example, the weights of the edges can be generated using a random number generator. The weights of the edges in the target association graph can also be pre-set. For example, the weights of the edges are all set to an initial value of 1.
[0127] In a specific embodiment, the graph neural network can be trained in advance to obtain a trained graph neural network, and then the graph neural network is deployed and used. Specifically:
[0128] The training data is obtained, and the training data includes a target association graph and a category label corresponding to each object node in the target association graph. Then, the attribute information of each object node in the target association graph is converted into a vector to obtain the embedding vector corresponding to each object node, and the vector corresponding to the target association graph is obtained according to the embedding vector corresponding to each object node, that is, the target association graph is used as the input of the initial graph neural network in the form of an object node pair, and the object nodes in the object node pair are represented by the corresponding embedding vector. The initial graph neural network can be established using a GNN (Graph Neural Networks) network. The initial graph neural network can also be established using a GraphSAGE network, which is an inductive learning framework that uses the attribute information of nodes to efficiently generate unknown node feature representations on ultra-large-scale graphs. GraphSAGE (Graph Attention Network) can be used to generate low-dimensional vector representations of nodes. The initial graph neural network can also be established using a GAT network, and the initialization parameters in the initial graph neural network can be obtained by random initialization, zero initialization, or initialization through a Gaussian distribution. Then the initial graph neural network passes the input target association graph through the initialized network parameters to obtain the hidden layer representation of each node, that is, the semantic representation of each object node. Then the semantic representation of each object node is linearly transformed, and then the activation function is used to perform activation calculation to obtain the training category probability corresponding to the object node. Among them, the activation function can be an S-type activation function, or a RELU (The Rectified Linear Unit) activation function, or a Tanh (Hyperbolic Function) activation function. Then the cross entropy loss function is used to calculate the error between the training category probability and the corresponding category label to obtain the loss information. The loss information is used to reversely update the initial graph neural network through the gradient descent algorithm, and after multiple iterations, when the training completion condition is reached, the trained graph neural network is obtained. Among them, the training completion condition can be that the number of training iterations reaches the maximum number of iterations, or the loss information obtained from the training reaches a pre-set threshold, or the network parameters of the graph neural network no longer change, etc. Finally, the server can deploy the trained graph neural network, which can then be used to predict the category of the object.
[0129] In the above embodiment, by inputting the target association graph into the graph neural network for graph information extraction, the semantic representation corresponding to each object node in the target association graph is obtained, which can improve the accuracy of the obtained semantic representation. Then, the semantic representation corresponding to each object node is used to classify the object nodes to obtain the category corresponding to each object node, thereby improving the accuracy of object classification.
[0130] In one embodiment, Figure 8 As shown, the data processing method further includes:
[0131] S802, obtaining a user object set and a transaction object set corresponding to a target time period, wherein a transaction relationship exists between the user objects in the user object set and the corresponding transaction objects in the transaction object set.
[0132] The user object set includes various user objects, which may be represented by a corresponding user identifier or by the corresponding user's attribute information, and the user's attribute information may include the user's basic attribute information, behavior attribute information, and the like. The transaction object set includes various transaction objects, which may be merchant objects. The merchant object may be represented by a corresponding merchant identifier or by the corresponding merchant attribute information. There is a transaction relationship between the user object and the transaction object, which means that a transaction has occurred between the user and the corresponding merchant.
[0133] Specifically, the server can obtain transaction data from the database, determine each user object and the transaction object with which each user object has a transaction relationship based on the transaction data, and then obtain the user object set and the transaction object set. The server can also directly obtain the user object set corresponding to the target time period, and then obtain the transaction object set with which the transaction relationship exists based on the user object set. The server can also obtain the user object set and the transaction object set corresponding to the target time period from the business service provider.
[0134] S804: Determine user object subsets corresponding to each sub-time period from the user object set, and determine transaction object subsets corresponding to each sub-time period from the transaction object set associated with the user object set.
[0135] The user object subset refers to the set of user objects corresponding to the sub-time period, and the user object subset includes each user object that conducts transactions with the merchant object in the corresponding sub-time period. The user objects in the user object subsets corresponding to different sub-time periods may be the same user objects or different user objects. The transaction object subset refers to the set formed by each transaction object associated with each user object in the user object subset. Each user object subset has a corresponding transaction object set.
[0136] Specifically, the server divides each user object in the user object set according to each sub-time period to obtain the user objects corresponding to each sub-time period, thereby obtaining a user object subset corresponding to each sub-time period, and then obtains transaction objects with transaction relationships from the transaction object set according to the user objects in the user object subset, thereby obtaining a transaction user object subset corresponding to the user object subset. The transaction object subset corresponding to each user object subset is obtained to obtain the transaction object subset corresponding to each sub-time period.
[0137] S806: Generate a bipartite graph based on the user object subsets corresponding to each sub-time period and the transaction object subsets associated with the user object subsets to obtain a transaction sub-bipartite graph corresponding to each sub-time period.
[0138] The transaction sub-bipartite graph refers to a bipartite graph formed based on the transaction relationship in the sub-time period. The transaction sub-bipartite graph can also be called a transaction network. Different sub-time periods correspond to different transaction networks.
[0139] Specifically, the server connects each user object in each sub-time period with the corresponding transaction object according to the transaction relationship, and then aggregates the different edges corresponding to the same node. That is, when the user object and the transaction object have multiple transactions in the sub-time period, that is, when multiple transaction relationships are generated, the user object and the transaction object will have different edges. At this time, multiple edges are aggregated into one edge to obtain the node pair of the user object and the transaction object in the sub-time period, and then all the node pairs corresponding to the sub-time period are used as the transaction sub-bipartite graph corresponding to the sub-time period. The server traverses each sub-time period to obtain the transaction sub-bipartite graph corresponding to each sub-time period.
[0140] S808, associating the matching users in the transaction sub-bipartite graphs corresponding to the sub-time periods to obtain a target transaction graph corresponding to the target time period.
[0141] Among them, the target transaction graph refers to the transaction relationship graph obtained by connecting the matching users in the transaction sub-bipartite graph corresponding to different time periods, and the matching users in the target transaction graph are connected.
[0142] Specifically, the server determines matching users from each transaction sub-bipartite graph, and can use the attribute information of the user object to calculate the similarity between the user objects, and determine the matching users according to the similarity. Then the matching users are connected, wherein the connections are made in sequence according to the time sequence of each sub-time period. The server can also directly use the same user as a matching user, and then connect them according to the time sequence of each sub-time period. For example, user 1 in the transaction sub-bipartite graph corresponding to March 2020 can be connected with user 1 in the transaction sub-bipartite graph corresponding to April 2020, and then user 1 in the transaction sub-bipartite graph corresponding to April 2020 can be connected with user 1 in the transaction sub-bipartite graph corresponding to May 2020. When there is no matching user 1 in the transaction sub-bipartite graph corresponding to April 2020, user 1 in the transaction sub-bipartite graph corresponding to March 2020 can also be directly connected with user 1 in the transaction sub-bipartite graph corresponding to May 2020. When all matching users are associated, the target transaction graph corresponding to the target time period is obtained.
[0143] S810, input the target transaction graph into an abnormal crowd identification model to identify abnormal crowds, obtain the abnormality degree corresponding to each user object in the target transaction graph, and determine abnormal user objects from each user object based on the abnormality degree corresponding to each user object.
[0144] Among them, the abnormal crowd identification model refers to a graph neural network model used to identify abnormal faces, which includes a graph neural network and a classification network. The abnormal crowd identification model is pre-trained using the historical target transaction graph and the corresponding historical abnormal user labels and historical normal user labels. The abnormality degree is used to characterize the abnormality degree of the corresponding user object. The higher the abnormality degree, the higher the abnormal risk of the user object in conducting transactions.
[0145] Specifically, the server uses the target transaction graph as the input of the abnormal crowd recognition model to identify abnormal user objects among the user objects in the target transaction graph. The abnormal face recognition model extracts the hidden layer representation corresponding to each user object through the graph neural network, and then uses the classification network to classify and calculate each user object according to the hidden layer representation corresponding to each user object to obtain the abnormality degree corresponding to each user object. The abnormality degree is then compared with the preset threshold, and the user object whose abnormality degree exceeds the preset threshold is regarded as an abnormal user object, and the user object whose abnormality degree does not exceed the preset threshold is regarded as a normal user object.
[0146] In the above embodiment, by generating transaction sub-bipartite graphs corresponding to each sub-time period, and then associating each matching user in each transaction sub-bipartite graph, a target transaction graph corresponding to the target time period is obtained. Finally, the target transaction graph is input into the abnormal crowd identification model for abnormal crowd identification, and the abnormal degree corresponding to each user object in the target transaction graph is obtained. Based on the abnormal degree corresponding to each user object, an abnormal user object is determined from each user object, thereby improving the accuracy of the obtained abnormal user object.
[0147] In one embodiment, Fig. 9 As shown, the data processing method further includes:
[0148] S902: Acquire a video set corresponding to a target time period and a viewing object set associated with the video set.
[0149] The video set includes various videos, and the viewing object set includes various viewing objects. The viewing object refers to an object that views the associated video, and the object may be a user, a virtual object, and the like.
[0150] Specifically, the server can directly obtain the video set corresponding to the target time period and the viewing object set associated with the video set from the database. The server can also obtain the video set corresponding to the target time period and the viewing object set associated with the video set from the business service provider. The server can also obtain the video set corresponding to the target time period uploaded by the terminal and the viewing object set associated with the video set.
[0151] S904: Determine the video subsets corresponding to the sub-time periods from the video set, and determine the viewing object subsets corresponding to the sub-time periods from the viewing object set associated with the video set.
[0152] The video subset refers to the set of videos corresponding to the sub-time period, that is, the video is watched or has been watched in the corresponding sub-time period. The viewing object subset refers to the set of viewing objects corresponding to the sub-time period, that is, the viewing objects in the subset have watched or have watched the video in the sub-time period. Different viewing objects can watch different videos in different time periods, can watch the same video in one time period, and can watch different videos in one time period.
[0153] Specifically, the server divides the target time period according to the pre-set division conditions to obtain disjoint sub-time periods. Then, the video viewing data corresponding to each sub-time period is obtained, and the videos watched by the viewing objects in each sub-time period are determined according to the video viewing data, thereby obtaining a viewing object subset and a video subset. The viewing objects in the viewing object subset have watched the videos in the corresponding video subset.
[0154] S906 , generating a bipartite graph based on the video subsets corresponding to each sub-time period and the viewing object subsets associated with the video subsets, to obtain a video recommendation sub-bipartite graph corresponding to each sub-time period.
[0155] The video recommendation sub-bipartite graph refers to a bipartite graph formed according to the video viewing relationship in the sub-time period. Different sub-time periods correspond to different bipartite graphs.
[0156] Specifically, each video in each sub-time period is connected to the corresponding viewing object according to the video viewing relationship, and then different edges corresponding to the same node are aggregated, that is, when the video and the viewing object watch the video in the sub-time period or watch the video multiple times, the video and the viewing object will have different edges. At this time, multiple edges are aggregated into one edge to obtain the node pair of the video and the viewing object in the sub-time period, and then all the node pairs corresponding to the sub-time period are used as the video recommendation sub-bipartite graph corresponding to the sub-time period. The server traverses each sub-time period to obtain the video recommendation sub-bipartite graph corresponding to each sub-time period.
[0157] S908, associating the matching videos in the video recommendation sub-bipartite graph corresponding to each sub-time period to obtain a target video graph corresponding to the target time period.
[0158] Among them, the target video graph refers to a video viewing relationship graph obtained by connecting the matching videos in the transaction sub-bipartite graph corresponding to different time periods, and the matching videos in the target video graph are connected.
[0159] Specifically, the server determines the matching videos from each video recommendation sub-bipartite graph, can use the basic attribute information of the video to calculate the similarity between the videos, determine the matching videos based on the similarity, and then connect the matching videos. The server can also directly use the same video as the matching video for video. Among them, when there are multiple identical videos, they need to be connected in sequence according to the time sequence of each sub-time period. That is, the video in the front sub-time period is connected with the video in the back sub-time period. When there are matching videos in the video recommendation sub-bipartite graph of two adjacent sub-time periods, the matching videos of the two adjacent sub-time periods can be directly connected. When there are matching videos in the video recommendation sub-bipartite graph of two non-adjacent sub-time periods, the matching videos of the two non-adjacent sub-time periods can also be directly connected. When all matching videos are connected, the target video graph corresponding to the target time stage is obtained.
[0160] S910, input the target video graph into the video recommendation model to perform video recommendation calculation, obtain the recommendation degree corresponding to each video in the target video graph, and determine the target recommended video from each video based on the recommendation degree corresponding to each video.
[0161] The video recommendation model refers to a graph neural network model that identifies whether a video is recommended. The video recommendation model also includes a graph neural network and a classification network. The video recommendation model is pre-trained using a historical target video graph and corresponding video recommendation labels and video non-recommended labels. The recommendation degree is used to characterize the degree of recommendation of the corresponding video. The higher the recommendation degree, the more likely the video can be recommended to the viewing object.
[0162] Specifically, the server uses the target video graph as the input of the video recommendation model to calculate the recommendation degree of each video in the target video graph, that is, the video recommendation model extracts the corresponding hidden layer representation of each video through the graph neural network, and then uses the private classification network to perform binary classification recognition of whether each video is recommended according to the corresponding hidden layer representation of each video, and obtains the recommendation degree of each video. Then, the recommendation degree is compared with the preset threshold, and the video with a recommendation degree exceeding the preset threshold is used as the target recommended video. The target recommended video can be recommended to the new viewing object, wherein the target recommended video can include at least two.
[0163] In the above embodiment, by generating a video recommendation sub-bipartite graph corresponding to each sub-time period, and then associating the matching videos in the video recommendation sub-bipartite graph corresponding to each sub-time period, a target video graph corresponding to the target time period is obtained, thereby improving the accuracy of the obtained target video graph. Then, the target video graph is input into the video recommendation model to perform video recommendation calculation, thereby obtaining the recommendation degree corresponding to each video in the target video graph. Based on the recommendation degree corresponding to each video, a target recommended video is determined from each video, thereby improving the accuracy of the obtained target recommended video.
[0164] In a specific embodiment, Fig.10 As shown, a data processing method is provided, which specifically includes the following steps:
[0165] S1002: Acquire a to-be-processed object set corresponding to a target time period and a target object set associated with the to-be-processed object set.
[0166] S1004, determining the subsets of objects to be processed corresponding to the sub-time periods from the set of objects to be processed, and determining the subsets of target objects corresponding to the sub-time periods from the set of target objects associated with the set of objects to be processed, wherein the sub-time periods are obtained by dividing the target time period;
[0167] S1006, determining the current sub-time period from each sub-time period, obtaining the current subset of objects to be processed corresponding to the current sub-time period, and obtaining the current subset of target objects associated with the current subset of objects to be processed. Establishing each object node pair based on each current object to be processed in the current subset of objects to be processed and the current target objects associated with each current object to be processed in the current subset of target objects.
[0168] S1008, determining each repeated node pair and each non-repeated node pair from each object node pair, removing duplicates from each repeated node pair, and obtaining the aggregate node pairs corresponding to each repeated node pair. Based on each non-repeated node pair and the aggregate node pair, obtain the sub-bipartite graph corresponding to the current sub-time period, and traverse each sub-time period in turn to obtain the sub-bipartite graph corresponding to each sub-time period.
[0169] S1010, determining the same to-be-processed objects and the same target objects from the sub-bipartite graphs corresponding to the sub-time periods. In the sub-bipartite graphs corresponding to the sub-time periods, the same to-be-processed objects are associated according to the time sequence of the sub-time periods, and in the sub-bipartite graphs corresponding to the sub-time periods, the same target objects are associated according to the time sequence of the sub-time periods, to obtain a target association graph corresponding to the target time period.
[0170] S1012, input the target association graph into the graph neural network to extract graph information, obtain the semantic representation corresponding to each object node in the target association graph, classify the object nodes based on the semantic representation corresponding to each object node, and obtain the category corresponding to each object node.
[0171] In a specific embodiment, the data processing method is applied to a live broadcast platform. Specifically, the live broadcast platform collects data across a long period of time, for example, collects data of users watching live broadcasts for one year, and then establishes a viewing relationship graph between users and live broadcast objects based on the data of users watching live broadcasts. Specifically, the live broadcast platform first divides the time period of one year according to preset conditions, and can be divided into multiple non-intersecting sub-time periods according to the natural range of time. For example, it can be divided according to months to obtain 12 non-intersecting sub-time periods [T1, T2, ... T12]. Then, the data of users watching live broadcasts corresponding to each sub-time period is obtained, and the node pairs formed by the users and the watched live broadcast objects are determined according to the data of users watching live broadcasts. The sub-bipartite graphs corresponding to each sub-time period are obtained according to the node pairs formed by the users and the watched live broadcast objects, that is, the sub-bipartite graphs corresponding to 12 intersecting sub-time periods are obtained [G1, G2, ... G12]. Then, the same node is determined from the bipartite graphs corresponding to each sub-time period, and an edge is added between the same nodes in different sub-bipartite graphs to connect them, indicating the similarity and correlation between the two nodes, thereby obtaining a new graph network, that is, obtaining a target live broadcast viewing relationship graph. Compared with the bipartite graph directly constructed using the data of users watching live broadcasts in the target time period, the target live broadcast viewing relationship graph has more edges and nodes, which can improve the information contained in the topology of the target live broadcast viewing relationship graph. The target live broadcast viewing relationship graph is then input into the GNN model corresponding to the downstream task for processing the downstream task. For example, abnormal users watching live broadcasts can be identified, and live broadcast objects can be recommended, etc., thereby improving the accuracy of subsequent task processing, such as improving the accuracy of abnormal user identification and the accuracy of live broadcast object recommendation.
[0172] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0173] Based on the same inventive concept, the embodiment of the present application also provides a data processing device for implementing the data processing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more data processing device embodiments provided below can refer to the limitations on the data processing method above, and will not be repeated here.
[0174] In one embodiment, Fig.11 As shown, a data processing device 1100 is provided, comprising: a data acquisition module 1102, a subset determination module 1104, a sub-bipartite graph generation module 1106 and a bipartite graph association module 1108, wherein:
[0175] The data acquisition module 1102 is used to acquire the to-be-processed object set corresponding to the target time period and the target object set associated with the to-be-processed object set;
[0176] Subset determination module 1104, used to determine the subsets of objects to be processed corresponding to the sub-time periods from the set of objects to be processed, and determine the subsets of target objects corresponding to the sub-time periods from the set of target objects associated with the set of objects to be processed, wherein the sub-time periods are obtained by dividing the target time period;
[0177] Sub-bipartite graph generation module 1106, used to generate a bipartite graph based on the to-be-processed object subsets corresponding to each sub-time period and the target object subsets associated with the to-be-processed object subsets, to obtain sub-bipartite graphs corresponding to each sub-time period;
[0178] The bipartite graph association module 1108 is used to associate the matching objects in the sub-bipartite graphs corresponding to each sub-time period to obtain a target association graph corresponding to the target time period. The target association graph is used to extract graph information through a graph neural network.
[0179] In one embodiment, the data processing device 1100 further includes:
[0180] The merging module is used to merge the sub-bipartite graphs corresponding to each sub-time period according to the time sequence of each sub-time period to obtain a merged bipartite graph, in which the sub-bipartite graphs are not connected; and the merged bipartite graph is used as the target association graph corresponding to the target time period.
[0181] In one embodiment, the sub-bipartite graph generation module 1106 is also used to determine the current sub-time period from each sub-time period, and obtain the current subset of objects to be processed corresponding to the current sub-time period, and obtain the current target object subset associated with the current subset of objects to be processed; establish each object node pair based on each current object to be processed in the current subset of objects to be processed and the current target object associated with each current object to be processed in the current subset of objects to be processed; aggregate each object node pair to obtain the sub-bipartite graph corresponding to the current sub-time period; traverse each sub-time period in turn to obtain the sub-bipartite graph corresponding to each sub-time period.
[0182] In one embodiment, the sub-bipartite graph generation module 1106 is also used to determine each repeated node pair and each non-repeated node pair from each object node pair, deduplicate each repeated node pair, and obtain the aggregate node pair corresponding to each repeated node pair; based on each non-repeated node pair and the aggregate node pair, obtain the sub-bipartite graph corresponding to the current sub-time period.
[0183] In one embodiment, the bipartite graph association module 1108 is also used to calculate the similarity of each object in the sub-bipartite graph corresponding to each sub-time period, and use the objects whose similarity exceeds a preset threshold as matching objects; associate the matching objects in the sub-bipartite graph corresponding to each sub-time period to obtain a target association graph corresponding to the target time period.
[0184] In one embodiment, the bipartite graph association module 1108 is further used to determine the same objects from the sub-bipartite graphs corresponding to each sub-time period, and associate the same objects in the sub-bipartite graphs corresponding to each sub-time period to obtain a target association graph corresponding to the target time period.
[0185] In one embodiment, the bipartite graph association module 1108 is also used to determine the same objects to be processed from the sub-bipartite graphs corresponding to each sub-time period; in the sub-bipartite graphs corresponding to each sub-time period, the same objects to be processed are associated according to the time sequence of each sub-time period to obtain a target association graph corresponding to the target time period.
[0186] In one embodiment, the bipartite graph association module 1108 is also used to determine the same target object from the sub-bipartite graphs corresponding to each sub-time period; in the sub-bipartite graphs corresponding to each sub-time period, the same target object is associated according to the time sequence of each sub-time period to obtain a target association graph corresponding to the target time period.
[0187] In one embodiment, the bipartite graph association module 1108 is also used to determine the same objects to be processed and the same target objects from the sub-bipartite graphs corresponding to each sub-time period; in the sub-bipartite graphs corresponding to each sub-time period, the same objects to be processed are associated according to the time sequence of each sub-time period, and in the sub-bipartite graphs corresponding to each sub-time period, the same target objects are associated according to the time sequence of each sub-time period, to obtain a target association graph corresponding to the target time period.
[0188] In one embodiment, the data processing device 1100 further includes:
[0189] The classification module is used to input the target association graph into the graph neural network to extract graph information and obtain the semantic representation corresponding to each object node in the target association graph; classify the object nodes based on the semantic representation corresponding to each object node to obtain the category corresponding to each object node.
[0190] In one embodiment, the data processing device 1100 further includes:
[0191] A transaction module is used to obtain a user object set and a transaction object set corresponding to a target time period, wherein a transaction relationship exists between the user objects in the user object set and the transaction objects corresponding to the transaction object set; determine the user object subsets corresponding to each sub-time period from the user object set, and determine the transaction object subsets corresponding to each sub-time period from the transaction object set associated with the user object set; generate a bipartite graph based on the user object subsets corresponding to each sub-time period and the transaction object subsets associated with the user object subsets, and obtain a transaction sub-bipartite graph corresponding to each sub-time period; associate matching users in the transaction sub-bipartite graphs corresponding to each sub-time period, and obtain a target transaction graph corresponding to the target time period; input the target transaction graph into an abnormal crowd recognition model to perform abnormal crowd recognition, obtain the abnormality degree corresponding to each user object in the target transaction graph, and determine abnormal user objects from each user object based on the abnormality degree corresponding to each user object.
[0192] In one embodiment, the data processing device 1100 further includes:
[0193] A recommendation module is used to obtain a video set corresponding to a target time period and a viewing object set associated with the video set; determine the video subsets corresponding to each sub-time period from the video set, and determine the viewing object subsets corresponding to each sub-time period from the viewing object set associated with the video set; generate a bipartite graph based on the video subsets corresponding to each sub-time period and the viewing object subsets associated with the video subsets, and obtain a video recommendation sub-bipartite graph corresponding to each sub-time period; associate the matching videos in the video recommendation sub-bipartite graph corresponding to each sub-time period, and obtain a target video graph corresponding to the target time period; input the target video graph into a video recommendation model to perform video recommendation calculation, obtain the recommendation degree corresponding to each video in the target video graph, and determine a target recommended video from each video based on the recommendation degree corresponding to each video.
[0194] Each module in the above data processing device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0195] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig.12 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store a set of objects to be processed and target object set data associated with the set of objects to be processed. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a data processing method is implemented.
[0196] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.13As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a data processing method is implemented. The display unit of the computer device is used to form a visually visible image, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse, etc.
[0197] Those skilled in the art will understand that Fig.12 or Fig.13 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0198] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0199] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0200] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0201] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0202] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0203] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0204] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A data processing method, characterized in that: The method comprises: Acquire a to-be-processed object set corresponding to a target time period and a target object set associated with the to-be-processed object set; Determine the subsets of objects to be processed corresponding to the sub-time periods from the set of objects to be processed, and determine the subsets of target objects corresponding to the sub-time periods from the set of target objects associated with the set of objects to be processed, wherein the sub-time periods are obtained by dividing the target time period; Generate a bipartite graph based on the subsets of objects to be processed corresponding to the sub-time periods and the subsets of target objects associated with the subsets of objects to be processed, to obtain sub-bipartite graphs corresponding to the sub-time periods; The matching objects in the sub-bipartite graphs corresponding to the sub-time periods are associated to obtain a target association graph corresponding to the target time period, and the target association graph is used to extract graph information through a graph neural network.
2. The method according to claim 1, characterized in that The method further comprises: Merging the sub-bipartite graphs corresponding to the sub-time periods respectively according to the time sequence of the sub-time periods to obtain a merged bipartite graph, wherein the sub-bipartite graphs in the merged bipartite graph are not connected; The merged bipartite graph is used as the target association graph corresponding to the target time period.
3. The method according to claim 1, characterized in that The generating of the bipartite graph based on the subsets of objects to be processed corresponding to the respective sub-time periods and the subsets of target objects associated with the subsets of objects to be processed to obtain the sub-bipartite graphs corresponding to the respective sub-time periods includes: Determine a current sub-time period from the sub-time periods, obtain a current subset of objects to be processed corresponding to the current sub-time period, and obtain a current subset of target objects associated with the current subset of objects to be processed; Establishing each object node pair based on each current object to be processed in the current object to be processed subset and the current target object respectively associated with each current object to be processed in the current target object subset; Aggregating each pair of object nodes to obtain a sub-bipartite graph corresponding to the current sub-time period; Each of the sub-time periods is traversed in sequence to obtain a sub-bipartite graph corresponding to each of the sub-time periods.
4. The method according to claim 3, characterized in that The step of aggregating the object node pairs to obtain a sub-bipartite graph corresponding to the current sub-time period includes: Determine each duplicate node pair and each non-duplicate node pair from each object node pair, remove duplicates from each duplicate node pair, and obtain aggregate node pairs corresponding to each duplicate node pair; Based on the non-repetitive node pairs and the aggregated node pairs, a sub-bipartite graph corresponding to the current sub-time period is obtained.
5. The method according to claim 1, characterized in that The step of associating the matching objects in the sub-bipartite graphs corresponding to the sub-time periods to obtain a target association graph corresponding to the target time period includes: Calculate the similarity of each object in the sub-bipartite graph corresponding to each sub-time period, and take the objects whose similarity exceeds a preset threshold as matching objects; The matching objects are associated in the sub-bipartite graphs corresponding to the sub-time periods to obtain a target association graph corresponding to the target time period.
6. The method according to claim 1, characterized in that The step of associating the matching objects in the sub-bipartite graphs corresponding to the sub-time periods to obtain a target association graph corresponding to the target time period includes: The same objects are determined from the sub-bipartite graphs corresponding to the sub-time periods, and the same objects are associated in the sub-bipartite graphs corresponding to the sub-time periods to obtain a target association graph corresponding to the target time period.
7. The method according to claim 6, characterized in that The determining the same objects from the sub-bipartite graphs corresponding to the sub-time periods, and associating the same objects in the sub-bipartite graphs corresponding to the sub-time periods to obtain the target association graph corresponding to the target time period includes: Determine the same to-be-processed objects from the sub-bipartite graphs corresponding to the sub-time periods; In the sub-bipartite graphs corresponding to the sub-time periods, the same objects to be processed are associated according to the time sequence of the sub-time periods to obtain a target association graph corresponding to the target time period.
8. The method according to claim 6, characterized in that The determining the same objects from the sub-bipartite graphs corresponding to the sub-time periods, and associating the same objects in the sub-bipartite graphs corresponding to the sub-time periods to obtain the target association graph corresponding to the target time period includes: Determine the same target object from the sub-bipartite graphs corresponding to the sub-time periods; In the sub-bipartite graphs corresponding to the sub-time periods, the same target objects are associated according to the time sequence of the sub-time periods to obtain a target association graph corresponding to the target time period.
9. The method according to claim 6, characterized in that The determining the same objects from the sub-bipartite graphs corresponding to the sub-time periods, and associating the same objects in the sub-bipartite graphs corresponding to the sub-time periods to obtain the target association graph corresponding to the target time period includes: Determine the same to-be-processed object and the same target object from the sub-bipartite graphs corresponding to the sub-time periods; In the sub-bipartite graphs corresponding to the sub-time periods, the same objects to be processed are associated according to the time sequence of the sub-time periods, and in the sub-bipartite graphs corresponding to the sub-time periods, the same target objects are associated according to the time sequence of the sub-time periods to obtain a target association graph corresponding to the target time period.
10. The method according to claim 1, characterized in that After associating the matching objects in the sub-bipartite graphs corresponding to the sub-time periods to obtain the target association graph corresponding to the target time period, the method further includes: Inputting the target association graph into the graph neural network to extract graph information, and obtaining semantic representations corresponding to each object node in the target association graph; The object nodes are classified based on the semantic representations corresponding to the respective object nodes to obtain the categories corresponding to the respective object nodes.
11. The method according to claim 1, characterized in that: The method further comprises: Acquire a user object set and a transaction object set corresponding to a target time period, wherein a transaction relationship exists between the user objects in the user object set and the corresponding transaction objects in the transaction object set; Determine the user object subsets corresponding to the sub-time periods from the user object set, and determine the transaction object subsets corresponding to the sub-time periods from the transaction object set associated with the user object set; Generate a bipartite graph based on the user object subsets corresponding to the sub-time periods and the transaction object subsets associated with the user object subsets, to obtain transaction sub-bipartite graphs corresponding to the sub-time periods; Associating the matched users in the transaction sub-bipartite graphs corresponding to the respective sub-time periods to obtain a target transaction graph corresponding to the target time period; The target transaction graph is input into an abnormal crowd identification model to identify abnormal crowds, and the abnormality degree corresponding to each user object in the target transaction graph is obtained. The abnormal user object is determined from the user objects based on the abnormality degree corresponding to each user object.
12. The method according to claim 1, characterized in that The method further comprises: Obtaining a video set corresponding to a target time period and a viewing object set associated with the video set; Determine the video subsets corresponding to the sub-time periods from the video set, and determine the viewing object subsets corresponding to the sub-time periods from the viewing object set associated with the video set; Generate a bipartite graph based on the video subsets corresponding to the sub-time periods and the viewing object subsets associated with the video subsets, to obtain a video recommendation sub-bipartite graph corresponding to the sub-time periods; Associating the matching videos in the video recommendation sub-bipartite graphs corresponding to the sub-time periods, respectively, to obtain a target video graph corresponding to the target time period; The target video graph is input into a video recommendation model to perform video recommendation calculation, and the recommendation degree corresponding to each video in the target video graph is obtained. Based on the recommendation degree corresponding to each video, a target recommended video is determined from the videos.
13. A data processing device, characterized in that: The device comprises: A data acquisition module, used to acquire a to-be-processed object set corresponding to a target time period and a target object set associated with the to-be-processed object set; A subset determination module, used to determine the subsets of objects to be processed corresponding to the respective sub-time periods from the set of objects to be processed, and to determine the subsets of target objects corresponding to the respective sub-time periods from the set of target objects associated with the set of objects to be processed, wherein the respective sub-time periods are obtained by dividing the target time period; A sub-bipartite graph generation module is used to generate a bipartite graph based on the subsets of objects to be processed corresponding to the sub-time periods and the subsets of target objects associated with the subsets of objects to be processed, so as to obtain the sub-bipartite graphs corresponding to the sub-time periods; The bipartite graph association module is used to associate the matching objects in the sub-bipartite graphs corresponding to the respective sub-time periods to obtain a target association graph corresponding to the target time period, and the target association graph is used to extract graph information through a graph neural network.
14. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 12 are implemented.
15. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 12 are implemented.
16. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 12 are implemented.
Citation Information
Patent Citations
Method and device for allocating embedded vectors to nodes in bipartite graph
CN111176838A
Scientific article recommendation algorithm based on bipartite graph
CN112948697A
Data processing method and device, computer equipment and computer readable storage medium
CN113987290A
Data recommendation method and device, electronic equipment and medium
CN114036397A
Identification model determination method and related device
CN114528994A
