Map updating method and device, electronic equipment and storage medium
By using methods to trim and repair incomplete graph structures, the problem of low graph update efficiency under large data volumes is solved, and a highly efficient graph update process is achieved.
Patent Information
- Application Number
- CN202310200414.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-28
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2043-02-28
AI Technical Summary
Existing technologies are inefficient in updating graphs with large amounts of data, requiring the reconstruction of the graph structure, which leads to insufficient efficiency.
By obtaining the target update object, performing pruning to obtain the incomplete graph structure, and then repairing it based on the node relationship table, the amount of data for reconstructing the graph structure is reduced, and the update efficiency is improved.
Without rebuilding the graph structure, pruning and repair processes significantly improve the efficiency and accuracy of graph updates.
Smart Images

Figure CN116226130B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and more specifically, to a graph updating method, apparatus, electronic device, and storage medium. Background Technology
[0002] With the development of computer technology, graph computing is being applied more and more widely. For example, graph computing can be applied to the field of data mining, specifically, graphs can be used to mine data such as social media (e.g., social connections); another example is that graph computing can also be applied to the field of transportation route planning, specifically, transportation route data can be abstracted into directed graphs, etc.
[0003] In graph computing applications, graph updates are often involved. Current graph update methods typically reconstruct the graph based on the updated data each time an update is performed. However, while this method can achieve graph updates, it can affect the efficiency of graph updates when the data volume is large. Summary of the Invention
[0004] This disclosure provides at least one graph update method, apparatus, electronic device, and storage medium, which can improve the efficiency of graph updates.
[0005] This disclosure provides a graph update method, including:
[0006] Obtain the node relationship table and target graph structure corresponding to the current data file. The current data file includes multiple sub-files, and each sub-file corresponds to a node in the node relationship table. The target graph structure refers to the graph structure that needs to be updated.
[0007] Obtain the target update object, which includes at least one of the target update node, entry edge, and failed edge, wherein the failed edge refers to the edge of the target graph structure that failed to update in the previous update.
[0008] The target graph structure is pruned based on the target update object to obtain a fragmented graph structure corresponding to the target graph structure, and the target edges that need to be updated for the fragmented graph structure are determined based on the target update object.
[0009] Based on the target edge that needs to be updated and the node relationship table, the incomplete graph structure is repaired to obtain a graph structure that corresponds to the current data file and has been updated.
[0010] In this embodiment, after obtaining the target update object, the target graph structure can be pruned according to the target update object to obtain a fragmented graph structure. Then, based on the target update object, the target edges that need to be updated for the fragmented graph structure are determined. Next, based on the target edges that need to be updated and the node relationship table, the fragmented graph structure is repaired to obtain a graph structure corresponding to the current data file and which has been updated. That is, in this embodiment, during the graph structure update process, it is not necessary to rebuild the graph structure based on the current data file. Only by pruning and repairing the previous target graph structure can the target graph structure be updated. In this way, the amount of data processed during the update process can be reduced, thereby improving the efficiency of graph update.
[0011] In one possible implementation, the step of pruning the target graph structure based on the target update object to obtain a fragmented graph structure corresponding to the target graph structure, and determining the target edges that need to be updated for the fragmented graph structure based on the target update object, includes:
[0012] If the target update object includes the entry edge and / or the failure edge, the entry edge and / or the failure edge are transformed to obtain the corresponding transformation node, and the transformation node and / or the target update node are used as intermediate update nodes.
[0013] In the target graph structure, the intermediate update node and the edge associated with the intermediate update node are deleted to obtain the incomplete graph structure;
[0014] The first update edge is determined based on the deleted edge, and the first update edge is filtered to obtain the target edge that needs to be updated.
[0015] In this embodiment of the disclosure, since the target object is normalized to obtain the intermediate update node corresponding to the target update object, and then the target graph structure is deleted based on the intermediate update node, the pruning efficiency of the target graph structure can be improved, which in turn helps to further improve the efficiency of graph update.
[0016] In one possible implementation, the transformation process of the entry edge and / or the failed edge to obtain the corresponding transformation node includes:
[0017] When the target graph structure is a directed target graph structure, the child nodes of the entry edge and / or the failure edge are determined as the transformation nodes; or,
[0018] When the target graph structure is an undirected target graph structure, the associated nodes of the entry edge and / or the failure edge are determined as the transformation nodes.
[0019] In this embodiment of the disclosure, the conversion of edges into nodes is determined separately for directed graph structures and undirected graph structures. This not only improves the conversion accuracy of edges under each graph structure, but also enhances the applicability of the conversion process.
[0020] In one possible implementation, determining the first updated edge based on the deleted edge includes:
[0021] If the target graph structure is a directed target graph structure, the edge pointing to the intermediate update node among the deleted edges is taken as the first update edge; or,
[0022] When the target graph structure is an undirected target graph structure, the edge associated with the intermediate update node among the deleted edges is taken as the first update edge.
[0023] In one possible implementation, the step of filtering the first updated edge to obtain the target edge that needs to be updated includes:
[0024] When the target graph structure is a directed target graph structure, the first update edge that exists in the node relationship table and is the entry edge is taken as the target edge that needs to be updated, and / or the first update edge that the parent node exists in the incomplete graph structure is taken as the target edge that needs to be updated.
[0025] When the target graph structure is an undirected target graph structure, the first update edge that exists in the node relationship table and is the entry edge is taken as the target edge that needs to be updated, and / or, the first update edge that the associated node exists in the incomplete graph structure is taken as the target edge that needs to be updated.
[0026] In this embodiment of the disclosure, filtering the first updated edge from different angles can improve the completeness of the target edge determination, which is beneficial to the subsequent repair process and thus helps to improve the accuracy of the updated graph structure.
[0027] In one possible implementation, the repair process for the incomplete graph structure based on the target edge that needs updating and the node relationship table includes:
[0028] When the target graph structure is a directed target graph structure, for each target edge that needs to be updated, it is determined whether the child nodes of the target edge exist in the incomplete graph structure;
[0029] If the child node of the target edge does not exist in the incomplete graph structure, a new node is constructed based on the dependency relationship of the target edge, and the constructed new node and the target edge are added to the incomplete graph structure.
[0030] The dependencies of the new nodes are determined based on the node relationship table, and dependent edges are generated based on the dependencies of the new nodes. The dependent edges are used as the target edges, and the process returns to the step of determining whether the child nodes of the target edges exist in the incomplete graph structure. This process continues until the child nodes of the target edges exist in the incomplete graph, at which point the target edges are added to the incomplete graph structure.
[0031] In this embodiment of the disclosure, for each target edge, the integrity of the graph structure after repair can be improved by traversing and repairing the dependent edges and nodes that are related to the target edge.
[0032] In one possible implementation, the repair process for the incomplete graph structure based on the target edge that needs updating and the node relationship table includes:
[0033] When the target graph structure is an undirected target graph structure, for each target edge, it is determined whether there is only one node associated with the target edge in the incomplete graph structure;
[0034] If there is only one node associated with the target edge in the incomplete graph structure, another node associated with the target edge is constructed based on the dependency relationship of the target edge, and the constructed other node and the target edge are added to the incomplete graph structure.
[0035] The dependency relationship of the other node is determined based on the node relationship table, and a dependency edge is generated based on the dependency relationship of the other node. The dependency edge is used as the target edge, and the process returns to the step of determining whether there is only one node associated with the target edge in the incomplete graph structure. This continues until both associated nodes of the target edge exist in the incomplete graph structure, and then the target edge is added to the incomplete graph structure.
[0036] In one possible implementation, after obtaining the updated graph structure corresponding to the current data file, the method further includes:
[0037] If there are isolated nodes in the updated graph structure, it is determined whether the isolated nodes need to be cleared based on the function corresponding to the current data file.
[0038] In this embodiment of the disclosure, if there are isolated nodes in the updated graph structure, it is determined whether the isolated nodes need to be cleared based on the function corresponding to the current data file. That is, it is determined whether the isolated nodes need to be cleared based on the actual situation. In this way, the applicability of the graph update method can be improved.
[0039] This disclosure provides a graph updating apparatus, including:
[0040] The first acquisition module acquires the node relationship table and the target graph structure corresponding to the current data file. The current data file includes multiple sub-files, and each sub-file corresponds to a node in the node relationship table. The target graph structure refers to the graph structure that needs to be updated.
[0041] The second acquisition module acquires the target update object, which includes at least one of the target update node, entry edge, and failed edge, wherein the failed edge refers to the edge of the target graph structure that failed to be updated in the previous update.
[0042] The pruning module prunes the target graph structure based on the target update object to obtain a fragmented graph structure corresponding to the target graph structure, and determines the target edges that need to be updated for the fragmented graph structure based on the target update object.
[0043] The repair processing module repairs the incomplete graph structure based on the target edge that needs to be updated and the node relationship table, to obtain a graph structure that corresponds to the current data file and has been updated.
[0044] In one possible implementation, the cropping module is specifically used for:
[0045] If the target update object includes the entry edge and / or the failure edge, the entry edge and / or the failure edge are transformed to obtain the corresponding transformation node, and the transformation node and / or the target update node are used as intermediate update nodes.
[0046] In the target graph structure, the intermediate update node and the edge associated with the intermediate update node are deleted to obtain the incomplete graph structure;
[0047] The first update edge is determined based on the deleted edge, and the first update edge is filtered to obtain the target edge that needs to be updated.
[0048] In one possible implementation, the cropping module is specifically used for:
[0049] When the target graph structure is a directed target graph structure, the child nodes of the entry edge and / or the failure edge are determined as the transformation nodes; or,
[0050] When the target graph structure is an undirected target graph structure, the associated nodes of the entry edge and / or the failure edge are determined as the transformation nodes.
[0051] In one possible implementation, the cropping module is specifically used for:
[0052] If the target graph structure is a directed target graph structure, the edge pointing to the intermediate update node among the deleted edges is taken as the first update edge; or,
[0053] When the target graph structure is an undirected target graph structure, the edge associated with the intermediate update node among the deleted edges is taken as the first update edge.
[0054] In one possible implementation, the cropping module is specifically used for:
[0055] When the target graph structure is a directed target graph structure, the first update edge that exists in the node relationship table and is the entry edge is taken as the target edge that needs to be updated, and / or, the first update edge that the parent node exists in the incomplete graph structure is taken as the target edge that needs to be updated; or...
[0056] When the target graph structure is an undirected target graph structure, the first update edge that exists in the node relationship table and is the entry edge is taken as the target edge that needs to be updated, and / or, the first update edge that the associated node exists in the incomplete graph structure is taken as the target edge that needs to be updated.
[0057] In one possible implementation, the repair processing module is specifically used for:
[0058] When the target graph structure is a directed target graph structure, for each target edge that needs to be updated, it is determined whether the child nodes of the target edge exist in the incomplete graph structure;
[0059] If the child node of the target edge does not exist in the incomplete graph structure, a new node is constructed based on the dependency relationship of the target edge, and the constructed new node and the target edge are added to the incomplete graph structure.
[0060] The dependencies of the new nodes are determined based on the node relationship table, and dependent edges are generated based on the dependencies of the new nodes. The dependent edges are used as the target edges, and the process returns to the step of determining whether the child nodes of the target edges exist in the incomplete graph structure. This process continues until the child nodes of the target edges exist in the incomplete graph, at which point the target edges are added to the incomplete graph structure.
[0061] In one possible implementation, the repair processing module is specifically used for:
[0062] When the target graph structure is an undirected target graph structure, for each target edge, it is determined whether there is only one node associated with the target edge in the incomplete graph structure;
[0063] If there is only one node associated with the target edge in the incomplete graph structure, another node associated with the target edge is constructed based on the dependency relationship of the target edge, and the constructed other node and the target edge are added to the incomplete graph structure.
[0064] The dependency relationship of the other node is determined based on the node relationship table, and a dependency edge is generated based on the dependency relationship of the other node. The dependency edge is used as the target edge, and the process returns to the step of determining whether there is only one node associated with the target edge in the incomplete graph structure. This continues until both associated nodes of the target edge exist in the incomplete graph structure, and then the target edge is added to the incomplete graph structure.
[0065] In one possible implementation, the repair processing module is further configured to:
[0066] If there are isolated nodes in the updated graph structure, it is determined whether the isolated nodes need to be cleared based on the function corresponding to the current data file.
[0067] This disclosure provides an electronic device, including a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, the graph update method described in any of the above embodiments is performed.
[0068] This disclosure provides a computer-readable storage medium storing a computer program that, when executed by a processor, performs the graph update method described in any of the above embodiments.
[0069] To make the above-mentioned objects, features and advantages of this disclosure more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0070] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the accompanying drawings used in the embodiments will be briefly described below. These drawings are incorporated in and constitute a part of this specification. They illustrate embodiments conforming to this disclosure and, together with the specification, serve to explain the technical solutions of this disclosure. It should be understood that the following drawings only show some embodiments of this disclosure and should not be considered as limiting the scope. Those skilled in the art can obtain other related drawings based on these drawings without creative effort.
[0071] Figure 1 A flowchart of a graph update method provided in some embodiments of this disclosure is shown;
[0072] Figure 2 This illustration shows a process diagram of cropping a target graph structure according to some embodiments of the present disclosure;
[0073] Figure 3 This illustration shows a process for determining a target edge provided by some embodiments of the present disclosure;
[0074] Figure 4 This illustration shows another process for determining a target edge provided by some embodiments of the present disclosure;
[0075] Figure 5 A schematic diagram of the updated graph structure provided by some embodiments of this disclosure is shown;
[0076] Figure 6 A schematic diagram of another updated graph structure provided by some embodiments of this disclosure is shown;
[0077] Figure 7 The diagram shows a schematic structural representation of a graph updating apparatus provided in some embodiments of this disclosure;
[0078] Figure 8 A schematic diagram of an electronic device provided in some embodiments of the present disclosure is shown. Detailed Implementation
[0079] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. The components of the embodiments of this disclosure described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this disclosure provided in the accompanying drawings is not intended to limit the scope of the claimed disclosure, but merely represents selected embodiments of this disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without inventive effort are within the scope of protection of this disclosure.
[0080] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0081] In this document, the term "and / or" merely describes a relationship, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Furthermore, the term "at least one" in this document means any combination of at least two of any one or more elements. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.
[0082] A graph is an abstract data type used to implement the concepts of directed and undirected graphs in graph theory in mathematics. That is, a graph is a data structure that represents the relationships between different data elements. Nodes in a graph are also called vertices, and the connection between two nodes is called an edge. Furthermore, if the vertices representing edges are ordered, the graph is called a directed graph; if the vertices representing edges are unordered, the graph is called an undirected graph.
[0083] Research has shown that in practical applications, since data files may be updated, the corresponding graph must also be updated after the data file is updated in order to ensure that the graph used matches the updated data file.
[0084] Current graph update methods typically reconstruct the graph based on the updated data file with each update. While this method achieves graph updates, it can negatively impact efficiency when dealing with large datasets. Therefore, improving the efficiency of graph updates has been a key focus in the industry.
[0085] Based on the above research, this disclosure provides a graph update method, including: obtaining a node relationship table and a target graph structure corresponding to a current data file, wherein the current data file includes multiple sub-files, and each sub-file corresponds to a node in the node relationship table; obtaining a target update object, wherein the target update object includes at least one of a target update node, an entry edge, and a failed edge, wherein a failed edge refers to an edge of the target graph structure that failed to update in the previous update; performing a pruning process on the target graph structure based on the target update object to obtain a fragmented graph structure corresponding to the target graph structure, and determining the target edges that need to be updated for the fragmented graph structure based on the target update object; and performing a repair process on the fragmented graph structure based on the target edges that need to be updated and the node relationship table to obtain a graph structure that corresponds to the current data file and has been updated.
[0086] In this embodiment, after obtaining the target update object, the target graph structure can be pruned based on the target update object to obtain a fragmented graph structure. Then, based on the target update object, the target edges that need to be updated for the fragmented graph structure are determined. Next, based on the target edges that need to be updated and the node relationship table, the fragmented graph structure is repaired to obtain a graph structure corresponding to the current data file and which has been updated. That is, in this embodiment, during the graph structure update process, it is not necessary to rebuild the graph structure based on the current data file. Updating the target graph structure can be achieved simply by pruning and repairing the target graph structure. This reduces the amount of data processed during the update process, thereby improving the efficiency of graph updates.
[0087] To facilitate understanding of this embodiment, the executing entity of the graph update method provided in this disclosure will first be described in detail. The executing entity of the graph update method provided in this disclosure is an electronic device. This electronic device can be a terminal device or a server. Specifically, the terminal device can be a mobile device, a user terminal, a terminal, a handheld device, a computing device, an in-vehicle device, a wearable device, etc. The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud storage, big data, and artificial intelligence platforms.
[0088] In other embodiments, the graph update method can also be implemented by the processor calling computer-readable instructions stored in memory.
[0089] The diagram update method provided in this application embodiment will be described in detail below with reference to the accompanying drawings. See also: Figure 1 The diagram shown is a flowchart of a graph update method provided in this embodiment of the present disclosure. The graph update method includes the following steps S101 to S104:
[0090] S101, obtain the node relationship table and target graph structure corresponding to the current data file. The current data file includes multiple sub-files, and each sub-file corresponds to a node in the node relationship table. The target graph structure refers to the graph structure that needs to be updated.
[0091] Depending on the application scenario, the content of the current data file can vary. For example, in a code development scenario, the current data file can be a code file used to implement a specific function. Each sub-file implements a sub-function, and different sub-files can have a calling relationship. For instance, sub-file 1 corresponds to node a, sub-file 2 corresponds to node b, and during code execution, if sub-file 1 calls sub-file 2, then in the node relationship table, it can be recorded that node a points to node b. In a directed graph structure, node a is connected to node b, and the edge between node a and node b points to b. In this case, node a is the parent node of node b. The connection relationships between the nodes can be called node relationships or dependency relationships.
[0092] Specifically, in a front-end bundler scenario, a directed graph of module dependencies can be generated based on the entry file, and each file can be mapped to a module, with the file content containing the module's dependencies. It can be understood that a front-end bundler can be a web front-end bundler.
[0093] For example, in a transportation route planning scenario, the current data file can also be a route planning file, where each sub-file can contain station information for different routes. Specifically, transportation route data can be abstracted into a topological network or a directed graph, and then transfer route planning calculations can be performed on this basis to obtain transfer schemes. Furthermore, it should be understood that the node relationship table can be pre-set or obtained by traversing the current data file.
[0094] In this embodiment of the disclosure, the target graph structure is a graph structure with an entry point. Furthermore, for the scenario of constructing a graph structure for the first time, it can be understood as a graph structure update process from scratch; therefore, in this scenario, the target graph structure can be an empty graph.
[0095] The node relationship table is used to represent the dependencies between nodes. That is, any file that can represent the dependencies between nodes can be called a node relationship table. For example, in a front-end bundler scenario, the node relationship table is the file corresponding to each node. The dependencies of the node can be parsed from the content of this file. Therefore, in a front-end bundler scenario, the node relationship table can be omitted; only the current data file needs to be obtained. In other embodiments, the node relationship table can also be a function or code that can represent node dependencies; this is not limited here.
[0096] S102, obtain the target update object, the target update object includes at least one of the target update node, entry edge and failed edge, the failed edge refers to the edge of the target graph structure that failed to update in the previous update.
[0097] The target update node is the node specified by the user that needs to be updated this time. For example, the node corresponding to the sub-file modified by the user can be used as the target update node. For the scenario of building a graph structure for the first time, the target update object only includes the entry edge, which refers to the edge used to represent the entry point of the graph structure. If there were no failed edges from the previous update, the target update object for this update can include only the entry edge and the target update node. Of course, if no node is updated, only the failed edges from the previous update can be used as the target update object.
[0098] S103, the target graph structure is pruned based on the target update object to obtain a fragmented graph structure corresponding to the target graph structure, and the target edges that need to be updated for the fragmented graph structure are determined based on the target update object.
[0099] See Figure 2 The diagram illustrates the process of pruning a target graph structure according to some embodiments of this disclosure. As mentioned earlier, since the target update object may include entry edges and failure edges, it is necessary to convert the entry edges and failure edges into nodes before pruning the target graph structure, and then prune (delete) the target graph structure based on the nodes. This process of uniformly converting edges into nodes can also be called a normalization process.
[0100] Therefore, in some embodiments, when the target update object includes the entry edge and / or the failed edge, the entry edge and / or the failed edge are transformed to obtain a corresponding transformed node, and the transformed node and / or the target update node are used as intermediate update nodes; then, the intermediate update node and the edge associated with the intermediate update node are deleted from the target graph structure to obtain the incomplete graph structure; then, a first update edge is determined based on the deleted edge, and the first update edge is filtered to obtain the target edge that needs to be updated.
[0101] It should be understood that, for directed graph structures, when performing deletion processing on the target graph structure, intermediate update nodes and edges pointing to the intermediate update nodes can also be deleted to obtain the incomplete graph structure.
[0102] In this embodiment of the disclosure, since the target object is normalized to obtain the intermediate update node corresponding to the target update object, and then the target graph structure is deleted based on the intermediate update node, the pruning efficiency of the target graph structure can be improved, which in turn helps to further improve the efficiency of graph update.
[0103] Regarding the step of transforming the entry edge and / or the failed edge to obtain the corresponding transformed node, the following explanation will be provided for directed graph structures and undirected graph structures respectively.
[0104] In some implementations, when the target graph structure is a directed target graph structure, the child nodes of the entry edge and / or the failed edge are determined as the transformation nodes. That is, in the directed target graph structure, the pointing nodes of the entry edge and / or the failed edge are determined as the transformation nodes. It can be understood that this process can also be regarded as a process of unifying the entry edge, the failed edge, and the target update node into a single node. In this process, the target update node remains unchanged. For the entry edge and / or the failed edge, the corresponding transformation node can be obtained by taking its child nodes. Then, the target update node and the transformation node are unified into an intermediate update node. That is, the intermediate update node includes the initial target update node and the transformation node corresponding to the entry edge and / or the failed edge.
[0105] When the target graph structure is an undirected target graph structure, the associated nodes of the entry edge and / or the failed edge are determined as the transformation nodes. This process is similar to the edge transformation process in the aforementioned directed graph structure. The difference is that, in the undirected graph structure, all nodes associated (connected) with the entry edge and / or the failed edge are determined as the transformation nodes.
[0106] It should be noted that, regardless of whether it is a directed graph structure or an undirected graph structure, when the target update object does not include the target update node, the intermediate update nodes only include the entry edge and / or the transformation node corresponding to the failed edge. In the case that the target update object does not include the entry edge and the failed edge, the intermediate update nodes may also only include the target update node.
[0107] In this embodiment of the disclosure, the conversion of edges into nodes is determined separately for directed graph structures and undirected graph structures. This not only improves the conversion accuracy of edges under each graph structure, but also enhances the applicability of the conversion process.
[0108] Optionally, when determining the first update edge based on the deleted edges, the process may include: if the target graph structure is a directed target graph structure, using the deleted edges pointing to the intermediate update node as the first update edge; or, if the target graph structure is an undirected target graph structure, using the deleted edges associated with the intermediate update node as the first update edge. This improves the completeness of the first update edge.
[0109] Alternatively, when filtering the first updated edge to obtain the target edge to be updated, the following may be included:
[0110] When the target graph structure is a directed target graph structure, the first update edge that exists in the node relationship table and is the entry edge is taken as the target edge that needs to be updated, and / or, the first update edge that the parent node exists in the incomplete graph structure is taken as the target edge that needs to be updated; or...
[0111] When the target graph structure is an undirected target graph structure, the first update edge that exists in the node relationship table and is the entry edge is taken as the target edge that needs to be updated, and / or, the first update edge that the associated node exists in the incomplete graph structure is taken as the target edge that needs to be updated.
[0112] It should be noted that in some scenarios (such as front-end bundlers), if there is no node relationship table, the first update edge that is the entry edge can be directly used as the target edge that needs to be updated.
[0113] In this embodiment of the disclosure, filtering the first updated edge from different angles can improve the completeness of the target edge determination, which is beneficial to the subsequent repair process and thus helps to improve the accuracy of the updated graph structure.
[0114] The cutting process will be explained in detail below with reference to the accompanying drawings.
[0115] For directed target graph structures, see [link to relevant documentation]. Figure 3 As shown, with node b and node c as the intermediate update nodes, in the target graph structure ( Figure 3 In the diagram shown in (1), the intermediate update nodes (b, c) and the edges (marked by squares) associated with the intermediate update nodes (b, c) are deleted to obtain the incomplete graph structure. Figure 3 As shown in (2), the dashed line represents deletion; then, based on the deleted edge, the first update edge is determined, and the first update edge is filtered to obtain the target edge that needs to be updated, wherein, Figure 3The edge marked by the box in (3) is the first update edge that the parent node (a1, a2) exists in the incomplete graph. Therefore, this edge is taken as the target edge that needs to be updated.
[0116] Similarly, for undirected target graph structures, see [link to relevant documentation]. Figure 4 As shown, with node b and node c as the intermediate update nodes, in the target graph structure ( Figure 4 In the diagram shown in (I), the intermediate update nodes (b, c) and the edges (marked by squares) associated with the intermediate update nodes (b, c) are deleted to obtain the incomplete graph structure. Figure 4 As shown in (II), the dashed line represents deletion; then, based on the deleted edge, the first update edge is determined, and the first update edge is filtered to obtain the target edge that needs to be updated, wherein, Figure 4 The edge marked by the box in (III) is the first update edge of the associated nodes (a1, a2, d) in the incomplete graph structure. Therefore, this edge is taken as the target edge that needs to be updated.
[0117] S104. Based on the target edge that needs to be updated and the node relationship table, the incomplete graph structure is repaired to obtain a graph structure that corresponds to the current data file and has been updated.
[0118] For example, after obtaining the incomplete graph structure and the target edge that needs to be updated, the incomplete graph structure can be repaired based on the target edge that needs to be updated and the node relationship table to obtain a graph structure that corresponds to the current data file and has been updated.
[0119] In some implementations, for directed target graph structures, please refer to [link to relevant documentation]. Figure 5 ,in Figure 5 (4) shows the... Figure 3 The diagram after repair of (3) is shown. The specific repair process includes the following (1) to (4):
[0120] (1) For each target edge that needs to be updated, determine whether the child node of the target edge exists in the incomplete graph structure; if yes, then execute step (4); if no, then execute step (2).
[0121] Among them, the child nodes of the target edge can be obtained from the data structure of the target edge, and the child nodes of the target edge are also the nodes pointed to by the target edge. Taking the target edge 1 between a1 and b as an example, we can first determine whether the child node b of the target edge 1 exists in the incomplete graph structure. In this embodiment, the child node b of the target edge 1 does not exist in the incomplete graph structure, so step (2) needs to be executed.
[0122] (2) Construct new nodes based on the dependencies of the target edge, and add the constructed new nodes and the target edge to the incomplete graph structure.
[0123] It is understandable that if the node b pointed to by the target edge 1 does not exist in the incomplete graph structure, a new node b needs to be constructed based on the dependency relationship of the target edge 1, and the constructed new node b and the target edge 1 are added to the incomplete graph structure.
[0124] (3) Determine the dependency relationship of the new node based on the node relationship table, generate a dependency edge based on the dependency relationship of the new node, and use the dependency edge as the target edge, and return to the execution step (1).
[0125] In this context, a dependency edge refers to an edge that exists in the node relationship table and points from the new node to other nodes. That is, based on the dependency relationships (node relationships) recorded in the node relationship table, all edges and nodes associated with the new node need to be traversed and added to the incomplete graph structure. For example, by traversing the dependency relationships, a dependency edge 1 for the new node b is generated, and dependency edge 1 is used as target edge 1. This process is repeated to construct a new node c, and the new node c and dependency edge 1 are added to the incomplete graph structure. Then, by traversing the dependency relationships again, it is determined that there are no dependency edges connecting the new node c, and the repair process for target edge 1 ends.
[0126] (4) Add the target edge to the incomplete graph structure.
[0127] It is understandable that if the node pointed to by the target edge exists in the incomplete graph structure, the target edge can be directly added to the incomplete graph structure, and the repair process for the target edge is completed.
[0128] For example, after the repair process of target edge 1 is completed, target edge 2 can be repaired. Since the node b pointed to by target edge 2 exists in the incomplete graph structure, step (4) can be executed directly to add target edge 2 to the incomplete graph structure, thus completing the traversal process of target edge 2.
[0129] In this embodiment of the disclosure, for a directed target graph structure, a dependency traversal can be performed on each target edge, and the incomplete graph structure can be updated based on the dependency traversal results of each target edge, thereby improving the update accuracy of the graph structure.
[0130] In other implementations, for undirected target graph structures, please refer to [link to relevant documentation]. Figure 6 ,in Figure 6 (IV) in the diagram shows the... Figure 4A schematic diagram of (III) after repair treatment. The specific repair process includes the following (a) to (d):
[0131] (a) For each target edge, determine whether there is only one node associated with the target edge in the incomplete graph structure; if yes, proceed to step (b); if no, proceed to step (d).
[0132] For example, taking the target edge 1 between a1 and b as an example, it can be determined that the target edge 1 has only one associated node a1 in the incomplete graph structure. Therefore, step (b) needs to be performed.
[0133] (b) Based on the dependency relationship of the target edge, construct another node associated with the target edge, and add the constructed other node and the target edge to the incomplete graph structure.
[0134] Since the other associated node of target edge 1 does not exist in the incomplete graph structure, it is necessary to construct another node b associated with target edge 1 based on the dependency relationship of target edge 1, and add the constructed other node b and target edge 1 to the incomplete graph structure.
[0135] (c) Determine the dependency relationship of the other node based on the node relationship table, generate a dependency edge based on the dependency relationship of the other node, and use the dependency edge as the target edge, and return to step (a).
[0136] Next, it is necessary to obtain the dependency relationship of another node, and generate a dependency edge based on the dependency relationship of the other node. Then, after using the dependency edge as the target edge, the step of traversing the target edge is performed until both associated nodes of the target edge exist in the incomplete graph structure, and the target edge is added to the incomplete graph structure.
[0137] In this embodiment of the disclosure, it can be determined through the node relationship table that another node b does not have a dependent edge. Therefore, the repair process for target edge 1 ends.
[0138] (d) If both associated nodes of the target edge exist in the incomplete graph structure, add the target edge to the incomplete graph structure; or, if neither associated node of the target edge exists in the incomplete graph structure, directly end the repair process for the target edge.
[0139] It is understood that if both associated nodes of the target edge exist in the incomplete graph structure, the target edge can be directly added to the incomplete graph structure. For example, regarding target edge 2, after repairing target edge 1, when repairing target edge 2, both nodes a2 and b associated with target edge 2 exist in the incomplete graph structure. Therefore, target edge 2 can be added to the incomplete graph structure. The processing of target edge 3 is similar to that of target edge 1, and will not be elaborated here.
[0140] Furthermore, if neither of the two associated nodes of the target edge exists in the incomplete graph structure, the repair process for the target edge is terminated directly.
[0141] It should be understood that, in some embodiments, after obtaining and updating the graph structure corresponding to the current data file, if there are isolated nodes in the updated graph structure, it can be determined whether the isolated nodes need to be cleared based on the function corresponding to the current data file. Here, an isolated node refers to a node that has no direct or indirect association with any entry edge; that is, regardless of which entry edge the traversal begins from, that node will not be reached.
[0142] Specifically, such as Figure 5 Node d in the diagram is an isolated node. Figure 6 Nodes c and d in the data are isolated nodes. If isolated nodes exist among the updated nodes, it can be determined whether to clear them based on the function corresponding to the current data file.
[0143] Optionally, if an isolated node has no impact on the functionality of the current data file, it can be left unremoved. This not only reduces resource consumption but also allows the isolated node to be reused in the next graph update, thus improving the efficiency of the next graph update. Conversely, if an isolated node does affect the functionality of the current data file, it needs to be removed to improve the accuracy of the current graph update. Specifically, a mark-and-sweep method can be used to remove isolated nodes.
[0144] The following example, using a front-end bundler scenario, illustrates the application process of the graph update method.
[0145] In a front-end bundler scenario, a directed graph of module dependencies can be generated based on the entry file. Each file can be mapped to a module, and the file content contains the dependencies of that module. Then, based on the aforementioned pruning and repair processes for the directed graph, the graph can be generated or updated. The generation process of the directed graph can be understood as updating an empty graph. Furthermore, it can be determined whether the updated directed graph needs to be cleaned up based on actual business requirements.
[0146] It's important to note that in this scenario, there is no complete node relationship table (dependency table). Therefore, during the repair process, the file can be directly parsed to obtain the current file's dependencies. When using it, simply treat the user-modified file as the node to be updated to achieve graph updates.
[0147] Those skilled in the art will understand that, in the above-described method of the specific implementation, the order in which each step is written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.
[0148] Based on the same technical concept, this disclosure also provides a graph update device corresponding to the graph update method. Since the principle of the device in this disclosure for solving the problem is similar to the graph update method described above in this disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.
[0149] Reference Figure 7 The diagram shown is a schematic representation of a graph updating device 700 provided in an embodiment of this disclosure. The device includes:
[0150] The first acquisition module 701 acquires the node relationship table and the target graph structure corresponding to the current data file. The current data file includes multiple sub-files, and each sub-file corresponds to a node in the node relationship table. The target graph structure refers to the graph structure that needs to be updated.
[0151] The second acquisition module 702 acquires the target update object, which includes at least one of the target update node, entry edge, and failed edge, and the failed edge refers to the edge of the target graph structure that failed to be updated in the previous update.
[0152] The pruning processing module 703 prunes the target graph structure based on the target update object to obtain a fragmented graph structure corresponding to the target graph structure, and determines the target edges that need to be updated for the fragmented graph structure based on the target update object.
[0153] The repair processing module 704 repairs the incomplete graph structure based on the target edge that needs to be updated and the node relationship table, to obtain a graph structure that corresponds to the current data file and has been updated.
[0154] In one possible implementation, the cropping module 703 is specifically used for:
[0155] If the target update object includes the entry edge and / or the failure edge, the entry edge and / or the failure edge are transformed to obtain the corresponding transformation node, and the transformation node and / or the target update node are used as intermediate update nodes.
[0156] In the target graph structure, the intermediate update node and the edge associated with the intermediate update node are deleted to obtain the incomplete graph structure;
[0157] The first update edge is determined based on the deleted edge, and the first update edge is filtered to obtain the target edge that needs to be updated.
[0158] In one possible implementation, the cropping module 703 is specifically used for:
[0159] When the target graph structure is a directed target graph structure, the child nodes of the entry edge and / or the failure edge are determined as the transformation nodes; or,
[0160] When the target graph structure is an undirected target graph structure, the associated nodes of the entry edge and / or the failure edge are determined as the transformation nodes.
[0161] In one possible implementation, the cropping module 703 is specifically used for:
[0162] If the target graph structure is a directed target graph structure, the edge pointing to the intermediate update node among the deleted edges is taken as the first update edge; or,
[0163] When the target graph structure is an undirected target graph structure, the edge associated with the intermediate update node among the deleted edges is taken as the first update edge.
[0164] In one possible implementation, the cropping module 703 is specifically used for:
[0165] When the target graph structure is a directed target graph structure, the first update edge that exists in the node relationship table and is the entry edge is taken as the target edge that needs to be updated, and / or, the first update edge that the parent node exists in the incomplete graph structure is taken as the target edge that needs to be updated; or...
[0166] When the target graph structure is an undirected target graph structure, the first update edge that exists in the node relationship table and is the entry edge is taken as the target edge that needs to be updated, and / or, the first update edge that the associated node exists in the incomplete graph structure is taken as the target edge that needs to be updated.
[0167] In one possible implementation, the repair processing module 704 is specifically used for:
[0168] When the target graph structure is a directed target graph structure, for each target edge that needs to be updated, it is determined whether the child nodes of the target edge exist in the incomplete graph structure;
[0169] If the child node of the target edge does not exist in the incomplete graph structure, a new node is constructed based on the dependency relationship of the target edge, and the constructed new node and the target edge are added to the incomplete graph structure.
[0170] The dependencies of the new nodes are determined based on the node relationship table, and dependent edges are generated based on the dependencies of the new nodes. The dependent edges are used as the target edges, and the process returns to the step of determining whether the child nodes of the target edges exist in the incomplete graph structure. This process continues until the child nodes of the target edges exist in the incomplete graph, at which point the target edges are added to the incomplete graph structure.
[0171] In one possible implementation, the repair processing module 704 is specifically used for:
[0172] When the target graph structure is an undirected target graph structure, for each target edge, it is determined whether there is only one node associated with the target edge in the incomplete graph structure;
[0173] If there is only one node associated with the target edge in the incomplete graph structure, another node associated with the target edge is constructed based on the dependency relationship of the target edge, and the constructed other node and the target edge are added to the incomplete graph structure.
[0174] The dependency relationship of the other node is determined based on the node relationship table, and a dependency edge is generated based on the dependency relationship of the other node. The dependency edge is used as the target edge, and the process returns to the step of determining whether there is only one node associated with the target edge in the incomplete graph structure. This continues until both associated nodes of the target edge exist in the incomplete graph structure, and then the target edge is added to the incomplete graph structure.
[0175] In one possible implementation, the repair processing module 704 is further configured to:
[0176] If there are isolated nodes in the updated graph structure, it is determined whether the isolated nodes need to be cleared based on the function corresponding to the current data file.
[0177] The processing flow of each module in the device and the interaction flow between each module can be referred to the relevant descriptions in the above method embodiments, and will not be detailed here.
[0178] Based on the same technical concept, this disclosure also provides an electronic device. (See also...) Figure 8 The diagram shown is a structural schematic of an electronic device 800 provided in an embodiment of this disclosure, including a processor 801, a memory 802, and a bus 803. The memory 802 is used to store execution instructions and includes a main memory 8021 and an external memory 8022. The main memory 8021, also called internal memory, is used to temporarily store computational data in the processor 801, as well as data exchanged with external memory 8022 such as a hard disk. The processor 801 exchanges data with the external memory 8022 through the main memory 8021.
[0179] In this embodiment, the memory 802 is specifically used to store application code that executes the solution of this application, and its execution is controlled by the processor 801. That is, when the electronic device 800 is running, the processor 801 communicates with the memory 802 through the bus 803, so that the processor 801 executes the application code stored in the memory 802, and then executes the method described in any of the foregoing embodiments.
[0180] The memory 802 may be, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc.
[0181] Processor 801 may be an integrated circuit chip with signal processing capabilities. The aforementioned processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor.
[0182] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 800. In other embodiments of this application, the electronic device 800 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0183] This disclosure also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the graph update method in the above-described method embodiments. The storage medium may be a volatile or non-volatile computer-readable storage medium.
[0184] This disclosure also provides a computer program product carrying program code. The program code includes instructions that can be used to execute the steps of the graph update method in the above method embodiments. For details, please refer to the above method embodiments, which will not be repeated here.
[0185] The aforementioned computer program product can be implemented through hardware, software, or a combination thereof. In one optional embodiment, the computer program product is specifically embodied in a computer storage medium; in another optional embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.
[0186] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and devices described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. In the several embodiments provided in this disclosure, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division; in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection may be through some communication interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.
[0187] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0188] In addition, the functional units in the various embodiments of this disclosure can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0189] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory, random access memory, magnetic disks, or optical disks.
[0190] Finally, it should be noted that the above-described embodiments are merely specific implementations of this disclosure, used to illustrate the technical solutions of this disclosure, and not to limit it. The protection scope of this disclosure is not limited thereto. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this disclosure. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this disclosure, and should all be covered within the protection scope of this disclosure. Therefore, the protection scope of this disclosure should be determined by the protection scope of the claims.
Claims
1. A graph update method, characterized in that, include: Obtain the node relationship table and target graph structure corresponding to the current data file. The current data file includes multiple sub-files, and each sub-file corresponds to a node in the node relationship table. The target graph structure refers to the graph structure that needs to be updated. The node relationship table is used to represent the dependency relationship between each node. Obtain the target update object, which includes at least one of the target update node, entry edge, and failed edge, wherein the failed edge refers to the edge of the target graph structure that failed to update in the previous update. The target graph structure is pruned based on the target update object to obtain a fragmented graph structure corresponding to the target graph structure, and the target edges that need to be updated for the fragmented graph structure are determined based on the target update object. Based on the target edge that needs to be updated and the node relationship table, the incomplete graph structure is repaired to obtain a graph structure that corresponds to the current data file and has been updated.
2. The method according to claim 1, characterized in that, The step of pruning the target graph structure based on the target update object to obtain a fragmented graph structure corresponding to the target graph structure, and determining the target edges that need to be updated for the fragmented graph structure based on the target update object, includes: If the target update object includes the entry edge and / or the failure edge, the entry edge and / or the failure edge are transformed to obtain the corresponding transformation node, and the transformation node and / or the target update node are used as intermediate update nodes. In the target graph structure, the intermediate update node and the edge associated with the intermediate update node are deleted to obtain the incomplete graph structure; The first update edge is determined based on the deleted edge, and the first update edge is filtered to obtain the target edge that needs to be updated.
3. The method according to claim 2, characterized in that, The transformation process for the entry edge and / or the failed edge to obtain the corresponding transformation node includes: When the target graph structure is a directed target graph structure, the child nodes of the entry edge and / or the failure edge are determined as the transformation nodes; or, When the target graph structure is an undirected target graph structure, the associated nodes of the entry edge and / or the failure edge are determined as the transformation nodes.
4. The method according to claim 2, characterized in that, The determination of the first updated edge based on the deleted edge includes: If the target graph structure is a directed target graph structure, the edge pointing to the intermediate update node among the deleted edges is taken as the first update edge; or, When the target graph structure is an undirected target graph structure, the edge associated with the intermediate update node among the deleted edges is taken as the first update edge.
5. The method according to claim 2, characterized in that, The step of filtering the first updated edge to obtain the target edge that needs to be updated includes: When the target graph structure is a directed target graph structure, the first update edge that exists in the node relationship table and is the entry edge is taken as the target edge that needs to be updated, and / or, the first update edge that the parent node exists in the incomplete graph structure is taken as the target edge that needs to be updated; or... When the target graph structure is an undirected target graph structure, the first update edge that exists in the node relationship table and is the entry edge is taken as the target edge that needs to be updated, and / or, the first update edge that the associated node exists in the incomplete graph structure is taken as the target edge that needs to be updated.
6. The method according to any one of claims 1-5, characterized in that, The repair process for the incomplete graph structure based on the target edge that needs to be updated and the node relationship table includes: When the target graph structure is a directed target graph structure, for each target edge that needs to be updated, it is determined whether the child nodes of the target edge exist in the incomplete graph structure; If the child node of the target edge does not exist in the incomplete graph structure, a new node is constructed based on the dependency relationship of the target edge, and the constructed new node and the target edge are added to the incomplete graph structure. The dependencies of the new nodes are determined based on the node relationship table, and dependent edges are generated based on the dependencies of the new nodes. The dependent edges are used as the target edges, and the process returns to the step of determining whether the child nodes of the target edges exist in the incomplete graph structure. This process continues until the child nodes of the target edges exist in the incomplete graph, at which point the target edges are added to the incomplete graph structure.
7. The method according to any one of claims 1-5, characterized in that, The repair process for the incomplete graph structure based on the target edge that needs to be updated and the node relationship table includes: When the target graph structure is an undirected target graph structure, for each target edge, it is determined whether there is only one node associated with the target edge in the incomplete graph structure; If there is only one node associated with the target edge in the incomplete graph structure, another node associated with the target edge is constructed based on the dependency relationship of the target edge, and the constructed other node and the target edge are added to the incomplete graph structure. The dependency relationship of the other node is determined based on the node relationship table, and a dependency edge is generated based on the dependency relationship of the other node. The dependency edge is used as the target edge, and the process returns to the step of determining whether there is only one node associated with the target edge in the incomplete graph structure. This continues until both associated nodes of the target edge exist in the incomplete graph structure, and then the target edge is added to the incomplete graph structure.
8. The method according to any one of claims 1-5, characterized in that, After obtaining the updated graph structure corresponding to the current data file, the method further includes: If there are isolated nodes in the updated graph structure, it is determined whether the isolated nodes need to be cleared based on the function corresponding to the current data file.
9. A graph updating device, characterized in that, include: The first acquisition module acquires the node relationship table and the target graph structure corresponding to the current data file. The current data file includes multiple sub-files, and each sub-file corresponds to a node in the node relationship table. The target graph structure refers to the graph structure that needs to be updated. The node relationship table is used to represent the dependency relationship between each node. The second acquisition module acquires the target update object, which includes at least one of the target update node, entry edge, and failed edge, wherein the failed edge refers to the edge of the target graph structure that failed to be updated in the previous update. The pruning module prunes the target graph structure based on the target update object to obtain a fragmented graph structure corresponding to the target graph structure, and determines the target edges that need to be updated for the fragmented graph structure based on the target update object. The repair processing module repairs the incomplete graph structure based on the target edge that needs to be updated and the node relationship table, to obtain a graph structure that corresponds to the current data file and has been updated.
10. An electronic device, characterized in that, include: The device includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, the graph update method as described in any one of claims 1-8 is performed.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the graph update method as described in any one of claims 1-8.
Citation Information
Patent Citations
Topology analysis method and device, electronic equipment and storage medium
CN114154019A