An image grouping method, apparatus, device and medium

By grouping images based on their correlation with each other, the problem of low clustering accuracy caused by randomly grouping highly similar images is solved, resulting in more efficient clustering results.

CN114611588BActive Publication Date: 2026-02-13ZHEJIANG DAHUA TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210177432.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-25
Publication Date
2026-02-13
Estimated Expiration
2042-02-25

AI Technical Summary

Technical Problem

In existing technologies, images with high similarity may be grouped into different groups, affecting the accuracy of clustering results.

Method used

By acquiring images from each image acquisition device within a set time period, a first group is determined for devices with a number not less than a preset threshold, and the images are grouped according to the correlation between the image acquisition devices to ensure that the images in each group have a high degree of similarity.

Benefits of technology

It improves the accuracy of clustering results and reduces the impact of grouping on clustering results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114611588B_ABST
    Figure CN114611588B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide an image grouping method, device, equipment and medium. For a first image acquisition device with a number of collected images not less than a preset number threshold, a first group number of images collected by the first image acquisition device and satisfying the number threshold is determined, and the images collected by the first image acquisition device are divided into the first group number of groups. Each group contains images with a number of the number threshold. For a second image acquisition device with a number of collected images less than the number threshold and a target first image acquisition device with remaining ungrouped images, images to be grouped are grouped according to a saved correlation degree between any two image acquisition devices. In the embodiments of the present application, the correlation degree between image acquisition devices is considered when grouping, so that the similarity between images in each group is high, and the influence of grouping on the accuracy of clustering results is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processing, and particularly relates to an image grouping method and device, equipment and a medium. BACKGROUND

[0002] With the development of technology, image acquisition devices are widely used for portrait acquisition, and a technology of clustering faces based on images acquired by image acquisition devices is also widely applied in security scenes. However, considering the increasing number of images to be clustered, the operation efficiency and stability of traditional clustering methods have gradually failed to meet actual demands.

[0003] Therefore, in the clustering scene of a large number of images, in order to continuously improve the clustering rate under the premise of ensuring high accuracy and recall rate, a method of clustering faces under a distributed framework is proposed in the prior art. Specifically, the images are divided into each group, and the images in each group are distributed to an electronic device, and the electronic device clusters the images in the group to obtain the clustering result of the group images, and then the clustering results of the images in each group are counted to obtain the final clustering result.

[0004] However, when the images to be clustered are divided into each group, the images are randomly selected, and images with high similarity may be divided into different groups, affecting the accuracy of the clustering result. SUMMARY

[0005] The present application provides an image grouping method, device, equipment and medium to solve the problem that images with high similarity may be divided into different groups in the prior art, thereby causing low accuracy of the clustering result.

[0006] The present application provides an image grouping method, which comprises:

[0007] acquiring images acquired by each image acquisition device within a set time length;

[0008] for a first image acquisition device with a number of acquired images not less than a preset number threshold, determining a first group number of images acquired by the first image acquisition device and satisfying the number threshold, and dividing the images acquired by the first image acquisition device into groups of the first group number, wherein the number of images in each group is the number threshold;

[0009] for a second image acquisition device with a number of acquired images less than the number threshold and a target first image acquisition device with remaining ungrouped images, grouping the images to be grouped according to the saved association degree between any two image acquisition devices.

[0010] Further, the grouping the images according to the saved correlation degrees between any two image acquisition devices comprises:

[0011] counting the total number of the images to be grouped, and determining the second group number corresponding to the images to be grouped according to the total number and the number threshold;

[0012] sorting each image acquisition device in the order from large to small according to the number of images to be grouped of each second image acquisition device, to obtain a first sorting result;

[0013] according to the first sorting result, sequentially for each image acquisition device in the first sorting result, if the image acquisition device is correlated with the image acquisition device corresponding to the grouped image, the remaining space of the first group in which the grouped image is located is less than the number of images to be grouped of the image acquisition device, and there is an unoccupied group, then the images to be grouped of the image acquisition device are divided into the unoccupied group; if the image acquisition device is correlated with the image acquisition device corresponding to the grouped image, the remaining space of the second group in which the grouped image is located is not less than the number of images to be grouped of the image acquisition device, then the images to be grouped of the image acquisition device are divided into the second group.

[0014] Further, the method further comprises:

[0015] if the image acquisition device is correlated with the image acquisition device corresponding to the grouped image, the remaining space of the third group in which the grouped image is located is less than the number of images to be grouped of the image acquisition device, and there is no unoccupied group, then find a fourth group with the largest remaining space, sort the fourth image acquisition device according to the third image acquisition corresponding to the images contained in the fourth group and the correlation degrees of the fourth image acquisition device in the first sorting result, to obtain a second sorting result;

[0016] sequentially for each fourth image acquisition device in the second sorting result, if the number of images to be grouped of any fourth image acquisition device is not greater than the remaining space of the fourth group, then the images to be grouped of the fourth image acquisition device are divided into the fourth group.

[0017] Further, the method further comprises:

[0018] if the number of images to be grouped of each fourth image acquisition device is greater than the remaining space of the fourth group, then the images to be grouped collected by the image acquisition device are divided into the fourth group.

[0019] Further, the method for determining the correlation degree between any two image acquisition devices comprises:

[0020] According to the pre-stored position information of each image acquisition device, the distance between each two image acquisition devices is determined, and if the distance is less than a preset distance threshold, it is determined that there is a correlation between the two image acquisition devices.

[0021] According to the distance, the correlation degree between any two image acquisition devices that exist is determined.

[0022] Further, the method for determining the correlation degree between any two image acquisition devices comprises:

[0023] Obtain the saved target image that has been clustered in a preset time range, wherein the target image is marked with first identification information of the image acquisition device that collects the target image, and second identification information of the clustering result corresponding to the target image;

[0024] Input each target image into a pre-trained model to obtain information about whether there is a correlation between any two image acquisition devices output by the model, and the correlation degree between any two image acquisition devices that exist.

[0025] Further, the method for determining the correlation degree between any two image acquisition devices comprises:

[0026] For any image acquisition device, obtain the saved fifth image acquisition device that exists in correlation with the image acquisition device based on the model, and the correlation degree between the fifth image acquisition device and the image acquisition device, and sort the fifth image acquisition device in order from high to low according to the correlation degree, to obtain a third sorting result;

[0027] For any image acquisition device, find a candidate third sorting result containing the image acquisition device; obtain the saved sixth image acquisition device that exists in correlation with the image acquisition device based on the distance, and the correlation degree between the sixth image acquisition device and the image acquisition device, and sort the sixth image acquisition device in order from high to low according to the correlation degree, to obtain a fourth sorting result; according to the third sorting result corresponding to the image acquisition device, the fourth sorting result and the candidate third sorting result, determine the fifth sorting result corresponding to the image acquisition device;

[0028] According to each fifth sorting result, the correlation degree between each two image acquisition devices is determined.

[0029] Further, the method for determining the correlation degree between any two image acquisition devices comprises:

[0030] For any two image acquisition devices, a target fifth sorting result corresponding to each of the two image acquisition devices is obtained, a candidate correlation degree of the two image acquisition devices in each target fifth sorting result is determined, and a correlation degree of the two image acquisition devices is determined according to each candidate correlation degree.

[0031] Embodiments of the present application also provide an image grouping device, and the device comprises:

[0032] An acquisition module is configured to acquire images collected by each image acquisition device within a set time length;

[0033] A grouping module is configured to, for a first image acquisition device with a number of collected images not less than a preset number threshold, determine a first group number of images collected by the first image acquisition device and satisfying the number threshold, and divide the images collected by the first image acquisition device into the first group number of groups, wherein the number of images in each group is the number threshold; for a second image acquisition device with a number of collected images less than the number threshold and a target first image acquisition device with remaining images not grouped, group the images to be grouped according to the saved correlation degree between any two image acquisition devices.

[0034] Further, the grouping module is specifically configured to count a total number of images to be grouped, determine a second group number corresponding to the images to be grouped according to the total number and the number threshold, sort each image acquisition device in a descending order of the number of images to be grouped of each second image acquisition device to obtain a first sorting result, and for each image acquisition device in the first sorting result, if the image acquisition device is associated with an image acquisition device corresponding to an already grouped image, the remaining space of a first group in which the already grouped image is located is less than the number of images to be grouped of the image acquisition device, and there is an unoccupied group, divide the images to be grouped of the image acquisition device into the unoccupied group; if the image acquisition device is associated with an image acquisition device corresponding to an already grouped image, the remaining space of a second group in which the already grouped image is located is not less than the number of images to be grouped of the image acquisition device, divide the images to be grouped of the image acquisition device into the second group.

[0035] Further, the grouping module is further configured to, if the image acquisition device is associated with an image acquisition device corresponding to an image that has been grouped, the remaining space of a third group in which the image that has been grouped is located is less than the number of images to be grouped of the image acquisition device, and there is no unoccupied group, find a fourth group with the largest remaining space, sort the fourth image acquisition device according to the association degree of the third image acquisition device corresponding to the image contained in the fourth group and the fourth image acquisition device that is not grouped in the first sorting result, to obtain a second sorting result; and sequentially for each fourth image acquisition device in the second sorting result, if the number of images to be grouped of any fourth image acquisition device is not greater than the remaining space of the fourth group, divide the images to be grouped of the fourth image acquisition device into the fourth group.

[0036] Further, the grouping module is further configured to, if the number of images to be grouped of each fourth image acquisition device is greater than the remaining space of the fourth group, divide the images to be grouped collected by the image acquisition device into the fourth group.

[0037] Further, the apparatus further comprises:

[0038] The determining module is configured to determine the distance between each two image acquisition devices according to the pre-stored position information of each image acquisition device, and determine that there is an association between the two image acquisition devices if the distance is less than a preset distance threshold; and determine the association degree between any two image acquisition devices that are associated according to the distance.

[0039] Further, the determining module is further configured to obtain each target image that has been clustered in a preset time range, wherein the target image is marked with first identification information of an image acquisition device that collects the target image, and second identification information of a clustering result corresponding to the target image; and input each target image into a pre-trained model to obtain information about whether there is an association between any two image acquisition devices and the association degree between any two image acquisition devices that are associated.

[0040] Further, the determining module is further configured to, for any image acquisition device, acquire each fifth image acquisition device associated with the image acquisition device and an association degree between the each fifth image acquisition device and the image acquisition device determined based on a model, and sort the each fifth image acquisition device in descending order of the association degree to obtain a third sorting result; for any image acquisition device, search for a candidate third sorting result containing the image acquisition device; acquire each sixth image acquisition device associated with the image acquisition device and an association degree between the each sixth image acquisition device and the image acquisition device determined based on a distance, and sort the each sixth image acquisition device in descending order of the association degree to obtain a fourth sorting result; determine a fifth sorting result corresponding to the image acquisition device according to the third sorting result corresponding to the image acquisition device, the fourth sorting result and the candidate third sorting result; and determine the association degree between each two image acquisition devices according to each fifth sorting result.

[0041] Further, the determining module is further configured to, for any image acquisition device, acquire each fifth image acquisition device associated with the image acquisition device and an association degree between the each fifth image acquisition device and the image acquisition device determined based on a model, and sort the each fifth image acquisition device in descending order of the association degree to obtain a third sorting result; for any image acquisition device, search for a candidate third sorting result containing the image acquisition device; acquire each sixth image acquisition device associated with the image acquisition device and an association degree between the each sixth image acquisition device and the image acquisition device determined based on a distance, and sort the each sixth image acquisition device in descending order of the association degree to obtain a fourth sorting result; determine a fifth sorting result corresponding to the image acquisition device according to the third sorting result corresponding to the image acquisition device, the fourth sorting result and the candidate third sorting result; and determine the association degree between each two image acquisition devices according to each fifth sorting result.

[0042] The embodiment of the present application further provides an electronic device, the electronic device comprising a processor, the processor being used to implement the steps of the image grouping method according to any one of the above.

[0043] The embodiment of the present application further provides a computer readable storage medium, the computer readable storage medium storing a computer program, the computer program being executed by a processor to implement the steps of the image grouping method according to any one of the above.

[0044] In the embodiment of the present application, the images collected by each image acquisition device within a set time length are acquired, for a first image acquisition device with a number of collected images not less than a preset number threshold, a first group number of images collected by the first image acquisition device and satisfying the number threshold is determined, the images collected by the first image acquisition device are divided into the first group number of groups, and the number of images in each group is the number threshold, for a second image acquisition device with a number of collected images less than the number threshold and a target first image acquisition device with remaining images not grouped, the images to be grouped are grouped according to the association degrees between any two image acquisition devices stored. In the embodiment of the present application, the association degrees between image acquisition devices are considered when grouping, so that the similarity between images in each group is high, and the influence of grouping on the accuracy of clustering results is reduced. Attached Figure Description

[0045] To more clearly illustrate the technical solutions of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0046] Figure 1 This is a schematic diagram of an image grouping process provided in an embodiment of this application;

[0047] Figure 2 This is a schematic diagram of grouping provided for an embodiment of this application;

[0048] Figure 3 A schematic diagram illustrating the relationships provided in the embodiments of this application;

[0049] Figure 4 A flowchart illustrating the process of determining the correlation between two image acquisition devices based on the distance between them, as provided in this application embodiment;

[0050] Figure 5 A schematic diagram illustrating the process of determining the correlation between two image acquisition devices based on a model, as provided in this application embodiment;

[0051] Figure 6 A schematic diagram illustrating the merging of correlation degrees determined based on the model and correlation degrees determined based on distance, provided for an embodiment of this application;

[0052] Figure 7 This is a schematic diagram of the structure of an image grouping device provided in an embodiment of this application;

[0053] Figure 8 This is a schematic diagram of an electronic device structure provided in an embodiment of this application. Detailed Implementation

[0054] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0055] To improve the similarity of images contained in each group and reduce the impact of grouping on the accuracy of clustering results, embodiments of this application provide an image grouping method, apparatus, device, and medium.

[0056] Example 1:

[0057] Figure 1 A schematic diagram of an image grouping process provided by an embodiment of the present application is shown in the figure, which includes the following steps:

[0058] S101: Obtain images collected by each image collection device within a set time length.

[0059] The image grouping method provided by an embodiment of the present application is applied to an electronic device, which can be a PC, a server, etc.

[0060] In the embodiment of the present application, when images collected by image collection devices need to be clustered, the images to be clustered need to be determined first, and in order to improve the clustering efficiency, the images need to be grouped, wherein the images to be grouped are images collected by each image collection device within a set time length.

[0061] S102: For a first image collection device whose number of collected images is not less than a preset number threshold, determine a first group number of images collected by the first image collection device that satisfy the number threshold, and divide the images collected by the first image collection device into the first group number of groups, wherein the number of images contained in each group is the number threshold.

[0062] In the embodiment of the present application, the number threshold of images contained in each group is predetermined before the images are grouped, and when the images are grouped, the images collected by the image collection device whose number of collected images is not less than the number threshold can be grouped first, so that the images contained in a group are all collected by one image collection device, and the similarity between the images in the group is high, and the clustering result is more accurate when clustering is performed subsequently.

[0063] Specifically, the electronic device identifies a first image collection device whose number of collected images is not less than a preset number threshold among all image collection devices. For each first image collection device, according to the number of images collected by the first image collection device and the preset number threshold, a first group number corresponding to the first image collection device is determined, wherein the images contained in each group are all collected by the first image collection device. For each first image collection device, from the images collected by the first image collection device, a number threshold of images are randomly selected, and the number threshold of images are divided into a group, until there is no remaining ungrouped image of the first image collection device, or the number of remaining ungrouped images of the first image collection device is less than the number threshold.

[0064] S103: For the second image acquisition device with the number of collected images less than the number threshold and the target first image acquisition device with remaining ungrouped images, grouping the images to be grouped according to the saved association degree between any two image acquisition devices.

[0065] For each second image acquisition device with the number of collected images less than the number threshold, in the embodiment of the present application, the images to be grouped of the second image device are the images collected by the second image acquisition device. For each target first image acquisition device with remaining ungrouped images, in the embodiment of the present application, the images to be grouped of the target first image acquisition device are the images collected by the target first image acquisition device and remaining ungrouped.

[0066] In the embodiment of the present application, for each two image acquisition devices, the association degree of the two image acquisition devices is saved in the electronic device. If there is an association relationship between the two image acquisition devices, the association degree of the two image acquisition devices is not 0. If there is no association relationship between the two image acquisition devices, the association degree of the two image acquisition devices is 0.

[0067] In the embodiment of the present application, the higher the association degree of the two image acquisition devices, the closer the distance between the two image acquisition devices, and the higher the similarity of the images collected by the two image acquisition devices. After dividing the images collected by each first image acquisition device and meeting the number threshold into a group, for the target first image acquisition device with the number of remaining ungrouped images less than the number threshold, and the second image acquisition device with the number of collected images less than the number threshold, the electronic device groups the ungrouped images according to the pre-saved association degree between any two image acquisition devices.

[0068] Specifically, according to the saved association degree between any two image acquisition devices, the association degree of each two image acquisition devices in the second image acquisition device and the target first image acquisition device is determined, and the images to be grouped of the two image acquisition devices with high association degree are divided into a group.

[0069] In the embodiment of the present application, the association degree between the image acquisition devices is considered when grouping, so that the similarity between the images in each group is high, and the influence of grouping on the accuracy of clustering results is reduced.

[0070] Embodiment 2:

[0071] In order to make the similarity of the images contained in the same group higher, on the basis of the above-mentioned embodiment, in the embodiment of the present application, the grouping of images according to the saved association degree between any two image acquisition devices comprises:

[0072] count a total number of the images to be grouped, and determine a second group number corresponding to the images to be grouped according to the total number and a number threshold;

[0073] sort each image capture device in an order from large to small according to the number of images to be grouped, to obtain a first sorting result;

[0074] according to the first sorting result, for each image capture device in the first sorting result, if the image capture device is associated with an image capture device corresponding to an image that has been grouped, a remaining space of a first group in which the image that has been grouped is located is less than the number of images to be grouped of the image capture device, and there is an unoccupied group, then the images to be grouped of the image capture device are divided into the unoccupied group; if the image capture device is associated with an image capture device corresponding to an image that has been grouped, a remaining space of a second group in which the image that has been grouped is located is not less than the number of images to be grouped of the image capture device, then the images to be grouped of the image capture device are divided into the second group.

[0075] In the embodiments of the present application, when grouping the images to be grouped based on the saved association degree between any two image capture devices, first, the second group number corresponding to the images to be grouped needs to be determined, that is, how many groups the images to be grouped are divided into. Specifically, a total number of the images to be grouped is counted, a ratio of the total number to a pre-set number threshold is determined, if the ratio is an integer, the ratio is determined as the second group number corresponding to the images to be grouped, if the ratio is a decimal, the smallest integer greater than the ratio is determined as the second group number corresponding to the images to be grouped.

[0076] In the embodiments of the present application, the similarity of the images captured by the same image capture device is the highest, and based on this, when grouping the images to be grouped, the images to be grouped captured by the same image capture device can be divided into one group. And in order to further improve the similarity of the images contained in each group, in the embodiments of the present application, the electronic device preferentially groups the images to be grouped of the image capture device with a large number of images to be grouped.

[0077] Specifically, in the embodiments of the present application, for the target first image acquisition device and the second image acquisition device, the electronic device sorts each image acquisition device according to the order of the number of images to be grouped of each image acquisition device from large to small, to determine a first sorting result. According to the first sorting result, for each image acquisition device in the first sorting result, if the image acquisition device is associated with an image acquisition device corresponding to an image that has been grouped, but the remaining space of the first group in which the image that has been grouped is located is less than the number of images to be grouped of the image acquisition device, and there is an unoccupied group, then the images to be grouped of the image acquisition device are divided into the unoccupied group. If the image acquisition device is associated with an image acquisition device corresponding to an image that has been grouped, and the remaining space of the second group in which the image that has been grouped is located is not less than the number of images to be grouped of the image acquisition device, then the images to be grouped of the image acquisition device are divided into the second group.

[0078] For example, in the embodiments of the present application, the number of images to be grouped of the image acquisition device A in the current first sorting result is 10, the image acquisition device is associated with a certain image acquisition device corresponding to an image that has been grouped, but the remaining space of the first group in which the image that has been grouped is located can accommodate 5 images, the remaining space is less than the number of images to be grouped, and there is an unoccupied group, then the images to be grouped are divided into the unoccupied group. If the remaining space of the first group can accommodate 20 images, the remaining space is not less than the number of images to be grouped, then the images to be grouped of the image acquisition device A are divided into the first group.

[0079] Embodiment 3

[0080] In order to make the similarity of the images contained in the same group higher, on the basis of the above embodiments, in the embodiments of the present application, the method further comprises:

[0081] If the image acquisition device is associated with an image acquisition device corresponding to an image that has been grouped, the remaining space of the third group in which the image that has been grouped is located is less than the number of images to be grouped of the image acquisition device, and there is no unoccupied group, then the fourth group with the largest remaining space is found, the fourth image acquisition device is sorted according to the third image acquisition device corresponding to the image contained in the fourth group and the association degree of the fourth image acquisition device in the first sorting result, to obtain a second sorting result.

[0082] If the number of images to be grouped of any fourth image capture device is not greater than the remaining space of the fourth group, the images to be grouped of the fourth image capture device are divided into the fourth group.

[0083] In the grouping of the images to be grouped of each image capture device in the first sorting result according to the first sorting result, there can be a case that the image capture device has an association with the image capture device corresponding to the grouped image, but the remaining space of the third group in which the grouped image is located is less than the number of images to be grouped of the image capture device, and there is no currently unoccupied group. Based on this, in the embodiment of the present application, the electronic device will give priority to the degree of association between the image capture device corresponding to the image to be grouped and the image capture device corresponding to the grouped image when grouping the remaining images to be grouped, and grouping according to the degree of association.

[0084] Specifically, in the embodiment of the present application, in the currently occupied groups, the fourth group with the largest remaining space is found, the third image capture device corresponding to the images currently contained in the fourth group is determined, and the fourth image capture device not grouped in the first sorting result is determined. The association degree between each fourth image capture device and the third image capture device is obtained, and each fourth image capture device is sorted according to the order of the association degree value from large to small to obtain the second sorting result.

[0085] After obtaining the second sorting result, in order to make the similarity of the images contained in the fourth group high, and to avoid the problem of serious imbalance of the number of images contained in each group after grouping, leading to data skew, in the embodiment of the present application, for each fourth image capture device in the second sorting result, if the number of images to be grouped of any fourth image capture device is not greater than the remaining space of the fourth group, the images to be grouped of the fourth image capture device are divided into the fourth group. In the embodiment of the present application, it can be that the images to be grouped of one image capture device are divided into the fourth group, it can be that the images to be grouped of multiple image capture devices are divided into the fourth group, and it can be that no image is divided into the fourth group. If the images to be grouped of multiple image capture devices are divided into the fourth group, the image capture device corresponding to the image newly divided into the fourth group is determined as the third image capture device, and the fourth image capture device is sorted according to the association degree between the fourth image capture device having images to be grouped in the first sorting result and the third image capture device, to obtain the second sorting result.

[0086] For example, in the embodiments of the present application, if the remaining space of the fourth group can accommodate 20 images, the second sorting result is image acquisition device A, image acquisition device B and image acquisition device C, wherein the number of images to be grouped of image acquisition device A is 25, the number of images to be grouped of image acquisition device B is 15, and the number of images to be grouped of image acquisition device C is 10, then the images to be grouped of image acquisition device B are divided into the fourth group. Or, if the remaining space of the fourth group can accommodate 20 images, the second sorting result is image acquisition device A, image acquisition device B and image acquisition device C, wherein the number of images to be grouped of image acquisition device A is 25, the number of images to be grouped of image acquisition device B is 15, and the number of images to be grouped of image acquisition device C is 5, then the images to be grouped of image acquisition device B are divided into the fourth group. Or, if the remaining space of the fourth group is 20 images, the second sorting result is image acquisition device A, image acquisition device B and image acquisition device C, wherein the number of images to be grouped of image acquisition device A is 25, the number of images to be grouped of image acquisition device B is 21, and the number of images to be grouped of image acquisition device C is 50, then the images to be grouped of image acquisition device B are not temporarily added into the fourth group.

[0087] In order to avoid the situation of data tilt after grouping, on the basis of the above embodiments, in the embodiments of the present application, the method further comprises:

[0088] If the number of images to be grouped of each fourth image acquisition device is greater than the remaining space of the fourth group, the images to be grouped collected by the image acquisition device are divided into the fourth group.

[0089] In the embodiments of the present application, if the number of images to be grouped of each fourth image acquisition device is greater than the remaining space of the fourth group, in order to avoid data tilt, the images to be grouped of the fourth image acquisition device with the largest number of images to be grouped are divided into the fourth group.

[0090] Specifically, in the embodiments of the present application, if the number of images to be grouped of each fourth image acquisition device is greater than the remaining space of the fourth group, at this time, the images to be grouped of the same image acquisition device are divided into a group according to the number of images to be grouped of each fourth image acquisition device. In order to avoid data skew, that is, to avoid the difference between the number of images contained in any two groups being too large, because the fourth group has the largest remaining space, based on this, in the embodiments of the present application, the electronic device divides the images to be grouped of the fourth image acquisition device with the largest number of images to be grouped into the fourth group. Wherein, after dividing the images to be grouped of the fourth image acquisition device with the largest number of images to be grouped into the fourth group, in the embodiments of the present application, the number of images contained in the fourth group may exceed the preset number threshold.

[0091] Figure 2 The grouping schematic diagram provided for the embodiments of the present application is as shown in the figure Figure 2 It is shown that the current contains image acquisition devices A1, A2 and A3, wherein the number of images to be grouped of image acquisition device A1 is K1, the number of images to be grouped of image acquisition device A2 is K2, the number of images to be grouped of image acquisition device A3 is K3, and the preset number threshold is K, wherein K1>K>K2>K3, and only image acquisition devices A1 and A3 have an association relationship. When grouping images, the images in image acquisition device A1 that meet the number threshold are preferentially divided into B1 group, and the remaining space of B1 is 0.

[0092] At this time, the number of remaining images to be grouped of the image acquisition device A1 is K1-K>K2. It is determined that the second group number is two, that is, B2 and B3, and the image acquisition devices A1, A2 and A3 are sorted according to the number of images to be grouped, and the final first sorting result is A1>A2>A3. For image acquisition device A1, since there is no group with remaining space at present, the K1-K images to be grouped of image acquisition device A1 are divided into the unoccupied group B2; for image acquisition device A2, since A1 and A2 do not have an association, and there is still an unoccupied group at present, the K2 images to be grouped of the image acquisition device A2 are divided into the unoccupied group B3; for image acquisition device A3, since the image acquisition device A3 has an association with image acquisition device A1, and the remaining space of B2 is not less than the K3 images to be grouped of the image acquisition device A3, the K3 images to be grouped of the image acquisition device A3 are divided into group B2.

[0093] In the embodiments of the present application, by using the above method to group the images to be grouped, the difference between the number of images contained in every two groups is small, which greatly avoids data skew and improves the user's use experience.

[0094] Embodiment 4:

[0095] In order to determine the correlation degree between any two image acquisition devices, on the basis of the above embodiments, in the embodiment of the present application, the method for determining the correlation degree between any two image acquisition devices comprises:

[0096] According to the pre-stored position information of each image acquisition device, the distance between each two image acquisition devices is determined, and if the distance is less than a preset distance threshold, it is determined that there is a correlation between the two image acquisition devices;

[0097] According to the distance, the correlation degree between any two image acquisition devices with correlation is determined.

[0098] In the embodiment of the present application, when determining the correlation degree between any two image acquisition devices, the distance between the two image acquisition devices can be determined, wherein the closer the distance between the two image acquisition devices, the more likely it is to capture the image of the same person, so the closer the distance between the two image acquisition devices, the higher the correlation degree.

[0099] Specifically, in the embodiment of the present application, according to the pre-stored position information of each image acquisition device, such as longitude and latitude information, the distance between each two image acquisition devices is determined. After obtaining each distance, if the distance is less than a preset distance threshold, it is determined that there is a correlation between the two image acquisition devices, and then the distance is normalized to obtain the correlation degree between the two image acquisition devices, wherein the smaller the distance, the greater the correlation degree obtained by normalization. If there is no correlation between the two image acquisition devices, the correlation degree of the two image acquisition devices is set to 0.

[0100] In the embodiment of the present application, when calculating the distance between two image acquisition devices, the following formula can be used for calculation:

[0101]

[0102] Wherein, lng1 and lat1 represent the longitude and latitude of one image acquisition device; lng2 and lat2 represent the longitude and latitude of another image acquisition device; 6378.137 is the radius of the earth, with a unit of kilometers; dis represents the distance between the two image acquisition devices, with a calculation result unit of kilometers, and if the unit of the radius of the earth is changed to meters, the calculation unit of the distance is also meters.

[0103] Further, in the embodiments of the present application, the method for determining the correlation degree between the two image acquisition devices based on the distance between the two image acquisition devices is also referred to as the generation of the correlation relationship of the cold start area. Specifically, when the number of times of clustering after grouping is the first time or within the preset number of times, at this time, the historical clustering result has no reference significance, and the correlation degree cannot be determined using the model, then the above method can be used, and the correlation degree of the two image acquisition devices is determined based on the distance between the two image acquisition devices.

[0104] In the embodiments of the present application, after the distance between each two image acquisition devices is determined, a corresponding correlation relationship graph can be generated, in which the two image acquisition devices with a distance less than a preset distance threshold are directly or indirectly connected by a line segment.

[0105] Figure 3 The schematic diagram of the correlation relationship provided for the embodiments of the present application is shown in the figure Figure 3 As shown in the figure, the two image acquisition devices with a distance less than a preset distance threshold are directly or indirectly connected by a line segment, and the correlation relationship in the figure can be represented as (a1->a2, a3), (b2->b1), (c3->c2, c1, c4), wherein (a1->a2, a3) represents that the image acquisition device a1 and the image acquisition devices a2 and a3 have a correlation relationship, (b2->b1) represents that the image acquisition device b2 and the image acquisition device b1 have a correlation relationship, and (c3->c2, c1, c4) represents that the image acquisition device c3 and the image acquisition devices c2, c1 and c4 have a correlation relationship.

[0106] Figure 4 The flowchart of the method for determining the correlation degree between the two image acquisition devices based on the distance between the two image acquisition devices provided for the embodiments of the present application is shown in the figure Figure 4 As shown in the figure, the process includes:

[0107] S401: Obtain the position information of any two image acquisition devices.

[0108] S402: Determine the distance between the two image acquisition devices, and if the distance is less than a preset distance threshold, it is determined that there is a correlation between the two image acquisition devices.

[0109] S403: Determine the correlation degree between the two image acquisition devices according to the distance.

[0110] Embodiment 5:

[0111] In order to determine the correlation degree between any two image acquisition devices, on the basis of the above embodiments, in the embodiments of the present application, the method for determining the correlation degree between the two image acquisition devices includes:

[0112] obtain each target image that has been clustered within a preset time range, wherein the target image is marked with first identification information of an image acquisition device that collects the target image, and second identification information of a clustering result corresponding to the target image;

[0113] input each target image into a pre-trained model, and obtain information about whether there is an association between any two image acquisition devices and an association degree between any two image acquisition devices that have an association.

[0114] In the embodiment of the present application, when determining the association degree between the two image acquisition devices, the model can also be used for determination.

[0115] Specifically, the electronic device obtains each target image that has been clustered within a preset time range, wherein the target image is marked with first identification information of an image acquisition device that collects the target image, and second identification information of a clustering result corresponding to the target image, inputs each target image into a pre-trained model, and obtains information about whether there is an association between any two image acquisition devices and an association degree between any two image acquisition devices that have an association.

[0116] In addition, in the embodiment of the present application, the method of determining the association degree between two image acquisition devices based on the model is also called hot start. The generation of regional association relationship. Specifically, when the number of times of clustering after grouping is after the preset number of times, the historical clustering result has reference significance, and the model can be used to determine the association degree.

[0117] Figure 5 The flowchart of determining the association degree between two image acquisition devices based on the model provided in the embodiment of the present application is shown in the figure. Figure 5 As shown in the figure, the process includes:

[0118] S501: Obtain each target image that has been clustered within a preset time range, wherein the target image is marked with first identification information of an image acquisition device that collects the target image, and second identification information of a clustering result corresponding to the target image.

[0119] S502: Input each target image into a pre-trained model, and obtain information about whether there is an association between any two image acquisition devices and an association degree between any two image acquisition devices that have an association.

[0120] Embodiment 6:

[0121] To further improve the authenticity of the correlation degree between each two image acquisition devices, on the basis of the above embodiments, in the embodiments of the present application, the method for determining the correlation degree between any two image acquisition devices comprises:

[0122] For each image acquisition device, the saved model-based determination of each fifth image acquisition device that has a correlation with the image acquisition device and the correlation degree between the image acquisition device and the fifth image acquisition device are obtained, and the fifth image acquisition devices are sorted in descending order of correlation degree to obtain a third sorting result.

[0123] For each image acquisition device, in the third sorting result, the target third sorting result corresponding to the image acquisition device and the candidate third sorting result containing the image acquisition device are found. The saved distance-based determination of each sixth image acquisition device that has a correlation with the image acquisition device and the correlation degree between the image acquisition device and the sixth image acquisition device are obtained, and the sixth image acquisition devices are sorted in descending order of correlation degree to obtain a fourth sorting result. The fifth sorting result corresponding to the image acquisition device is determined according to the target third sorting result, the fourth sorting result and the candidate third sorting result.

[0124] According to each fifth sorting result, the correlation degree between each two image acquisition devices is determined.

[0125] In the embodiments of the present application, after the correlation degree between each two image acquisition devices is determined based on the model, the correlation degree determined based on the distance is also combined.

[0126] Specifically, for any image acquisition device, each fifth image acquisition device that has a correlation with the image acquisition device output by the model is obtained, and the fifth image acquisition devices are sorted in descending order of correlation degree to obtain a third sorting result.

[0127] For any image acquisition device, each sixth image acquisition device that has a correlation with the image acquisition device determined based on the distance is obtained, and the sixth image acquisition devices are sorted in descending order of correlation degree to obtain a fourth sorting result. In each third sorting result, the target third sorting result corresponding to the image acquisition device is found, and the candidate third sorting result containing the image acquisition device is found in other third sorting results except the target third sorting result.

[0128] According to the target third ranking result, the fourth ranking result and the candidate third ranking result, a fifth ranking result corresponding to the image acquisition device is determined, specifically including: deleting the image acquisition device commonly existing in the fourth ranking result and the target third ranking result, and then arranging the fourth ranking result at the end of the target third ranking result to obtain the fifth ranking result. If the image acquisition device corresponding to the candidate third ranking result does not appear in the fifth ranking result, the image acquisition device is arranged at the end of the fifth ranking result.

[0129] If the correlation degree between the seventh image acquisition device and the image acquisition device corresponding to the fifth ranking result is greater than the correlation degree between other image acquisition devices arranged before the seventh image acquisition device and the image acquisition device in the fifth ranking result, the sum of the correlation degrees between the two image acquisition devices adjacent to the seventh image acquisition device in the fifth ranking result and the image acquisition device is calculated as the correlation degree between the image acquisition device and the first target image acquisition device.

[0130] In order to further improve the authenticity of the correlation degree between each two image acquisition devices, on the basis of the above embodiments, in the embodiments of the present application, the correlation degree between each two image acquisition devices is determined according to each fifth ranking result, including:

[0131] For any two image acquisition devices, the target fifth ranking result corresponding to each of the two image acquisition devices is obtained, the candidate correlation degree of the two image acquisition devices in each target fifth ranking result is determined, and the correlation degree between the two image acquisition devices is determined according to each candidate correlation degree.

[0132] In the embodiments of the present application, for any two image acquisition devices, when the correlation degree between the two image acquisition devices is determined, the target fifth ranking result corresponding to each of the two image acquisition devices is obtained, and the correlation degree of the two image acquisition devices in each target fifth ranking result is obtained, and each correlation degree is taken as a candidate correlation degree. If the numerical value of each candidate correlation degree is the same, the numerical value is determined as the correlation degree between the two image acquisition devices; if the numerical value of each candidate correlation degree is different, the average value of the numerical value of each candidate correlation degree is calculated, and the average value is determined as the correlation degree between the two image acquisition devices. In addition, in the embodiments of the present application, if the numerical value of each candidate correlation degree is different, the correlation degree between the two image acquisition devices is also determined according to other methods, such as the mode in the numerical value of each candidate correlation degree, and the mode is determined as the correlation degree between the two image acquisition devices, etc., which is not limited herein.

[0133] Figure 6The schematic diagram provided by the embodiment of the present application for combining the correlation degree determined based on the model and the correlation degree determined based on the distance is shown in the figure, which is used to determine the correlation degree of the image acquisition device a1 and other image acquisition devices, wherein A1 is a target third ranking result of the image acquisition device a1 corresponding to the model determined based on the model, the target third ranking result is (a1->a2, a3), A2 is a fourth ranking result determined based on the distance, the fourth ranking result is (a1->a2, a4), and A3 is a candidate third ranking result determined based on the model, the candidate third ranking result is (a6->a1). Based on the target third ranking result, the fourth ranking result and the candidate third ranking result, the final fifth ranking result is (a1->a2, a3, a4, a6).

[0134] Embodiment 7:

[0135] Figure 7 The structure schematic diagram of the image grouping device provided by the embodiment of the present application is shown in the figure, which comprises: Figure 7

[0136] The acquisition module 701 is configured to acquire images collected by each image acquisition device within a set time length.

[0137] The grouping module 702 is configured to, for a first image acquisition device with a number of collected images not less than a preset number threshold, determine a first group number of images collected by the first image acquisition device and satisfying the number threshold, and divide the images collected by the first image acquisition device into the first group number of groups, wherein the number of images contained in each group is the number threshold; for a second image acquisition device with a number of collected images less than the number threshold and a target first image acquisition device with remaining images not grouped, group the images to be grouped according to the saved correlation degree between any two image acquisition devices.

[0138] ​In a possible implementation, the grouping module 702 is specifically configured to: determine a second group number corresponding to the images to be grouped according to the total number of the images to be grouped and the number threshold; sort each image acquisition device according to the number of the images to be grouped of each second image acquisition device in descending order, to obtain a first sorting result; and according to the first sorting result, sequentially for each image acquisition device in the first sorting result, if the image acquisition device is associated with an image acquisition device corresponding to a grouped image, a remaining space of a first group in which the grouped image is located is less than the number of the images to be grouped of the image acquisition device, and there is an unoccupied group, the images to be grouped of the image acquisition device are divided into the unoccupied group; and if the image acquisition device is associated with an image acquisition device corresponding to a grouped image, a remaining space of a second group in which the grouped image is located is not less than the number of the images to be grouped of the image acquisition device, the images to be grouped of the image acquisition device are divided into the second group.

[0139] In a possible implementation, the grouping module 702 is further configured to: if the image acquisition device is associated with an image acquisition device corresponding to a grouped image, a remaining space of a third group in which the grouped image is located is less than the number of the images to be grouped of the image acquisition device, and there is no unoccupied group, find a fourth group with the largest remaining space, sort fourth image acquisition devices according to the second sorting result according to a third image acquisition device corresponding to an image included in the fourth group and the degree of association of the fourth image acquisition device in the first sorting result, to obtain a second sorting result; and according to the second sorting result, sequentially for each fourth image acquisition device, if the number of the images to be grouped of any fourth image acquisition device is not greater than the remaining space of the fourth group, the images to be grouped of the fourth image acquisition device are divided into the fourth group.

[0140] In a possible implementation, the grouping module 702 is further configured to: if the number of the images to be grouped of each fourth image acquisition device is greater than the remaining space of the fourth group, divide the images to be grouped collected by the image acquisition device into the fourth group.

[0141] In a possible implementation, the apparatus further includes:

[0142] The determining module 703 is configured to determine a distance between each two image acquisition devices according to the position information of each image acquisition device preserved in advance, and determine that there is an association between the two image acquisition devices if the distance is less than a preset distance threshold. The determining module 703 is further configured to determine an association degree between any two image acquisition devices with the association.

[0143] In a possible implementation, the determining module 703 is further configured to obtain each target image that has been clustered in a preset time range and that is preserved, wherein the target image is marked with first identification information of an image acquisition device that acquires the target image, and second identification information of a clustering result corresponding to the target image; and input each target image into a pre-trained model to obtain information about whether there is an association between any two image acquisition devices and an association degree between any two image acquisition devices with the association.

[0144] In a possible implementation, the determining module 703 is further configured to, for any image acquisition device, obtain each fifth image acquisition device that has an association with the image acquisition device and that is determined based on a model and preserved, and an association degree between the fifth image acquisition device and the image acquisition device, and sort each fifth image acquisition device in descending order of the association degree to obtain a third sorting result; for any image acquisition device, find a candidate third sorting result that contains the image acquisition device; obtain each sixth image acquisition device that has an association with the image acquisition device and that is determined based on a distance and preserved, and an association degree between the sixth image acquisition device and the image acquisition device, and sort each sixth image acquisition device in descending order of the association degree to obtain a fourth sorting result; determine a fifth sorting result corresponding to the image acquisition device according to the third sorting result corresponding to the image acquisition device, the fourth sorting result, and the candidate third sorting result; and determine an association degree between each two image acquisition devices according to each fifth sorting result.

[0145] In a possible implementation, the determining module 703 is specifically configured to, for any two image acquisition devices, obtain target fifth sorting results corresponding to the two image acquisition devices respectively, determine a candidate association degree of the two image acquisition devices in each target fifth sorting result; and determine an association degree of the two image acquisition devices according to each candidate association degree.

[0146] Embodiment 8

[0147] On the basis of the above-described embodiments, the embodiments of the present application further provide an electronic device, Figure 8 A structural schematic diagram of an electronic device provided by the embodiments of the present application is shown in FIG. 8. Figure 8As shown, it comprises: a processor 81, a communication interface 82, a memory 83 and a communication bus 84, wherein the processor 81, the communication interface 82 and the memory 83 complete mutual communication through the communication bus 84;

[0148] The memory 83 stores a computer program, which, when executed by the processor 81, causes the processor 81 to perform the following steps:

[0149] Obtaining images collected by each image collection device within a set time length;

[0150] For a first image collection device with a number of collected images not less than a preset number threshold, determining a first group number of images collected by the first image collection device that meet the number threshold, and dividing the images collected by the first image collection device into the first group number of groups, wherein each group contains a number of images equal to the number threshold;

[0151] For a second image collection device with a number of collected images less than the number threshold and a target first image collection device with remaining ungrouped images, grouping the images to be grouped according to the saved correlation degree between any two image collection devices.

[0152] In a possible implementation, the grouping of the images according to the saved correlation degree between any two image collection devices comprises:

[0153] Counting the total number of images to be grouped, and determining a second group number corresponding to the images to be grouped according to the total number and the number threshold;

[0154] For the target first image collection device and the second image collection device, sorting each image collection device in descending order of the number of images to be grouped for each second image collection device to obtain a first sorting result;

[0155] According to the first sorting result, for each image collection device in the first sorting result in turn, if the image collection device is associated with an image collection device corresponding to an already grouped image, the remaining space of a first group in which the already grouped image is located is less than the number of images to be grouped for the image collection device, and there is an unoccupied group, then the images to be grouped for the image collection device are divided into the unoccupied group; if the image collection device is associated with an image collection device corresponding to an already grouped image, the remaining space of a second group in which the already grouped image is located is not less than the number of images to be grouped for the image collection device, then the images to be grouped for the image collection device are divided into the second group.

[0156] In a possible implementation, the method further includes:

[0157] If the image acquisition device is associated with the image acquisition device corresponding to the grouped image, the remaining space of the third group in which the grouped image is located is less than the number of images to be grouped of the image acquisition device, and there is no unoccupied group, a fourth group with the largest remaining space is found, and the fourth image acquisition device is sorted according to the association degree of the third image acquisition corresponding to the image contained in the fourth group and the fourth image acquisition device not grouped in the first sorting result, to obtain a second sorting result;

[0158] In sequence for each fourth image acquisition device in the second sorting result, if the images to be grouped of any fourth image acquisition device are not greater than the remaining space of the fourth group, the images to be grouped of the fourth image acquisition device are divided into the fourth group.

[0159] In a possible implementation, the method further includes:

[0160] If the number of images to be grouped of each fourth image acquisition device is greater than the remaining space of the fourth group, the images to be grouped collected by the image acquisition device are divided into the fourth group.

[0161] In a possible implementation, the method for determining the association degree between any two image acquisition devices includes:

[0162] According to the pre-stored position information of each image acquisition device, the distance between each two image acquisition devices is determined, and if the distance is less than a preset distance threshold, it is determined that there is an association between the two image acquisition devices.

[0163] According to the distance, the association degree between any two image acquisition devices with the association is determined.

[0164] In a possible implementation, the method for determining the association degree between any two image acquisition devices includes:

[0165] Obtaining each target image that has been clustered in a preset time range, wherein the target image is marked with first identification information of an image acquisition device that collects the target image, and second identification information of a clustering result corresponding to the target image;

[0166] The each target image is input into a pre-trained model, and information about whether there is an association between any two image acquisition devices and the association degree between any two image acquisition devices with the association are obtained from the model.

[0167] In a possible implementation, the method for determining the relevance between any two image acquisition devices comprises the following steps:

[0168] For any image acquisition device, acquiring each fifth image acquisition device associated with the image acquisition device and the relevance between the image acquisition device and each fifth image acquisition device determined based on the model, and sorting each fifth image acquisition device in descending order of relevance to obtain a third sorting result;

[0169] For any image acquisition device, searching for a candidate third sorting result containing the image acquisition device; acquiring each sixth image acquisition device associated with the image acquisition device and the relevance between the image acquisition device and each sixth image acquisition device determined based on the distance, and sorting each sixth image acquisition device in descending order of relevance to obtain a fourth sorting result; and determining a fifth sorting result corresponding to the image acquisition device according to the third sorting result corresponding to the image acquisition device, the fourth sorting result, and the candidate third sorting result;

[0170] Determining the relevance between each two image acquisition devices according to each fifth sorting result.

[0171] In a possible implementation, the method for determining the relevance between each two image acquisition devices according to each fifth sorting result comprises the following steps:

[0172] For any two image acquisition devices, acquiring target fifth sorting results corresponding to the two image acquisition devices respectively, determining candidate relevance of the two image acquisition devices in each target fifth sorting result, and determining the relevance between the two image acquisition devices according to each candidate relevance.

[0173] Since the principle of solving the problem of the above electronic device is similar to the image grouping method, the implementation of the above electronic device can refer to the embodiments of the method, and the repeated parts will not be described herein.

[0174] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The communication interface 82 is used for communication between the above electronic device and other devices. The memory can include a Random Access Memory (RAM) and can also include a Non-Volatile Memory (NVM), such as at least one disk memory. Optionally, the memory can also be at least one storage device located away from the aforementioned processor.

[0175] The processor mentioned above can be a general-purpose processor, including a central processing unit, a network processor (NP), etc.; can also be a Digital Signal Processing (DSP), an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc.

[0176] Embodiment 9:

[0177] On the basis of the above embodiments, the embodiment of the present application further provides a computer readable storage medium, and the computer readable storage medium stores a computer program executable by a processor. When the program runs on the processor, the processor executes the following steps:

[0178] Obtaining images collected by each image collection device within a set time length;

[0179] For a first image collection device with a number of collected images not less than a preset number threshold, determining a first group number of images collected by the first image collection device that meet the number threshold, dividing the images collected by the first image collection device into the first group number of groups, and the number of images included in each group is the number threshold;

[0180] For a second image collection device with a number of collected images less than the number threshold and a target first image collection device with remaining ungrouped images, grouping the images to be grouped according to the saved correlation degree between any two image collection devices.

[0181] In a possible implementation, the grouping the images according to the saved correlation degrees between any two image acquisition devices comprises:

[0182] counting the total number of the images to be grouped, and determining the second group number corresponding to the images to be grouped according to the total number and the number threshold;

[0183] sorting each image acquisition device in the order from large to small according to the number of images to be grouped of each second image acquisition device, to obtain a first sorting result;

[0184] according to the first sorting result, for each image acquisition device in the first sorting result, if the image acquisition device is correlated to the image acquisition device corresponding to the grouped image, the remaining space of the first group in which the grouped image is located is less than the number of images to be grouped of the image acquisition device, and there is an unoccupied group, then the images to be grouped of the image acquisition device are divided into the unoccupied group; if the image acquisition device is correlated to the image acquisition device corresponding to the grouped image, and the remaining space of the second group in which the grouped image is located is not less than the number of images to be grouped of the image acquisition device, then the images to be grouped of the image acquisition device are divided into the second group.

[0185] In a possible implementation, the method further comprises:

[0186] if the image acquisition device is correlated to the image acquisition device corresponding to the grouped image, the remaining space of the third group in which the grouped image is located is less than the number of images to be grouped of the image acquisition device, and there is no unoccupied group, then a fourth group with the largest remaining space is found, the fourth image acquisition device is sorted according to the third image acquisition corresponding to the image contained in the fourth group and the correlation degrees of the fourth image acquisition device in the first sorting result, to obtain a second sorting result;

[0187] for each fourth image acquisition device in the second sorting result, if the number of images to be grouped of any fourth image acquisition device is not greater than the remaining space of the fourth group, then the images to be grouped of the fourth image acquisition device are divided into the fourth group.

[0188] In a possible implementation, the method further comprises:

[0189] if the number of images to be grouped of each fourth image acquisition device is greater than the remaining space of the fourth group, then the images to be grouped collected by the image acquisition device are divided into the fourth group.

[0190] In a possible implementation, the method for determining the correlation degree between any two image acquisition devices comprises:

[0191] According to the pre-stored position information of each image acquisition device, a distance between any two image acquisition devices is determined, and if the distance is less than a preset distance threshold, it is determined that there is a correlation between the two image acquisition devices.

[0192] According to the distance, a correlation degree between any two image acquisition devices that have a correlation is determined.

[0193] In a possible implementation, the method for determining the correlation degree between any two image acquisition devices comprises:

[0194] Obtaining a saved target image that has been clustered in a preset time range, wherein the target image is marked with first identification information of an image acquisition device that acquires the target image, and second identification information of a clustering result corresponding to the target image;

[0195] Inputting each target image into a pre-trained model to obtain information about whether there is a correlation between any two image acquisition devices output by the model, and a correlation degree between any two image acquisition devices that have a correlation.

[0196] In a possible implementation, the method for determining the correlation degree between any two image acquisition devices comprises:

[0197] For any image acquisition device, obtaining a saved fifth image acquisition device that has a correlation with the image acquisition device and a correlation degree between the fifth image acquisition device and the image acquisition device, which are determined based on a model, and sorting the fifth image acquisition devices in descending order of the correlation degree to obtain a third sorting result;

[0198] For any image acquisition device, searching for a candidate third sorting result that contains the image acquisition device; obtaining a saved sixth image acquisition device that has a correlation with the image acquisition device and a correlation degree between the sixth image acquisition device and the image acquisition device, which are determined based on a distance, and sorting the sixth image acquisition devices in descending order of the correlation degree to obtain a fourth sorting result; and determining a fifth sorting result corresponding to the image acquisition device according to the third sorting result, the fourth sorting result, and the candidate third sorting result corresponding to the image acquisition device.

[0199] According to each fifth sorting result, a correlation degree between any two image acquisition devices is determined.

[0200] In a possible implementation, the determining the association degree between each two image capture devices according to each fifth ranking result comprises:

[0201] For any two image capture devices, a target fifth ranking result corresponding to each of the two image capture devices is obtained, a candidate association degree of the two image capture devices in each target fifth ranking result is determined, and an association degree of the two image capture devices is determined according to each candidate association degree.

[0202] Since the principle of solving the problem by the above computer readable storage medium is similar to the image grouping method, the implementation of the above computer readable storage medium can be referred to the embodiments of the method, and the repeated parts will not be described herein.

[0203] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0204] The present application is described with reference to flowcharts and / or block diagrams of the method, device (system), and computer program product according to the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to produce a machine, so that the instructions executed by the computer or other programmable data processing devices produce a device that implements the functions specified in the flowcharts and / or block diagrams. Figure 1 The functions specified in one or more flows and / or blocks Figure 1 The functions specified in one or more flows and / or blocks

[0205] These computer program instructions can also be stored in a computer readable memory that can guide the computer or other programmable data processing devices to work in a specific way, so that the instructions stored in the computer readable memory produce a product including instruction devices that implement the functions specified in the flowcharts and / or block diagrams. Figure 1 The functions specified in one or more flows and / or blocks Figure 1 The functions specified in one or more flows and / or blocks

[0206] These computer program instructions can also be loaded into a computer or other programmable data processing devices, so that a series of operational steps are performed on the computer or other programmable data processing devices to generate computer-implemented processes, thus the instructions executed on the computer or other programmable data processing devices provide processes for implementing the functions specified in the flowchart Figure 1 flowchart or multiple flows and / or blocks Figure 1 flowchart or multiple flows and / or blocks

[0207] Obviously, those skilled in the art can make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application also intends to include these modifications and variations.

Claims

1. An image grouping method, characterized in that, The method includes: Acquire images captured by each image acquisition device within a set time period; For a first image acquisition device whose number of acquired images is not less than a preset number threshold, a first group of images acquired by the first image acquisition device that meets the number threshold is determined, and the images acquired by the first image acquisition device are divided into groups of the first group of images, with the number of images contained in each group being the number threshold. For a second image acquisition device whose number of acquired images is less than the threshold and a target first image acquisition device with remaining ungrouped images, the images to be grouped are grouped according to the correlation between any two image acquisition devices stored in the database. The step of grouping images based on the correlation between any two image acquisition devices includes: The total number of images to be grouped is counted, and the number of the second group corresponding to the images to be grouped is determined based on the total number and the number threshold. For the target first image acquisition device and the second image acquisition device, each image acquisition device is sorted in descending order of the number of images to be grouped in each second image acquisition device to obtain a first sorting result; According to the first sorting result, for each image acquisition device in the first sorting result, if the image acquisition device is associated with the image acquisition device corresponding to the already grouped image, the remaining space of the first group where the already grouped image is located is less than the number of images to be grouped by the image acquisition device, and there are unoccupied groups, then the images to be grouped by the image acquisition device are assigned to the unoccupied groups; if the image acquisition device is associated with the image acquisition device corresponding to the already grouped image, and the remaining space of the second group where the already grouped image is located is not less than the number of images to be grouped by the image acquisition device, then the images to be grouped by the image acquisition device are assigned to the second group.

2. The method according to claim 1, characterized in that, The method further includes: If the image acquisition device is associated with the image acquisition device corresponding to the already grouped image, and the remaining space of the third group containing the already grouped image is less than the number of images to be grouped by the image acquisition device, and there is no unoccupied group, then the fourth group with the largest remaining space is searched. Based on the association degree between the third image acquisition device corresponding to the image contained in the fourth group and the fourth image acquisition device that has not been grouped in the first sorting result, the fourth image acquisition device is sorted to obtain the second sorting result. For each fourth image acquisition device in the second sorting result, if the image to be grouped by any fourth image acquisition device is not larger than the remaining space of the fourth group, then the image to be grouped by the fourth image acquisition device is assigned to the fourth group.

3. The method according to claim 2, characterized in that, The method further includes: If the number of images to be grouped by each fourth image acquisition device is greater than the remaining space of the fourth group, the images to be grouped acquired by that image acquisition device shall be assigned to the fourth group.

4. The method according to claim 1, characterized in that, The method for determining the correlation between any two image acquisition devices includes: Based on the pre-saved location information of each image acquisition device, the distance between any two image acquisition devices is determined. If the distance is less than a preset distance threshold, it is determined that there is a correlation between the two image acquisition devices. Based on the distance, the correlation degree between any two image acquisition devices that are associated is determined.

5. The method according to claim 1, characterized in that, The method for determining the correlation between any two image acquisition devices includes: Acquire each clustered target image within a preset time range, wherein the target image contains first identification information of the image acquisition device that acquired the target image, and second identification information of the clustering result corresponding to the target image; Each target image is input into a pre-trained model to obtain information on whether there is a correlation between any two image acquisition devices output by the model, and the degree of correlation between any two image acquisition devices that are correlated.

6. The method according to claim 1, characterized in that, The method for determining the correlation between any two image acquisition devices includes: For any image acquisition device, obtain the saved fifth image acquisition device that is associated with the image acquisition device based on the model, as well as the association degree between each fifth image acquisition device and the image acquisition device, and sort each fifth image acquisition device in order of association degree from high to low to obtain a third sorting result; For any image acquisition device, find the candidate third ranking result containing that image acquisition device; obtain each sixth image acquisition device that is associated with that image acquisition device based on distance determination, and the association degree between each sixth image acquisition device and that image acquisition device, and sort each sixth image acquisition device in descending order of association degree to obtain the fourth ranking result; determine the fifth ranking result corresponding to that image acquisition device based on the third ranking result corresponding to that image acquisition device, the fourth ranking result, and the candidate third ranking result; Based on each fifth ranking result, the correlation between every two image acquisition devices is determined.

7. The method according to claim 6, characterized in that, The determination of the correlation between every two image acquisition devices based on each fifth sorting result includes: For any two image acquisition devices, obtain the target fifth ranking result corresponding to the two image acquisition devices respectively, determine the candidate correlation degree of the two image acquisition devices in each target fifth ranking result, and determine the correlation degree of the two image acquisition devices based on each candidate correlation degree.

8. An image grouping device, characterized in that, The device includes: The acquisition module is used to acquire images captured by each image acquisition device within a set time period. The grouping module is used to, for a first image acquisition device whose number of acquired images is not less than a preset number threshold, determine a first group of images acquired by the first image acquisition device that meets the number threshold, and divide the images acquired by the first image acquisition device into groups of the first group, wherein the number of images contained in each group is the number threshold; for a second image acquisition device whose number of acquired images is less than the number threshold and a target first image acquisition device with remaining ungrouped images, the module groups the images to be grouped according to the stored correlation between any two image acquisition devices; The grouping module is specifically used to count the total number of images to be grouped, and determine the number of second groups corresponding to the images to be grouped based on the total number and the number threshold. For the target first image acquisition device and the second image acquisition device, each image acquisition device is sorted in descending order of the number of images to be grouped for each second image acquisition device to obtain a first sorting result. According to the first sorting result, for each image acquisition device in the first sorting result, if the image acquisition device is associated with an image acquisition device corresponding to an already grouped image, the remaining space in the first group containing the already grouped image is less than the number of images to be grouped for the image acquisition device, and there are unoccupied groups, then the images to be grouped for the image acquisition device are assigned to the unoccupied groups. If the image acquisition device is associated with an image acquisition device corresponding to an already grouped image, and the remaining space in the second group containing the already grouped image is not less than the number of images to be grouped for the image acquisition device, then the images to be grouped for the image acquisition device are assigned to the second group.

9. An electronic device, characterized in that, The electronic device includes a processor that executes a computer program stored in a memory to implement the steps of the image grouping method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the steps of the image grouping method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Method and equipment for clustering pictures

    CN110413817A

  • Face image clustering method, system, product and medium

    CN110516586A

  • Target tracking method, computing device and storage medium

    CN113963019A