Image aggregation method, image aggregation device and computer-readable storage medium

By dividing the portrait clustering into atomic areas and merging and adjusting the clustering areas based on historical data, the inaccuracy problem caused by fixed clustering areas is solved, and the accuracy and efficiency of clustering are improved.

CN114241224BActive Publication Date: 2025-09-19ZHEJIANG DAHUA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111314536.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-08
Publication Date
2025-09-19
Estimated Expiration
2041-11-08

AI Technical Summary

Technical Problem

In the existing technology, the portrait clustering area is fixed, resulting in inaccurate clustering results and being unable to adapt to factors such as actual regional changes.

Method used

By obtaining the historical image data and current image data of the preset area, it is divided into multiple atomic areas, and the merging conditions are judged based on the historical data to form a second clustering area, and the clustering area is dynamically adjusted to improve accuracy.

Benefits of technology

The adaptability and flexibility of the aggregation area are achieved, the accuracy and efficiency of aggregation are improved, and the consumption of computing resources is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114241224B_ABST
    Figure CN114241224B_ABST
Patent Text Reader

Abstract

The present application discloses an image clustering method, an image clustering device, and a computer-readable storage medium. The method comprises: obtaining historical image data and current image data of the same preset area, wherein the preset area includes multiple first clustering areas; after determining based on the historical image data that the first clustering areas meet preset merging conditions, merging the first clustering areas to obtain multiple second clustering areas; and clustering the current image to be clustered in the current image data according to the second clustering areas to obtain a first clustering result. Through the above-mentioned method, the present application can improve the accuracy of clustering.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of big data technology, and in particular to an image archiving method, an image archiving device, and a computer-readable storage medium. Background Art

[0002] Portrait archiving is to cluster the collected portrait data, gather the face and body pictures of the same person together, and form a person-based file. The file includes several portrait pictures and the collection time and location of each picture. After the portrait file is constructed, the movement trajectory and destination of a person can be restored, which can provide technical support for relevant departments to combat various illegal and criminal activities, such as Figure 1 As shown, each circle represents a snapshot, recording the time and location of the snapshot, allowing the reconstruction of a person's trajectory and destination. However, while the clustering area in related technologies is fixed, in practice, it is not fixed and may change due to road conditions or other factors, resulting in inaccurate clustering results. Summary of the Invention

[0003] The present application provides an image aggregation method, an image aggregation device and a computer-readable storage medium, which can improve the accuracy of aggregation.

[0004] In order to solve the above technical problems, the technical solution adopted in this application is: to provide an image clustering method, the method including: obtaining historical image data and current image data of the same preset area, the preset area including multiple first clustering areas; after judging that the first clustering area meets the preset merging conditions based on the historical image data, merging the first clustering area to obtain multiple second clustering areas; clustering the current image to be clustered in the current image data according to the second clustering area to obtain a first clustering result.

[0005] In order to solve the above technical problems, another technical solution adopted in this application is: to provide an image archiving device, which includes a memory and a processor connected to each other, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, it is used to implement the image archiving method in the above technical solution.

[0006] In order to solve the above technical problems, another technical solution adopted in this application is: to provide a computer-readable storage medium, which is used to store a computer program. When the computer program is executed by a processor, it is used to implement the image archiving method in the above technical solution.

[0007] Through the above scheme, the beneficial effects of the present application are as follows: first, the preset area is divided into multiple first clustering areas, and then historical image data of the preset area in the historical clustering period and current image data of the preset area in the current clustering period are obtained; then, the historical image data is processed to determine whether any two first clustering areas corresponding to the historical image data can be merged; if the two first clustering areas meet the preset merging conditions, they are merged to obtain a second clustering area; otherwise, the second clustering area is the same as the first clustering area; then, the current image to be clustered is clustered according to the second clustering area to obtain a first clustering result. Since the preset area is divided into multiple small areas, and the small areas can be adaptively merged, the adjustment of the clustering area is achieved, the flexibility of the clustering area is improved, and the accuracy of the clustering is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without inventive efforts. Among them:

[0009] Figure 1 It is a schematic diagram of the movement trajectory of a person provided by this application;

[0010] Figure 2 This is a schematic diagram of roads and pedestrian flows provided by this application;

[0011] Figure 3 It is a schematic diagram of the structure of the atomic region provided in this application;

[0012] Figure 4 This is another schematic diagram of roads and pedestrian flows provided by this application;

[0013] Figure 5 This is a flow chart of an embodiment of the image aggregation method provided by the present application;

[0014] Figure 6 It is a structural diagram of the second gathering area provided by this application;

[0015] Figure 7 This is a flow chart of another embodiment of the image aggregation method provided by the present application;

[0016] Figure 8 yes Figure 7 A schematic flow chart of step 73 in the embodiment shown;

[0017] Figure 9 is another structural schematic diagram of the second gathering area provided by this application;

[0018] Figure 10 This is a flowchart of another embodiment of the image aggregation method provided by the present application;

[0019] Figure 11 This is a structural diagram of an embodiment of an image aggregation device provided by the present application;

[0020] Figure 12 It is a structural diagram of an embodiment of a computer-readable storage medium provided by this application. DETAILED DESCRIPTION

[0021] The present application will be further described in detail below in conjunction with the accompanying drawings and examples. It is particularly noted that the following examples are only intended to illustrate the present application and are not intended to limit the scope of the present application. Similarly, the following examples are only some examples of the present application and not all examples. All other examples obtained by those of ordinary skill in the art without creative work are intended to fall within the scope of protection of this application.

[0022] References to "embodiments" in this application mean that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0023] It should be noted that the terms "first", "second" and "third" in this application are only used for descriptive purposes and should not be understood as indicating or suggesting relative importance or implicitly indicating the number of the indicated technical features. Thus, the features defined as "first", "second" and "third" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined. In addition, the terms "including" and "having" and any variations thereof 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 limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units that are inherent to these processes, methods, products or devices.

[0024] Some solutions in related technologies judge the distance by whether the moving speed is greater than the moving threshold. For the data to be clustered that is greater than the set threshold, it is considered that they do not belong to the same person and do not participate in the cluster comparison. However, in fact, two points that are geographically close may have geographical barriers. At this time, using the moving speed to judge is not very accurate; and the circular clustering area envisioned by this solution is only applicable in a few open and flat occasions. In fact, due to the obstruction of rivers, roads or buildings, it is difficult for a person's movement route to become a circle. It is more likely to be an irregular shape, resulting in inaccurate regional division. There are also some solutions that cluster by gradually increasing the cluster area, but there are also cases where geographically close areas do have physical barriers; and this solution does not take probability factors into consideration. The probability of a person passing through different areas is not equal, such as Figure 2 As shown in the figure, there are subway entrances A and B on both sides of a main road. The passenger flow at subway entrances A and B is very large. The probability of people passing through subway entrance A passing through the south side of the main road is much lower than the probability of passing through the north side of the main road. The dynamic adjustment area is not considered. Even if a roadblock is suddenly set up in a certain area, this solution will not adjust the gathering area.

[0025] In summary, the problems to be solved by this application are: 1) how to divide the area for clustering; 2) how to dynamically adjust the area for clustering so that the area for clustering is in an optimal state to improve the accuracy of clustering.

[0026] This application uses road networks and rivers as the basis for dividing the area of ​​the cluster. In order to facilitate the description of the technical solution provided by this application, the map can be abstracted and the road network or river can be used as the edge to form Figure 3 The area diagram shown in the figure is shown in the figure. AP is the area number. Before describing the specific solution of this application, two terms are defined:

[0027] Atomic Region: Figure 3 In the AP, the atomic region is the smallest region of the aggregate file and is also an indivisible region. Therefore, the division should be finer. Atomic regions rarely change and can be manually planned. In implementation, the division of atomic regions can refer to road networks or rivers. The boundaries of atomic regions are mainly:

[0028] 1) Various roads, such as main roads, secondary roads or branch roads, etc.

[0029] 2) The bank of a river or lake.

[0030] 3) Elevated road bridge.

[0031] 4) Both sides of the railway.

[0032] 5) Virtual edges, such as different exits of a subway, Figure 4For example, people entering and exiting subway entrance A are unlikely to pass through subway entrance B, so a virtual edge can be drawn between subway entrances A and B.

[0033] The edges of an atomic region are considered connected. However, if an edge crosses a river or an impassable roadblock, the edge is not considered connected. It is worth noting that the two sides of a road or river may be designated as different regions.

[0034] A clustering region is a region consisting of 1 to N atomic regions. The data in a clustering region is clustered once. For example, three atomic regions AC form a clustering region, and the data in these three regions is clustered once each time. This application improves clustering accuracy by adjusting the atomic regions contained in each clustering region to optimize the clustering region.

[0035] See also Figure 5 , Figure 5 1 is a flow chart of an embodiment of an image aggregation method provided by the present application, the method comprising:

[0036] Step 51: Acquire historical image data and current image data of the same preset area.

[0037] The preset area is a pre-set area that needs to be clustered. The preset area includes multiple first clustering areas. The first clustering area can be a single atomic area or include at least two atomic areas. The atomic areas can be manually divided according to the recommended rules; the historical image data includes the to-be-clustered images of the preset area within the historical clustering period (recorded as historical to-be-clustered images), and the current image data includes the to-be-clustered images of the preset area within the current clustering period (recorded as current to-be-clustered images). The to-be-clustered images (including historical to-be-clustered images and current to-be-clustered images) are images containing the to-be-clustered targets. The to-be-clustered targets can be people or other objects (such as license plates). The time length of the clustering period is set in advance.

[0038] It can be understood that the historical aggregation period can be the previous aggregation period of the current aggregation period, but in addition to adjusting the current aggregation area according to the previous aggregation period, the aggregation area can also be adjusted according to the aggregation results of a certain time period yesterday, last week or last month. For example: the aggregation area of ​​a working day can refer to the previous working day.

[0039] Step 52: After determining that the first clustering area meets the preset merging condition based on the historical image data, the first clustering area is merged to obtain a plurality of second clustering areas.

[0040] After acquiring the historical image data, the historical images to be clustered in the historical image data can be clustered to find whether there are at least two first clustering areas that can be merged, that is, to determine whether the at least two first clustering areas meet the preset merging conditions. If these first clustering areas meet the preset merging conditions, they are merged to obtain a second clustering area; if a first clustering area cannot be merged with all other first clustering areas, the first clustering area is directly used as a second clustering area. For example, Figure 6 Taking the first gathering gear area shown as an example, after judgment, it is found that the first gathering gear area A and the first gathering gear area B can be merged to obtain the second gathering gear area 61, and the first gathering gear area J and the first gathering gear area N can be merged to obtain the second gathering gear area 62, and the remaining first gathering gear areas CI, KM and OP are respectively used as the corresponding second gathering gear areas.

[0041] Step 53: Perform clustering processing on the current image to be clustered in the current image data according to the second clustering area to obtain a first clustering result.

[0042] All images in a clustering cycle can be clustered together. However, if the geographical scope of the clustering is relatively large, the number of images in the clustering cycle may also be very large. Clustering such a large image collection requires a lot of computing resources and time. At the same time, there may be many similar images in a large image collection. For example, taking the images to be clustered as portrait images, there may be many similar faces and bodies in the large image collection. In particular, there are many bodies with similar body shapes and the same clothing, but they may not be the same person and should not be clustered together. Therefore, clustering in a large image collection is more prone to errors. Therefore, the number of portraits to be clustered can be limited to a smaller scale. This can significantly reduce the number of similar faces and bodies, reduce resource consumption, and further improve the accuracy of clustering. Since people cannot move from one place to another instantly and cannot walk 1 kilometer in one minute, their actions are highly spatially correlated. Therefore, we can make full use of spatial local correlation and divide the physical world into several smaller areas. We can first cluster within the small area and then expand the clustering range. This is a solution that saves resources and improves the accuracy of clustering. For example, suppose a city is divided into 100 regions, each with 10,000 portrait snapshots. The following is a comparison of the images without and with regions:

[0043]

[0044] As can be seen from the table above, regionalized archiving has much lower peak resource demands, making it more user-friendly for building an archiving big data system. At the same time, performing regional archiving first fully utilizes the correlation of geographic space, resulting in higher archiving accuracy.

[0045] Therefore, after merging the first clustering regions according to historical image data to generate multiple second clustering regions, a method of first local clustering and then global clustering is adopted. Specifically, all images currently to be clustered in each second clustering region are first clustered to generate corresponding clustering results. Then, all clustering results are clustered to obtain the first clustering result. For example, assuming there are M second clustering regions, after the first clustering, M clustering results are obtained. These M clustering results are then clustered to obtain the first clustering result.

[0046] This embodiment provides an image clustering scheme. First, a preset area is divided into multiple atomic areas. Then, historical image data from a historical clustering period and current image data from a current clustering period are obtained. The historical image data is processed to determine whether a first clustering area can be merged. If multiple first clustering areas meet the preset merging conditions, they are merged to obtain a second clustering area. Similar operations are repeated until all first clustering areas are determined to be mergeable with other first clustering areas, ultimately obtaining multiple second clustering areas. The current image to be clustered is then clustered according to the second clustering areas to obtain a first clustering result. This embodiment provides rules for dividing atomic areas. According to these rules, atomic areas that are more consistent with human behavior can be manually divided, facilitating subsequent clustering according to the atomic areas. Moreover, because the preset area is divided into multiple small areas, the small areas can be adaptively merged, which increases the flexibility of the clustering area and helps improve the accuracy of the clustering.

[0047] See also Figure 7 , Figure 7 FIG. 1 is a flow chart of another embodiment of the image aggregation method provided by the present application, the method comprising:

[0048] Step 71: Acquire historical image data and current image data of the same preset area.

[0049] Step 71 is the same as step 51 in the above embodiment and will not be described again here.

[0050] Step 72: Clustering the historical images to be clustered in the historical image data to obtain a second clustering result.

[0051] The second clustering result includes multiple clusters, each cluster includes historical images to be clustered of the same target to be clustered; clustering processing is performed on the historical images to be clustered in each first clustering area respectively to obtain at least one third clustering result; then clustering processing is performed on all third clustering results to obtain the second clustering result, thereby realizing local clustering in a small area first and then global clustering in a large area.

[0052] Furthermore, taking portrait clustering as an example, after the portrait clustering system is started, first in the first clustering cycle, portrait clustering is performed on each first clustering area. At this time, the first clustering area is equal to the atomic area, and then portrait clustering is performed on the clustering results of all first clustering areas.

[0053] Step 73: Based on the second aggregation result, determine whether a preset merging condition is met.

[0054] After obtaining the second aggregate result, you can use Figure 8 The solution shown in the figure is used to determine whether regions need to be merged, which specifically includes the following steps:

[0055] Step 731: Count the areas where the targets to be clustered appear in the clusters to obtain the categories of the targets to be clustered that appear in the first clustering area.

[0056] According to the second gathering results of the historical gathering cycle, the number of times each target to be gathered participates in the gathering in each first gathering area is counted, and the category of the target to be gathered appearing in the first gathering area is obtained, so as to distinguish whether the same target to be gathered exists in different first gathering areas, and then find the first gathering area with the closest relationship to form the second gathering area of ​​the current gathering cycle.

[0057] Step 732: Calculate the intimacy between any two first clustering areas based on the categories of the to-be-clustered targets appearing in the first clustering areas.

[0058] In order to prevent the activity areas from being disconnected due to the obstruction of the action trajectory, the intimacy between any two first gathering areas can be calculated; specifically, the number of the same category of the targets to be gathered in the two first gathering areas is first calculated to obtain a first value; then the sum of the number of categories of the targets to be gathered in the two first gathering areas is calculated to obtain a second value; then the first value is divided by the second value to obtain the intimacy between the two first gathering areas.

[0059] Furthermore, when determining whether the categories of the targets to be aggregated in the two first aggregation areas are the same, a historical image to be aggregated with better image quality can be selected from each of the two first aggregation areas, and then the similarity between the two historical images to be aggregated can be calculated to determine whether the targets to be aggregated in the two historical images to be aggregated belong to the same target to be aggregated.

[0060] Step 733: Determine whether the intimacy is greater than a preset intimacy threshold.

[0061] The preset intimacy threshold is a preset threshold used to measure the intimacy between the first clustering areas.

[0062] Step 734: If the intimacy is greater than the preset intimacy threshold, it is determined that the preset merging condition is met.

[0063] If the intimacy between the two first spooling areas is greater than a preset intimacy threshold, the two first spooling areas are determined to meet a preset merging condition, and the two first spooling areas are merged. It is understood that the first spooling areas in the second spooling area are not necessarily directly adjacent to each other geographically; that is, the first spooling areas to be merged may not be adjacent to each other.

[0064] For example, Figure 9 As shown, the preset area includes 16 areas: AP. In the first gathering period, the targets to be gathered p1, p2, p3 and p4 appear in area A, and the targets to be gathered p2, p3, p4 and p5 appear in area B. Then the intimacy between area A and area B is the ratio of the number of elements of (p1, p2, p3, p4)∩(p2, p3, p4, p5) to the number of elements of (p1, p2, p3, p4)∪(p2, p3, p4, p5), that is, 3 / 5=0.6, which means that 60% of the people who passed through area A passed through area B. If 60% is higher than the preset intimacy threshold, the two areas are considered to be closely connected and are planned as a second gathering area. By analogy, all areas with intimacy higher than the preset intimacy threshold are calculated, and the final second gathering area is formed as follows. Figure 9 As shown, the same color block represents a second focusing area.

[0065] Step 74: If the preset merging condition is met, the first clustering regions are merged to obtain a plurality of second clustering regions.

[0066] When the intimacy between the two first gathering areas is greater than a preset intimacy threshold, the two first gathering areas are merged to obtain a second gathering area; when the intimacy between the two first gathering areas is less than / equal to the preset intimacy threshold, no merging is performed.

[0067] It can be understood that the intimacy between any two first to-be-gathered areas in the same second to-be-gathered area is greater than a preset intimacy threshold, for example, Figure 9 As shown, the intimacy between area A and area B is greater than the preset intimacy threshold, the intimacy between area A and area F is greater than the preset intimacy threshold, and the intimacy between area B and area F is greater than the preset intimacy threshold. When most people pass through the three areas A, B, and F at the same time, these three areas are grouped together as a large gathering area. Alternatively, it can be set that when the intimacy between more than a certain proportion of areas is greater than the preset intimacy threshold, they are merged; for example, Figure 9As shown, the intimacy between area A and area B is greater than the preset intimacy threshold, the intimacy between area A and area F is greater than the preset intimacy threshold, and the intimacy between area B and area F is also greater than the preset intimacy threshold, so these three areas can be merged.

[0068] Step 75: Perform clustering processing on the current image to be clustered in the current image data according to the second clustering area to obtain a first clustering result.

[0069] In the current gear shifting cycle, gear shifting is performed with reference to the newly divided gear shifting area (i.e., the second gear shifting area). By executing steps 71 to 75, the current gear shifting area can be dynamically adjusted according to the gear shifting result of the previous gear shifting cycle, so that the current gear shifting area is always in an optimal state.

[0070] In a specific embodiment, after the clustering system is activated, during the first clustering cycle, assuming that 100 people pass through area D1, and 90 of them also pass through area D2, then areas D1 and D2 are closely related. During the second clustering cycle, areas D1 and D2 are clustered together, rather than waiting until the global clustering phase. This fully utilizes the spatial correlation between regions, reduces the number of initial clusters, reduces the probability of incorrect clustering of similar faces and bodies, and conserves clustering computing resources. Assuming that during the previous clustering cycle, 100 people passed through area D1, but only 5 also passed through area D2, then it can be considered that areas D1 and D2 are not closely related, and there is insufficient basis for classifying areas D1 and D2 as the same clustering area. Clustering can therefore be performed during the global clustering phase.

[0071] This embodiment divides the aggregation regions into zones, fully taking probability into account. This improves both the probability of successful aggregation and the accuracy of aggregation. Furthermore, the aggregation regions for the current aggregation cycle can be dynamically adjusted based on the aggregation results of the previous aggregation cycle, ensuring that the aggregation regions are always optimized, achieving better aggregation results with fewer resources.

[0072] See also Figure 10 , Figure 10 FIG. 5 is a flow chart of another embodiment of the image aggregation method provided by the present application, the method comprising:

[0073] Step 101: Acquire historical image data and current image data of the same preset area.

[0074] Step 102: After determining that the first clustering area meets a preset merging condition based on the historical image data, the first clustering area is merged to obtain a plurality of second clustering areas.

[0075] Step 101-step 102 are the same as steps 51-52 in the above embodiment and will not be repeated here.

[0076] Step 103: Perform position detection processing on the current image to be gathered to obtain the area where the target to be gathered is located in the current image to be gathered.

[0077] Position detection processing is performed on the current image to be gathered in the current image data to find the position of the target to be gathered in the current image to be gathered and determine the area where the target to be gathered is located.

[0078] Step 104: Based on the area where the target to be aggregated is located, determine whether the preset splitting conditions are met.

[0079] Step 105: If the preset splitting condition is met, the second gathering area is split to obtain at least two third gathering areas.

[0080] A first gathering area can be selected from the second gathering area as the current first area, and the remaining first gathering areas in the second gathering area are recorded as the current second area; then the number of each to-be-gathered target in the current first area that does not appear in the current second area is counted to obtain a statistical number; then it is determined whether the ratio of the statistical number to the total number of to-be-gathered targets in the current first area is greater than a preset ratio; if the ratio of the statistical number to the total number of to-be-gathered targets in the current first area is greater than the preset ratio, it is determined that the preset splitting condition is met, and the current first area is split from the second gathering area; the second gathering area after the split is determined Whether the number of the first gathering gear areas in the split second gathering gear area is a preset number, which can be 1; if the number of the first gathering gear areas in the split second gathering gear area is not the preset number, the current second area is used as the current first area, and the process returns to the step of selecting a first gathering gear area from the second gathering gear area as the current first area, until the preset splitting condition is not met or the number of the first gathering gear areas in the split second gathering gear area is the preset number, and finally the splitting judgment of all the second gathering gear areas is realized to obtain multiple third gathering gear areas, and the size of the third gathering gear area can be the same as or smaller than the size of the second gathering gear area at the corresponding position.

[0081] Step 106: Perform clustering processing on the current image to be clustered in the current image data according to the third clustering area to obtain a first clustering result.

[0082] Step 106 is similar to step 53 in the above embodiment and will not be described again here.

[0083] Before the current gathering period begins, it is determined whether the division of the gathering areas is appropriate. If not, they are split up in time to improve the accuracy of the gathering. For example, a roadblock is added between area H1 and area H2, which were originally a gathering area. During the current gathering period, statistics show that people passing through area H1 almost never pass through area H2. Then, during the current gathering period, area H1 and area H2 are split up and divided into different gathering areas, thus realizing dynamic adjustment of the gathering areas and keeping them in an optimal state.

[0084] See also Figure 11 , Figure 11 It is a structural diagram of an embodiment of the image archiving device provided in the present application. The image archiving device 110 includes a memory 111 and a processor 112 connected to each other. The memory 111 is used to store computer programs. When the computer program is executed by the processor 112, it is used to implement the image archiving method in the above embodiment.

[0085] See also Figure 12 , Figure 12 It is a structural diagram of an embodiment of a computer-readable storage medium provided in the present application. The computer-readable storage medium 120 is used to store a computer program 121. When the computer program 121 is executed by the processor, it is used to implement the image archiving method in the above embodiment.

[0086] The computer-readable storage medium 120 can be a server, a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc., which can store program codes.

[0087] In the several embodiments provided in this application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of modules or units is merely a logical functional division. In actual implementation, other division methods may be used. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not implemented.

[0088] Units described as separate components may or may not be physically separate, and 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 these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0089] In addition, each functional unit in each embodiment of the present application may be integrated into a processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The above-mentioned integrated units may be implemented in the form of hardware or software functional units.

[0090] The above description is merely an embodiment of the present application and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. An image aggregation method, characterized in that: include: Acquiring historical image data and current image data of a same preset area, wherein the preset area includes a plurality of first aggregate areas; When it is determined based on the historical image data that the intimacy between the two first gathering areas is greater than a preset intimacy threshold, merging the two first gathering areas to obtain a second gathering area; Clustering is performed on the current image to be clustered in the current image data according to the second clustering area to obtain a first clustering result.

2. The image aggregation method according to claim 1, characterized in that: Before the step of merging the two first gathering areas to obtain the second gathering area when it is determined based on the historical image data that the intimacy between the two first gathering areas is greater than a preset intimacy threshold, the method includes: performing clustering processing on the historical images to be clustered in the historical image data to obtain a second clustering result, wherein the second clustering result includes a plurality of clusters, and the clusters include historical images to be clustered of the same target to be clustered; Based on the second grouping result, it is determined whether the intimacy between any two of the first grouping areas is greater than a preset intimacy threshold.

3. The image aggregation method according to claim 2, characterized in that: The step of determining whether the intimacy between any two of the first clustering areas is greater than a preset intimacy threshold based on the second clustering result includes: Counting the areas where the objects to be clustered appear in the clusters to obtain categories of the objects to be clustered that appear in the first clustering areas; Calculating the intimacy between any two of the first gathering areas based on the categories of the to-be-gathered targets appearing in the first gathering areas; Determine whether the intimacy is greater than a preset intimacy threshold.

4. The image aggregation method according to claim 3, characterized in that: The step of calculating the intimacy between any two first gathering areas based on the categories of the to-be-gathered targets appearing in the first gathering areas comprises: Calculating the number of targets to be gathered in the same category in the two first gathering areas to obtain a first value; Calculating the sum of the numbers of categories of the to-be-gathered targets in the two first gathering areas to obtain a second value; The first value is divided by the second value to obtain the intimacy of the two first clustering areas.

5. The image aggregation method according to claim 2, characterized in that: The step of performing clustering processing on the historical images to be clustered in the historical image data to obtain a second clustering result includes: performing clustering processing on each of the historical images to be clustered in the first clustering area to obtain a third clustering result; Clustering is performed on the third clustering result to obtain the second clustering result.

6. The image aggregation method according to claim 1, characterized in that: The second convergence zone includes at least two of the first convergence zones, and the method further includes: Performing position detection processing on the current image to be gathered to obtain an area where the target to be gathered is located in the current image to be gathered; Based on the area where the target to be aggregated is located, determining whether a preset splitting condition is met; If so, the second gathering and shifting area is split to obtain at least two third gathering and shifting areas.

7. The image aggregation method according to claim 6, characterized in that: The method further comprises: Selecting one first convergence zone from the second convergence zones as a current first zone, and recording the remaining first convergence zones in the second convergence zones as current second zones; Counting the number of each to-be-aggregated target in the current first area that does not appear in the current second area to obtain a statistical number; Determine whether the ratio of the statistical number to the total number of targets to be aggregated in the current first area is greater than a preset ratio; If the ratio of the statistical number to the total number of targets to be aggregated in the current first area is greater than the preset ratio, it is determined that the preset splitting condition is met, and the current first area is separated from the second aggregate area; determining whether the number of the first gear-gathering areas in the second gear-gathering areas after the splitting is equal to a preset number; If the number of first gathering areas in the split second gathering area is not the preset number, the current second area is used as the current first area, and the process returns to the step of selecting a first gathering area from the second gathering area as the current first area until the preset splitting condition is not met or the number of first gathering areas in the split second gathering area is the preset number.

8. An image aggregation device, characterized in that: The invention comprises a memory and a processor connected to each other, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, it is used to implement the image archiving method according to any one of claims 1 to 7.

9. A computer-readable storage medium for storing a computer program, characterized in that: When the computer program is executed by a processor, it is used to implement the image archiving method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Image-based archive management method, system and device, and medium

    CN111694979A

  • Image clustering method and device, electronic equipment and storage medium

    CN113052245A