Data processing method and device, electronic equipment and storage medium

By performing clustering and graph embedding processing on graph data, event subgraphs and relationship subgraphs are generated, which solves the problem in the existing technology of being unable to capture and respond to changes in graph data in a timely manner, and achieves efficient graph data processing.

CN119336953APending Publication Date: 2025-01-21LENOVO (BEIJING) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411515473.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-28
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

The prior art cannot capture and respond to changes in the graph data in a timely manner when processing graph data, and the data processing efficiency is low.

Method used

First graph data is generated by clustering at least two events, and the data includes an event subgraph and a relationship subgraph. Then, based on the variation of the target event subgraph and the relationship subgraph, graph embedding processing is performed to determine the similarity between different events.

Benefits of technology

It significantly reduces the computational complexity, increases the processing speed, enhances the sensitivity to changes in events over time, can capture and respond to changes in graph data in a timely manner, and improves the data processing efficiency of graph data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119336953A_ABST
    Figure CN119336953A_ABST
Patent Text Reader

Abstract

The invention provides a data processing method and device, electronic equipment and a storage medium. The method comprises the following steps: clustering at least two events to obtain first graph data; the first graph data at least comprises at least two event sub-graphs and at least one relation sub-graph; the event sub-graph represents a set of node data and edge data of the event, and the relation sub-graph represents an incidence relation between different event sub-graphs; based on a target event sub-graph included in the first graph data, determining a first variable quantity of the target event sub-graph along with time change; determining a second variable quantity of a target relation sub-graph corresponding to the target event sub-graph along with time change; and based on the first variable quantity and the second variable quantity, performing graph embedding processing on the first graph data, and determining the similarity between different events.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a data processing method, device, electronic device and storage medium. Background Art

[0002] In the fields of online public opinion monitoring, emergency response, and marketing communication, the amount of graph data of related events is relatively large and the graph data is constantly changing. At present, the data processing of graph data in related technologies is performed through static graphs, which cannot capture and respond to changes in graph data in a timely manner, and the data processing efficiency of graph data is low. Summary of the invention

[0003] The embodiments of the present application provide a data processing method, device, electronic device and storage medium to solve one or more problems existing in the above-mentioned related technologies.

[0004] According to a first aspect of the present application, a data processing method is provided, the method comprising: clustering at least two events to obtain first graph data; the first graph data comprises at least two event subgraphs and at least one relationship subgraph; the event subgraph represents a set of node data and edge data of an event, and the relationship subgraph represents the association relationship between different event subgraphs; based on a target event subgraph included in the first graph data, determining a first change amount of the target event subgraph over time; determining a second change amount of a target relationship subgraph corresponding to the target event subgraph over time; based on the first change amount and the second change amount, performing graph embedding processing on the first graph data to determine the similarity between different events.

[0005] According to one embodiment of the present application, clustering at least two events to obtain first graph data includes: obtaining original graph data; clustering the at least two events based on event categories included in the original graph data to obtain a clustering result, wherein the clustering result includes at least event clustering data corresponding to the at least two events respectively; based on the clustering result, extracting the at least two event subgraphs and the at least one relationship subgraph to obtain the first graph data.

[0006] According to an implementation manner of the present application, based on the clustering result, the at least two event subgraphs and the at least one relationship subgraph are extracted to obtain the first graph data, including: extracting the event clustering data to obtain node data and edge data corresponding to each event; based on the node data and edge data corresponding to each event, constructing an event subgraph corresponding to the event; determining the same node data included in different event subgraphs; based on the same node data, constructing relationship subgraphs corresponding to the different event subgraphs; integrating the event subgraph and the relationship subgraph to obtain the first graph data.

[0007] According to an embodiment of the present application, the first change amount of the target event subgraph over time is determined based on the target event subgraph included in the first graph data, including: determining a first event weight of the target event subgraph at a first moment; determining a second event weight of the target event subgraph at a second moment; the first moment is before the second moment; based on the first event weight and the second event weight, the first change amount is determined; the first change amount represents the weight change of the target event subgraph from the first moment to the second moment.

[0008] According to an embodiment of the present application, determining the second change of the target relationship subgraph corresponding to the target event subgraph over time includes: determining the change of the first edge weight sum from the first moment to the second moment; the first edge weight sum represents the sum of the weights of the edge data of the target relationship subgraph; determining the second edge weight change of the second edge weight sum from the first moment to the second moment; the second edge weight sum represents the sum of the weights of the edge data between the node data in the target relationship subgraph; the first moment is before the second moment; determining the second change based on the first edge weight change and the second edge weight change; the second change represents the weight change of the target relationship subgraph from the first moment to the second moment.

[0009] According to an embodiment of the present application, the first graph data is subjected to graph embedding processing based on the first change amount and the second change amount to determine the similarity between different events, including: based on the first change amount and the second change amount, determining embedding parameters for graph embedding processing between the event subgraphs; based on the embedding parameters, performing graph embedding processing on the first graph data to obtain graph embedding vectors corresponding to different event subgraphs; based on the graph embedding vectors corresponding to the different event subgraphs, determining the similarity between different events.

[0010] According to one embodiment of the present application, based on the first change amount and the second change amount, embedding parameters for graph embedding processing between the event subgraphs are determined, including: normalizing the second change amount to obtain a normalized value; in response to the second change amount satisfying a set change condition, determining the embedding parameters based on the first change amount, the normalized value and hyperparameters of the graph embedding processing.

[0011] According to a second aspect of the present application, a data processing device is provided, which includes: a clustering module, which is used to cluster at least two events to obtain first graph data; the first graph data includes at least two event subgraphs and at least one relationship subgraph; the event subgraph represents a set of node data and edge data of the event, and the relationship subgraph represents the association relationship between different event subgraphs; a first determination module, which is used to determine a first change amount of the target event subgraph over time based on the target event subgraph included in the first graph data; a second determination module, which is used to determine a second change amount of the target relationship subgraph corresponding to the target event subgraph over time; and a processing module, which is used to perform graph embedding processing on the first graph data based on the first change amount and the second change amount to determine the similarity between different events.

[0012] According to a third aspect of the present application, an electronic device is provided, including:

[0013] at least one processor; and

[0014] a memory communicatively connected to the at least one processor; wherein,

[0015] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in the present application.

[0016] According to a fourth aspect of the present application, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method described in the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present application will become readily understood. In the accompanying drawings, several embodiments of the present application are shown in an exemplary and non-limiting manner, wherein:

[0018] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts.

[0019] Figure 1 The processing flow diagram of the data processing method provided in the embodiment of the present application is shown in FIG. Figure 1 ;

[0020] Figure 2 The processing flow diagram of the data processing method provided in the embodiment of the present application is shown in FIG. Figure 2 ;

[0021] Figure 3 The processing flow diagram of the data processing method provided in the embodiment of the present application is shown in FIG. Figure 3 ;

[0022] Figure 4 The processing flow diagram of the data processing method provided in the embodiment of the present application is shown in FIG. Figure 4 ;

[0023] Figure 5 The processing flow diagram of the data processing method provided in the embodiment of the present application is shown in FIG. Figure 5 ;

[0024] Figure 6 The processing flow diagram of the data processing method provided in the embodiment of the present application is shown in FIG. Figure 6 ;

[0025] Figure 7 The processing flow diagram of the data processing method provided in the embodiment of the present application is shown in FIG. Figure 7 ;

[0026] Figure 8 An application scenario diagram of the data processing method provided in an embodiment of the present application is shown;

[0027] Fig. 9 An optional schematic diagram of a data processing device provided in an embodiment of the present application is shown;

[0028] Fig.10 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0029] In order to make the purpose, features, and advantages of the present application more obvious and easy to understand, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0030] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0031] In the following description, the terms "first\second" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0032] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0033] The processing flow of the data processing method provided in the embodiment of the present application is described. Figure 1 , Figure 1 The processing flow diagram of the data processing method provided in the embodiment of the present application is as follows: Figure 1 , will combine Figure 1 Steps S101-S104 are shown for explanation.

[0034] Step S101: cluster at least two events to obtain first graph data.

[0035] In some embodiments, the first graph data may include at least two event subgraphs and at least one relationship subgraph. The event subgraph may represent a collection of node data and edge data of an event. The relationship subgraph may represent the association relationship between different event subgraphs. Clustering at least two events may include: clustering at least two events according to a pre-set event category to obtain a clustering result, and the clustering result may include event clustering data corresponding to the at least two events. The first graph data may include: at least two event subgraphs and at least one relationship subgraph extracted based on the clustering result.

[0036] Step S102: determining a first change amount of the target event subgraph over time based on the target event subgraph included in the first graph data.

[0037] In some embodiments, the target event subgraph may include: any event subgraph in the first graph data. The first change amount may include: the degree of change of the target event subgraph within a certain period of time. The first change amount may represent the weight change of the target event subgraph within a certain period of time. The weight change may represent the change of multiple attributes, such as the change of event flow, the change of event intensity and the change of event importance. The embodiments of the present application do not limit the specific weight change.

[0038] Step S103: determining a second change amount of the target relationship subgraph corresponding to the target event subgraph over time.

[0039] In some embodiments, the target relationship subgraph may include: any relationship subgraph corresponding to the target event subgraph in the first graph data. The second change amount may include: the degree of change of the target relationship subgraph within a certain period of time. The second change amount may characterize the weight change of the target relationship subgraph within a certain period of time. The weight change may characterize the change of multiple attributes, such as the change of event flow, the change of event intensity and the change of event importance. The embodiments of the present application do not limit the specific weight change.

[0040] Step S104: Based on the first variation and the second variation, the first graph data is subjected to graph embedding processing to determine similarities between different events.

[0041] In some embodiments, performing graph embedding processing on the first graph data may include: converting the first graph data into a vector space representation so that the subgraphs included in the first graph data can be compared in a low-dimensional vector space. Determining the similarity between different events may include: determining the similarity between different event subgraphs by calculating the similarity index between the graph embedding vectors corresponding to different event subgraphs. Among them, the similarity index may include: cosine similarity, Euclidean distance, and Jaccard similarity coefficient and other indicators. The embodiments of the present application do not limit the specific similarity index.

[0042] The method of the embodiment of the present application simplifies complex graph data into first graph data containing key event subgraphs and relationship subgraphs through cluster analysis, significantly reducing computational complexity and accelerating processing speed. By optimizing the weight of the time dimension, the sensitivity to changes in events over time is enhanced, and the dynamic changes of events can be captured more accurately. Through graph embedding processing, the correlation between different events can be determined based on the changes in events, taking into account the changes and timeliness of events, and can timely capture and respond to changes in graph data, and improve the data processing efficiency of graph data.

[0043] In some embodiments, the processing flow of the data processing method is shown as follows: Figure 2 ,like Figure 2 As shown, clustering at least two events in step S101 to obtain first graph data may specifically include:

[0044] Step S201, obtaining original image data.

[0045] In this embodiment, the original graph data may include: full data collected during online public opinion, emergencies or marketing communications. Specifically, the full data may include event categories. The full data may be collected from a data source, where the data source may include a database, an API (Application Programming Interface), and other data collection tools. The embodiments of this application do not limit the specific data source.

[0046] Step S202: cluster at least two events based on the event categories included in the original graph data to obtain a clustering result.

[0047] In this embodiment, the event category may include a pre-set label for classifying the event, such as "product release", "user complaint", "natural disaster", etc. The embodiment of the present application does not limit the specific event category. The clustering method may include: K-means clustering, hierarchical clustering, and deep embedding clustering. The embodiment of the present application does not limit the specific clustering method. Clustering at least two events may include: if there is a defined event category corresponding to the event, clustering at least two events according to the defined event category. Clustering at least two events may also include: if there is no defined event category corresponding to the event, creating a new event category according to the characteristics and attributes of the event, and clustering at least two events according to the created new event category. There are similarities between events of the same class in the clustering results. There are differences between events of different classes, and there are differences in key features between events of different classes.

[0048] Step S203: extract at least two event subgraphs and at least one relationship subgraph based on the clustering result to obtain first graph data.

[0049] In this embodiment, the clustering result may include event clustering data corresponding to at least two events. By extracting the event clustering data, at least two event subgraphs and at least one relationship subgraph can be obtained, and the event subgraph and the relationship subgraph can be integrated to obtain the first graph data. The event clustering data may include: node data and edge data corresponding to each event. Node data can be used to represent entities participating in the event, such as individuals, organizations, places, topics, etc. The embodiment of the present application does not limit the specific node data. Edge data can be used to represent the association relationship between node data, such as interaction, connection, influence, etc. The embodiment of the present application does not limit the specific edge data. The clustering result may also include: information such as the number of clusters, time information, and cluster members. Among them, the number of clusters may include the number of clusters finally formed. Time dynamic information may include timestamp information contained in the event. Cluster members may include events contained in each cluster. The clustering result may also include other clustering information, which is not limited in the embodiment of the present application.

[0050] The method of the embodiment of the present application can extract key event subgraphs and relationship subgraphs from large-scale original graph data through cluster analysis, and simplify the complex graph data into first graph data containing key event subgraphs and relationship subgraphs. This significantly reduces the computational complexity and speeds up the processing, improves the processing efficiency of data processing, and enhances the ability to identify the relationships between events.

[0051] In some embodiments, the processing flow of the data processing method is shown as follows: Figure 3 ,like Figure 3 As shown, in step S203, based on the clustering result, at least two event subgraphs and at least one relationship subgraph are extracted to obtain the first graph data, which may specifically include:

[0052] Step S301, extracting event clustering data to obtain node data and edge data corresponding to each event.

[0053] In this embodiment, node data can be used to represent entities participating in an event, such as individuals, organizations, locations, topics, etc. The embodiment of the present application does not limit the specific node data. Edge data can be used to represent the association relationship between node data, such as interaction, connection, influence, etc. The embodiment of the present application does not limit the specific edge data.

[0054] Step S302: construct an event subgraph corresponding to each event based on the node data and edge data corresponding to each event.

[0055] Step S303: determine the same node data included in different event subgraphs.

[0056] Step S304: construct relationship subgraphs corresponding to different event subgraphs based on the same node data.

[0057] In this embodiment, the event subgraph may include: multiple node data and edge data related to the event. The event subgraph may be used to analyze the corresponding event. Different event subgraphs may include the same node data. The same node data may represent the existence of associated features in different events, for example, the existence of the same participants, the same place or the same time in different events. The relationship subgraph may include: the same node data and edge data between different event subgraphs. The relationship subgraph may be used to represent the connection between different event subgraphs. The same node data and edge data between different event subgraphs are much smaller than the node data and edge data of the event subgraph. The size of the association matrix corresponding to the relationship subgraph is much smaller than the size of the event matrix of the event subgraph.

[0058] Step S305: Integrate the event subgraph and the relationship subgraph to obtain first graph data.

[0059] In this embodiment, the first graph data may include: merging the event subgraph with the corresponding relationship subgraph to create a graph data representation. The first graph data may integrate information of at least two event subgraphs and at least one relationship subgraph. The first graph data may be used to represent the relationship between the event subgraph and the relationship subgraph.

[0060] As an example, taking the analysis of information dissemination events on a social media platform as an example, the information dissemination events may include two events, "new product launch" and "competitor product recall". The event clustering data of the social media platform may include user posts, comments and forwardings related to the two events. Text analysis and keyword matching are performed on the event clustering data to extract the node data and edge data corresponding to each event. Among them, the node data may include user data, and the edge data may include interactive data performed by users. Based on the node data and edge data corresponding to each event, an event subgraph is constructed for each event. The event subgraph is used to represent the corresponding users and their interactions. By analyzing the event subgraphs corresponding to the two events, the same node data included in the two event subgraphs is determined. The same node data represents user data that is active in the discussion of "new product launch" and "competitor product recall". And a relationship subgraph of the two event subgraphs is created based on these node data. The relationship subgraph is used to represent the interactive relationship between users between the two events. The two event subgraphs and the corresponding relationship subgraphs are integrated to obtain the first graph data. The first graph data may include: all relevant node data and edge data corresponding to the two events.

[0061] The method of the embodiment of the present application extracts the node data and edge data corresponding to each event, constructs an event subgraph, identifies the same node data included in different event subgraphs, and constructs a relationship subgraph based on the same node data, and finally integrates these subgraphs to form the first graph data. This significantly reduces the computational complexity and accelerates the processing speed, improves the processing efficiency of data processing, and enhances the ability to identify the relationship between events, so that changes in graph data can be captured and responded to in a timely manner.

[0062] In some embodiments, the processing flow of the data processing method is shown as follows: Figure 4 ,like Figure 4 As shown, determining the first change amount of the target event subgraph over time based on the target event subgraph included in the first graph data in step S102 may include:

[0063] Step S401: determine a first event weight of a target event subgraph at a first moment.

[0064] Step S402: determine a second event weight of the target event subgraph at the second moment.

[0065] Step S403: determining a first change amount based on the first event weight and the second event weight.

[0066] In this embodiment, the first moment may be before the second moment. The first change amount may represent the weight change of the same target event subgraph from the first moment to the second moment. The first event weight may include: the importance of the target event subgraph at the first moment. The second event weight may include: the importance of the target event subgraph at the second moment. At least two target event subgraphs may be recorded at the first moment to obtain {E 1 ,E 2 ,E 3 …E n The relationship subgraph between each event subgraph can be recorded as {R 1 ,R 2 ,R 3 …R m At the first moment, the corresponding event weights can be calculated according to the recorded at least two target relationship subgraphs. Similarly, at the second moment, at least two target event subgraphs can be recorded and the corresponding event weights can be calculated, which will not be described in detail here.

[0067] As an example, steps S401-S403 can be expressed by the following formulas (1)-(3):

[0068]

[0069] ΔS i =||E t2 -E t1 || i / ||E t2 -E t1 ||| max (3)

[0070] Among them, i represents the i-th target event subgraph, represents the first event weight of the target event subgraph at the first moment, E t1 represents the target event subgraph at the first moment, represents the second event weight of the target event subgraph at the second moment, E t2 Represents the target event subgraph at the second moment. ΔS i Indicates the first change. ΔS i Can be and Get the difference.

[0071] The method of the embodiment of the present application determines the weight change of the event weight of the target event subgraph over time by calculating the event weight of the target event subgraph at the first moment and the second moment, and can determine the dynamic change of the event subgraph over time. By optimizing the weight in the time dimension, the sensitivity to the change of events over time is enhanced, and the dynamic change of events can be captured more accurately. Then, the graph embedding processing is performed according to the first change amount, and the correlation between different events can be determined based on the change of events, and the change of graph data can be captured and responded to in a timely manner, and the data processing efficiency of graph data is improved.

[0072] In some embodiments, the processing flow of the data processing method is shown as follows: Figure 5 ,like Figure 5 As shown, determining the second change amount of the target relationship subgraph corresponding to the target event subgraph over time in step S103 may include:

[0073] Step S501, determining a change in a first edge weight of a first edge weight sum from a first moment to a second moment.

[0074] Step S502: determine a change in the second edge weight of the second edge weight sum from the first moment to the second moment.

[0075] Step S503: Determine a second change amount based on the first edge weight change amount and the second edge weight change amount.

[0076] In this embodiment, the first moment may be before the second moment. The second change amount may represent the weight change of the target relationship subgraph from the first moment to the second moment. The first edge weight sum may represent the sum of the weights of the edge data of the target relationship subgraph. The second edge weight sum may represent the sum of the weights of the edge data between the node data in the target relationship subgraph. At the first moment, the target relationship subgraph R may be determined to be the target event subgraph E. i and event subgraph E j The target relationship subgraph R may include multiple node data.

[0077] As an example, step S503 can be expressed by the following formula (4):

[0078]

[0079] Among them, j represents the jth target relationship subgraph, ΔR j represents the second change of the target relationship subgraph. Δm represents the change of the first edge weight, ∑(w t2 -w t1) represents the change in the second edge weight, w represents the weight of the connected edge data of a node data in the target relationship subgraph R. c represents the set of node data in the target relationship subgraph R. m represents the sum of the first edge weights. The sum of the second edge weights at the first moment can be expressed as The sum of the second edge weights at the second moment can be expressed as

[0080] The method of the embodiment of the present application can determine the dynamic change of the relationship subgraph over time by calculating the weight of the edge data of the target relationship subgraph at the first moment and the second moment, and can enhance the sensitivity to the change of events over time through the weight optimization of the time dimension, and can more accurately capture the dynamic change of events. Then, the graph embedding processing is performed according to the second change amount, and the correlation between different events can be determined based on the change of events, and the change of graph data can be captured and responded to in time, and the data processing efficiency of graph data is improved.

[0081] In some embodiments, the processing flow of the data processing method is shown as follows: Figure 6 ,like Figure 6 As shown, in step S104, performing graph embedding processing on the first graph data based on the first variation and the second variation to determine the similarity between different events may include:

[0082] Step S601: Determine embedding parameters for graph embedding processing between event subgraphs based on the first variation and the second variation.

[0083] Step S602: Based on the embedding parameters, the first graph data is subjected to graph embedding processing to obtain graph embedding vectors corresponding to different event subgraphs.

[0084] Step S603: Determine the similarity between different events based on the graph embedding vectors corresponding to different event subgraphs.

[0085] In this embodiment, the embedding parameters may include: parameters for mapping graph data into a low-dimensional vector space. The embedding parameters may specifically include: parameters such as the embedding dimension, learning rate, and walk coefficient. The embedding parameters may also include other parameters, and the embodiments of the present application do not limit the specific embedding parameters. The graph embedding vector may include: a vector representation of an event subgraph mapped into a low-dimensional vector space. The graph embedding processing may include graph embedding processing methods such as DeepWalk, Node2Vec, and HIN2Vec. The graph embedding processing may also include other methods, and the embodiments of the present application do not limit the specific graph embedding processing methods. Based on the graph embedding vectors corresponding to different event subgraphs, determining the similarity between different events may include: determining the similarity between different event subgraphs by calculating the similarity index between the graph embedding vectors corresponding to different event subgraphs. Among them, the similarity index may include: indicators such as cosine similarity, Euclidean distance, and Jaccard similarity coefficient. The embodiments of the present application do not limit the specific similarity index.

[0086] The method of the embodiment of the present application performs graph embedding processing according to the first change amount corresponding to the event subgraph and the second change amount corresponding to the relationship subgraph, determines the embedding parameters of the graph embedding processing based on the change amounts, can determine the correlation between different events based on the changes of events, takes into account the changes and timeliness of events, timely captures and responds to changes in graph data, and improves the data processing efficiency of graph data.

[0087] In some embodiments, the processing flow of the data processing method is shown as follows: Figure 7 ,like Figure 7 As shown, determining the embedding parameters for graph embedding processing between event subgraphs based on the first variation and the second variation in step S601 may include:

[0088] Step S701, normalize the second variation to obtain a normalized value.

[0089] Step S702: In response to the second change amount satisfying the set change condition, an embedding parameter is determined based on the first change amount, the normalized value, and the hyperparameters of the graph embedding processing.

[0090] As an example, step S701 can be expressed by the following formula (5):

[0091]

[0092] Among them, ΔR norm represents the normalized value of the second change, ΔR represents the second change from the first moment to the second moment, ΔR min Indicates the minimum value of the second change amount from the first moment to the second moment. ΔR maxIndicates the maximum value of the second change amount from the first moment to the second moment.

[0093] Take the target event subgraph E i For example, with E i The associated event subgraphs may include: event subgraph E j and event subgraph E k . Determine the target event subgraph E i With event subgraph E j The target relationship subgraph between them is the target relationship subgraph R j , determine the target event subgraph E i With event subgraph E k The target relationship subgraph between them is the target relationship subgraph R k . Among them, ΔR norm 1 represents the target relationship subgraph R j Normalized value of the second change over time. ΔR norm 2 represents the target relationship subgraph R k Normalized value of the second change over time. ΔR j Represents the target relationship subgraph R j Second change over time, ΔR k Represents the target relationship subgraph R k A second variation that varies with time.

[0094] For the target relationship subgraph R j , in response to ΔR j >0, the wandering coefficient α in the embedding coefficient of the graph embedding process is corrected to A*(1+ΔR norm 1) ΔS i / S i ; In response to ΔR j =0, the wandering coefficient α is corrected to 1; ΔR j <0, the wandering coefficient α is corrected to A*(1-ΔR norm 1)ΔS i / S i .

[0095] For the target relationship subgraph R k , in response to ΔR k >0, the wandering coefficient α in the embedding coefficient of the graph embedding process is corrected to A*(1+ΔR norm 2) ΔS i / S i ; In response to ΔR k =0, the wandering coefficient α is corrected to 1; ΔR k <0, the wandering coefficient α is corrected to A*(1-ΔR norm 2) ΔS i / Si .

[0096] Among them, ΔS i Represents the target event subgraph E i The first change from the first moment to the second moment, S i The target event subgraph E represents the second moment i The second event weight of , A represents the hyperparameter in the graph embedding process.

[0097] The method of the embodiment of the present application normalizes the second variation, determines the embedding parameters by combining the first variation and the hyperparameters of the graph embedding processing, and then generates the graph embedding representation corresponding to the event subgraph according to the embedding parameters. It is possible to determine the correlation between different events based on the changes in events, taking into account the changes and timeliness of events, timely capturing and responding to changes in graph data, and improving the data processing efficiency of graph data.

[0098] refer to Figure 8 , an application scenario diagram of the data processing method provided in an embodiment of the present application is applied to the data processing of graph data. Among them, time t1 may be before time t2, and the first graph data recorded at time t1 includes event subgraph E1, event subgraph E2 and relationship subgraph R1. Among them, event subgraph E1 may include: node data e1, node data r1 and node data r2. Event subgraph E2 may include: node data e2, node data r1 and node data r2. Event subgraph E2 and event subgraph E1 are different associated event subgraphs. Node data r1 and node data r2 are the same node data included in event subgraph E1 and event subgraph E2. Relationship subgraph R1 can be constructed by node data r1 and node data r2.

[0099] Determine a first change amount of the event subgraph E1 from time t1 to time t2, and determine a second change amount of the relationship subgraph R1 corresponding to the event subgraph E1 from time t1 to time t2. The first change amount represents the weight change of the event subgraph E1 from time t1 to time t2. The second change amount represents the weight change of the relationship subgraph R1 from time t1 to time t2.

[0100] Based on the first change amount and the second change amount, determine the walking coefficient α for graph embedding processing between event subgraph E1 and event subgraph E2. Based on the walking coefficient α, perform graph embedding processing on the first graph data at time t2 to obtain the graph embedding vector corresponding to event subgraph E1 and the graph embedding vector corresponding to event subgraph E2. Based on the graph embedding vector corresponding to event subgraph E1 and the graph embedding vector corresponding to event subgraph E2, determine the similarity between event subgraph E1 and event subgraph E2.

[0101] The following further describes an exemplary structure of the data processing device 90 provided in the embodiment of the present application implemented as a software module. In some embodiments, for example Fig. 9 As shown, the software modules in the data processing device 90 may include: a clustering module 901, which can be used to cluster at least two events to obtain first graph data; the first graph data at least includes at least two event subgraphs and at least one relationship subgraph; the event subgraph represents a set of node data and edge data of the event, and the relationship subgraph represents the association relationship between different event subgraphs; a first determination module 902, which can be used to determine a first change amount of the target event subgraph over time based on the target event subgraph included in the first graph data; a second determination module 903, which can be used to determine a second change amount of the target relationship subgraph corresponding to the target event subgraph over time; a processing module 904, which can be used to perform graph embedding processing on the first graph data based on the first change amount and the second change amount to determine the similarity between different events.

[0102] In some embodiments, the clustering module 901 can be used to: obtain original graph data; cluster at least two events based on the event categories included in the original graph data to obtain a clustering result, and the clustering result at least includes event clustering data corresponding to at least two events; based on the clustering result, extract at least two event subgraphs and at least one relationship subgraph to obtain first graph data.

[0103] In some embodiments, the clustering module 901 can be used to: extract event clustering data to obtain node data and edge data corresponding to each event; construct an event subgraph corresponding to the event based on the node data and edge data corresponding to each event; determine the same node data included in different event subgraphs; based on the same node data, construct relationship subgraphs corresponding to different event subgraphs; integrate the event subgraph and the relationship subgraph to obtain the first graph data.

[0104] In some embodiments, the first determination module 902 can be used to: determine a first event weight of a target event subgraph at a first moment; determine a second event weight of a target event subgraph at a second moment; the first moment is before the second moment; based on the first event weight and the second event weight, determine a first change; the first change characterizes a weight change of the target event subgraph from the first moment to the second moment.

[0105] In some embodiments, the second determination module 903 can be used to: determine the change in the first edge weight sum from the first moment to the second moment; the first edge weight sum represents the sum of the weights of the edge data of the target relationship subgraph; determine the change in the second edge weight sum from the first moment to the second moment; the second edge weight sum represents the sum of the weights of the edge data between the node data in the target relationship subgraph; the first moment is before the second moment; based on the first edge weight change and the second edge weight change, determine the second change; the second change represents the change in the weight of the target relationship subgraph from the first moment to the second moment.

[0106] In some embodiments, the processing module 904 can be used to: determine embedding parameters for graph embedding processing between event subgraphs based on the first change amount and the second change amount; perform graph embedding processing on the first graph data based on the embedding parameters to obtain graph embedding vectors corresponding to different event subgraphs; determine the similarity between different events based on the graph embedding vectors corresponding to different event subgraphs.

[0107] In some embodiments, the processing module 904 can be used to: normalize the second change amount to obtain a normalized value; in response to the second change amount satisfying the set change condition, determine the embedding parameter based on the first change amount, the normalized value and the hyperparameters of the graph embedding processing.

[0108] It should be noted that the description of the device in the embodiment of the present application is similar to the description of the method embodiment described above, and has similar beneficial effects as the method embodiment, so it will not be repeated. Figures 1 to 7 The present invention can be understood by referring to the description of any one of the accompanying drawings.

[0109] According to an embodiment of the present application, the present application also provides an electronic device and a non-transitory computer-readable storage medium.

[0110] Fig.10 A schematic block diagram of an example electronic device 800 that can be used to implement an embodiment of the present application is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.

[0111] like Figure 8As shown, the electronic device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0112] Multiple components in the electronic device 800 are connected to the I / O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the electronic device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0113] The computing unit 801 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above, such as data processing methods. For example, in some embodiments, the data processing method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by the computing unit 801, one or more steps of the data processing method described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform the data processing method in any other appropriate manner (e.g., by means of firmware).

[0114] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0115] The program code for implementing the method of the present application can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, implements the functions / operations specified in the flow chart and / or block diagram. The program code can be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0116] In the context of the present application, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0117] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0118] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0119] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0120] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution disclosed in this application can be achieved, and this document is not limited here.

[0121] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0122] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A data processing method, comprising: Clustering at least two events to obtain first graph data; The first graph data at least includes at least two event subgraphs and at least one relationship subgraph; The event subgraph represents a collection of node data and edge data of an event, and the relationship subgraph represents the association relationship between different event subgraphs; Based on the target event subgraph included in the first graph data, determining a first change amount of the target event subgraph over time; Determine a second change amount of the target relationship subgraph corresponding to the target event subgraph over time; Based on the first variation and the second variation, graph embedding processing is performed on the first graph data to determine similarities between different events.

2. According to the method of claim 1, clustering at least two events to obtain first graph data comprises: Get the original image data; Based on the event categories included in the original graph data, clustering the at least two events to obtain a clustering result, wherein the clustering result at least includes event clustering data corresponding to the at least two events respectively; Based on the clustering result, the at least two event subgraphs and the at least one relationship subgraph are extracted to obtain the first graph data.

3. The method according to claim 2, wherein extracting the at least two event subgraphs and the at least one relationship subgraph based on the clustering result to obtain the first graph data comprises: Extracting the event clustering data to obtain node data and edge data corresponding to each event; Based on the node data and edge data corresponding to each event, construct an event subgraph corresponding to the event; Determine the same node data included in different event subgraphs; Based on the same node data, construct relationship subgraphs corresponding to the different event subgraphs; The event subgraph and the relationship subgraph are integrated to obtain the first graph data.

4. The method according to claim 1, wherein determining a first change amount of the target event subgraph over time based on the target event subgraph included in the first graph data comprises: Determine a first event weight of the target event subgraph at the first moment; Determine a second event weight of the target event subgraph at the second moment; The first moment is before the second moment; Determining the first change amount based on the first event weight and the second event weight; The first change amount represents a weight change of the target event subgraph from the first moment to the second moment.

5. According to the method of claim 1, the determining of a second change amount of the target relationship subgraph corresponding to the target event subgraph over time comprises: Determine a change in the first edge weight of the first edge weight sum from the first moment to the second moment; The first edge weight sum represents the sum of weights of edge data of the target relationship subgraph; Determine a change in the second edge weight of the second edge weight sum from the first moment to the second moment; The second edge weight sum represents the sum of weights of edge data between node data in the target relationship subgraph; The first moment is before the second moment; Based on the first edge weight change amount and the second edge weight change amount, the second change amount is determined; the second change amount represents the weight change of the target relationship subgraph from the first moment to the second moment.

6. The method according to claim 1, wherein the step of performing graph embedding processing on the first graph data based on the first variation and the second variation to determine the similarity between different events comprises: Determining embedding parameters for graph embedding processing between the event subgraphs based on the first variation and the second variation; Based on the embedding parameters, performing graph embedding processing on the first graph data to obtain graph embedding vectors corresponding to different event subgraphs; Based on the graph embedding vectors respectively corresponding to the different event subgraphs, the similarities between different events are determined.

7. The method according to claim 6, wherein determining embedding parameters for graph embedding processing between the event subgraphs based on the first variation and the second variation comprises: Normalizing the second variation to obtain a normalized value; In response to the second change amount satisfying a set change condition, the embedding parameter is determined based on the first change amount, the normalized value, and a hyperparameter of a graph embedding process.

8. A data processing device, comprising: A clustering module, used for clustering at least two events to obtain first graph data; The first graph data at least includes at least two event subgraphs and at least one relationship subgraph; The event subgraph represents a collection of node data and edge data of an event, and the relationship subgraph represents the association relationship between different event subgraphs; A first determining module, configured to determine, based on a target event subgraph included in the first graph data, a first change amount of the target event subgraph over time; A second determination module, used to determine a second change amount of the target relationship subgraph corresponding to the target event subgraph over time; A processing module is used to perform graph embedding processing on the first graph data based on the first change amount and the second change amount to determine the similarity between different events.

9. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the method according to any one of claims 1 to 7.