Method and device for archiving driving path, computer device and storage medium

CN117423080BActive Publication Date: 2026-10-16BEIJING REALAI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311336944.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-16
Publication Date
2026-10-16
Estimated Expiration
2043-10-16

AI Technical Summary

Technical Problem

[0004]有鉴于此,本发明实施例提供了一种行驶路径的档案聚集方法,以解决现有技术中仅仅按照Geohash划分区域而降低聚档结果准确度的技术问题

Benefits of technology

[0016] Compared with the prior art, the beneficial effects that the above-mentioned at least one technical solution adopted in the embodiments of this specification can achieve include at least the following: It proposes determining the correlation between every two image acquisition devices based on the files obtained in the previous preset period according to a preset period, generating correlation pairs, and then dividing the image acquisition devices in the correlation pairs whose correlation meets a preset threshold into the same image acquisition device group, and dividing the locations of the image acquisition devices included in each image acquisition device group into the same new region, resulting in multiple new regions. This achieves the goal of readjusting the region division based on the correlation between image acquisition devices on the basis of dividing regions according to GeoHash, avoiding the fixation of region division, and simultaneously ensuring strong correlation between image acquisition devices in the new region. File aggregation based on the new region reduces computational load and also helps improve the accuracy of file aggregation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117423080B_ABST
    Figure CN117423080B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a driving path archive aggregation method and device, computer equipment and a storage medium, relating to the technical field of image processing, wherein the method comprises: obtaining each archive obtained in a previous preset period according to a preset period in a current preset period; determining the correlation degree between each two image acquisition devices in the same archive, generating a correlation degree pair, and dividing the image acquisition devices in the correlation degree pair that meets a preset threshold into the same image acquisition device group according to the correlation degree pairs corresponding to all archives, to obtain multiple image acquisition device groups; dividing the positions of the image acquisition devices included in each image acquisition device group into the same new area to obtain multiple new areas; performing archive aggregation on each snapshot of the image acquisition devices in the new area to obtain a sub archive, and integrating the sub archives between the new areas to obtain each archive in the current preset period.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to a method, apparatus, computer device, and storage medium for accumulating files along a travel path. Background Technology

[0002] When performing clustering tasks over large areas, the number of captured images obtained daily is enormous, necessitating the division into regions and then performing clustering tasks based on these regions. Performing clustering tasks based on regions can solve the computational burden problem. For example, if the original total number of captured images is n, dividing it into 10 regions reduces the computational burden from $n*n$ to (n / 10)*(n / 10)*10$, a reduction of one-tenth of the original. Furthermore, performing clustering tasks based on regions can also address the top-k accuracy issue. By reducing the size of the retrieval database, target data can be retrieved more accurately, improving clustering accuracy.

[0003] Currently, using Geohash to divide regions is the existing strategy for clustering and archiving. Specifically, after dividing regions according to Geohash, images within each region are aggregated into sub-files. Sub-files are then merged between regions (using keyframes) to obtain the final clustered file. The advantage of using Geohash for region division is the ability to quickly retrieve raw capture data of different sizes to select the initial clustering area. However, current methods of dividing regions using Geohash suffer from problems such as fixed regions and low spatial correlation due to considering only geographical location, thus affecting the accuracy of the clustering results. Summary of the Invention

[0004] In view of this, embodiments of the present invention provide a method for accumulating travel path archives to solve the technical problem in the prior art where simply dividing regions according to Geohash reduces the accuracy of the archive accumulation results. The method includes:

[0005] According to a preset cycle, within the current preset cycle, each file obtained in the previous preset cycle is acquired. The file is obtained by dividing the location of the image acquisition device into multiple regions based on the GeoHash encoding of the geographic information of each image acquisition device, then aggregating each snapshot of the image acquisition device in each region to obtain a sub-file, and integrating the sub-files between regions. Each snapshot includes a collection of images generated by the same image acquisition device for the same individual within a preset time.

[0006] In the same file, among the image acquisition devices to which each snapshot belongs, the correlation degree between every two image acquisition devices is determined, and a correlation degree pair is generated. Based on the correlation degree pairs corresponding to all files, the image acquisition devices in the correlation degree pairs that meet the preset threshold are divided into the same image acquisition device group, resulting in multiple image acquisition device groups. The correlation degree pair includes the correlation degree and the two image acquisition devices that determine the correlation degree.

[0007] The locations of the image acquisition devices in each image acquisition device group are divided into the same new region, resulting in multiple new regions;

[0008] Each snapshot captured by the image acquisition device in the new area is archived to obtain a sub-file, and the sub-files between the new areas are integrated to obtain the various files within the current preset period.

[0009] This invention also provides a device for aggregating travel path archives, addressing the technical problem in existing technologies where simply dividing regions according to Geohash reduces the accuracy of the aggregation results. The device includes:

[0010] The acquisition module is used to acquire, within the current preset period, each file obtained in the previous preset period. The file is obtained by dividing the location of the image acquisition device into multiple regions according to the GeoHash encoding of the geographic information of each image acquisition device, aggregating each snapshot of the image acquisition device in each region to obtain a sub-file, and integrating the sub-files between regions. Each snapshot includes a collection of images generated by the same image acquisition device for the same individual at a preset time.

[0011] The device grouping module is used to determine the correlation degree between each pair of image acquisition devices in the same file, generate correlation degree pairs, and divide the image acquisition devices in the correlation degree pairs that meet the preset threshold into the same image acquisition device group according to the correlation degree pairs corresponding to all files, thereby obtaining multiple image acquisition device groups. The correlation degree pair includes the correlation degree and the two image acquisition devices that determine the correlation degree.

[0012] The region division module is used to divide the location of the image acquisition devices included in each image acquisition device group into the same new region, resulting in multiple new regions;

[0013] The file aggregation module is used to aggregate each snapshot captured by the image acquisition device in the new area to obtain sub-files, and to integrate the sub-files between the new areas to obtain the files within the current preset period.

[0014] This invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the above-mentioned file aggregation method for arbitrary travel paths, thereby solving the technical problem in the prior art that reduces the accuracy of file aggregation results by dividing regions solely according to Geohash.

[0015] This invention also provides a computer-readable storage medium storing a computer program that executes the file aggregation method for any of the above-described travel paths, in order to solve the technical problem in the prior art that reduces the accuracy of file aggregation results by dividing regions solely according to Geohash.

[0016] Compared with the prior art, the beneficial effects that the above-mentioned at least one technical solution adopted in the embodiments of this specification can achieve include at least the following: It proposes determining the correlation between every two image acquisition devices based on the files obtained in the previous preset period according to a preset period, generating correlation pairs, and then dividing the image acquisition devices in the correlation pairs whose correlation meets a preset threshold into the same image acquisition device group, and dividing the locations of the image acquisition devices included in each image acquisition device group into the same new region, resulting in multiple new regions. This achieves the goal of readjusting the region division based on the correlation between image acquisition devices on the basis of dividing regions according to GeoHash, avoiding the fixation of region division, and simultaneously ensuring strong correlation between image acquisition devices in the new region. File aggregation based on the new region reduces computational load and also helps improve the accuracy of file aggregation results. Attached Figure Description

[0017] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the 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.

[0018] Figure 1 This is a flowchart of a method for accumulating travel route files according to an embodiment of the present invention;

[0019] Figure 2 This is a schematic diagram of the mapping between snapshot, area, and camera provided in an embodiment of the present invention;

[0020] Figure 3 This is a schematic diagram illustrating how to determine the first correlation degree between image acquisition devices based on the number of snapshots, according to an embodiment of the present invention.

[0021] Figure 4 This is a schematic diagram showing the area before and after adjustment according to an embodiment of the present invention;

[0022] Figure 5 This is a structural block diagram of a computer device provided in an embodiment of the present invention;

[0023] Figure 6 This is a structural block diagram of a file aggregation device for a travel path provided in an embodiment of the present invention. Detailed Implementation

[0024] The embodiments of this application will now be described in detail with reference to the accompanying drawings.

[0025] The following specific examples illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. This application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. It should be noted that, in the absence of conflict, the following embodiments and features in the embodiments can be combined with each other. 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.

[0026] In this embodiment of the invention, a method for accumulating travel route files is provided, such as... Figure 1 As shown, the method includes:

[0027] Step S101: According to a preset period, within the current preset period, acquire each file obtained in the previous preset period. The file is obtained by dividing the location of the image acquisition device into multiple regions based on the GeoHash encoding of the geographic information of each image acquisition device, then aggregating each snapshot of the image acquisition device in each region to obtain a sub-file, and integrating the sub-files between regions. Each snapshot includes a set of images generated by the same image acquisition device for the same individual within a preset time.

[0028] Step S102: In the image acquisition devices to which each snapshot belongs within the same file, determine the correlation degree between every two image acquisition devices, generate correlation degree pairs, and according to the correlation degree pairs corresponding to all files, divide the image acquisition devices in the correlation degree pairs that meet the preset threshold into the same image acquisition device group to obtain multiple image acquisition device groups, wherein the correlation degree pair includes the correlation degree and the two image acquisition devices that determine the correlation degree;

[0029] Step S103: Divide the location of the image acquisition devices in each image acquisition device group into the same new region to obtain multiple new regions;

[0030] Step S104: Collect each snapshot captured by the image acquisition device in the new area to obtain a sub-file, and integrate the sub-files between the new areas to obtain the files within the current preset period.

[0031] Depend on Figure 1 As shown in the process, in this embodiment of the invention, a method is proposed to determine the correlation between every two image acquisition devices based on the files obtained in the previous preset period according to a preset period, generate correlation pairs, and then divide the image acquisition devices in the correlation pairs that meet the preset threshold into the same image acquisition device group. The locations of the image acquisition devices included in each image acquisition device group are divided into the same new region, resulting in multiple new regions. This achieves the goal of readjusting the region division based on the correlation between image acquisition devices on the basis of dividing regions according to GeoHash, avoiding the fixation of region division, and at the same time making the image acquisition devices in the new region have strong correlations. This allows image acquisition devices in the same scene, field, building, etc. with strong correlations to be divided into the same region, and files are aggregated based on the new regions. This reduces the amount of computation and also helps to improve the accuracy of file aggregation results.

[0032] In practice, the above-mentioned method for accumulating travel path archives can be applied to the archiving of human activity trajectories. In this case, the individual characteristics of each captured image can be the biometric features of the person. It can also be applied to the archiving of the movement trajectories of moving objects. The moving objects can be transportation equipment such as cars, mobile devices such as mobile robots, and in this case, the individual characteristics of each captured image can be the identification features of the moving object, such as license plate number, ID code of mobile robot, etc.

[0033] In practice, the aforementioned image acquisition device can be any device capable of acquiring images, such as a camera, a webcam, etc.

[0034] In practical implementation, GeoHash encoding is a spatial address encoding method that encodes two-dimensional spatial latitude and longitude data into a string. For example, latitude and longitude [31.1932993, 121.43960190000007] will have a GeoHash encoding result of wtw37q. Using string length as precision, latitude and longitude with the same precision form a grid region after calculation. Within a grid region at a certain precision, the latitude and longitude characters formed are identical if the precision is consistent (i.e., the first preset number of prefix characters in the GeoHash encoding of the latitude and longitude within a grid region are the same). This application initially processes the latitude and longitude of the image acquisition device's geographical location into GeoHash encoding, and then divides the geographical locations of image acquisition devices with the same preset number of prefix characters in the GeoHash encoding into one region, thereby dividing the area to be monitored into multiple regions.

[0035] In practice, during the region division process based on GeoHash encoding, the geographical locations of image acquisition devices with the same prefix characters in the GeoHash encoding are grouped into one region. To balance computational load and aggregation accuracy, the value of the first preset number can be determined based on specific accuracy requirements, the size of the area involved in the trajectory, and other factors. The smaller the value of the first preset number, the more image acquisition devices are included in each sub-region, the larger the geographical area where the image acquisition devices in each sub-region are distributed, the greater the computational load for each region node, and the lower the aggregation accuracy. For example, the value of the first preset number could be 5, 6, etc.

[0036] In practical implementation, after initializing the region division using Geohash, the mapping relationship between image acquisition devices such as cameras and regions can be obtained, such as a camera-region mapping table. Each region's corresponding cameras form a camera group, as shown below. Figure 2 As shown, based on the mapping between camera groups and regions, and according to the relationship between the captured image and its corresponding camera, the mapping relationship between the captured image and the region can be obtained. At this time, when the captured image is entered into the database, the region information to which the captured image belongs can be obtained by searching the region-camera mapping table.

[0037] In practice, after initializing the monitored area using Geohash for region division, file aggregation can be performed based on the region. For each snapshot captured by the image acquisition device within each region, sub-files are aggregated. These sub-files are then integrated across regions to obtain individual files, thus completing the file aggregation process. During this process, according to a preset cycle, the correlation between every two image acquisition devices is determined based on the files from the previous preset cycle. The region division is then readjusted based on this correlation, and files are aggregated based on the snapshots within the adjusted regions to obtain the files for the current preset cycle. The duration of this preset cycle can be determined based on specific circumstances; for example, it could be one day, one week, or half a month.

[0038] In specific implementation, in order to accurately adjust the region division based on the correlation between every two image acquisition devices, so that the image acquisition devices in each region are strongly correlated in space, and that image acquisition devices in the same scene, field, building or other strongly correlated range are divided into the same region, this application proposes a variety of methods to analyze the correlation between image acquisition devices based on the archives of the previous preset period and adjust the region division based on the correlation.

[0039] For example, the first method determines the correlation between image acquisition devices based on the number of images captured by each device, and then groups the image acquisition devices into different groups based on this correlation.

[0040] Within the same file, for each snapshot belonging to a particular image acquisition device, a first correlation degree is determined between every two image acquisition devices based on the number of snapshots corresponding to each image acquisition device, and a first correlation degree pair is generated.

[0041] Based on the first correlation pairs corresponding to all the files, the image acquisition devices in the first correlation pairs whose first correlation meets the first preset threshold are divided into the same image acquisition device group, resulting in multiple image acquisition device groups.

[0042] In specific implementation, during the process of determining the first correlation degree between every two image acquisition devices based on the number of snapshots corresponding to each image acquisition device and generating the first correlation degree pair, the number of snapshots corresponding to each two image acquisition devices can be multiplied, and the resulting product can be determined as the first correlation degree between each two image acquisition devices to generate the first correlation degree pair; alternatively, the larger value among the number of snapshots corresponding to each two image acquisition devices can be determined as the first correlation degree between each two image acquisition devices to generate the first correlation degree pair.

[0043] In specific implementation, such as Figure 3As shown, in file A, camera 1 has 3 snapshots, camera 2 has 2 snapshots, and camera 3 has 1 snapshot. In file B, camera 3 has 2 snapshots, and camera 4 has 2 snapshots. Taking the product of the number of snapshots corresponding to the two cameras as the first correlation degree as an example, the output results of the first correlation degree pairs are shown in Table 1 below. The first correlation degree between camera 1 and camera 2 is 6, and the generated first correlation degree pair is shown as item 0 in the table below; the first correlation degree between camera 2 and camera 3 is 2, and the generated first correlation degree pair is shown as item 1 in the table below, and so on.

[0044] 0 camera1<->camera2:6 1 camera2<->camera3:2 2 camera1<->camera3:3 3 camera3<->camera4:4 ... ...

[0045] Table 1

[0046] In practical implementation, after obtaining the first correlation degree pair of transaction sets shown in Table 1 above, it can be considered that the higher the correlation degree between cameras and the larger the value, the closer the cameras are. Therefore, a distance-based k-means clustering method from data mining correlation analysis techniques is proposed to obtain multiple groups of image acquisition devices to adjust the region division. For example,

[0047] For all the first association pairs corresponding to the files, at least two first association pairs that include the same image acquisition device are merged into one first association pair. The sum of the first association degrees of the at least two first association pairs is taken as the first association degree of the merged first association pair. For example, if the two image acquisition devices included in one first association pair are the same as the two image acquisition devices included in another first association pair, then the two first association pairs are merged.

[0048] In all the first association degree pairs, a preset number of the first association degree pairs are randomly determined as cluster centers, wherein the preset number is the same as the number of regions divided according to the GeoHash encoding of the geographic information of each image acquisition device;

[0049] Based on the first correlation degree included in each first correlation degree pair, clustering is performed on all first correlation degree pairs other than the cluster center based on the preset number of cluster centers (for example, calculating the distance between each first correlation degree pair and each cluster center, obtaining multiple distances, and adding the first correlation degree pair to the cluster center with the smallest distance), and each cluster center and the image acquisition devices included in the first correlation degree pair clustered to that cluster center are divided into the same image acquisition device group, resulting in multiple image acquisition device groups.

[0050] For example, the second approach determines the correlation between image acquisition devices based on the co-occurrence frequency of every two image acquisition devices, and then groups different image acquisition devices based on this correlation. For example,

[0051] The snapshots within the same file are sorted chronologically to obtain the snapshot order;

[0052] The capture sequence is divided into multiple time periods according to a preset duration. The image acquisition devices to which each capture belongs in each time period are grouped into a device subset, resulting in multiple device subsets corresponding to each file.

[0053] Based on the device subsets corresponding to all the files, for each image acquisition device, calculate the co-occurrence frequency between the image acquisition device and all other image acquisition devices except itself, and refer to the co-occurrence frequency as the second correlation degree, and generate a second correlation degree pair, wherein the co-occurrence frequency is the ratio between the number of times two image acquisition devices exist in the same device subset and the total number of device subsets;

[0054] Group all the second correlation pairs corresponding to the aforementioned files into a first set, and repeatedly execute the following steps to obtain multiple groups of the aforementioned image acquisition devices:

[0055] Take out a pair of second correlation degrees that meet the second preset threshold from the first set, and form a second set including the image acquisition devices included in the taken second correlation degree pair;

[0056] If there exists a second correlation degree pair in the first set that includes the image acquisition device in the second set and whose second correlation degree meets the second preset threshold, then if so, remove the determined second correlation degree pair from the first set and add the image acquisition device included in the removed second correlation degree pair to the second set, and continue to repeat the current step; otherwise, divide the image acquisition devices in the second set into the same image acquisition device group.

[0057] In practice, when dividing the capture sequence of the same file into multiple time periods according to the preset duration, the length of the preset duration can be determined according to the specific situation. The preset duration is less than the preset period, for example, it can be one day, several hours, etc. Taking one day as an example, after dividing the file into different time periods, the result of the image acquisition devices to which each capture belongs in each time period forms a device subset is shown in Table 2 below. The image acquisition devices 1, 2, 3...10 included in time period 1 of file 1 form a device subset, as shown in item 0 of Table 2; the image acquisition devices 2, 3...9 included in time period 2 of file 1 form a device subset, as shown in item 1 of Table 2, and so on.

[0058] 0 (dossier-1,day-1):[camera-1,camre-2,camre-3,....camre-10] 1 (dossier-1,day-2):[camre-2,camre-3,....camre-9] 2 (dossier-1,day-3):[camre-2,camre-4,....camre-9] 4 (dossier-2,day-1):[camre-3,camera-6,camre-11] ... ...

[0059] Table 2

[0060] In specific implementation, when calculating the co-occurrence frequency between the image acquisition device and other image acquisition devices besides itself, the image acquisition devices included in the same device subset are not repeated. That is, the number of times two image acquisition devices exist in the same device subset at the same time refers to the number of different device subsets in which the two image acquisition devices exist at the same time. For example, if image acquisition devices 2 and 3 appear in device subsets 0 and 1 at the same time, then the number of times two image acquisition devices 2 and 3 exist in the same device subset at the same time is 2.

[0061] In practical implementation, for example, the image acquisition device groups obtained from the first and second methods can be merged to obtain multiple final image acquisition device groups. For example,

[0062] Within the same file, for each snapshot belonging to a particular image acquisition device, a first correlation degree is determined between every two image acquisition devices based on the number of snapshots corresponding to each image acquisition device, and a first correlation degree pair is generated.

[0063] Based on the first correlation pair corresponding to all the files, the image acquisition devices in the first correlation pair whose first correlation meets the first preset threshold are divided into the same first image acquisition device group, resulting in multiple first image acquisition device groups.

[0064] The snapshots within the same file are sorted chronologically to obtain the snapshot order;

[0065] The capture sequence is divided into multiple time periods according to a preset duration. The image acquisition devices to which each capture belongs in each time period are grouped into a device subset, resulting in multiple device subsets corresponding to each file.

[0066] Based on the device subsets corresponding to all the files, for each image acquisition device, calculate the co-occurrence frequency between the image acquisition device and all other image acquisition devices except itself, and refer to the co-occurrence frequency as the second correlation degree, and generate a second correlation degree pair, wherein the co-occurrence frequency is the ratio between the number of times two image acquisition devices exist in the same device subset and the total number of device subsets;

[0067] All the second correlation pairs corresponding to the files are grouped into a first set. The following steps are executed repeatedly until the first set is empty or there are no second correlation pairs in the first set whose second correlation meets the second preset threshold, at which point the loop ends, resulting in multiple groups of second image acquisition devices:

[0068] Take out a pair of second correlation degrees that meet the second preset threshold from the first set, and form a second set including the image acquisition devices included in the taken second correlation degree pair;

[0069] Determine whether there exists a second correlation degree pair in the first set that includes the image acquisition device in the second set and whose second correlation degree meets the second preset threshold. If yes, remove the determined second correlation degree pair from the first set and add the image acquisition device included in the removed second correlation degree pair to the second set, and continue to repeat the current step; if no, divide the image acquisition devices in the second set into the same second image acquisition device group.

[0070] Determine the number of identical image acquisition devices simultaneously included in each of the first image acquisition device groups and each of the second image acquisition device groups;

[0071] Based on the size of the quantity, each first image acquisition device group and each second image acquisition device group include the image acquisition devices in the same image acquisition device group, resulting in multiple image acquisition device groups.

[0072] In specific implementation, to further improve the accuracy and relevance of region division, this embodiment uses the following steps to classify the image acquisition devices included in each first image acquisition device group and each second image acquisition device group into the same image acquisition device group based on the quantity:

[0073] Based on the number of identical image acquisition devices simultaneously included in each of the first image acquisition device groups and each of the second image acquisition device groups, a ratio is calculated between the number of identical image acquisition devices and the total number of image acquisition devices included in the first image acquisition device group, and this ratio is called the first ratio; a ratio is also calculated between the number of identical image acquisition devices and the total number of image acquisition devices included in the second image acquisition device group, and this ratio is called the second ratio.

[0074] When both the first ratio and the second ratio are greater than the third preset threshold, the image acquisition devices included in the first image acquisition device group and the second image acquisition device group are classified into the same image acquisition device group.

[0075] In practice, a comparison image before and after the region division of the image acquisition equipment group is used, as shown in the figure. Figure 4 As shown, Figure 4 The image on the left is a schematic diagram of region division based on GeoHash encoding. Figure 4 The right figure is a schematic diagram of the region after adjustment based on the correlation degree. Regions with the same filling pattern are the same region. It can be seen that the size of the adjusted region is no longer fixed. After adaptive division, the region can obtain irregular region division results according to the actual connectivity. The same region can also include two spatially non-adjacent regions, realizing cross-space union.

[0076] In practical implementation, after the image acquisition equipment group readjusts the regional division, the process of archive aggregation based on the new region can be achieved using existing archive aggregation methods. To improve the accuracy and precision of archive aggregation, the following archive aggregation method is also proposed in this embodiment:

[0077] In each new region, based on the feature similarity between the captured images, each captured image is divided into multiple sub-files, wherein each sub-file includes at least one captured image;

[0078] In each new region, the average feature value of each sub-file is determined based on the features of the captured images included in each sub-file;

[0079] Based on the feature similarity between the feature averages of the sub-files in each of the two new regions, the sub-files in each of the two new regions are merged into one file to obtain the files within the current preset period.

[0080] In practice, in each new region, the process of dividing each of the aforementioned snapshots into multiple sub-files based on the feature similarity between them can be achieved by clustering based on the feature similarity between pairs of snapshots, or by obtaining multiple sub-files in the following ways:

[0081] In each new area, for each captured image, the images are sorted in descending order of their individual feature quality scores to obtain a first order. The images preceding the first order corresponding to a second preset number of positions are then identified as first keyframes, resulting in a second preset number of first keyframes.

[0082] For each real-time archive (i.e., sub-archive) of each new region, the images are sorted in descending order of individual feature quality scores to obtain a second order. The images preceding the second preset number of positions in the second order are determined as second keyframes, and the second preset number of second keyframes for each real-time archive are determined.

[0083] Calculate the first similarity of individual features between each of the first keyframes and each of the second keyframes to obtain multiple first similarities;

[0084] The first similarity scores are sorted in descending order to obtain a third order, and the first similarity scores before the third preset number of positions in the third order are determined as key similarity scores, thus obtaining the third preset number of key similarity scores.

[0085] Count each real-time file based on the number of key similarities corresponding to each real-time file;

[0086] The system iterates through each of the real-time archives in descending order of count to determine the valid real-time archives. When the number of valid real-time archives is 0, no processing is performed on the captured image. When the number of valid real-time archives is not 0, the valid real-time archives and the captured image are merged to form a new real-time archive. The valid real-time archives are the real-time archives that have not been merged yet.

[0087] In specific implementation, based on the feature similarity between the average features of the sub-files in each two new regions, the sub-files in each two new regions are merged into one file to obtain the files within the current preset period. Existing methods can be used to merge sub-files between regions. To improve the accuracy of file aggregation, a keyframe-based method for merging sub-files between regions is proposed, for example...

[0088] For each sub-file of the first region in every two new regions, the images are sorted in descending order of individual feature quality scores to obtain a fourth order. The images before the second preset number of positions in the fourth order are determined as third keyframes. The second preset number of the third keyframes of each sub-file of the first region are determined. Based on the features of the second preset number of the third keyframes, the first feature average value of each sub-file of the first region is determined.

[0089] For each sub-file of the second region in every two new regions, the images are sorted in descending order of individual feature quality scores to obtain a fifth order. The images before the second preset number of positions in the fifth order are determined as the fourth keyframes. The second preset number of the fourth keyframes for each sub-file of the second region are determined. Based on the features of the second preset number of the fourth keyframes, the average value of the second feature of each sub-file of the second region is determined.

[0090] For each sub-file in the second region and each sub-file in the first region, a third similarity is calculated between each average value of the second feature and each average value of the first feature, resulting in multiple third similarities;

[0091] Merge the two sub-files corresponding to the third similarity score that is greater than the preset threshold to obtain the files within the current preset period.

[0092] In practical implementation, real-time archives refer to temporary archives generated internally by the T+0 real-time archive system for each region. An archive refers to the set of snapshots calculated during system operation. Each archive is considered in the algorithm to represent all snapshots corresponding to a single person or moving object; however, in reality, there may be multiple archives for one person and one archive for multiple people. An archive can contain one or more snapshots. Archive aggregation is short for archive clustering, referring to the process of determining whether a snapshot can be included in an archive or become a new archive.

[0093] In this embodiment, a computer device is provided, such as... Figure 5 As shown, it includes a memory 501, a processor 502, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the file aggregation method for any of the above-mentioned driving paths.

[0094] Specifically, the computer device can be a computer terminal, a server, or a similar computing device.

[0095] In this embodiment, a computer-readable storage medium is provided, which stores a computer program that performs the file aggregation method for any of the above-described driving paths.

[0096] Specifically, computer-readable storage media, including both permanent and non-permanent, removable and non-removable media, can store information using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer-readable storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable storage media does not include transient media, such as modulated data signals and carrier waves.

[0097] Based on the same inventive concept, this invention also provides a file aggregation device for driving paths, as described in the following embodiments. Since the principle of the file aggregation device for driving paths is similar to that of the file aggregation method for driving paths, the implementation of the file aggregation device for driving paths can refer to the implementation of the file aggregation method for driving paths, and repeated details will not be elaborated further. As used below, the terms "unit" or "module" can refer to a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0098] Figure 6 This is a structural block diagram of a file aggregation device for a travel path according to an embodiment of the present invention, such as... Figure 6 As shown, the device includes:

[0099] The acquisition module 601 is used to acquire, within the current preset period, various files obtained in the previous preset period according to a preset period. The files are obtained by dividing the location of the image acquisition device into multiple regions according to the GeoHash encoding of the geographic information of each image acquisition device, aggregating each snapshot of the image acquisition device in each region to obtain sub-files, and integrating the sub-files between regions. Each snapshot includes a collection of images generated by the same image acquisition device for the same individual at a preset time.

[0100] The device grouping module 602 is used to determine the correlation degree between every two image acquisition devices in the same file, generate correlation degree pairs, and divide the image acquisition devices in the correlation degree pairs that meet the preset threshold into the same image acquisition device group according to the correlation degree pairs corresponding to all files, thereby obtaining multiple image acquisition device groups. The correlation degree pair includes the correlation degree and the two image acquisition devices that determine the correlation degree.

[0101] The region division module 603 is used to divide the location of the image acquisition devices included in each image acquisition device group into the same new region, thereby obtaining multiple new regions;

[0102] The file aggregation module 604 is used to aggregate each snapshot captured by the image acquisition device in the new area to obtain sub-files, and to integrate the sub-files between the new areas to obtain the files within the current preset period.

[0103] In one embodiment, the device grouping module 602 is used to determine a first correlation degree between every two image acquisition devices based on the number of captures corresponding to each image acquisition device in the same file, and generate a first correlation degree pair; based on the first correlation degree pairs corresponding to all the files, the image acquisition devices in the first correlation degree pairs whose first correlation degree meets a first preset threshold are divided into the same image acquisition device group, thereby obtaining multiple image acquisition device groups.

[0104] In one embodiment, the device grouping module 602 is used to multiply the number of snapshots corresponding to every two image acquisition devices, and determine the product as the first correlation degree between every two image acquisition devices to generate a first correlation degree pair; for all the first correlation degree pairs corresponding to the files, at least two first correlation degree pairs that include the same image acquisition device are merged into one first correlation degree pair, and the sum of the first correlation degrees of the at least two first correlation degree pairs is used as the first correlation degree of the merged first correlation degree pair; in all the first correlation degree pairs, a preset number of first correlation degree pairs are randomly determined as cluster centers, wherein the preset number is the same as the number of regions divided according to the GeoHash encoding of the geographical information of each image acquisition device; based on the first correlation degree included in each first correlation degree pair, the other first correlation degree pairs in all the first correlation degree pairs except the cluster centers are clustered based on the preset number of cluster centers, and each cluster center and the image acquisition devices included in the first correlation degree pairs clustered to the cluster center are divided into the same image acquisition device group to obtain multiple image acquisition device groups.

[0105] In one embodiment, the device grouping module 602 is used to sort the snapshots within the same file according to time order to obtain a snapshot order; divide the snapshot order into multiple time periods according to a preset duration, and form a device subset by the image acquisition devices to which each snapshot belongs in each time period, to obtain multiple device subsets corresponding to each file; based on the device subsets corresponding to all files, for each image acquisition device, calculate the co-occurrence frequency between the image acquisition device and all other image acquisition devices except itself, and refer to the co-occurrence frequency as a second correlation degree, generating a second correlation degree pair, wherein the co-occurrence frequency is the ratio between the number of times two image acquisition devices coexist in the same device subset and the total number of device subsets; form a first set by all the second correlation degree pairs corresponding to all files, and iteratively execute the following... The process continues until the first set is empty or there is no second correlation pair in the first set whose second correlation degree meets the second preset threshold, at which point the loop ends, resulting in multiple image acquisition device groups: A second correlation pair whose second correlation degree meets the second preset threshold is taken from the first set, and the image acquisition devices included in the taken-out second correlation pair are grouped into a second set; it is determined whether there exists a second correlation pair in the first set that includes the image acquisition devices in the second set and whose second correlation degree meets the second preset threshold. If yes, the determined second correlation pair is taken from the first set, and the image acquisition devices included in the taken-out second correlation pair are added to the second set, and the current step is repeated; if not, the image acquisition devices in the second set are grouped into the same image acquisition device group.

[0106] In one embodiment, the device grouping module 602 is configured to: determine a first correlation degree between every two image acquisition devices within the same file, based on the number of captures corresponding to each image acquisition device, and generate a first correlation degree pair; classify the image acquisition devices in the first correlation degree pairs corresponding to all files into the same first image acquisition device group based on the first correlation degree pairs that meet a first preset threshold, thereby obtaining multiple first image acquisition device groups; sort the captures within the same file according to time order to obtain a capture order; and group the captures according to a preset duration. The capture sequence is divided into multiple time periods. Within each time period, the image acquisition devices associated with each capture are grouped into device subsets, resulting in multiple device subsets corresponding to each file. Based on all device subsets corresponding to all files, for each image acquisition device, the co-occurrence frequency between that image acquisition device and all other image acquisition devices (excluding itself) is calculated. This co-occurrence frequency is referred to as the second correlation degree, and second correlation degree pairs are generated. The co-occurrence frequency is the ratio between the number of times two image acquisition devices simultaneously exist in the same device subset and the total number of device subsets. The second correlation degree pairs corresponding to all files are then... The following steps are performed iteratively until the first set is empty or there is no second correlation degree pair in the first set whose second correlation degree meets the second preset threshold, thus ending the loop and obtaining multiple second image acquisition device groups: A second correlation degree pair whose second correlation degree meets the second preset threshold is taken from the first set, and the image acquisition devices included in the taken second correlation degree pair are grouped into a second set; it is determined whether there is a second correlation degree pair in the first set that includes the image acquisition devices in the second set and whose second correlation degree meets the second preset threshold. If yes, the determined second correlation degree pair is taken from the first set, and the image acquisition devices included in the taken second correlation degree pair are added to the second set, and the current step is repeated; if not, the image acquisition devices in the second set are divided into the same second image acquisition device group; the number of identical image acquisition devices included in each first image acquisition device group and each second image acquisition device group is determined; based on the size of the number, the image acquisition devices included in each first image acquisition device group and each second image acquisition device group are divided into the same image acquisition device group, thus obtaining multiple image acquisition device groups.

[0107] In one embodiment, the device grouping module 602 is further configured to calculate, based on the number of identical image acquisition devices simultaneously included in each first image acquisition device group and each second image acquisition device group, a ratio between the number of identical image acquisition devices included in the first image acquisition device group and the total number of image acquisition devices included in the first image acquisition device group, the ratio being called a first ratio; calculate, based on the number of identical image acquisition devices simultaneously included in each first image acquisition device group and each second image acquisition device group, a ratio being called a second ratio; and when both the first ratio and the second ratio are greater than a third preset threshold, classify the image acquisition devices included in the first image acquisition device group and the second image acquisition device group into the same image acquisition device group.

[0108] In one embodiment, the aggregation module 604 is configured to, in each new region, divide each of the captured images into multiple sub-files based on the feature similarity between the captured images, wherein each sub-file includes at least one captured image; in each new region, determine the feature average value of each sub-file based on the features of the captured images included in each sub-file; and merge the sub-files in each two new regions into one file based on the feature similarity between the feature average values ​​of the sub-files in each two new regions, thereby obtaining the files within the current preset period.

[0109] The embodiments of this invention achieve the following technical effects: A method is proposed that, according to a preset period, the correlation between every two image acquisition devices is determined based on the files obtained in the previous preset period, generating correlation pairs. Then, the image acquisition devices in the correlation pairs that meet a preset threshold are grouped into the same image acquisition device group, and the locations of the image acquisition devices in each image acquisition device group are divided into the same new region, resulting in multiple new regions. This achieves the goal of readjusting the region division based on the correlation between image acquisition devices on the basis of GeoHash region division, avoiding the fixation of region division, and simultaneously ensuring strong correlation between image acquisition devices within the new regions. File aggregation based on these new regions reduces computational load and also improves the accuracy of file aggregation results.

[0110] Obviously, those skilled in the art should understand that the modules or steps of the above-described embodiments of the present invention can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the embodiments of the present invention are not limited to any particular hardware and software combination.

[0111] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, various modifications and variations can be made to the embodiments of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for accumulating travel route files, characterized in that, include: According to a preset cycle, within the current preset cycle, each file obtained in the previous preset cycle is acquired. The file is obtained by dividing the location of the image acquisition device into multiple regions based on the GeoHash encoding of the geographic information of each image acquisition device, then aggregating each snapshot of the image acquisition device in each region to obtain a sub-file, and integrating the sub-files between regions. Each snapshot includes a collection of images generated by the same image acquisition device for the same individual within a preset time. In the same file, among the image acquisition devices to which each snapshot belongs, the correlation degree between every two image acquisition devices is determined, and a correlation degree pair is generated. Based on the correlation degree pairs of the image acquisition devices corresponding to all files, the image acquisition devices in the correlation degree pairs that meet the preset threshold are divided into the same image acquisition device group, resulting in multiple image acquisition device groups. The correlation degree pair includes the correlation degree and the two image acquisition devices that determine the correlation degree. The locations of the image acquisition devices in each image acquisition device group are divided into the same new region, resulting in multiple new regions; Each snapshot captured by the image acquisition device in the new area is archived to obtain a sub-file, and the sub-files between the new areas are integrated to obtain the various files within the current preset period.

2. The method for accumulating travel route files as described in claim 1, characterized in that, Within the same file, for each snapshot belonging to one of the image acquisition devices, the correlation degree between every two image acquisition devices is determined, generating correlation degree pairs. Based on the correlation degree pairs of all the image acquisition devices corresponding to the files, the image acquisition devices in the correlation degree pairs that meet a preset threshold are grouped into the same image acquisition device group, resulting in multiple image acquisition device groups, including: Within the same file, for each snapshot belonging to a particular image acquisition device, a first correlation degree is determined between every two image acquisition devices based on the number of snapshots corresponding to each image acquisition device, and a first correlation degree pair is generated. Based on the first correlation pairs corresponding to all the files, the image acquisition devices in the first correlation pairs whose first correlation meets the first preset threshold are divided into the same image acquisition device group, resulting in multiple image acquisition device groups.

3. The method for accumulating travel route files as described in claim 2, characterized in that, Based on the number of snapshots corresponding to each of the image acquisition devices, a first correlation degree is determined between every two of the image acquisition devices, and a first correlation degree pair is generated, including: Multiply the number of snapshots corresponding to each pair of image acquisition devices, and determine the product as the first correlation degree between each pair of image acquisition devices to generate the first correlation degree pair. Based on the first correlation pairs corresponding to all the files, the image acquisition devices in the first correlation pairs whose first correlation meets a first preset threshold are divided into the same image acquisition device group, resulting in multiple image acquisition device groups, including: For all the first correlation pairs corresponding to the files, at least two first correlation pairs that include the same image acquisition device are merged into one first correlation pair, and the sum of the first correlations of the at least two first correlation pairs is taken as the first correlation of the merged first correlation pair. In all the first association degree pairs, a preset number of the first association degree pairs are randomly determined as cluster centers, wherein the preset number is the same as the number of regions divided according to the GeoHash encoding of the geographic information of each image acquisition device; Based on the first correlation degree included in each first correlation degree pair, clustering is performed on all first correlation degree pairs except for the cluster center based on the preset number of cluster centers. Each cluster center and the image acquisition device included in the first correlation degree pair clustered to that cluster center are divided into the same image acquisition device group, resulting in multiple image acquisition device groups.

4. The method for accumulating travel route files as described in claim 1, characterized in that, Within the same file, for each snapshot belonging to one of the image acquisition devices, the correlation degree between every two image acquisition devices is determined, generating correlation degree pairs. Based on the correlation degree pairs of all the image acquisition devices corresponding to the files, the image acquisition devices in the correlation degree pairs that meet a preset threshold are grouped into the same image acquisition device group, resulting in multiple image acquisition device groups, including: The snapshots within the same file are sorted chronologically to obtain the snapshot order; The capture sequence is divided into multiple time periods according to a preset duration. The image acquisition devices to which each capture belongs in each time period are grouped into a device subset, resulting in multiple device subsets corresponding to each file. Based on the device subsets corresponding to all the files, for each image acquisition device, calculate the co-occurrence frequency between the image acquisition device and all other image acquisition devices except itself, and refer to the co-occurrence frequency as the second correlation degree, and generate a second correlation degree pair, wherein the co-occurrence frequency is the ratio between the number of times two image acquisition devices exist in the same device subset and the total number of device subsets; All the second correlation pairs corresponding to the files are grouped into a first set. The following steps are executed repeatedly until the first set is empty or there are no second correlation pairs in the first set whose second correlation meets the second preset threshold, at which point the loop ends, resulting in multiple groups of image acquisition devices: Take out a pair of second correlation degrees that meet the second preset threshold from the first set, and form a second set including the image acquisition devices included in the taken second correlation degree pair; If there exists a second correlation degree pair in the first set that includes the image acquisition device in the second set and whose second correlation degree meets the second preset threshold, then if so, remove the determined second correlation degree pair from the first set and add the image acquisition device included in the removed second correlation degree pair to the second set, and continue to repeat the current step; otherwise, divide the image acquisition devices in the second set into the same image acquisition device group.

5. The method for accumulating travel route files as described in claim 1, characterized in that, Within the same file, for each snapshot belonging to one of the image acquisition devices, the correlation degree between every two image acquisition devices is determined, generating correlation degree pairs. Based on the correlation degree pairs of all the image acquisition devices corresponding to the files, the image acquisition devices in the correlation degree pairs that meet a preset threshold are grouped into the same image acquisition device group, resulting in multiple image acquisition device groups, including: Within the same file, for each snapshot belonging to a particular image acquisition device, a first correlation degree is determined between every two image acquisition devices based on the number of snapshots corresponding to each image acquisition device, and a first correlation degree pair is generated. Based on the first correlation pair corresponding to all the files, the image acquisition devices in the first correlation pair whose first correlation meets the first preset threshold are divided into the same first image acquisition device group, resulting in multiple first image acquisition device groups. The snapshots within the same file are sorted chronologically to obtain the snapshot order; The capture sequence is divided into multiple time periods according to a preset duration. The image acquisition devices to which each capture belongs in each time period are grouped into a device subset, resulting in multiple device subsets corresponding to each file. Based on the device subsets corresponding to all the files, for each image acquisition device, calculate the co-occurrence frequency between the image acquisition device and all other image acquisition devices except itself, and refer to the co-occurrence frequency as the second correlation degree, and generate a second correlation degree pair, wherein the co-occurrence frequency is the ratio between the number of times two image acquisition devices exist in the same device subset and the total number of device subsets; All the second correlation pairs corresponding to the files are grouped into a first set. The following steps are executed repeatedly until the first set is empty or there are no second correlation pairs in the first set whose second correlation meets the second preset threshold, at which point the loop ends, resulting in multiple groups of second image acquisition devices: Take out a pair of second correlation degrees that meet the second preset threshold from the first set, and form a second set including the image acquisition devices included in the taken second correlation degree pair; Determine whether there exists a second correlation degree pair in the first set that includes the image acquisition device in the second set and whose second correlation degree meets the second preset threshold. If yes, remove the determined second correlation degree pair from the first set and add the image acquisition device included in the removed second correlation degree pair to the second set, and continue to repeat the current step; if no, divide the image acquisition devices in the second set into the same second image acquisition device group. Determine the number of identical image acquisition devices simultaneously included in each of the first image acquisition device groups and each of the second image acquisition device groups; Based on the size of the quantity, each first image acquisition device group and each second image acquisition device group include the image acquisition devices in the same image acquisition device group, resulting in multiple image acquisition device groups.

6. The method for accumulating travel route files as described in claim 5, characterized in that, Based on the quantity, each first image acquisition device group and each second image acquisition device group are grouped into the same image acquisition device group, including: Based on the number of identical image acquisition devices simultaneously included in each of the first image acquisition device groups and each of the second image acquisition device groups, a ratio is calculated between the number of identical image acquisition devices and the total number of image acquisition devices included in the first image acquisition device group, and this ratio is called the first ratio; a ratio is also calculated between the number of identical image acquisition devices and the total number of image acquisition devices included in the second image acquisition device group, and this ratio is called the second ratio. When both the first ratio and the second ratio are greater than the third preset threshold, the image acquisition devices included in the first image acquisition device group and the second image acquisition device group are classified into the same image acquisition device group.

7. The method for accumulating travel route files as described in any one of claims 1 to 6, characterized in that, Each snapshot captured by the image acquisition device within the new area is aggregated into sub-files, and the sub-files between the new areas are integrated to obtain the various files within the current preset period, including: In each new region, based on the feature similarity between the captured images, each captured image is divided into multiple sub-files, wherein each sub-file includes at least one captured image; In each new region, the average feature value of each sub-file is determined based on the features of the captured images included in each sub-file; Based on the feature similarity between the feature averages of the sub-files in each of the two new regions, the sub-files in each of the two new regions are merged into one file to obtain the files within the current preset period.

8. A file aggregation device for a travel path, characterized in that, include: The acquisition module is used to acquire, within the current preset period, each file obtained in the previous preset period. The file is obtained by dividing the location of the image acquisition device into multiple regions according to the GeoHash encoding of the geographic information of each image acquisition device, aggregating each snapshot of the image acquisition device in each region to obtain a sub-file, and integrating the sub-files between regions. Each snapshot includes a collection of images generated by the same image acquisition device for the same individual at a preset time. The device grouping module is used to determine the correlation degree between each pair of image acquisition devices in the same file, generate correlation degree pairs, and divide the image acquisition devices in the correlation degree pairs that meet the preset threshold into the same image acquisition device group according to the correlation degree pairs of all the file-related image acquisition devices, thereby obtaining multiple image acquisition device groups. The correlation degree pair includes the correlation degree and the two image acquisition devices that determine the correlation degree. The region division module is used to divide the location of the image acquisition devices included in each image acquisition device group into the same new region, resulting in multiple new regions; The file aggregation module is used to aggregate each snapshot captured by the image acquisition device in the new area to obtain sub-files, and to integrate the sub-files between the new areas to obtain the files within the current preset period.

9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method for accumulating travel path files according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that performs the method for assembling a travel path file according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Target object clustering method and device, electronic equipment and readable storage medium

    CN116152535A

  • Device clustering method and apparatus, and computer device and storage medium

    WO2023024670A1