Image archiving method, device, electronic device and storage medium

By identifying and deleting redundant edges in image clustering and performing multi-level image archive merging, the resource waste problem when the graph scale is large and redundant edges exist is solved, and the efficiency and accuracy of clustering are improved.

CN119377429BActive Publication Date: 2025-04-25JINAN BOGUAN INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411943373.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-04-25
Estimated Expiration
2044-12-27

AI Technical Summary

Technical Problem

In the image file gathering scenario, the expansion of the graph scale leads to an increase in memory load and a significant increase in computing time, and there is redundant information, especially the redundant edges in the connected components, resulting in excessive memory consumption, low computing efficiency, and waste of resources.

Method used

By determining the communication components in the image to be gathered, and determining the redundant edges according to the degree of each image node, deleting the redundant edges and performing image collection, the initial image archive is obtained. Then, the initial image archives of the same connected component are initially merged, and the initial image archives of different connected components are secondary merged to obtain the target image archive.

Benefits of technology

It reduces memory consumption and computing resource waste, improves the efficiency and accuracy of file gathering, and solves the problem of resource waste when the graph is large in scale and redundant edges exist.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119377429B_ABST
    Figure CN119377429B_ABST
Patent Text Reader

Abstract

The present invention discloses an image clustering method, device, electronic device and storage medium, the method comprising: determining at least two connected components in a graph to be clustered, and determining redundant edges in the connected components according to the degree of each image node in the connected components; performing image clustering according to the graph to be clustered after deleting the redundant edges, and obtaining at least two initial image archives; performing a primary merger of initial image archives corresponding to the same connected component, and performing a secondary merger of initial image archives corresponding to different connected components and / or image archives after the primary merger, and obtaining at least two target image archives. The present invention can reduce memory consumption and waste of computing resources, and improve the efficiency and accuracy of clustering.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] With the rapid development of big data technology, the volume and complexity of image data are growing exponentially. A graph is a mathematical structure composed of vertices and edges. In the image clustering scenario, images can be used as graph vertices, similarity relationships between images as edges, and graphs as input to the clustering algorithm.

[0003] As the scale of graphs continues to expand, storing and processing graph structures will not only cause memory load, but also significantly increase computing time. In addition, there is some redundant information in the graph structure, especially for connected components. A connected component is a subgraph composed of a group of vertices in the graph. Any two vertices in a connected component are directly or indirectly reachable, while vertices in a connected component are not directly connected to vertices in other connected components. Many edges in connected components do not have a significant impact on the aggregation results, but will lead to excessive memory consumption, low computing efficiency, and waste of resources. Summary of the invention

[0004] The present invention provides an image aggregation method, device, electronic device and storage medium to reduce memory consumption and waste of computing resources and improve the efficiency and accuracy of aggregation.

[0005] In a first aspect, an embodiment of the present invention provides an image aggregation method, the method comprising:

[0006] Determine at least two connected components in the graph to be aggregated, and determine redundant edges in the connected components according to the degrees of each image node in the connected components;

[0007] Perform image clustering according to the to-be-clustered graph after deleting redundant edges, to obtain at least two initial image archives;

[0008] Initial image files corresponding to the same connected component are initially merged, and initial image files corresponding to different connected components and / or image files after initial merging are secondary merged to obtain at least two target image files.

[0009] In a second aspect, an embodiment of the present invention further provides an image aggregation device, the device comprising:

[0010] A redundant edge determination module is used to determine at least two connected components in the to-be-aggregated graph, and determine redundant edges in the connected components according to the degrees of each image node in the connected components;

[0011] An initial image archive determination module, used to perform image aggregation according to the to-be-aggregated image graph after redundant edges are deleted, to obtain at least two initial image archives;

[0012] The target image file determination module is used to initially merge the initial image files corresponding to the same connected component, and to perform secondary merging of the initial image files corresponding to different connected components and / or the image files after the initial merging, so as to obtain at least two target image files.

[0013] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, an image archiving method as described in any one of the embodiments of the present invention is implemented.

[0014] In a fourth aspect, an embodiment of the present invention further provides a storage medium storing computer executable instructions, wherein the computer executable instructions, when executed by a computer processor, are used to execute the image archiving method as described in any one of the embodiments of the present invention.

[0015] The technical solution of the embodiment of the present invention determines the connected components of the to-be-clustered graph, determines the redundant edges in the connected components according to the degree of each image node in the connected components, deletes the redundant edges, clusters the graph to be clustered, and after obtaining the initial image archive, first merges the initial image archives within the same connected component, and then merges the image archives between different connected components to obtain the final target image archive. The problem of excessive memory consumption, low computing efficiency, and waste of computing power caused by large graph scale and redundant edges in the prior art is solved. The embodiment of the present invention can reduce memory consumption and waste of computing resources, and improve the efficiency and accuracy of clustering.

[0016] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0018] Figure 1 is a flow chart of an image aggregation method provided by Embodiment 1 of the present invention;

[0019] Figure 2is a schematic diagram of a connected component provided by Embodiment 1 of the present invention;

[0020] Figure 3 is a schematic diagram of a key image node set and an adjacent image node set provided by the first embodiment of the present invention;

[0021] Figure 4 is a schematic diagram of redundant edge determination provided by Embodiment 1 of the present invention;

[0022] Figure 5 This is a schematic diagram of the effect of the file merging order on the file aggregation result provided by the first embodiment of the present invention;

[0023] Figure 6 is a flow chart of another image aggregation method provided by Embodiment 2 of the present invention;

[0024] Figure 7 is a schematic diagram of an initial image file before deleting redundant edges provided by the second embodiment of the present invention;

[0025] Figure 8 It is a schematic diagram of the influence of the centroid on the image file merging effect after deleting redundant edges provided by the second embodiment of the present invention;

[0026] Fig. 9 is a structural schematic diagram of an image aggregation device provided by Embodiment 3 of the present invention;

[0027] Fig.10 It is a structural schematic diagram of an electronic device provided in Embodiment 4 of the present invention. DETAILED DESCRIPTION

[0028] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices. In the embodiments of the present application, some existing solutions in the industry such as certain software, components, models, etc. may be mentioned, and they should be considered as exemplary, and their purpose is only to illustrate the feasibility of the implementation of the technical solution of the present application, but it does not mean that the applicant has or must use the solution.

[0030] The acquisition, transmission, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.

[0031] Embodiment 1

[0032] Figure 1 A flowchart of an image archiving method is provided for Embodiment 1 of the present invention. This embodiment is applicable to the case of performing image archiving based on a graph. The method can be executed by an image archiving device. The image archiving device can be implemented in the form of hardware and / or software. The image archiving device can be configured in an electronic device or a server.

[0033] like Figure 1 As shown, the method includes:

[0034] S110, determining at least two connected components in the graph to be aggregated, and determining redundant edges in the connected components according to the degree of each image node in the connected components.

[0035] Among them, graph is a concept in graph theory, which is a structure composed of nodes and edges. Nodes are objects, and edges are used to describe the relationship between objects corresponding to the nodes at both ends. In this embodiment, the graph of files to be clustered is a graph in which nodes represent images, which is used as an input for image clustering. The graph of files to be clustered consists of image nodes and edges between image nodes. The edges between image nodes are used to represent the similarity between image nodes.

[0036] A connected component refers to a subgraph in the graph to be aggregated, including a group of image nodes. The image nodes in a connected component are directly or indirectly connected, and the image nodes between a connected component and other connected components are not connected. Figure 2 A schematic diagram of connected components is provided, such as Figure 2 As shown, circles represent image nodes, and lines between circles represent edges between image nodes. Figure 2 A total of three sets of examples of connected components are provided.

[0037] To determine the connected components in the graph to be clustered, the DFS (Depth-First Search) algorithm or the BFS (Breadth-First Search) algorithm can be used to find the connected components in the graph to be clustered. Taking the DFS algorithm as an example, an unvisited image node is determined in the graph to be clustered, and a depth-first search is performed along the edge from the image node, marking all visited image nodes. When the search can no longer be continued, all the image nodes visited in this search constitute a connected component. Then determine an unvisited image node, and repeat the above process until all image nodes in the graph to be clustered have been visited.

[0038] In this embodiment, after each connected component is determined, the corresponding relationship between each connected component and the image nodes inside it can be obtained.

[0039] Graphs are divided into directed graphs and undirected graphs, wherein an undirected graph refers to a relationship represented by an edge that is bidirectional. If there is an edge between image node A and image node B in an undirected graph, image node B can be reached from image node A, or image node A can be reached from image node B. A directed graph refers to a relationship represented by an edge that is directional. If there is an edge pointing from image node A to image node B, image node B can be reached from image node A, but image node A may not be reached directly from image node B. On this basis, in an undirected graph, degree refers to the number of edges connected to an image node. In a directed graph, degree can be divided into in-degree and out-degree, in-degree refers to the number of edges pointing to the image node, and out-degree refers to the number of edges starting from the image node. For a directed graph, the degree in this embodiment specifically refers to in-degree, and the determination of redundant edges in a connected component is performed by in-degree.

[0040] Determine the degree of each image node in the connected component. For an undirected graph, you can traverse each image node in the connected component and count the number of all edges connected to the image node. For a directed graph, you can use the adjacency matrix method or the adjacency table method to determine the in-degree of the image node. Specifically, taking the adjacency matrix method as an example, the adjacency matrix A is used to represent the graph to be assembled, and A[i][j] indicates whether there is an edge from image node i to image node j. For example, A[i][j]=1 indicates that there is an edge, and A[i][j]=0 indicates that there is no edge. The in-degree of image node k is obtained by counting the sum of the elements in the kth column of the adjacency matrix.

[0041] Redundant edges refer to edges that do not significantly affect the clustering results. Deleting the redundant edges will not affect the topological structure characteristics of the graph to be clustered, nor will it affect the composition of the connected components where the redundant edges are located.

[0042] According to the degree of each image node in the connected component, the redundant edges in the connected component are determined. In an optional embodiment, the image nodes can be sorted and processed in sequence according to the order of the degree of each image node in the connected component from large to small. Take the image node with the largest degree among the currently unprocessed image nodes, and process the edges connected to it (for a directed graph, it specifically refers to the edges pointing to the image node), as well as other image nodes at the other end of each edge. Determine whether there are other paths that can reach other image nodes at the other end of the edge after deleting the edge. If so, treat the edge as a redundant edge. Process each image node in sequence until all image nodes with a degree greater than or equal to 2 are processed.

[0043] Determining redundant edges in the connected components according to the degrees of each image node in the connected components, in another optional embodiment, may further include:

[0044] A1. According to the degree of each image node in the connected component, a key image node is determined in each image node of the connected component to form a key image node set, and adjacent image nodes adjacent to the key image node are determined to form an adjacent image node set;

[0045] A2. If it is determined that the key image node and the adjacent image nodes form a loop, the other edges in the loop except the edges between the key image nodes are taken as candidate edges;

[0046] A3, determine the similarity between the two image nodes corresponding to the candidate edge, and take the candidate edge with the lowest similarity as a redundant edge;

[0047] A4. Mark each image node in the key image node set and the adjacent image node set as processed, and repeat the operation of determining the key image nodes in the unprocessed image nodes of the connected component until all image nodes in the connected component are processed and all redundant edges in the connected component are obtained.

[0048] Among them, the key image node refers to the image node that has a higher status and plays a key hub role in information dissemination, resource sharing, etc. among the image nodes of the connected components.

[0049] According to the degree of each image node in the connected component, the key image node is determined in each image node of the connected component. In an optional embodiment, the image node with the highest degree can be taken from each image node of the connected component, and the link including the image node is determined according to each edge connected to the image node. For each link, the following conditions are judged in turn: whether a closed loop can be formed, whether the total number of image nodes in the link is the least, and whether the total number of degrees of image nodes in the link is the highest. When the above three conditions are met at the same time, each image node on the link is taken as a key image node and added to the key image node set.

[0050] According to the degree of each image node in the connected component, a key image node is determined in each image node of the connected component to form a key image node set. In another optional embodiment, the following may be included:

[0051] A11. Among the image nodes of the connected components, the image node with the highest degree of certainty is taken as the key image node;

[0052] A12, among the image nodes connected to the key image node, determine the image node with the highest similarity as the key image node, and repeat the process until it is determined that a stop condition is met;

[0053] The stopping condition includes that the number of key image nodes is greater than or equal to a preset node number threshold, and / or a loop is formed between the key image nodes;

[0054] A13. Group the key image nodes into a key image node set.

[0055] In this embodiment, for a determined graph to be aggregated, the degree of each image node and the similarity of the edges between the image nodes are known. Therefore, for a connected component, firstly, among the image nodes therein, the image node with the highest degree is determined and used as the key image node.

[0056] Among the edges connected to the key image node, select the image node corresponding to the edge with the highest similarity as the new key image node. Continue to select the image node corresponding to the edge with the highest similarity as the new key image node among the edges connected to the new key image node. Repeat the above process until a preset node number threshold (for example, 20) key image nodes have been selected, or a loop is formed between the selected key image nodes.

[0057] It should be noted that if there are at least two image nodes with the highest degree and the same degree, since each image node of the connected component needs to be traversed once when determining the redundant edges, it is sufficient to randomly select an image node from each image node as the key image node. Similarly, if there are at least two image nodes with the highest similarity and the same similarity, it is sufficient to randomly select an image node from each image node as the key image node.

[0058] Adjacent image nodes refer to image nodes that are directly connected to the key image nodes through edges. Adjacent image nodes that are adjacent to the key image nodes can be determined directly based on the edges corresponding to each key image node.

[0059] Figure 3 A schematic diagram of a key image node set and an adjacent image node set is provided, such as Figure 3 As shown in the figure, for the connected component, the degree of each image node is counted. There are two image nodes with a degree of 5 in the connected component. The image node on the left is selected as the key image node. Find the image node with the highest similarity among the image nodes connected to it as the key image node. Search for the image nodes with the highest similarity in turn until Figure 3 The key image nodes in the image form a loop. Figure 3 V1 in is used to represent the key image node set. Figure 3 After obtaining the key image node set, the image nodes closest to each key image node in the key image node set are found as adjacent image nodes according to the edges of each key image node in the key image node set. Figure 3 V2 in is used to represent the set of adjacent image nodes. Figure 3 It is represented by a purple circle.

[0060] It is understandable that, since key image nodes have a higher status in information dissemination, resource sharing, etc. compared to other image nodes, and play a key hub role, the edges between key image nodes are retained to ensure that the topological structure of the connected components remains unchanged. This embodiment determines the redundant edges by judging the edges between key image nodes and adjacent image nodes, and the edges between adjacent image nodes.

[0061] Specifically, if the key image node and the adjacent image node form a loop, there are redundant edges in the loop. It can be understood that for the loop, removing one of the edges will not affect the topological structure, and the image nodes can still be directly or indirectly reachable. Therefore, there must be redundant edges in the loop. Because the loop is formed by the key image node and the adjacent image node, the key image node has a higher status than the adjacent image node, and the edges between the key image nodes need to be retained. Therefore, in this embodiment, the edges between the key image node and the adjacent image node in the loop and / or the edges between the adjacent image nodes are used as candidate edges.

[0062] Further, it can be determined whether a key image node and an adjacent image node form a loop in the following manner: an edge exists between an adjacent image node and at least two key image nodes, and / or an edge exists between adjacent image nodes. If either of the above two conditions is met, it can be considered that there is a loop between the key image node and the adjacent image node.

[0063] Among the candidate edges, the candidate edge with the smallest similarity between the image nodes at both ends is selected as the redundant edge. Figure 4 is Figure 3 Based on the key image nodes and adjacent image nodes determined in , a schematic diagram of redundant edge determination is provided, such as Figure 4 As shown, the key image nodes and the adjacent image nodes form a loop. In loop 1, the edge between the two key image nodes cannot be used as a redundant edge. The similarities between the two key image nodes and the adjacent image nodes are 0.7 and 0.8 respectively. Therefore, the edge with a similarity of 0.7 is deleted as a redundant edge. In loop 2, the edge between the two key image nodes cannot be used as a redundant edge. The similarities between the two key image nodes and the adjacent image nodes are 0.8 and 0.7 respectively. The similarity between the two adjacent image nodes is 0.6. Therefore, the edge between the two adjacent image nodes is deleted as a redundant edge. In loop 3, the similarities between the key image node and the two adjacent image nodes are 0.7 and 0.8 respectively. The similarity between the two adjacent image nodes is 0.9. Therefore, the edge with a similarity of 0.7 between the key image node and the adjacent image node is used as a redundant edge.

[0064] In this embodiment, after redundant edges are determined in the loop formed by the current batch of key image nodes and adjacent image nodes, each redundant edge is deleted. At the same time, each key image node and each adjacent image node are marked as processed, unprocessed image nodes are determined in each image node of the connected component, key image nodes and adjacent image nodes are re-determined in each unprocessed image node, and redundant edges are determined in the same manner as the above process until all image nodes of the connected component are processed.

[0065] In this embodiment, based on the degree of the image nodes in the connected components, dynamic deletion of redundant edges is achieved. While completely retaining the topological structure and connection characteristics between the image nodes, it is possible to delete redundant information in the graph to be clustered, optimize the processing process of the graph to be clustered, reduce redundant calculations and memory storage requirements, improve clustering efficiency and scale, and meet the demand for accurate clustering under large-scale complex data.

[0066] S120, performing image aggregation according to the graph to be aggregated after redundant edges are deleted, to obtain at least two initial image archives.

[0067] In this embodiment, image clustering based on the graph to be clustered after deleting redundant edges can be achieved through a clustering algorithm or a clustering model. Specifically, the clustering algorithm may include Louvain algorithm, Infomap (Information-theoretic Map Equation) algorithm, spectral clustering algorithm or label propagation algorithm, etc. This embodiment does not limit the specific type of the clustering algorithm. The clustering model can be trained based on a graph convolutional neural network or a variational graph autoencoder, etc. This embodiment does not limit the specific type of the model.

[0068] In this embodiment, the result of image clustering of the graph to be clustered after deleting redundant edges is used as the initial image archive, which needs to be merged later. The advantage of merging the initial image archive is that it can reduce the impact of noise, optimize the clustering boundaries, enhance the semantic consistency of the clustering results, and improve the accuracy and stability of the clustering.

[0069] S130, performing an initial merger on initial image files corresponding to the same connected component, and performing a secondary merger on initial image files corresponding to different connected components and / or image files after the initial merger, to obtain at least two target image files.

[0070] Among them, since the clustering algorithm or the clustering model usually does not generate an image file spanning more than two connected components when clustering the clustering graph, that is, one initial image file corresponds to one connected component, and at the same time, one connected component may contain one or more initial image files. Therefore, in this embodiment, the initial image files within the same connected component are initially merged, and after the initial image files within each connected component are merged, the image files between the connected components (here, they may be the initial image files or the image files after the initial merger) are merged for the second time, and the target image file obtained is the final clustering result.

[0071] In this embodiment, the initial image files within the same connected component are merged for the first time, and then the image files between different connected components are merged for the second time. The reason for this arrangement is that the merging result of the image files is affected by the merging order and is relatively random. Figure 5 A schematic diagram of the effect of the file merging order on the file aggregation result is provided, such as Figure 5 As shown in FIG. 1 , for the four initial image files A, B, C and D, if AB and CD are merged first, the final result is two image files; if BC is merged first, the final result is three image files. Figure 5 It can be seen that different merging orders will result in different image file merging results.

[0072] Therefore, in this embodiment, the image archives within the connected components are first merged, and then the image archives across the connected components are merged for the second time. This multi-level archive merging method based on the node position structure makes full use of the position information of the image nodes in the image archive, greatly reduces the disturbance of the randomness of the merging order on the final aggregation result, avoids the adverse effect of the early merging results on the subsequent merging results, improves the stability and robustness of the archive merging process, and to a certain extent moves the merging results from the local optimal direction to the global optimal direction, so that the final aggregation result obtained after the multi-level merging can enhance the information retention ability.

[0073] The technical solution of the embodiment of the present invention determines the connected components of the to-be-clustered graph, determines the redundant edges in the connected components according to the degree of each image node in the connected components, deletes the redundant edges, clusters the graph to be clustered, and after obtaining the initial image archive, first merges the initial image archives within the same connected component, and then merges the image archives between different connected components to obtain the final target image archive. The problem of excessive memory consumption, low computing efficiency, and waste of computing power caused by large graph scale and redundant edges in the prior art is solved. The embodiment of the present invention can reduce memory consumption and waste of computing resources, and improve the efficiency and accuracy of clustering.

[0074] Embodiment 2

[0075] Figure 6 This is a flow chart of another image archiving method provided in the second embodiment of the present invention. Based on the above embodiments, this embodiment of the present invention further specifies the processes of the initial merging and secondary merging of image archives.

[0076] like Figure 6 As shown, the method includes:

[0077] S210, determining at least two connected components in the graph to be aggregated, and determining redundant edges in the connected components according to the degree of each image node in the connected components.

[0078] S220, performing image aggregation according to the graph to be aggregated after deleting redundant edges, to obtain at least two initial image archives.

[0079] The process of determining the connected components in the graph to be clustered, determining the degree of each image node in the connected components, determining redundant edges within the connected components based on the degree of each node, and clustering the images has been described in the above examples and will not be repeated in this embodiment.

[0080] S230, determining the centroids of the initial image files corresponding to the same connected component, and determining two candidate initial image files with the highest similarity in the initial image files according to the centroids of the initial image files.

[0081] Among them, the centroid is the center point of the initial image archive, which can summarize the typical characteristics of the data in the initial image archive, accurately reflect the information of the archive, and provide a reliable reference for archive merging.

[0082] Determine the centroid of each initial image file corresponding to the same connected component. Specifically, the feature vector corresponding to each image node in the initial image file may be extracted and averaged to obtain the file centroid.

[0083] It is understandable that after deleting the redundant edges, although the topological structure and connection characteristics of the connected components are not destroyed, the clustering algorithm will randomly select a starting image node when clustering images, and randomly select an adjacent image node of the image node with a certain probability to move, so as to realize the traversal of the clustering graph. This process is called "random walk". During the random walk, the number of visits to some image nodes will be less than before the redundant edges are deleted. If the image node happens to be an important relay point of the random walk, it may cause a large image file before deleting the redundant edges to be divided into multiple small image files after deleting the redundant edges.

[0084] Therefore, in this embodiment, the initial image files within the same connected component are merged based on the centroid, which can compensate for the impact of deleting redundant edges on the clustering result and improve the clustering accuracy.

[0085] Further, the centroids of the initial image files corresponding to the same connected component are determined, including:

[0086] B1. For each initial image file corresponding to the same connected component, determine whether there is a target image node in the current initial image file;

[0087] The target image node is the image node corresponding to the redundant edge before deleting the redundant edge;

[0088] B2. If it is determined that the target image node exists in the current initial image file, the node weight of the target image node is determined according to the number of redundant edges corresponding to the target image node;

[0089] B3. Determine the centroid of the current initial image file based on the node weight of the target image node.

[0090] Based on the above embodiments, this embodiment proposes a weighted centroid determination method based on redundant edge deletion, so that the centroid is more biased towards the image nodes from which the redundant edges have been deleted, thereby compensating for the negative impact of deleting redundant edges on the centroid calculation. It can simulate the calculation of the real centroid when the redundant edges are not deleted, which is beneficial to improving the accuracy of subsequent image file merging.

[0091] Specifically, before deleting redundant edges, the image nodes at both ends of the redundant edges can be marked as target image nodes. Alternatively, the number of redundant edges corresponding to the image nodes can be counted by setting the missing degree parameter. Each time a redundant edge is determined, the missing degree of the image nodes corresponding to both ends is increased by one. For each image node in the current initial image file, if the missing degree is greater than 0, it is used as the target image node. The advantage of this setting is that the integrity of the image node can be evaluated by the number of deleted redundant edges corresponding to the image node, which facilitates the subsequent calculation of the weighted centroid.

[0092] In this embodiment, for the target image node, the node weight is calculated based on its missing degree (that is, the number of redundant edges), and for other image nodes in each image node except the target image node, the node weight is determined using a conventional node weight calculation method.

[0093] According to the number of redundant edges corresponding to the target image node, the node weight of the target image node is determined. In an optional embodiment, taking the number of redundant edges corresponding to the target image node represented by the missing degree as an example, the edge loss ratio of the target image node can be calculated according to the missing degree and degree of the target image node: T1 / T1+T2, where T1 represents the missing degree and T2 represents the degree. The mapping relationship between different edge loss ratio intervals and node weights is pre-set, and the node weight corresponding to the interval where the edge loss ratio of the current target image node is located is used as the node weight of the current target image node.

[0094] According to the number of redundant edges corresponding to the target image node, the node weight of the target image node is determined. In another optional embodiment, the number of redundant edges corresponding to the target image node is still represented by the missing degree as an example. Specifically, it can be calculated by the following formula: ,in, represents the node weight of the target image node, , T1 represents the missing degree, and T2 represents the degree. According to the above formula, the larger L is, the greater the node weight of the target image node is, which means that the centroid will be more biased towards the characteristics of the target image node.

[0095] Figure 7 A schematic diagram of the initial image archive before removing redundant edges is provided. Figure 8 exist Figure 7 Based on this, a schematic diagram of the effect of centroid on image file merging after removing redundant edges is provided. Figure 8 As shown in the figure, after deleting the redundant edges, the clustering result is two small initial image archives, A, B and C are one initial image archive, and DH is one initial image archive, which are represented by green and purple respectively. On this basis, if the centroid is calculated by the mean of the eigenvector, the two small initial image archives cannot be merged when the archives are merged due to the long distance between the centroids. If the centroid is calculated by weighting based on the missing degree of the image node, the centroid will be more biased towards the image node C and the image node E with a larger missing degree, so that when the image archives are merged later, the two small initial image archives can be more easily merged into a large image archive, which is closer to the image archive clustering result before deleting the redundant edges.

[0096] In this embodiment, the information integrity of the image nodes is evaluated based on the missing degree of the image nodes, the image node weights are changed, and the calculation of the image archive centroid is optimized, which can effectively compensate for the impact of the deletion of redundant edges on the image archive centroid characteristics, so that the calculated image archive centroid can restore the state before the redundant edges are deleted, accurately reflect the distribution characteristics of the original data, and thus help to improve the accuracy of subsequent archive merging.

[0097] In this embodiment, for each initial image file in the same connected component, the similarity between each pair of initial image files is calculated based on the centroid obtained by weighted calculation, and then the merging judgment is performed in order from large to small according to the similarity between the initial image files.

[0098] Specifically, the similarity between the two initial image files is calculated based on the centroid of each initial image file. The similarity between the two initial image files can be represented by the Euclidean distance, Manhattan distance, Chebyshev distance or cosine similarity of the centroids of the two initial image files, and this embodiment does not limit this.

[0099] S240: Determine a merging threshold that matches two candidate initial image files according to a preset first merging threshold and a second merging threshold.

[0100] The first merging threshold is greater than the second merging threshold. The first merging threshold is the maximum threshold for merging files within the connected component, and the second merging threshold is the minimum threshold for merging files within the connected component.

[0101] In this embodiment, based on the multi-level merging, a method of dynamically adjusting the merging threshold when merging files within connected components is proposed. By dynamically adjusting the merging threshold for different initial image files to be determined whether to be merged, the merging strength can be controlled at the micro level to further optimize the merging result.

[0102] According to the preset first merging threshold and the second merging threshold, the merging threshold matching the two candidate initial image archives is determined. In an optional embodiment, the merging threshold matching the two candidate initial image archives can be determined within the interval from the second merging threshold to the first merging threshold according to the missing degree of the target image node in the two candidate initial image archives. The greater the missing degree of the target image node, the smaller the merging threshold matching the two candidate initial image archives. This can be achieved by presetting a mapping relationship between different missing degree intervals and merging thresholds, or by a mathematical formula, which is not limited in this embodiment.

[0103] Understandably, according to Figure 8 It can be seen that the centroid of the initial image archive will be more biased towards image nodes with higher missingness. On this basis, setting a smaller merging threshold for the two candidate initial image archives can make it easier for the two candidate initial image archives to be merged into one image archive, which is closer to the image clustering effect before deleting redundant edges.

[0104] Determining a merging threshold matching two candidate initial image archives according to a preset first merging threshold and a second merging threshold may further include:

[0105] C1. Determine the position coefficients between the candidate initial image files according to the node positions of each image node in the candidate initial image file;

[0106] Wherein, the node position of each image node in the candidate initial image archive is represented by the processing batch of each image node when determining the redundant edges in the connected component;

[0107] C2. determining a difference between the first merging threshold and the second merging threshold, and determining a product of the position coefficient and the difference;

[0108] C3. Using the difference between the first merging threshold and the product as the merging threshold for matching the two candidate initial image files.

[0109] Specifically, in the above embodiment, after the redundant edges are determined based on the currently determined key original image nodes and adjacent image nodes, the current batch of key original image nodes and adjacent image nodes will be marked as processed. At this time, the processing batch of the key original image nodes and adjacent image nodes can be determined, and the processing batch of each image node can be used as the node position.

[0110] According to the node position of each image node in the candidate initial image file, the position coefficient between the candidate initial image files is determined. Specifically, the position coefficient can be expressed according to the degree of overlap of the node positions of each image node in the two candidate initial image files. Exemplarily, if there are four image nodes in the candidate initial image file A, when the redundant edges of the connected component where the candidate initial image file is located are determined, these four image nodes are processed at the 1st, 2nd, 2nd, and 5th times respectively. There are five image nodes in the candidate initial image file B. When the redundant edges of the connected component where the candidate initial image file is located are determined, these five image nodes are processed at the 2nd, 3rd, 4th, 5th, and 6th times respectively. Among them, there are three image nodes in the candidate initial image file A that have the same node position as two image nodes in the candidate initial image file B, then the position coefficient can be expressed by (3+2) / (4+5)=55.6%.

[0111] After calculating the position coefficient, the merge threshold matching the two candidate initial image files can be calculated by the following formula: ,in, represents the merge threshold for matching two candidate initial image archives, represents the first merging threshold, represents the second merging threshold, and k represents the position coefficient.

[0112] In this embodiment, it can be known from the above formula that the higher the degree of node position overlap between image nodes in two candidate initial image files, the smaller the merging threshold set therefor, and the easier it is for the two candidate initial image files to be merged into one image file.

[0113] In this embodiment, based on the node position overlap between image nodes in the initial image archive, the dynamic setting of the image archive merging threshold within the connected component is achieved.

[0114] S250: If it is determined that the similarity between the candidate initial image files is greater than or equal to a merging threshold matching the two candidate initial image files, the two candidate initial image files are merged.

[0115] In this embodiment, if the similarity between two candidate initial image files is greater than or equal to the merging threshold dynamically set in the above embodiment, the two candidate initial image files may be merged, and the centroid of the merged image file may be recalculated.

[0116] It should be noted that the centroid of the merged image file also needs to be determined by weighting based on the missing degree of the target image node, which will not be described in detail in this embodiment.

[0117] S260, re-determine the centroid of the merged image file, and re-execute the operation of determining the two candidate initial image files with the highest similarity in each initial image file and / or the merged image file, until the processing of all initial image files and / or merged image files corresponding to the same connected component is completed, or the similarity of the candidate initial image files is less than the second merging threshold.

[0118] In this embodiment, it is preferred to determine whether to merge two candidate initial image files with higher similarity, and the determination of whether to merge two image files is performed in order from high to low similarity, which can improve the efficiency of file merging.

[0119] S270 , performing secondary merging on the initial image files and / or the image files after the initial merging corresponding to different connected components according to a third merging threshold, to obtain at least two target image files.

[0120] The third merging threshold is greater than the first merging threshold.

[0121] In this embodiment, after the files within all connected components are merged, a higher merging threshold is used to merge the image files between connected components.

[0122] In this embodiment, for image files with the same connected components, a lower threshold is used, and the threshold is dynamically determined with the help of node position overlap, so as to achieve accurate initial file merging. For image files with different connected components, a higher threshold is used for secondary merging, and each image file after merging is the final target image file.

[0123] The technical solution of this embodiment determines the redundant edges in the connected components based on the degree of the image nodes, and dynamically deletes the redundant edges, while recording the missing degrees of the image nodes at both ends of the redundant edges, and evaluating the information integrity of the image nodes. After the clustering of the clustering graph is completed, the node weight is adjusted based on the node missing degree, the calculation of the image archive centroid is optimized, and the influence of the redundant edge deletion on the image archive centroid characteristics is effectively compensated, so that the centroid calculated based on the adjusted node weight can restore the image clustering effect before the redundant edge deletion, and accurately reflect the distribution characteristics of the original data inside the initial image archive. At the same time, a multi-level archive merging method is also designed. For the image archives inside the connected components, the merging threshold is dynamically adjusted by the node position coincidence degree, so as to realize the accurate initial merging of archives. For the image archives between the connected components, a higher threshold is used for secondary merging. This multi-level, dynamic threshold merging method further optimizes the merging effect of the image archives and avoids the influence of the merging order on the archive merging results. The image clustering using this embodiment can meet the requirements for accurate clustering in a large-scale complex network environment and improve the efficiency and accuracy of clustering.

[0124] Embodiment 3

[0125] Fig. 9 This is a schematic diagram of the structure of an image aggregation device provided by Embodiment 3 of the present invention. Fig. 9 As shown, the device comprises:

[0126] The redundant edge determination module 310 is used to determine at least two connected components in the to-be-aggregated graph, and determine the redundant edges in the connected components according to the degrees of the image nodes in the connected components;

[0127] An initial image archive determination module 320 is used to perform image aggregation according to the to-be-aggregated image graph after redundant edges are deleted, to obtain at least two initial image archives;

[0128] The target image file determination module 330 is used to initially merge the initial image files corresponding to the same connected component, and to perform secondary merging of the initial image files corresponding to different connected components and / or the image files after the initial merging, to obtain at least two target image files.

[0129] The technical solution of the embodiment of the present invention determines the connected components of the to-be-clustered graph, determines the redundant edges in the connected components according to the degree of each image node in the connected components, deletes the redundant edges, clusters the graph to be clustered, and after obtaining the initial image archive, first merges the initial image archives within the same connected component, and then merges the image archives between different connected components to obtain the final target image archive. The problem of excessive memory consumption, low computing efficiency, and waste of computing power caused by large graph scale and redundant edges in the prior art is solved. The embodiment of the present invention can reduce memory consumption and waste of computing resources, and improve the efficiency and accuracy of clustering.

[0130] Based on the above embodiment, optionally, the redundant edge determination module 310 includes:

[0131] A node determination unit, configured to determine key image nodes among the image nodes of the connected components according to the degrees of the image nodes in the connected components to form a key image node set, and to determine adjacent image nodes adjacent to the key image nodes to form an adjacent image node set;

[0132] A candidate edge determination unit, configured to, if it is determined that the key image node and the adjacent image nodes form a loop, take the other edges in the loop except the edges between the key image nodes as candidate edges;

[0133] A redundant edge determination unit, used to determine the similarity between two image nodes corresponding to the candidate edges, and to use the candidate edge with the lowest similarity as a redundant edge;

[0134] The node elimination unit is used to mark each image node in the key image node set and the adjacent image node set as processed, and repeatedly perform the operation of determining the key image nodes in the unprocessed image nodes of the connected component until all the image nodes in the connected component are processed and all the redundant edges in the connected component are obtained.

[0135] Based on the above embodiment, optionally, the node determination unit is specifically configured to:

[0136] Among the image nodes of the connected components, the image node with the highest degree of certainty is used as the key image node;

[0137] Among the image nodes connected to the key image node, determine the image node with the highest similarity as the key image node, and repeat the process until it is determined that a stop condition is met;

[0138] The stopping condition includes that the number of key image nodes is greater than or equal to a preset node number threshold, and / or a loop is formed between the key image nodes;

[0139] The key image nodes are grouped into a key image node set.

[0140] Based on the above embodiment, optionally, the target image archive determination module 330 includes:

[0141] A candidate initial image file determination unit is used to determine the centroids of each initial image file corresponding to the same connected component, and determine two candidate initial image files with the highest similarity in each initial image file according to the centroids of each initial image file;

[0142] a merging threshold determination unit, configured to determine a merging threshold matching two candidate initial image archives according to a preset first merging threshold and a second merging threshold;

[0143] an initial image file merging unit, configured to merge the two candidate initial image files if it is determined that the similarity between the candidate initial image files is greater than or equal to a merging threshold matching the two candidate initial image files;

[0144] a repetitive execution unit, configured to re-determine the centroid of the merged image archive, and re-execute the operation of determining two candidate initial image archives with the highest similarity in each initial image archive and / or the merged image archive, until the processing of all initial image archives and / or the merged image archives corresponding to the same connected component is completed, or the similarity of the candidate initial image archives is less than a second merging threshold;

[0145] The first merging threshold is greater than the second merging threshold.

[0146] Based on the above embodiment, optionally, the candidate initial image archive determining unit is specifically configured to:

[0147] For each initial image file corresponding to the same connected component, determine whether there is a target image node in the current initial image file;

[0148] The target image node is the image node corresponding to the redundant edge before deleting the redundant edge;

[0149] If it is determined that the target image node exists in the current initial image file, the node weight of the target image node is determined according to the number of redundant edges corresponding to the target image node;

[0150] According to the node weight of the target image node, the centroid of the current initial image archive is determined.

[0151] Based on the above embodiment, optionally, a threshold determination unit is incorporated, specifically used for:

[0152] Determining the position coefficients between the candidate initial image files according to the node positions of the image nodes in the candidate initial image files;

[0153] Wherein, the node position of each image node in the candidate initial image archive is represented by the processing batch of each image node when determining the redundant edges in the connected component;

[0154] Determine a difference between a first merging threshold and a second merging threshold, and determine a product of the position coefficient and the difference;

[0155] The difference between the first merging threshold and the product is used as the merging threshold for matching the two candidate initial image files.

[0156] Based on the above embodiment, optionally, the target image archive determination module 330 includes:

[0157] A secondary merging unit, used for performing secondary merging on the initial image files corresponding to different connected components and / or the image files after the initial merging according to a third merging threshold;

[0158] The third merging threshold is greater than the first merging threshold.

[0159] The image archiving device provided in the embodiment of the present invention can execute the image archiving method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0160] Embodiment 4

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

[0162] like Fig.10As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. The input / output (I / O) interface 15 is also connected to the bus 14.

[0163] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0164] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as the image aggregation method.

[0165] In some embodiments, the image archiving method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the image archiving method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the image archiving method in any other appropriate manner (e.g., by means of firmware).

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

[0167] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

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

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

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

[0171] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0172] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0173] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. An image aggregation method, characterized in that: include: Determining at least two connected components in the to-be-aggregated graph, and determining redundant edges in the connected components according to the degrees of the image nodes in the connected components, including: According to the degree of each image node in the connected component, key image nodes are determined in each image node of the connected component to form a key image node set, and adjacent image nodes adjacent to the key image nodes are determined to form an adjacent image node set; If it is determined that the key image node and the adjacent image nodes form a loop, then the edges in the loop except the edges between the key image nodes are taken as candidate edges; Determine the similarity between the two image nodes corresponding to the candidate edges, and take the candidate edge with the lowest similarity as a redundant edge; Mark each image node in the key image node set and the adjacent image node set as processed, and repeatedly perform the operation of determining the key image node in the unprocessed image nodes of the connected component until all image nodes in the connected component are processed and all redundant edges in the connected component are obtained; Perform image clustering according to the to-be-clustered graph after deleting redundant edges, to obtain at least two initial image archives; Initial image files corresponding to the same connected component are initially merged, and initial image files corresponding to different connected components and / or image files after initial merging are secondary merged to obtain at least two target image files.

2. The method according to claim 1, characterized in that According to the degree of each image node in the connected component, a key image node is determined in each image node of the connected component to form a key image node set, including: Among the image nodes of the connected components, the image node with the highest degree of certainty is used as the key image node; Among the image nodes connected to the key image node, determine the image node with the highest similarity as the key image node, and repeat the process until it is determined that a stop condition is met; The stopping condition includes that the number of key image nodes is greater than or equal to a preset node number threshold, and / or a loop is formed between the key image nodes; The key image nodes are grouped into a key image node set.

3. The method according to claim 1, characterized in that The initial image files corresponding to the same connected component are initially merged, including: Determine the centroids of each initial image file corresponding to the same connected component, and determine two candidate initial image files with the highest similarity in each initial image file according to the centroids of each initial image file; Determining a merging threshold matching two candidate initial image archives according to a preset first merging threshold and a second merging threshold; If it is determined that the similarity between the candidate initial image files is greater than or equal to the merging threshold matching the two candidate initial image files, then the two candidate initial image files are merged; Re-determine the centroid of the merged image file, and re-execute the operation of determining the two candidate initial image files with the highest similarity in each initial image file and / or the merged image file, until the processing of all initial image files and / or the merged image files corresponding to the same connected component is completed, or the similarity of the candidate initial image files is less than the second merging threshold; The first merging threshold is greater than the second merging threshold.

4. The method according to claim 3, characterized in that Determine the centroid of each initial image file corresponding to the same connected component, including: For each initial image file corresponding to the same connected component, determine whether there is a target image node in the current initial image file; The target image node is the image node corresponding to the redundant edge before deleting the redundant edge; If it is determined that the target image node exists in the current initial image file, the node weight of the target image node is determined according to the number of redundant edges corresponding to the target image node; According to the node weight of the target image node, the centroid of the current initial image archive is determined.

5. The method according to claim 3, characterized in that: Determining a merging threshold matching two candidate initial image archives according to a preset first merging threshold and a second merging threshold includes: Determining the position coefficients between the candidate initial image files according to the node positions of the image nodes in the candidate initial image files; Wherein, the node position of each image node in the candidate initial image archive is represented by the processing batch of each image node when determining the redundant edges in the connected component; Determine a difference between a first merging threshold and a second merging threshold, and determine a product of the position coefficient and the difference; The difference between the first merging threshold and the product is used as the merging threshold for matching the two candidate initial image files.

6. The method according to claim 3, characterized in that Performing secondary merging of initial image files corresponding to different connected components and / or image files after initial merging, including: Performing secondary merging on the initial image files and / or the image files after the initial merging corresponding to the different connected components according to the third merging threshold; The third merging threshold is greater than the first merging threshold.

7. An image aggregation device, characterized in that: include: A redundant edge determination module is used to determine at least two connected components in the to-be-aggregated graph, and determine redundant edges in the connected components according to the degrees of each image node in the connected components; The redundant edge determination module includes: A node determination unit, configured to determine key image nodes among the image nodes of the connected components according to the degrees of the image nodes in the connected components to form a key image node set, and to determine adjacent image nodes adjacent to the key image nodes to form an adjacent image node set; A candidate edge determination unit, configured to, if it is determined that the key image node and the adjacent image nodes form a loop, take the other edges in the loop except the edges between the key image nodes as candidate edges; A redundant edge determination unit, used to determine the similarity between two image nodes corresponding to the candidate edges, and to use the candidate edge with the lowest similarity as a redundant edge; A node elimination unit is used to mark each image node in the key image node set and the adjacent image node set as processed, and repeatedly perform the operation of determining the key image node in the unprocessed image nodes of the connected component until all image nodes in the connected component are processed to obtain all redundant edges in the connected component; An initial image archive determination module, used to perform image aggregation according to the to-be-aggregated image graph after redundant edges are deleted, to obtain at least two initial image archives; The target image file determination module is used to initially merge the initial image files corresponding to the same connected component, and to perform secondary merging on the initial image files corresponding to different connected components and / or the image files after the initial merging, so as to obtain at least two target image files.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the image archiving method as described in any one of claims 1-6 is implemented.

9. A storage medium storing computer executable instructions, characterized in that: When the computer executable instructions are executed by a computer processor, they are used to perform the image archiving method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Image clustering method and device, equipment and storage medium

    CN115147633A