CN113312368A - Relational data updating method and device, electronic equipment and storage medium - Google Patents

Relational data updating method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113312368A
CN113312368A CN202110861003.4A CN202110861003A CN113312368A CN 113312368 A CN113312368 A CN 113312368A CN 202110861003 A CN202110861003 A CN 202110861003A CN 113312368 A CN113312368 A CN 113312368A
Authority
CN
China
Prior art keywords
connected graph
data
updated
unstable
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110861003.4A
Other languages
Chinese (zh)
Inventor
吴帅
毛颖
王志鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202110861003.4A priority Critical patent/CN113312368A/en
Publication of CN113312368A publication Critical patent/CN113312368A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases

Abstract

The present disclosure relates to a method, an apparatus, an electronic device and a storage medium for updating relationship data, the method comprising: responding to a connected graph updating instruction aiming at the target service, and acquiring current full-scale side data and historical full-scale side data corresponding to the target service; determining incremental side data according to the current full side data and the historical full side data; determining an unstable connected graph in the connected graph set to be updated according to the matching condition of the incremental edge data in the connected graph set to be updated; determining corresponding side data of each service object in the unstable connected graph in the current full side data to obtain a calculation side data set; and updating the unstable connected graph in the connected graph set to be updated according to the calculation side data set and the incremental side data to obtain an updated connected graph set. The method and the device improve the updating efficiency and updating timeliness and reduce the consumption of computing resources.

Description

Relational data updating method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for updating relational data, an electronic device, and a storage medium.
Background
In some service data analysis scenarios, a connectivity graph is an important relational data representation form, and a connectivity graph set corresponding to the service generally needs to be calculated, for example, device ID analysis, user relationship analysis, and anti-cheating analysis for wind control. And with the update of the service data, the connected graph in the connected graph set corresponding to the service also needs to be updated along with the update of the service data.
In the related art, a full-scale calculation mode is adopted for updating the connection graph of the service, that is, all vertices and edge relations corresponding to the service are directly used for calculation, the full-scale calculation updating mode not only wastes a large amount of calculation resources, but also consumes a long time for calculation, and particularly in a large-data-volume scene, a large amount of calculation resources are consumed for directly calculating the connection graph of hundreds of billions of edge relations at any time.
Disclosure of Invention
The disclosure provides a relational data updating method, a relational data updating device, an electronic device and a storage medium, which are used for at least solving the problems of high computing resource consumption and long computing time consumption existing in the related art for updating a service connectivity graph. The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a relationship data updating method, including:
responding to a connected graph updating instruction aiming at a target service, and acquiring current full-scale side data and historical full-scale side data corresponding to the target service; the historical full-amount side data is full-amount side data corresponding to the target service when the previous connected graph is updated, and the side data indicates the incidence relation between corresponding service objects;
determining incremental side data according to the current full side data and the historical full side data;
determining an unstable connected graph in the connected graph set to be updated according to the matching condition of the incremental edge data in the connected graph set to be updated; the connected graph set to be updated is a connected graph set corresponding to the target service obtained by updating the connected graph last time;
determining corresponding side data of each business object in the current full-amount side data in the unstable connected graph to obtain a calculation side data set;
and updating the unstable connected graph in the connected graph set to be updated according to the calculation side data set and the incremental side data to obtain an updated connected graph set.
In an exemplary embodiment, when the incremental edge data includes at least one newly added edge data, the determining, according to a matching condition of the incremental edge data in a to-be-updated connected graph set, an unstable connected graph in the to-be-updated connected graph set includes:
determining two first business objects corresponding to each new edge adding data;
searching first connection graphs corresponding to the two first service objects respectively in the connection graph set to be updated; the first connected graph comprises the corresponding first business object;
and when the first connected graph corresponding to at least one first service object in the two first service objects is found, determining the unstable connected graph according to the first connected graph corresponding to the at least one first service object.
In an exemplary embodiment, when the at least one first service object is the two first service objects, the determining an unstable connected graph according to the first connected graph corresponding to the at least one first service object includes:
and when the first connected graphs corresponding to the first business objects are not the same connected graph, determining the first connected graph corresponding to the first business objects as an unstable connected graph.
In an exemplary embodiment, when the at least one first service object is any one of the two first service objects, the determining an unstable connected graph according to the first connected graph corresponding to the at least one first service object includes:
and determining the first connected graph corresponding to any one first service object as an unstable connected graph.
In an exemplary embodiment, the method further comprises:
and when the first connected graphs corresponding to the two first service objects are not found, determining the newly added edge data as pure newly added edge data.
In an exemplary embodiment, when the incremental edge data includes at least one vanishing edge data, the determining, according to a matching condition of the incremental edge data in a to-be-updated connected graph set, an unstable connected graph in the to-be-updated connected graph set includes:
determining two second business objects corresponding to each lost edge data;
determining second connected graphs respectively corresponding to the two second service objects in the connected graph set to be updated as unstable connected graphs; the second connected graph comprises the corresponding second business object.
In an exemplary embodiment, the updating the unstable connected graph in the connected graph set to be updated according to the calculation side data set and the incremental side data, and obtaining an updated connected graph set includes:
acquiring pure new edge data in the incremental edge data;
adding the pure newly added edge data serving as calculation edge data into the calculation edge data set;
generating an updated unstable connected graph according to the added calculation edge data set;
acquiring connected graphs except the unstable connected graph in the connected graph set to be updated to obtain a stable connected graph;
and merging the updated unstable connected graph and the stable connected graph to obtain the updated connected graph set.
According to a second aspect of the embodiments of the present disclosure, there is provided a relationship data updating apparatus, including:
the system comprises a full-amount side data acquisition unit, a data processing unit and a data processing unit, wherein the full-amount side data acquisition unit is configured to execute a connected graph updating instruction for a target service, and acquire current full-amount side data and historical full-amount side data corresponding to the target service; the historical full-amount side data is full-amount side data corresponding to the target service when the previous connected graph is updated, and the side data indicates the incidence relation between corresponding service objects;
an incremental side data determination unit configured to perform determining incremental side data according to the current full side data and the historical full side data;
the unstable connected graph determining unit is configured to determine an unstable connected graph in the connected graph set to be updated according to the matching condition of the incremental edge data in the connected graph set to be updated; the connected graph set to be updated is a connected graph set corresponding to the target service obtained by updating the connected graph last time;
the calculation side data determining unit is configured to execute determining side data corresponding to each service object in the unstable connected graph in the current full-amount side data to obtain a calculation side data set;
and the updating unit is configured to update the unstable connected graph in the connected graph set to be updated according to the calculation side data set and the increment side data to obtain an updated connected graph set.
In an exemplary embodiment, when the incremental side data includes at least one new added side data, the unstable connected component determining unit includes:
a first business object determining unit configured to perform determining two first business objects corresponding to each of the newly added edge data;
a connected graph searching unit configured to search the first connected graphs corresponding to the two first business objects in the connected graph set to be updated; the first connected graph comprises the corresponding first business object;
the first determining subunit is configured to determine, when the first connected graph corresponding to at least one of the two first service objects is found, the unstable connected graph according to the first connected graph corresponding to the at least one first service object.
In an exemplary embodiment, when the at least one first business object is the two first business objects, the first determining subunit includes:
and the second determining subunit is configured to determine the first connected graph corresponding to each first service object as an unstable connected graph when the first connected graphs corresponding to each first service object are not the same connected graph.
In an exemplary embodiment, when the at least one first business object is any one of the two first business objects, the first determining subunit includes:
and the third determining subunit is configured to determine the first connected graph corresponding to the any one first service object as the unstable connected graph.
In an exemplary embodiment, the unstable connected component determining unit further includes:
and the pure newly added edge data determining unit is configured to determine the newly added edge data as pure newly added edge data when the first connected graph corresponding to the two first service objects is not found.
In an exemplary embodiment, when the incremental edge data includes at least one vanishing edge data, the unstable connected component determining unit includes:
the second business object determining unit is configured to determine two second business objects corresponding to each lost edge data;
a fourth determining subunit, configured to perform determining, as an unstable connected graph, second connected graphs corresponding to the two second business objects in the connected graph set to be updated, respectively; the second connected graph comprises the corresponding second business object.
In an exemplary embodiment, the updating unit includes:
a pure new edge data obtaining unit configured to perform obtaining pure new edge data in the incremental edge data;
an adding unit configured to add the pure new edge data as calculation edge data to the calculation edge data set;
a connected graph calculation unit configured to generate an updated unstable connected graph according to the added calculation edge data set;
the stable connected graph acquisition unit is configured to acquire connected graphs except the unstable connected graph in the connected graph set to be updated to obtain a stable connected graph;
a merging unit configured to perform merging the updated unstable connected graph and the stable connected graph to obtain the updated connected graph set.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the relationship data updating method of the first aspect.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium, wherein instructions of the computer-readable storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the relationship data updating method of the first aspect.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the relational data update method of the first aspect described above.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
when updating a connected graph of a target service, determining incremental side data by acquiring current full side data corresponding to the target service and historical full side data corresponding to the last time of updating the connected graph, further determining an unstable connected graph in a connected graph set to be updated according to the matching condition of the incremental side data in the connected graph set to be updated, determining side data corresponding to each service object in the unstable connected graph in the current full side data to obtain a calculated side data set, further updating the unstable connected graph in the connected graph set to be updated according to the calculated side data set and the incremental side data to obtain an updated connected graph set, thereby only performing connected graph incremental updating calculation on the unstable connected graph, and having the same calculation accuracy with the related technology, the updating efficiency and the updating timeliness are improved, and the consumption of computing resources is greatly reduced.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
FIG. 1 is a flow diagram illustrating a method of relational data update according to an example embodiment;
fig. 2 is a schematic flowchart illustrating a process of determining an unstable connected graph in a connected graph to be updated according to a matching condition of incremental edge data in a connected graph set to be updated when the incremental edge data includes at least one newly added edge data according to an exemplary embodiment;
fig. 3 is a schematic flow chart illustrating a process of determining an unstable connected graph according to a first connected graph corresponding to at least one first service object when a first connected graph corresponding to at least one first service object in two first service objects is found according to an exemplary embodiment;
FIG. 4 is a flowchart illustrating a step of determining an unstable connected graph in a connected graph to be updated according to a matching condition of incremental edge data in a connected graph set to be updated when the incremental edge data includes at least one vanishing edge data according to an exemplary embodiment;
FIG. 5 is a schematic flow chart illustrating updating an unstable connected graph in a set of connected graphs to be updated according to computed edge data and incremental edge data according to an exemplary embodiment;
FIG. 6 is a block diagram illustrating a relational data update apparatus according to an example embodiment;
FIG. 7 is a block diagram illustrating an electronic device in accordance with an example embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
In practical application, a connected graph set corresponding to a service generally includes a large number of connected graphs, and each connected graph is composed of a vertex set and a set of edges between vertices, and may be denoted as: g (V, E), wherein G represents a connected graph, V is a set of vertexes in the graph G, E is a set of edges between the vertexes in the graph G, the vertexes contained in the connected graph correspond to the business objects in the business, and the contained edges indicate the association relation between the corresponding business objects.
In the related art, all vertex and edge relations corresponding to a service are adopted to perform full calculation each time the service is updated by a connected graph, and although the full calculation mode is simple, a large amount of calculation resources are wasted and the calculation time is long. In the process of implementing the present invention, the inventor finds that although the number of connected graphs in the connected graph set corresponding to a service is large, the proportion of the connected graphs which change in one update period is small, and therefore if a part which needs to be calculated by the connected graphs can be accurately identified and incremental update of the connected graphs is performed, the efficiency of updating the connected graphs for the service can be greatly improved, and the consumption of computing resources can be reduced.
Based on this, the embodiment of the present disclosure provides a relational data updating method, which accurately identifies an unstable connected graph in a connected graph set to be updated, and then performs incremental updating on the unstable connected graph in the connected graph set to be updated to obtain an updated connected graph set, so as to solve the problems of large consumption of computing resources and long time consumption of computing in total connected graph updating calculation, improve updating efficiency and updating timeliness while having the same computing accuracy as that of the total connected graph updating calculation, and realize automation and process of the whole process, thereby reducing resource consumption and improving timeliness when updating the connected graph in various service scenarios such as device ID analysis, user relationship analysis, and pneumatic control anti-cheating.
The relational data updating method of the embodiment of the present disclosure may be executed by a relational data updating apparatus, where the relational data updating apparatus may be configured in an electronic device, and taking the electronic device as a server as an example, the server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server that provides basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a network service, cloud communication, a middleware service, a domain name service, a security service, a CDN, and a big data and artificial intelligence platform.
Fig. 1 is a flowchart illustrating a relational data update method according to an exemplary embodiment, as shown in fig. 1, including the following steps.
In step S101, in response to a connectivity graph update instruction for a target service, current full-volume side data and historical full-volume side data corresponding to the target service are acquired.
The historical full-amount side data is full-amount side data corresponding to the target service when the previous connected graph is updated, and it can be understood that the full-amount side data refers to all side data.
The edge data indicates an association between corresponding business objects. And the connected graph updating instruction indicates that the connected graph set corresponding to the target service is updated.
The target service in the embodiment of the present disclosure may include a device ID analysis service, a user relationship analysis service, a user behavior analysis service, and the like, and correspondingly, the service object may include a device ID, a user identifier, a user behavior identifier, and the like.
In an exemplary embodiment, the set of connectivity graphs of the target service may be updated according to a preset update period, where the preset update period may be set according to actual needs, and may be, for example, 1 day, 3 days, and so on. In specific implementation, a corresponding update timer may be set for each service, and when the timing duration of the update timer reaches a preset update period, a connectivity graph update instruction for the corresponding service is automatically triggered.
In another exemplary embodiment, the change amplitude of the full-amount side data corresponding to each service may be monitored, and when the change amplitude reaches a preset change amplitude, a connectivity graph update instruction for the service whose change amplitude reaches the preset change amplitude is automatically triggered. The preset variation range may be set according to actual needs, and may be, for example, 5%, 10%, and the like.
In step S103, incremental side data is determined according to the current full side data and the historical full side data.
Specifically, the current full-scale side data and the historical full-scale side data may be compared, and the difference side data of the current full-scale side data and the historical full-scale side data may be used as the incremental side data.
It should be noted that the incremental side data may include newly added side data, that is, side data that is present in the current full-size side data but not present in the historical full-size side data; the incremental side data may also include vanishing side data, i.e., side data that is not present in the current full-scale side data but is present in the historical full-scale side data.
In step S105, an unstable connected graph in the connected graph set to be updated is determined according to a matching condition of the incremental edge data in the connected graph set to be updated.
And the connected graph set to be updated is a connected graph set corresponding to the target service obtained by updating the connected graph last time. The unstable connected graph is a connected graph in which merging and/or splitting will exist under the influence of incremental edge data.
In an exemplary embodiment, if the incremental side data includes at least one newly added side data, when determining an unstable connected graph in the connected graph to be updated according to a matching condition of the incremental side data in the connected graph set to be updated, the method shown in fig. 2 may be adopted, including:
in step S201, two first business objects corresponding to each of the newly added edge data are determined.
Specifically, each piece of newly added edge data indicates an association relationship between two first service objects, and the two first service objects serve as two vertexes of the connection graph of the corresponding piece of newly added edge data.
In step S203, first connection graphs corresponding to the two first service objects are searched in the connection graph set to be updated; the first connected graph comprises the corresponding first business object.
Specifically, for each first business object, a first connected graph with the first business object as a vertex is searched in the connected graph set to be updated.
In step S205, when the first connected graph corresponding to at least one of the two first service objects is found, the unstable connected graph is determined according to the first connected graph corresponding to the at least one first service object.
For example, newly added edge data Ei (V1,V2) Wherein V is1And V2Two first business objects corresponding to the newly added edge data are shown, and then the two first business objects are aimed at V1In stand byFind in the new connected graph set with V1First connectivity graph M as a vertex1 (V1) For V2Searching for V in the connected graph set to be updated2First connectivity graph M as a vertex1 (V2). If M is found1 (V1) And M1(V2) Or only find M1 (V1) Or only find M1 (V2) Then can be according to M1 (V1) And M1 (V2) Or M is1(V1) Or M is1 (V2) To determine an unstable connectivity map.
In an exemplary embodiment, when the at least one first service object is two first service objects corresponding to the newly added edge data, that is, the M is found in the above example1 (V1) And M1 (V2) In this case, the step S205 may include the following steps as shown in fig. 3 when determining the unstable connected graph according to the first connected graph corresponding to the at least one first service object:
in step S301, when the first connected graphs corresponding to the first business objects are not the same connected graph, the first connected graph corresponding to the first business objects is determined as an unstable connected graph.
Specifically, it may be determined whether the first connected graph corresponding to each of the two first service objects is the same connected graph in the connected graph set to be updated, and if not, it indicates that the two first service objects corresponding to the newly added edge data are not in the same connected graph, and at this time, the first connected graph corresponding to each of the first service objects may be determined to be an unstable connected graph.
Find M in the above example1 (V1) And M1 (V2) For example, judge M1 (V1) And M1 (V2) If the connection graph is the same in the connection graph set to be updated, if M is the same, judging whether the connection graph is the same in the connection graph set to be updated or not, and if M is the same in the connection graph set to be updated, judging whether the connection graph is the same in the connection graph set to be updated or not1 (V1) And M1 (V2) If not, it indicates two first services of the newly added edge dataObject V1And V2Not in the same connectivity graph, affected by the newly added edge data, M1 (V1) And M1 (V2) Will merge, at which point M may be merged1 (V1) And M1 (V2) And determining as an unstable connected graph.
In the embodiment of the present disclosure, when the first connected graph corresponding to each of the two first service objects corresponding to the newly added edge data is found, and the first connected graph corresponding to each of the two first service objects is not the same connected graph, the first connected graph corresponding to each of the two first service objects is determined as the unstable connected graph, so that the accuracy of determining the unstable connected graph can be ensured under the condition that the incremental edge data includes at least one newly added edge data.
In an exemplary embodiment, when the at least one first service object is any one of two first service objects corresponding to the newly added edge data, that is, only M is found in the above example1 (V1) Or only find M1 (V2) In this case, the step S205 may include the following steps as shown in fig. 3 when determining the unstable connected graph according to the first connected graph corresponding to the at least one first service object:
in step S303, the first connected graph corresponding to the any one first service object is determined as an unstable connected graph.
Find only M in the above example1 (V1) For example, the M1 (V1) Determining as an unstable connected graph; if only M is found1 (V2) Then M is added1 (V2) And determining as an unstable connected graph.
When only the first connected graph corresponding to any one of the two first service objects corresponding to the newly added edge data is found, the first connected graph corresponding to any one of the first service objects is determined to be the unstable connected graph, so that the accuracy of determining the unstable connected graph under the condition that the newly added edge data comprises at least one newly added edge data is ensured.
In the embodiment of the disclosure, under the condition that the incremental edge data includes at least one newly added edge data, by determining two first service objects corresponding to each newly added edge data, searching for first connection graphs corresponding to the two first service objects respectively in a connection graph set to be updated, and determining an unstable connection graph according to a connection graph corresponding to at least one first service object when the first connection graph corresponding to the at least one first service object in the two first service objects is found, an unstable connection graph corresponding to each newly added edge data can be accurately identified, and the accuracy of identifying the unstable connection graph in the connection graph set to be updated is ensured.
To improve connectivity graph update efficiency, in an exemplary embodiment, with continued reference to fig. 2, the method may further include:
in step S207, when the first connectivity graphs corresponding to the two first service objects are not found, the newly added edge data is determined as pure newly added edge data.
Again taking the foregoing example as an example, if M is not found1 (V1) Also, M is not found1 (V2) Then the new edge data E is addedi (V1,V2) And determining the data as the pure new edge data.
When the first connected graphs corresponding to the two first service objects corresponding to the newly added edge data are not found, the newly added edge data are determined to be pure newly added edge data, so that the pure newly added edge data in the incremental edge data can be rapidly determined, and the updating efficiency of the connected graph set updated based on the incremental edge data can be improved.
In an exemplary embodiment, if the incremental edge data includes at least one vanishing edge data, when determining an unstable connected graph in the connected graph set to be updated according to a matching condition of the incremental edge data in the connected graph set to be updated, a method shown in fig. 4 may be adopted, including:
in step S401, two second business objects corresponding to each of the vanishing edge data are determined.
Specifically, each piece of vanishing edge data indicates an association relationship between two second service objects, and the two second service objects serve as two vertices where corresponding vanishing edge data are connected in a connected graph.
In step S403, determining second connected graphs corresponding to the two second service objects in the connected graph set to be updated respectively, as unstable connected graphs; the second connected graph comprises the corresponding second business object.
Specifically, because the vanishing edge data is edge data that is not present in the current full-scale edge data but is present in the historical full-scale edge data, each second service object corresponding to the vanishing edge data can be definitely corresponding to a second connected graph in the to-be-updated connected graph set, so that the second connected graphs respectively corresponding to the two second service objects in the to-be-updated connected graph set can be used as unstable connected graphs.
For example, the vanishing edge data Ej (V3,V4) Wherein V is3And V4Two second business objects corresponding to the data representing the vanishing edge are pointed to V3The corresponding second connected graph M can be determined in the connected graph set to be updated2 (V3) For V4The corresponding second connected graph M can be determined in the connected graph set to be updated2 (V4) Then M may be added2 (V3) And M2(V4) As an unstable connected graph, and in practical application, M2 (V3) And M2 (V4) Typically the same connectivity graph.
When the incremental edge data comprises at least one vanishing edge data, determining two second service objects corresponding to each vanishing edge data, and determining second connected graphs respectively corresponding to the two second service objects in a connected graph set to be updated as unstable connected graphs, so that the unstable connected graphs corresponding to each vanishing edge data can be accurately identified, and the identification accuracy and comprehensiveness of the unstable connected graphs in the connected graph set to be updated are ensured.
In step S107, side data corresponding to each of the business objects in the unstable connected graph in the current full-volume side data is determined, so as to obtain a calculation side data set.
In a specific implementation, the vertices in each unstable connected graph can be extracted for each unstable connected graph, and the service objects corresponding to the vertices are determined based on the one-to-one correspondence relationship between the vertices and the service objects, so as to determine the corresponding side data of each service object in the unstable connected graph in the current full side data, and obtain the calculation side data set.
In practical application, in order to improve the update efficiency, the calculation edge data set may be edge data corresponding to all the business objects related to the unstable connected graph in the current full-amount edge data, so that it is avoided that each unstable connected graph needs to be subjected to one update calculation of the unstable connected graph, and the update efficiency of the connected graph set is improved.
In step S109, the unstable connected graph in the connected graph set to be updated is updated according to the calculation side data set and the incremental side data, so as to obtain an updated connected graph set.
According to the method and the device, the unstable connected graph in the connected graph set to be updated is accurately identified, and then the unstable connected graph in the connected graph set to be updated is only subjected to incremental updating to obtain the updated connected graph set, so that the problems of high computing resource consumption and long computing time consumption existing in the updating and calculating of the full-scale connected graph are solved, the updating efficiency and the updating timeliness can be improved while the same computing accuracy as that of the updating and calculating of the full-scale connected graph is achieved, the whole process is automatic and streamlined, and therefore the effects of reducing resource consumption and improving timeliness are achieved when the connected graph is updated in various service scenes such as equipment ID analysis, user relationship analysis and pneumatic control anti-cheating.
In an exemplary embodiment, to further improve the update efficiency and reduce the consumption of the computing resources, as shown in fig. 5, when updating the unstable connected graph in the to-be-updated connected graph set according to the computing side data and the incremental side data, the updating may include:
in step S501, pure new edge data in the incremental edge data is obtained.
In step S503, the pure new edge data is added to the calculation edge data set as calculation edge data.
In step S505, an updated unstable connected graph is generated from the added calculation side data set.
In a specific implementation, a graph algorithm based on Spark graph x may be used to construct a graph according to the added computed edge data set, where the constructed graph is an updated unstable connected graph. The Spark graph x is a distributed graph processing framework, and provides an interface for graph computation and graph mining based on a Spark platform. Spark graph x provides a variety of graph algorithms, where a Connected branching algorithm (i.e., Connected Components) can be used to construct the Connected graph.
In step S507, connected graphs except the unstable connected graph in the connected graph set to be updated are obtained, so as to obtain a stable connected graph.
In step S509, the updated unstable connected graph and the stable connected graph are merged to obtain the updated connected graph set.
Specifically, the updated unstable connected graph and the stable connected graph are stored in one set, that is, an updated connected graph set corresponding to the target service is obtained, and the updated connected graph set is obtained.
The embodiment of the disclosure obtains the pure new edge data in the incremental edge data, adds the pure new edge data to the calculation edge data set, and obtains the updated unstable connected graph in a manner of reconstructing the connected graph based on the added calculation edge data set, and then combines the updated unstable connected graph and the stable connected graph to obtain the updated connected graph set, thereby avoiding complexity of direct modification on the basis of the original unstable connected graph (the direct modification may involve splitting and combining of graphs, and the situation may be very complex), further improving the updating efficiency, and reducing consumption of calculation resources.
FIG. 6 is a block diagram illustrating a relational data update apparatus according to an example embodiment. Referring to fig. 6, the relational data update apparatus 600 includes a full-volume-side data acquisition unit 610, an incremental-side data determination unit 620, an unstable connected graph determination unit 630, a calculation-side data determination unit 640, and an update unit 650, where:
a full-side data obtaining unit 610 configured to execute, in response to a connectivity graph update instruction for a target service, obtaining current full-side data and historical full-side data corresponding to the target service; the historical full-amount side data is full-amount side data corresponding to the target service when the previous connected graph is updated, and the side data indicates the incidence relation between corresponding service objects;
an incremental edge data determining unit 620 configured to perform determining incremental edge data according to the current full amount edge data and the historical full amount edge data;
an unstable connected graph determining unit 630, configured to determine an unstable connected graph in the connected graph set to be updated according to a matching condition of the incremental edge data in the connected graph set to be updated; the connected graph set to be updated is a connected graph set corresponding to the target service obtained by updating the connected graph last time;
a calculation side data determining unit 640, configured to perform determining side data corresponding to each service object in the unstable connected graph in the current full-amount side data, so as to obtain a calculation side data set;
the updating unit 650 is configured to update the unstable connected graph in the connected graph set to be updated according to the calculation edge data set and the incremental edge data, so as to obtain an updated connected graph set.
In an exemplary embodiment, when the incremental side data includes at least one new added side data, the unstable connected component determining unit 630 includes:
a first business object determining unit configured to perform determining two first business objects corresponding to each of the newly added edge data;
a connected graph searching unit configured to search the first connected graphs corresponding to the two first business objects in the connected graph set to be updated; the first connected graph comprises the corresponding first business object;
the first determining subunit is configured to determine, when the first connected graph corresponding to at least one of the two first service objects is found, the unstable connected graph according to the first connected graph corresponding to the at least one first service object.
In an exemplary embodiment, when the at least one first business object is the two first business objects, the first determining subunit includes:
and the second determining subunit is configured to determine the first connected graph corresponding to each first service object as an unstable connected graph when the first connected graphs corresponding to each first service object are not the same connected graph.
In an exemplary embodiment, when the at least one first business object is any one of the two first business objects, the first determining subunit includes:
and the third determining subunit is configured to determine the first connected graph corresponding to the any one first service object as the unstable connected graph.
In an exemplary embodiment, the unstable connected component determining unit 630 further includes:
and the pure newly added edge data determining unit is configured to determine the newly added edge data as pure newly added edge data when the first connected graph corresponding to the two first service objects is not found.
In an exemplary embodiment, when the incremental edge data includes at least one vanishing edge data, the unstable connected component determining unit 630 includes:
the second business object determining unit is configured to determine two second business objects corresponding to each lost edge data;
a fourth determining subunit, configured to perform determining, as an unstable connected graph, second connected graphs corresponding to the two second business objects in the connected graph set to be updated, respectively; the second connected graph comprises the corresponding second business object.
In an exemplary embodiment, the update unit 650 includes:
a pure new edge data obtaining unit configured to perform obtaining pure new edge data in the incremental edge data;
an adding unit configured to add the pure new edge data as calculation edge data to the calculation edge data set;
a connected graph calculation unit configured to generate an updated unstable connected graph according to the added calculation edge data set;
the stable connected graph acquisition unit is configured to acquire connected graphs except the unstable connected graph in the connected graph set to be updated to obtain a stable connected graph;
a merging unit configured to perform merging the updated unstable connected graph and the stable connected graph to obtain the updated connected graph set.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
In one exemplary embodiment, there is also provided an electronic device, comprising a processor; a memory for storing processor-executable instructions; when the processor is configured to execute the instructions stored in the memory, any one of the relationship data updating methods provided in the embodiments of the present disclosure is implemented.
The electronic device may be a terminal, a server, or a similar computing device, taking the electronic device as a server as an example, fig. 7 is a block diagram of an electronic device for relational data update shown according to an exemplary embodiment, and as shown in fig. 7, the server 700 may generate a relatively large difference due to different configurations or performances, and may include one or more Central Processing Units (CPUs) 710 (the processor 710 may include but is not limited to a Processing device such as a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 730 for storing data, and one or more storage media 720 (e.g., one or more mass storage devices) for storing an application 723 or data 722. Memory 730 and storage medium 720 may be, among other things, transient storage or persistent storage. The program stored in the storage medium 720 may include one or more modules, each of which may include a series of instruction operations for the server. Still further, central processor 710 may be configured to communicate with storage medium 720 and execute a series of instruction operations in storage medium 720 on server 700. The server 700 may also include one or more power supplies 760, one or more wired or wireless network interfaces 750, one or more input-output interfaces 740, and/or one or more operating systems 721, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
The input/output interface 740 may be used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the server 700. In one example, the input/output Interface 740 includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the input/output interface 740 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
It will be understood by those skilled in the art that the structure shown in fig. 7 is only an illustration and is not intended to limit the structure of the electronic device. For example, server 700 may also include more or fewer components than shown in FIG. 7, or have a different configuration than shown in FIG. 7.
In an exemplary embodiment, a computer-readable storage medium comprising instructions, such as memory 730 comprising instructions, executable by processor 710 of apparatus 600 to perform the above-described method is also provided. Alternatively, the computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In an exemplary embodiment, a computer program product is also provided, which includes a computer program that when executed by a processor implements any one of the relationship data updating methods provided in the embodiments of the present disclosure.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (17)

1. A relational data update method, comprising:
responding to a connected graph updating instruction aiming at a target service, and acquiring current full-scale side data and historical full-scale side data corresponding to the target service; the historical full-amount side data is full-amount side data corresponding to the target service when the previous connected graph is updated, and the side data indicates the incidence relation between corresponding service objects;
determining incremental side data according to the current full side data and the historical full side data;
determining an unstable connected graph in the connected graph set to be updated according to the matching condition of the incremental edge data in the connected graph set to be updated; the connected graph set to be updated is a connected graph set corresponding to the target service obtained by updating the connected graph last time;
determining corresponding side data of each business object in the current full-amount side data in the unstable connected graph to obtain a calculation side data set;
and updating the unstable connected graph in the connected graph set to be updated according to the calculation side data set and the incremental side data to obtain an updated connected graph set.
2. The relationship data updating method according to claim 1, wherein when the incremental edge data includes at least one new added edge data, the determining the unstable connected graph in the connected graph set to be updated according to the matching condition of the incremental edge data in the connected graph set to be updated includes:
determining two first business objects corresponding to each new edge adding data;
searching first connection graphs corresponding to the two first service objects respectively in the connection graph set to be updated; the first connected graph comprises the corresponding first business object;
and when the first connected graph corresponding to at least one first service object in the two first service objects is found, determining the unstable connected graph according to the first connected graph corresponding to the at least one first service object.
3. The relationship data updating method according to claim 2, wherein when the at least one first business object is the two first business objects, the determining an unstable connected graph according to the first connected graph corresponding to the at least one first business object comprises:
and when the first connected graphs corresponding to the first business objects are not the same connected graph, determining the first connected graph corresponding to the first business objects as an unstable connected graph.
4. The relationship data updating method according to claim 2, wherein when the at least one first service object is any one of the two first service objects, the determining the unstable connected graph according to the first connected graph corresponding to the at least one first service object includes:
and determining the first connected graph corresponding to any one first service object as an unstable connected graph.
5. The relational data update method according to claim 2, wherein the method further comprises:
and when the first connected graphs corresponding to the two first service objects are not found, determining the newly added edge data as pure newly added edge data.
6. The relational data updating method according to claim 1, wherein when the incremental edge data includes at least one vanishing edge data, the determining an unstable connected graph in the connected graph set to be updated according to a matching condition of the incremental edge data in the connected graph set to be updated includes:
determining two second business objects corresponding to each lost edge data;
determining second connected graphs respectively corresponding to the two second service objects in the connected graph set to be updated as unstable connected graphs; the second connected graph comprises the corresponding second business object.
7. The relationship data updating method according to claim 5, wherein the updating the unstable connected graph in the connected graph set to be updated according to the calculation edge data set and the incremental edge data to obtain an updated connected graph set includes:
acquiring pure new edge data in the incremental edge data;
adding the pure newly added edge data serving as calculation edge data into the calculation edge data set;
generating an updated unstable connected graph according to the added calculation edge data set;
acquiring connected graphs except the unstable connected graph in the connected graph set to be updated to obtain a stable connected graph;
and merging the updated unstable connected graph and the stable connected graph to obtain the updated connected graph set.
8. A relational data update apparatus, comprising:
the system comprises a full-amount side data acquisition unit, a data processing unit and a data processing unit, wherein the full-amount side data acquisition unit is configured to execute a connected graph updating instruction for a target service, and acquire current full-amount side data and historical full-amount side data corresponding to the target service; the historical full-amount side data is full-amount side data corresponding to the target service when the previous connected graph is updated, and the side data indicates the incidence relation between corresponding service objects;
an incremental side data determination unit configured to perform determining incremental side data according to the current full side data and the historical full side data;
the unstable connected graph determining unit is configured to determine an unstable connected graph in the connected graph set to be updated according to the matching condition of the incremental edge data in the connected graph set to be updated; the connected graph set to be updated is a connected graph set corresponding to the target service obtained by updating the connected graph last time;
the calculation side data determining unit is configured to execute determining side data corresponding to each service object in the unstable connected graph in the current full-amount side data to obtain a calculation side data set;
and the updating unit is configured to update the unstable connected graph in the connected graph set to be updated according to the calculation side data set and the increment side data to obtain an updated connected graph set.
9. The relationship data updating apparatus according to claim 8, wherein when the incremental edge data includes at least one new added edge data, the unstable connected component determining unit includes:
a first business object determining unit configured to perform determining two first business objects corresponding to each of the newly added edge data;
a connected graph searching unit configured to search the first connected graphs corresponding to the two first business objects in the connected graph set to be updated; the first connected graph comprises the corresponding first business object;
the first determining subunit is configured to determine, when the first connected graph corresponding to at least one of the two first service objects is found, the unstable connected graph according to the first connected graph corresponding to the at least one first service object.
10. The relationship data updating apparatus according to claim 9, wherein when the at least one first business object is the two first business objects, the first determining subunit comprises:
and the second determining subunit is configured to determine the first connected graph corresponding to each first service object as an unstable connected graph when the first connected graphs corresponding to each first service object are not the same connected graph.
11. The relationship data updating apparatus according to claim 9, wherein when the at least one first business object is any one of the two first business objects, the first determining subunit comprises:
and the third determining subunit is configured to determine the first connected graph corresponding to the any one first service object as the unstable connected graph.
12. The relationship data updating apparatus according to claim 9, wherein the unstable connected graph determining unit further includes:
and the pure newly added edge data determining unit is configured to determine the newly added edge data as pure newly added edge data when the first connected graph corresponding to the two first service objects is not found.
13. The relationship data updating apparatus according to claim 8, wherein when the incremental edge data includes at least one vanishing edge data, the unstable connected graph determining unit includes:
the second business object determining unit is configured to determine two second business objects corresponding to each lost edge data;
a fourth determining subunit, configured to perform determining, as an unstable connected graph, second connected graphs corresponding to the two second business objects in the connected graph set to be updated, respectively; the second connected graph comprises the corresponding second business object.
14. The relationship data updating apparatus according to claim 12, wherein the updating unit includes:
a pure new edge data obtaining unit configured to perform obtaining pure new edge data in the incremental edge data;
an adding unit configured to add the pure new edge data as calculation edge data to the calculation edge data set;
a connected graph calculation unit configured to generate an updated unstable connected graph according to the added calculation edge data set;
the stable connected graph acquisition unit is configured to acquire connected graphs except the unstable connected graph in the connected graph set to be updated to obtain a stable connected graph;
a merging unit configured to perform merging the updated unstable connected graph and the stable connected graph to obtain the updated connected graph set.
15. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the relational data update method of any one of claims 1 to 7.
16. A computer-readable storage medium whose instructions, when executed by a processor of an electronic device, enable the electronic device to perform the relationship data update method of any one of claims 1 to 7.
17. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the relational data update method according to any one of claims 1 to 7.
CN202110861003.4A 2021-07-29 2021-07-29 Relational data updating method and device, electronic equipment and storage medium Pending CN113312368A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110861003.4A CN113312368A (en) 2021-07-29 2021-07-29 Relational data updating method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110861003.4A CN113312368A (en) 2021-07-29 2021-07-29 Relational data updating method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113312368A true CN113312368A (en) 2021-08-27

Family

ID=77381964

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110861003.4A Pending CN113312368A (en) 2021-07-29 2021-07-29 Relational data updating method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113312368A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113806600A (en) * 2021-09-29 2021-12-17 中国平安人寿保险股份有限公司 Method, device, equipment and medium for establishing family relation network of business data

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106325756A (en) * 2015-06-15 2017-01-11 阿里巴巴集团控股有限公司 Data storage and data computation methods and devices
CN106375360A (en) * 2015-07-24 2017-02-01 阿里巴巴集团控股有限公司 Method, device and system for updating graph data
CN110622156A (en) * 2017-05-12 2019-12-27 华为技术有限公司 Incremental graph computation for querying large graphs
US20200082026A1 (en) * 2018-09-06 2020-03-12 International Business Machines Corporation Graph data processing
CN113157981A (en) * 2021-03-26 2021-07-23 支付宝(杭州)信息技术有限公司 Graph network relation diffusion method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106325756A (en) * 2015-06-15 2017-01-11 阿里巴巴集团控股有限公司 Data storage and data computation methods and devices
CN106375360A (en) * 2015-07-24 2017-02-01 阿里巴巴集团控股有限公司 Method, device and system for updating graph data
CN110622156A (en) * 2017-05-12 2019-12-27 华为技术有限公司 Incremental graph computation for querying large graphs
US20200082026A1 (en) * 2018-09-06 2020-03-12 International Business Machines Corporation Graph data processing
CN113157981A (en) * 2021-03-26 2021-07-23 支付宝(杭州)信息技术有限公司 Graph network relation diffusion method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113806600A (en) * 2021-09-29 2021-12-17 中国平安人寿保险股份有限公司 Method, device, equipment and medium for establishing family relation network of business data
CN113806600B (en) * 2021-09-29 2023-09-15 中国平安人寿保险股份有限公司 Method, device, equipment and medium for constructing family relation network of service data

Similar Documents

Publication Publication Date Title
CN112566093B (en) Terminal relation identification method and device, computer equipment and storage medium
CN112804079B (en) Alarm analysis method, device, equipment and storage medium for cloud computing platform
CN112559631B (en) Data processing method and device of distributed graph database and electronic equipment
CN113312368A (en) Relational data updating method and device, electronic equipment and storage medium
CN110427574B (en) Route similarity determination method, device, equipment and medium
CN112686418A (en) Method and device for predicting performance timeliness
CN114912629A (en) Joint perception model training method, joint perception device, joint perception equipment and medium
CN112783508B (en) File compiling method, device, equipment and storage medium
CN114153986A (en) Knowledge graph construction method and device, electronic equipment and storage medium
CN113592293A (en) Risk identification processing method, electronic device and computer-readable storage medium
CN113468226A (en) Service processing method, device, electronic equipment and storage medium
CN111859187A (en) POI query method, device, equipment and medium based on distributed graph database
CN117056565A (en) Power information processing method, device, equipment and medium based on RPA and AI
CN116050159A (en) Simulation scene set generation method, device, equipment and medium
CN114579311B (en) Method, device, equipment and storage medium for executing distributed computing task
CN114564523B (en) Big data vulnerability analysis method and cloud AI system for intelligent virtual scene
CN116049420A (en) Knowledge graph generation task construction method and device, electronic equipment and storage medium
CN114969444A (en) Data processing method and device, electronic equipment and storage medium
CN112527943A (en) Map rendering method, map rendering device, map rendering equipment and storage medium
CN114971053A (en) Training method and device for online prediction model of network line loss rate of low-voltage transformer area
CN112749540B (en) Text matching method, training device and training equipment for text matching model
CN110502715B (en) Click probability prediction method and device
CN114528973A (en) Method for generating business processing model, business processing method and device
CN113704256A (en) Data identification method and device, electronic equipment and storage medium
CN111460237A (en) Data query method and device, readable storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination