Association methods, electronic devices and computer-readable storage media
By searching the target files for target devices detected by the bound device detectors within a preset time interval, the problem of low accuracy of target files is solved, and the efficient identification of target devices for the same target object is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-16
- Publication Date
- 2026-03-13
AI Technical Summary
Existing target clustering methods suffer from low accuracy in target files due to variations in capture angles and image clarity across different scenarios, making it difficult to efficiently identify target devices for the same target object.
By acquiring target images from the target file, the system locates target devices detected by the bound device detector within a preset time interval, establishes a binding relationship between the capture device and the device detector, narrows the search range, and identifies the target devices associated with the target file.
It improves the efficiency and accuracy of identifying target devices for the same target object, reduces errors, and ensures the effective locating of target devices within a preset time period.
Smart Images

Figure CN114648056B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to a correlation method, electronic device, and computer-readable storage medium. Background Technology
[0002] With the increasing popularity of smart cities, target trajectory data for each object can be generated based on data captured by cameras, thus creating target profiles. These target profiles can provide important information on population distribution and point area monitoring within the city.
[0003] Most existing target clustering methods are based on deep learning technology, which extracts the features of objects in captured images and performs similarity comparison to cluster objects. However, due to differences in capture angles and image clarity in different scenarios, the accuracy of the target profiles formed so far needs to be further improved. Summary of the Invention
[0004] This application provides an association method, an electronic device, and a computer-readable storage medium that can efficiently identify a target device that corresponds to the same target object as a target file.
[0005] A first aspect of this application provides an association method, the method comprising: acquiring a target file, the target file including target images corresponding to the same target object captured by a capture device within a target area; searching for a device detector bound to at least one capture device corresponding to each of the target images, and a target device detected within a first time period corresponding to the target image, wherein the interval between the start time point and the end time point of the first time period corresponding to the target image and the capture time corresponding to the target image is greater than a preset time interval; determining the target device associated with the target file based on the found target device, wherein the target device associated with the target file and the target file correspond to the same target object; wherein, in advance, in response to the time interval between the capture device capturing the target object and the device detector collecting information from the target device carried by the target object not exceeding the preset time interval, the capture device and the device detector are bound together.
[0006] A second aspect of this application provides an electronic device, which includes a processor, a memory, and a communication circuit. The processor is coupled to the memory and the communication circuit, respectively. The memory stores program data, and the processor executes the program data in the memory to implement the steps in the above method.
[0007] A third aspect of this application provides a computer-readable storage medium storing a computer program that can be executed by a processor to implement the steps in the above-described method.
[0008] The beneficial effects are as follows: In response to the time interval between the capture device capturing the target object and the device detector collecting information on the target device carried by the target object not exceeding a preset time interval, this application binds the capture device and the device detector, so that the target device carried by the target object corresponding to the target file can only be among the target devices detected by the device detector bound to the capture device corresponding to the target image within the first time period corresponding to the target image. This can narrow down the scope of searching for target devices associated with the target file and efficiently identify the target device corresponding to the same target object as the target file. Attached Figure Description
[0009] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of 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. Wherein:
[0010] Figure 1 This is a flowchart illustrating one implementation method of the method associated with this application;
[0011] Figure 2 yes Figure 1 A flowchart illustrating step S120;
[0012] Figure 3 yes Figure 1 A flowchart illustrating step S130;
[0013] Figure 4 yes Figure 3 A flowchart illustrating step S131;
[0014] Figure 5 This is a schematic diagram of the structure of one embodiment of the electronic device of this application;
[0015] Figure 6 This is a schematic diagram of another embodiment of the electronic device of this application;
[0016] Figure 7 This is a schematic diagram of one embodiment of the computer-readable storage medium of this application. Detailed Implementation
[0017] The technical solutions of the embodiments of this application will be clearly and completely described 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 of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0018] See Figure 1 , Figure 1 This is a flowchart illustrating one embodiment of the method associated with this application, which includes:
[0019] S110: Obtain the target file.
[0020] The target file comprises target images captured by cameras within the target area that correspond to the same target object; that is, all target images in the target file represent the same target object. Specifically, multiple images to be clustered within the target area are pre-clustered, and images corresponding to the same target object are grouped into one file, thus obtaining target files corresponding to different target objects. The target object can be any moving object; no specific restrictions are imposed here.
[0021] In the process of clustering multiple images to be clustered, clustering is performed based on a preset clustering threshold. Specifically, two images to be clustered with a similarity exceeding the clustering threshold are grouped into the same file.
[0022] S120: Locate the device detector bound to the capture device corresponding to at least one target image, and the target device detected within the first time period corresponding to the target image.
[0023] For each target image in the target file, there is a corresponding capture device and capture time. The capture time corresponding to the target image can be a capture time point or a capture time period.
[0024] The device detector is used to collect device information of the target device, which can be a mobile phone, computer or other device. In this embodiment, the device detector is a WIFI collection probe, which can collect the MAC information of target devices such as mobile phones and computers that enter its collection range.
[0025] The process involves pre-acquiring all capture devices and detectors within the target area. In response to the capture devices and detectors meeting preset requirements, a binding relationship is established between the capture devices and detectors. The preset requirements are: the time interval between the capture device capturing the target object and the detector collecting information from the target device carried by the target object does not exceed a preset time interval.
[0026] Specifically, if the interval between the capture device A capturing object C and the device detector B collecting information from the target device carried by object C is less than a preset time interval, then the capture device A and the device detector B will be bound together.
[0027] It is understandable that the number of detectors attached to a single camera capture device could be zero, one, or multiple.
[0028] The first time period corresponding to the target image includes the capture time corresponding to the target image. When the capture time corresponding to the target image is a capture time point, the interval between the start time point, the end time point, and the capture time point of the first time period is greater than a preset time interval. When the capture time corresponding to the target image is a capture time period, the interval between the start time point and the start time point of the capture time period, and the interval between the end time point and the end time point of the capture time period are both greater than the preset time interval.
[0029] Step S120 can be performed on every target image in the target file, or it can be performed on a subset of the target images. For the target image to be operated on, first find the capture device and capture time corresponding to the target image, then determine the device detector bound to the capture device, and finally determine the target devices detected by each device detector within the first time period corresponding to the capture time.
[0030] S130: Based on the found target device, determine the target device associated with the target file.
[0031] In this context, the target device associated with the target file and the target file correspond to the same target object, that is, the target device associated with the target file is the target device carried by the target object corresponding to the target file.
[0032] To better understand, the solution will be illustrated with examples:
[0033] The capture device A and the device detector B are bound together. The capture time when the capture device A captures the object C is time point T1. Then the time point when the device detector B collects information on the target device carried by the object C must be between T1-T and T1+T, and will not be in other time periods, where T is a preset time interval.
[0034] Therefore, it is only necessary to search for the target device carried by object C among the target devices detected by device detector B between T1-T and T1+T, which can shorten the search range and improve the search efficiency.
[0035] Therefore, the target device carried by the target object corresponding to the target file can only be located in the target device detected by the device detector bound to the capture device corresponding to the target image within the first time period corresponding to the target image. Therefore, step 130 can search for the target device that is the same as the target object corresponding to the target file among the target devices found in step S120, which can narrow the search range and efficiently determine the target device that is the same as the target object corresponding to the target file.
[0036] The number of target devices associated with the target file can be zero, one, or more.
[0037] In this embodiment, by detecting the distance between the capture device and the device detector, it is determined whether the capture device and the device detector can be bound together. Specifically, in advance, in response to the distance between the capture device and the device detector not exceeding the corresponding distance threshold, it is determined that the time interval between the capture device capturing the target object and the device detector collecting information from the target device carried by the target object does not exceed a preset time interval.
[0038] Specifically, the location of all capture devices and all device detectors within the target area is obtained, which may be latitude and longitude information. Then, for each capture device, the distance between it and each device detector is calculated. If the distance between a capture device and a device detector is less than the corresponding distance threshold, it is determined that the capture device captures object A and the device detector collects information from the target device carried by object A within a preset time interval. Then, the capture device and the device detector are bound together.
[0039] In one application scenario, the corresponding distance threshold d max The formula for calculating d is: max = d1 + d2 + d3 × t, where d1 is the maximum capture distance of the capture device (meaning the target object can only be captured if the distance between it and the capture device is less than or equal to d1), d2 is the maximum detection distance of the device's detector (meaning the detector can only collect information from the target object if the distance between it and the detector is less than or equal to d2), t is the detection time interval of the device's detector (meaning the time interval between two consecutive detections of the target object), and d3 is the maximum movement distance of the target object per unit time. In essence, d3 × t represents the maximum movement distance of the target object within the detection time interval of the device's detector. The maximum movement distance d3 of the target object per unit time can be determined in advance through numerous experiments.
[0040] In this application scenario, the distance threshold is related to the model of the capture device or the device detector. Different capture devices or device detectors may have different corresponding distance thresholds.
[0041] In other application scenarios, the corresponding distance threshold can also be a fixed value preset by the designer, regardless of the model of the capture device or the device detector.
[0042] To reduce computational load, please refer to... Figure 2 Step S120 specifically includes:
[0043] S121: In the target file, identify the target image whose corresponding capture time falls within the second time period and form the first sub-file.
[0044] S122: Locate the device detector bound to the capture device corresponding to at least one target image in the first sub-file, and the target device detected within the corresponding first time period.
[0045] Specifically, the target images captured within the second time period are searched from the target archive. Then, the target devices detected within the corresponding first time period are identified from at least one of these target images and the device detectors bound to the capture devices.
[0046] In this embodiment, the second time period is the closest time period to the present. In other embodiments, the second time period can also be a time period on a previous day. In short, as long as there is a target image that was captured within the second time period, it is acceptable.
[0047] This can be performed on a portion of the target images in the first sub-file, or it can be performed on each target image in the first sub-file.
[0048] It should be noted that in other embodiments, step S120 may also involve randomly selecting a number of target images from the target file, and then determining the target device detected by the device detector bound to the capture device corresponding to each of these target images within the corresponding first time period.
[0049] The process of creating target files typically includes: clustering images captured by various cameras within the target area for the day; grouping two images with a similarity exceeding the clustering threshold into the same file, thus creating multiple target files corresponding to different target objects; and then performing file-downloading processing on the target files obtained that day. The file-downloading process includes: determining the similarity between each target file obtained that day and each existing target file; if the similarity exceeds the clustering threshold, the target file obtained that day is merged into the corresponding existing target file; if the similarity does not meet the requirements, the target file obtained that day is treated as a newly created file.
[0050] Considering the above process, this implementation can divide the second time period into days. Specifically, the second time period is the most recent one day, two days, or three days, etc. Of course, in other implementations, the second time period can also be the most recent two hours, five hours, or 20 hours, etc.
[0051] See Figure 3 In this embodiment, step S130, which determines the target device associated with the target file, includes:
[0052] S131: Based on at least one target image in the first sub-file, determine the overlap assessment value corresponding to each target device.
[0053] Among them, the overlap evaluation value corresponding to the target device represents the degree of overlap between the movement trajectory of the target device and the target object corresponding to the target file in the second time period.
[0054] In this case, at least one target image in the first sub-file shows the motion trajectory of the target object corresponding to the target file in the second time period. For example, at least one target image is arranged in order from front to back according to the capture time, and then the capture device corresponding to each of the at least one target image is obtained. Based on the position of the capture device from front to back, the motion trajectory of the target object corresponding to the target file in the second time period can be shown.
[0055] For each target device found, the device detectors that detected the target device in the target area during the second time period can be found. The positions of each device detector are obtained in the order of detection time from front to back. Based on the positions obtained from front to back, the movement trajectory of the target device during the second time period can be displayed.
[0056] It is understandable that the higher the overlap between the movement trajectory of the target device in the second time period and the movement trajectory of the target object corresponding to the target file in the second time period, the higher the probability that the target object and the target file correspond to the same target object.
[0057] S132: Based on the overlap assessment value corresponding to each target device, determine the target devices associated with the target file.
[0058] In one application scenario, the overlap assessment value corresponding to the target device is directly proportional to the overlap of the movement trajectory of the target device and the target object corresponding to the target file in the second time period. That is, the higher the overlap assessment value corresponding to the target device, the higher the overlap of the movement trajectory of the target device and the target object corresponding to the target file in the second time period.
[0059] In this application scenario, step S132 can be: if the overlap evaluation value corresponding to the target device is greater than the evaluation value threshold, then it is determined that the target device and the target file correspond to the same target object. At this time, there may be multiple target devices whose overlap evaluation values are all greater than the evaluation value threshold. Therefore, the target devices finally determined to be associated with the target file can be zero, one, or more. Alternatively, step S132 can also be: determine the maximum overlap evaluation value among the determined overlap evaluation values. If the maximum overlap evaluation value is greater than the evaluation value threshold, then it is determined that the target device corresponding to the maximum overlap evaluation value and the target file correspond to the same target object. At this time, the target devices finally determined to be associated with the target file are either zero or one.
[0060] In other application scenarios, the overlap evaluation value corresponding to the target device can also be inversely proportional to the overlap of the motion trajectory of the target object corresponding to the target device and the target file in the second time period. In this case, step S132 is the opposite of step S132 in the above application scenario, and will not be described in detail here.
[0061] It is understandable that the longer the second time period determined in step S121, the higher the accuracy of finally identifying the target device that corresponds to the same target object as the target file.
[0062] See Figure 4 In this embodiment, step S131 specifically includes:
[0063] S1311: Based on at least one target image in the first sub-file, determine the first evaluation value and the second evaluation value corresponding to each target device.
[0064] Among them, the first evaluation value corresponding to the target device represents the overlap between the capture device bound to the device detector that detected the target device in the target area during the second time period and the capture device that captured the target object corresponding to the target file during the second time period.
[0065] It is understandable that if the target device and the target file correspond to the same target object, then the capture device bound to the device detector that detects the target device will definitely capture the user of the target device. The capture device bound to the device detector that detects the target device has a high degree of overlap with the capture device corresponding to the target image in the target file.
[0066] If the target device and the target file do not correspond to the same target object, the capture device bound to the device detector of the target device may not necessarily capture the user of the target device. The overlap between the capture device bound to the device detector of the target device and the capture device corresponding to the target image in the target file is low.
[0067] The second evaluation value corresponding to the target device represents the ratio of the path length traversed by the target object corresponding to the target file during the second time period to the path length traversed by the target device during the second time period.
[0068] It is understandable that if the target device and the target file correspond to the same target object, then the path length traversed by the target object corresponding to the target file in the second time period should be equal to or nearly equal to the path length traversed by the target device in the second time period.
[0069] If the target device and the target file do not correspond to the same target object, then the path length traversed by the target object corresponding to the target file in the second time period will differ significantly from the path length traversed by the target device in the second time period.
[0070] S1312: Determine the overlap assessment value for each target device based on at least one of the first assessment value and the second assessment value corresponding to each target device.
[0071] The overlap assessment value of the target equipment can be determined based on either the first assessment value or the second assessment value, or it can be determined based on both the first assessment value and the second assessment value.
[0072] In one application scenario, the process of determining the first evaluation value corresponding to the target device includes:
[0073] (a1) Determine the first number of at least one target image in the first sub-file.
[0074] (b1) Determine a second number of first target images in at least one target image in the first sub-file, wherein the device detector bound to the capture device corresponding to the first target image detects the target device within the corresponding first time period.
[0075] (c1) Determine the first ratio of the second quantity to the third quantity to obtain the first evaluation value corresponding to the target equipment, wherein the third quantity is equal to the sum of the first quantity and the first positive number.
[0076] The process of determining the first evaluation value is illustrated with examples:
[0077] Assume that at least one target image in the first sub-file is arranged in order of capture time from front to back as: C1, C2, C3, C4, and C5, and the corresponding capture devices are N1, N2, N3, N4, and N5, respectively, and the corresponding first time periods are T1, T2, T3, T4, and T5, respectively. In this case, the first quantity is determined to be 5.
[0078] In this scenario, the detector attached to capture device N1 collects device information of the target device in the corresponding first time period T1; the detector attached to capture device N3 collects device information of the target device in the corresponding first time period T3; the detector attached to capture device N2 does not collect device information of the target device in the corresponding first time period T2; the detector attached to capture device N4 does not collect device information of the target device in the corresponding first time period T4; and the detector attached to capture device N5 does not collect device information of the target device in the corresponding first time period T5. At this point, target images C1 and C2 are determined as the first target images, and the second quantity is 2.
[0079] Then, the first ratio of 2 to the third quantity is calculated to obtain the first evaluation value corresponding to the target device, where the third quantity is equal to the sum of 5 and the first positive number.
[0080] The first positive number can be any positive number, such as 1, 5, or other quantities.
[0081] The reason for calculating the ratio of the second quantity to the third quantity, rather than the ratio of the second quantity to the first quantity, is to avoid the first ratio being equal to 1. This avoidance of the first ratio being equal to 1 is to distinguish the following situations:
[0082] Suppose there are two first sub-files, one containing 100 target images and the other containing 5 target images. In both first sub-files, the detector of the capture device corresponding to each target image detects the target device within the corresponding first time period. In other words, the target images in both first sub-files are first target images.
[0083] If the ratio of the second quantity to the first quantity is directly determined as the first evaluation value corresponding to the target device, the first evaluation value corresponding to the target device in the two first sub-files mentioned above is 1. However, in reality, the probability that the target device corresponds to the same target object as the first sub-file containing 100 target images is greater than the probability that the target device corresponds to the same target object as the first sub-file containing 5 target images.
[0084] If we calculate the ratio of the second quantity to the third quantity, taking the first positive number as 1 as an example, one is... Approximately equal to 0.99, the other is... It is approximately equal to 0.83, which is consistent with the actual value.
[0085] In other words, the range of the first ratio determined by the above method is [0, 1).
[0086] It should be noted that, in other embodiments, the ratio of the second quantity to the first quantity can also be directly used as the first evaluation value corresponding to the target device.
[0087] In one application scenario, the process of determining the second evaluation value corresponding to the target device includes:
[0088] (a2) Among the device detectors bound to the capture device corresponding to at least one target image, find the first device detector, and the first device detector detects the target device within the corresponding first time period.
[0089] (b2) Determine the first distance between any two first device detectors and find the largest first distance.
[0090] (c2) Determine the second device detector that detects the target device within the target area during the second time period.
[0091] (d2) Determine the second distance between any two second target device detectors and find the largest second distance.
[0092] (e2) Determine the second ratio of the largest first distance to the third distance to obtain the second evaluation value corresponding to the target device, wherein the third distance is equal to the sum of the largest second distance and the second positive number.
[0093] The process of determining the second evaluation value is illustrated with examples:
[0094] Assume that at least one target image in the first sub-file is arranged sequentially from first to last according to the capture time as: C1, C2, C3, C4, and C5, and the corresponding capture devices are N1, N2, N3, N4, and N5, respectively. The corresponding first time periods are T1, T2, T3, T4, and T5, respectively. Furthermore, the device detectors bound to capture device N1 are W1 and W2, those bound to capture device N2 are W1 and W3, those bound to capture device N3 are W4 and W5, those bound to capture device N4 are W2 and W4, and those bound to capture device N5 are W2.
[0095] Among them, device detectors W1 and W2 collected device information of the target device in the first time period T1, device detectors W1 and W3 did not collect device information of the target device in the second time period T2, device detectors W4 and W5 did not collect device information of the target device in the second time period T3, device detectors W2 and W4 collected device information of the target device in the second time period T4, and device detector W2 did not collect device information of the target device in the second time period T5.
[0096] Then, device detectors W1, W2, and W4 are identified as the first device detectors, and the first distance between each pair is determined. Then, the largest first distance is determined.
[0097] Simultaneously, find all second device detectors that detected the target device within the target area during the second time period, then determine the first distance between any two second device detectors, and then determine the maximum second distance.
[0098] Finally, a second ratio of the maximum first distance to the third distance is determined. This second ratio is the second evaluation value corresponding to the target device, where the third distance is equal to the sum of the maximum second distance and the second positive number.
[0099] The second positive number can be any positive number, for example, the second positive number is 1 or 10, etc. In one application scenario, the second positive number is the distance threshold mentioned above.
[0100] The principle behind setting the second positive number is the same as that for setting the first positive number. It is also based on the actual situation to avoid the second ratio being equal to 1. That is to say, the range of the second ratio is [0, 1).
[0101] In one application scenario, step S1312 specifically includes: determining the product of the square of the first evaluation value corresponding to each target device and the square root of the corresponding second evaluation value to obtain the overlap evaluation value corresponding to each target device.
[0102] To amplify the difference in the first evaluation value corresponding to a large or small number of target images in the first sub-file, the first evaluation value is squared. Specifically, for the same target device, if there are two first sub-files and the first evaluation values corresponding to the target device and the two first sub-files are equal or nearly equal, but if the number of target images in one first sub-file is much greater than that in the other, in reality, the probability that the target device corresponds to the same target object in the two first sub-files should be different. Therefore, to amplify this difference, the first evaluation value is squared.
[0103] Considering that factors such as capture equipment and image clarity may lead to low similarity between two target images of the same target object, these two target images may not be classified into the same file during the clustering process. Therefore, the target file may miss some target images. If target images are missed, the capture equipment that captured the target object corresponding to the target file in the second time period will also be missed, and the second evaluation value will be too small. Therefore, in order to avoid the second evaluation value being too small, the second evaluation value is square rooted.
[0104] In other implementations, the product of the first evaluation value and the second evaluation value can be directly determined as the overlap evaluation value corresponding to the target device.
[0105] In this embodiment, the overlap evaluation value corresponding to each target device can also be determined in segments. In this case, step S131 includes:
[0106] (a3) Divide the second time period into multiple first sub-time periods.
[0107] The second time period is longer than one day (24 hours), and it can be divided into 24-hour periods. That is, the length of the first sub-time period is 24 hours, and the starting time of each first sub-time period is midnight of the day.
[0108] Of course, this application does not impose any limitation on the length of the first sub-time period.
[0109] (b3) In at least one target image in the first sub-file, determine the target image whose capture time is within each first sub-time period, and form the second sub-file corresponding to each first sub-time period.
[0110] It is understandable that if there is no target image in a certain first sub-time period, then the number of target images in the second sub-file corresponding to that first sub-time period is zero, indicating that the target object corresponding to the target file did not go out during that time period.
[0111] (c3) Based on each second sub-file, determine the sub-overlap evaluation value corresponding to each target device and each first sub-time period. The sub-overlap evaluation value corresponding to the target device and the first sub-time period represents the degree of overlap between the movement trajectory of the target device and the target object corresponding to the target file in the first sub-time period.
[0112] Among them, the evaluation value of the overlap of the motion trajectory of the target object corresponding to each target device and target file in each first sub-time period is determined, namely the sub-overlap evaluation value.
[0113] The process of determining the sub-overlap assessment value is similar to the process of determining the overlap assessment value described above, which is equivalent to replacing the second time period with the first sub-time period and replacing the first sub-file with the second sub-file.
[0114] (d3) Determine the ratio of the sum of the sub-overlap evaluation values corresponding to each target device to the number of the first sub-time period of the target, and obtain the overlap evaluation value corresponding to each target device, wherein the number of target images whose capture time is within the first sub-time period of the target is at least one.
[0115] In response to the fact that the number of target images corresponding to the first sub-time period is not zero, the first sub-time period is defined as the target first sub-time period. It can be understood that the target first sub-time period is the time period when the user goes out.
[0116] For each target device, calculate the sum of its corresponding sub-overlap evaluation values, and then determine the sum and the number of the first sub-time period of the target device to obtain the overlap evaluation value corresponding to the target device.
[0117] In this embodiment, in order to reduce the amount of computation, the first sub-file will be deduplicated in advance. The deduplication process includes: dividing the second time period into multiple second sub-time periods; and deduplicating the first sub-file so that in the deduplicated first sub-file, the number of target images corresponding to the same capture device within the same second sub-time period is at most one.
[0118] The second sub-time period is shorter than the first sub-time period, and the length of the second sub-time period can be 1 second, 30 seconds, or 1 minute, etc.
[0119] During the deduplication process, if multiple target images correspond to the same capture device within a second sub-time period, then these multiple target images are deduplicated, and only one target image is retained.
[0120] In one application scenario, the length of the second sub-time period is greater than the preset time interval. In this case, the specific process of finding the first time period corresponding to the target image can be as follows: determine the second sub-time period in which the capture time of the target image is located, and then take the time period consisting of the three second sub-time periods: the first second sub-time period adjacent to the second sub-time period, the second sub-time period itself, and the second sub-time period adjacent to the second sub-time period itself as the first time period corresponding to the target image.
[0121] In this embodiment, in order to reduce the amount of computation, step S122 includes: determining a target device set, which includes device detectors in the target area and target devices detected during the second time period; removing illegal target devices from the target device set, and / or removing target devices that remain stationary during the second time period from the target device set; and in the target device set, finding the target devices detected during the corresponding first time period by the device detectors bound to the capture device corresponding to at least one target image.
[0122] Specifically, if the target device is an illegal device, then two different target devices may have the same device information, making it impossible to determine which target device truly corresponds to the same object as the target file.
[0123] In one application scenario, when the device detector collects the MAC information of the target device, it can remove illegal target devices based on the globally unique organization identifier (OUI) library.
[0124] If the target device remains stationary during the second time period, it means that the target device has not left the house. The reason why the device detector detects it is that the user's residence is within the detection range of the device detector, but the user has not left the house, so the capture device cannot capture it and therefore removes it.
[0125] The standard for determining whether the target device is stationary is as follows: if the target device is always detected by one or the same batch of device detectors during the second time period, that is, if the number of device detectors that detect the target device does not exceed the number threshold, then the target device is determined to be stationary.
[0126] If the overlap assessment value corresponding to the target device is determined in a segmented manner, then before determining the sub-overlap assessment value corresponding to the target device and the first sub-time period, it is necessary to perform deduplication processing on multiple second sub-files and multiple sub-target device sets respectively. The multiple sub-target device sets respectively include the target devices detected by the device detectors in the target area in multiple first sub-time periods.
[0127] Specifically, multiple second sub-files and a set of sub-target devices corresponding to each second sub-file are determined. The set of sub-target devices corresponding to the second sub-file includes: device detectors within the target area and target devices detected within the first sub-time period corresponding to the second sub-file.
[0128] Next, the following deduplication process is performed on each second sub-file and its corresponding sub-target device set:
[0129] The second sub-file is deduplicated so that within the same second sub-time period, the number of target images corresponding to the same capture device is at most one.
[0130] And remove illegal target devices from the sub-target device set, and / or remove target devices concentrated in the corresponding first sub-time period that remain stationary.
[0131] To better understand the above solution, we will explain it in detail with examples:
[0132] First, acquire all capture devices and detectors in the target area, and establish binding relationships between capture devices and detectors that meet the binding requirements.
[0133] Obtain file B of target object A, find the target images from the most recent N days in file B, and then perform the following operations on the sub-files formed by the target images of each day:
[0134] For sub-file A1, first determine the corresponding sub-target device set C, which includes the target devices detected by the device detectors in the target area on the same day corresponding to sub-file A1.
[0135] The deduplication process for sub-file A1 and sub-target device set C includes:
[0136] The time of each day is divided into time blocks, for example, by dividing the time of each day into blocks per second, resulting in 86,400 time blocks.
[0137] If, within a certain time block, sub-file A1 contains a target image corresponding to the same capture device, then deduplication is performed until only one image is retained.
[0138] If an illegal target device exists in the sub-target device set C, the illegal target device is removed, and / or, if a stationary target device exists in the sub-target device set C, the stationary target device is removed.
[0139] After deduplication, the sub-file A1 and sub-target device set C are processed as follows:
[0140] For each target image in subfile A1, its corresponding first time period is determined, which is time block T. i-1 T i And T i+1 The time period that makes up T i T represents the time block in which the target image was captured. i-1 T i+1 These are the two time blocks adjacent to each other in this time block.
[0141] Then, locate the device detector that is bound to the capture device corresponding to each target image, and find the target device detected within the first time period corresponding to that target image.
[0142] Next, for each target device found, the following steps will be performed, taking target device L as an example:
[0143] In response to the device detector bound to the capture device corresponding to the target image, the target device L is detected within the first time period corresponding to the target image, and the target image is defined as the first target image.
[0144] In response to a certain device detector bound to the capture device corresponding to the target image, if the target device L is detected within the first time period corresponding to the target image, the device detector is defined as the target device detector; after the target device detector is found, the first distance between any two target device detectors is determined, and the largest first distance is found.
[0145] On the day of querying sub-file A1, the device detectors that detected the target device within the target area are identified. Then, the second distance between any two device detectors is determined, and the largest second distance is found.
[0146] Next, the sub-overlap evaluation value S corresponding to the target device L is determined according to the following formula:
[0147] Where T1 is the number of the first target images, T2 is the number of target images in sub-file A1, d is the maximum first distance, d′ is the maximum second distance, and d max The distance threshold mentioned above is used. After the above steps, the sub-overlap assessment value for target device L each day over N days can be determined. Then, the corresponding sub-overlap assessment values are added together to obtain a sum. This sum is then divided by the number of days target object A went out in the last N days to obtain the overlap assessment value for target device L over N days. It can be understood that the number of days target object A went out in the last N days is equal to the number of sub-files containing at least one target image. That is, if the number of target images in the sub-files for a certain day is zero, it means that target object A did not go out that day.
[0148] By analogy, the overlap assessment value corresponding to each target device can be determined.
[0149] Finally, if the overlap assessment value corresponding to the target device is greater than the threshold, then the target device is determined to be the device carried by target object A.
[0150] The above describes in detail the process of identifying the target device associated with the target file from the found target devices. The following describes the specific applications after identifying the associated target device:
[0151] In one application scenario, the target devices associated with multiple target files are determined according to the above method. In this case, the association method further includes:
[0152] S140: In response to multiple target files being associated with the same target device at the same time, merge the multiple target files.
[0153] Specifically, if multiple target files are associated with the same target device at the same time, it means that the multiple target files correspond to the same target object, and the target files corresponding to the same target object are then merged.
[0154] The above solution can avoid the following defects in the prior art:
[0155] In existing technologies, due to factors such as capture angle and image clarity, the similarity between target images of the same target object is lower than the clustering threshold. Therefore, during the clustering process, there is a phenomenon where one target object corresponds to multiple files.
[0156] The aforementioned target device associated with the target file can determine whether a problem of one target object corresponding to multiple files has occurred. After confirming that the problem exists, multiple target files corresponding to the same target object can be aggregated.
[0157] In this application scenario, in order to further improve the accuracy, before merging multiple target files that are simultaneously associated with the same target device, it is also necessary to verify whether the multiple target files truly correspond to the same target object. At this time, step S140 includes: determining the similarity between any two target files; and merging the corresponding two target files in response to the similarity being greater than a first similarity threshold.
[0158] Specifically, only two target files with a similarity exceeding the first similarity threshold will be further determined to correspond to the same target object, and then merged.
[0159] One possibility for the existence of multiple target files associated with the same target object is that the capture angle and image clarity are different. Under different capture angles and different clarity, the similarity between two target images of the same target object is low. Therefore, compared with the normal clustering process, it is necessary to reduce the clustering threshold. Thus, the first similarity threshold is set to be less than the clustering threshold (the third similarity threshold). The normal clustering process is to perform clustering processing on multiple images to be clustered to obtain the target file.
[0160] In another application scenario, after obtaining the target device associated with the target file, trajectory completion processing can be performed on the target file. This process includes:
[0161] (a4) In the target file, identify the target image whose corresponding capture time is within the third time period and form the third sub-file.
[0162] The third time period can be any time period, such as the most recent day, the most recent 5 hours, or 13:00-15:00 on a previous day.
[0163] (b4) Determine the device detectors bound to the capture devices corresponding to each target image in the third sub-file, and form the first set of device detectors.
[0164] (c4) Identify the device detectors of the associated target devices collected in the target area during the third time period, and form a second set of device detectors.
[0165] (d4) Find the target device detector that is in the second device detector set but not in the first device detector set.
[0166] Specifically, a device detector that is in the second set of device detectors but not in the first set of device detectors is defined as a target device detector.
[0167] If a target device detector exists, it means that the target device detector has detected the target device associated with the target file. However, the capture device bound to the target device detector has not captured the target object corresponding to the target file, which is not normal. The only reason for this phenomenon is that the image captured by the capture device bound to the target device detector was missed during the clustering process.
[0168] (e4) Locate the capture device bound to each target device detector and capture images within the corresponding fourth time period. The start and end times of the fourth time period corresponding to the target device detector and the time during which the target device detector collects information from the associated target device are greater than a preset time threshold.
[0169] (f4) Add the found images to the target file.
[0170] Based on the above analysis, it can be seen that the capture device bound to the target device detector should also capture the target object before and after the target device detector detects the associated target device. Therefore, the images captured by the capture device bound to the target device detector in the corresponding fourth time period are considered as missed images and are added to the target file.
[0171] To further improve accuracy, before assigning the found image to the target file, it is necessary to determine the similarity between the found image and the target file. If the similarity between the found image and the target file is greater than the second similarity threshold, the found image will be assigned to the target file.
[0172] Similar to the above application scenarios, considering that the reason for missing images may be due to different capture angles and image clarity, the similarity between two target images of the same target object is low under different capture angles and different clarity. Therefore, compared with the normal clustering process, it is necessary to reduce the clustering threshold at this time. Thus, the second similarity threshold is also set to be lower than the clustering threshold (third similarity threshold).
[0173] See Figure 5 , Figure 5 This is a schematic diagram of one embodiment of the electronic device of this application. The electronic device 200 includes a processor 210, a memory 220, and a communication circuit 230. The processor 210 is coupled to the memory 220 and the communication circuit 230 respectively. The memory 220 stores program data. The processor 210 executes the program data in the memory 220 to implement the steps in any of the above embodiments. The detailed steps can be found in the above embodiments and will not be repeated here.
[0174] The electronic device 200 can be any device with algorithm processing capabilities, such as a computer or mobile phone, and there are no restrictions on it.
[0175] See Figure 6 , Figure 6 This is a schematic diagram of one embodiment of the electronic device of this application. The electronic device 300 includes an acquisition module 310, a search module 320, and a determination module 330.
[0176] The acquisition module 310 is used to acquire target files, which include target images of the same target object captured by the capture device in the target area.
[0177] The search module 320 is connected to the acquisition module 310 and is used to search for the device detectors bound to the capture devices corresponding to at least one target image, and the target devices detected within the first time period corresponding to the target image. The interval between the start time point and the end time point of the first time period corresponding to the target image and the capture time corresponding to the target image is greater than a preset time interval.
[0178] The determination module 330 is connected to the search module 320 and is used to determine the target device associated with the target file based on the found target device, wherein the target device associated with the target file and the target file correspond to the same target object.
[0179] In this process, the time interval between the capture device capturing the target object and the device detector collecting information from the target device carried by the target object does not exceed a preset time interval, and the capture device and the device detector are bound together.
[0180] When the electronic device 300 is in operation, it executes the method steps of any of the above embodiments. For detailed steps, please refer to the above embodiments, which will not be repeated here.
[0181] Among them, electronic device 300 can be any device with algorithm processing capabilities, such as mobile phone or computer.
[0182] See Figure 7 , Figure 7 This is a schematic diagram of one embodiment of the computer-readable storage medium of this application. The computer-readable storage medium 400 stores a computer program 410, which can be executed by a processor to implement the steps in any of the above methods.
[0183] Specifically, the computer-readable storage medium 400 can be a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, or a device that can store the computer program 410. Alternatively, it can be a server that stores the computer program 410, which can send the stored computer program 410 to other devices for execution, or it can run the stored computer program 410 itself.
[0184] The above description is merely an embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A method of association, characterized by, The method comprises: acquiring a target archive, the target archive comprising target images of a same target object captured by a snapshot device in a target area; finding at least one target device detected by a device detector bound to the snapshot device corresponding to each of the target images in a first time period corresponding to the target images, wherein the interval between the starting time point and the ending time point of the first time period corresponding to the target images and the snapshot time corresponding to the target images is greater than a preset time interval; determining the target device associated with the target archive according to the target device found, wherein the target device associated with the target archive and the target archive correspond to the same target object; wherein, in response to the time interval between the snapshot of the target object by the snapshot device and the information collection of the target device carried by the target object by the device detector being not more than the preset time interval, the snapshot device is bound to the device detector; the step of finding at least one target device detected by a device detector bound to the snapshot device corresponding to each of the target images in a first time period corresponding to the target images comprises: determining the target images corresponding to the snapshot time in a second time period in the target archive to form a first sub-archive; finding the target device detected in the corresponding first time period by the device detector bound to the snapshot device corresponding to each of the target images in the first sub-archive; the step of determining the target device associated with the target archive according to the target device found comprises: determining the coincidence evaluation value corresponding to each of the target devices according to at least one of the target images in the first sub-archive, wherein the coincidence evaluation value corresponding to the target device represents the coincidence degree of the motion trajectory of the target object corresponding to the target device and the target archive in the second time period; determining the target device associated with the target archive according to the coincidence evaluation value corresponding to each of the target devices.
2. The method of claim 1, wherein, The method further comprises: determining the time interval between the snapshot of the target object by the snapshot device and the information collection of the target device carried by the target object by the device detector to be not more than the preset time interval in response to the distance between the snapshot device and the device detector being not more than a corresponding distance threshold value.
3. The method of claim 2, wherein, The corresponding distance threshold value is equal to the sum of the maximum snapshot distance of the snapshot device, the maximum detection distance of the device detector, and the maximum movement distance of the target object within the detection time interval of the device detector.
4. The method of claim 1, wherein, The step of determining the coincidence evaluation value corresponding to each of the target devices according to at least one of the target images in the first sub-archive comprises: determining the first evaluation value and the second evaluation value corresponding to each of the target devices according to at least one of the target images in the first sub-archive; determine the coincidence degree evaluation value corresponding to each target device according to at least one of the first evaluation value and the second evaluation value corresponding to each target device; The first evaluation value corresponding to the target device represents the coincidence degree between the snapshot device bound by the device detector detecting the target device in the target area in the second time period and the snapshot device capturing the target object corresponding to the target file in the second time period. The second evaluation value corresponding to the target device represents the coincidence degree between the path length passed by the target object corresponding to the target file in the second time period and the path length passed by the target device in the second time period.
5. The method of claim 4, wherein, The step of obtaining the first evaluation value corresponding to the target device comprises: determining the first number of at least one target image in the first sub-file; determining the second number of first target images in at least one target image in the first sub-file, wherein the device detector bound by the snapshot device corresponding to the first target image detects the target device in the corresponding first time period; determining the first ratio of the second number and the third number to obtain the first evaluation value corresponding to the target device, wherein the third number is equal to the sum of the first number and a first positive number.
6. The method of claim 4, wherein, The step of obtaining the second evaluation value corresponding to the target device comprises: finding a first device detector in the device detector bound by the snapshot device corresponding to each of the at least one target image, wherein the first device detector detects the target device in the corresponding first time period; determining the first distance between any two first device detectors and finding the maximum first distance; determining the second device detector detecting the target device in the target area in the second time period; determining the second distance between any two second target device detectors and finding the maximum second distance; determining the second ratio of the maximum first distance and the third distance to obtain the second evaluation value corresponding to the target device, wherein the third distance is equal to the sum of the maximum second distance and a second positive number.
7. The method of claim 4, wherein, The step of determining the coincidence degree evaluation value corresponding to each target device according to at least one of the first evaluation value and the second evaluation value corresponding to each target device comprises: determining the product of the square value of the first evaluation value corresponding to each target device and the square root of the corresponding second evaluation value to obtain the coincidence degree evaluation value corresponding to each target device.
8. The association method of claim 1, wherein, The step of determining the coincidence degree evaluation value corresponding to each target device according to at least one of the first evaluation value and the second evaluation value corresponding to each target device comprises: dividing the second time period into a plurality of first sub-time periods; determining the target image corresponding to the snapshot time in each first sub-time period in at least one target image in the first sub-file to form the second sub-file corresponding to each first sub-time period; According to each of the second sub-archives, determine the sub-coincidence evaluation value corresponding to each of the target devices and each of the first sub-time periods. The sub-coincidence evaluation value corresponding to the target device and the first sub-time period represents the coincidence degree of the motion track of the target object corresponding to the target device and the target archive in the first sub-time period. Determine the ratio of the sum of the sub-coincidence evaluation values corresponding to each of the target devices to the number of target first sub-time periods, and obtain the coincidence evaluation value corresponding to each of the target devices. The number of target images corresponding to the target first sub-time period is at least one.
9. The method of claim 1, wherein, Before the step of finding the device detector bound by the snapshot device corresponding to each of the target images in the first sub-archives, the method further comprises: Divide the second time period into a plurality of second sub-time periods; De-duplicate the first sub-archives, so that in the de-duplicated first sub-archives, the number of target images corresponding to the same snapshot device in the same second sub-time period is at most one.
10. The method of claim 1, wherein, The step of finding the device detector bound by the snapshot device corresponding to each of the target images in the first sub-archives, the target device detected in the corresponding first time period, comprises: Determine a target device set, wherein the target device set comprises the target device detected by the device detector in the target area within the second time period; Remove illegal target devices in the target device set, and / or remove target devices in the target device set that remain stationary within the second time period; In the target device set, find the device detector bound by the snapshot device corresponding to each of the target images, and the target device detected in the corresponding first time period.
11. The method of claim 1, wherein, The number of target archives is a plurality, and the method further comprises: In response to a plurality of target archives being associated with the same target device at the same time, merge a plurality of target archives.
12. The method of claim 11, wherein, The step of merging a plurality of target archives, comprises: Determine the similarity of any two target archives; In response to the similarity being greater than a first similarity threshold, merge the corresponding two target archives.
13. The method of claim 1, wherein, The method further comprises: In the target archive, determine the target image corresponding to the snapshot time within the third time period to form a third sub-archive; Determine the device detector bound by the snapshot device corresponding to each of the target images in the third sub-archives to form a first device detector set; Determine the device detector in the target area that collects the associated target device within the third time period to form a second device detector set; Find the target device detector that is in the second device detector set but not in the first device detector set; find the snapshot device bound with each of the target device detectors, and find images captured in a corresponding fourth time period, wherein a starting time point and an ending time point of the corresponding fourth time period of the target device detector are both greater than the preset time interval; classify the found images into the target archive.
14. The method of claim 13, wherein, The step of classifying the found images into the target archive comprises: in response to a similarity between the found images and the target archive being greater than a second similarity threshold, classify the target images into the target archive.
15. The method according to claim 12 or 14, characterized in that, The first similarity threshold and the second similarity threshold are both less than a third similarity threshold, wherein the target archive is obtained by clustering a plurality of to-be-clustered images based on the third similarity threshold.
16. An electronic device, comprising: The electronic device comprises a processor, a memory and a communication circuit, the processor is coupled to the memory and the communication circuit respectively, the memory stores program data, and the processor executes the program data in the memory to implement the steps in the method according to any one of claims 1-15.
17. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program can be executed by the processor to implement the steps in the method according to any one of claims 1-15.
Citation Information
Patent Citations
Data association method and device and electronic equipment
CN113268482A