Face and IMSI Matching Method, Device, Electronic Device and Storage Medium
By comparing and clustering the face and IMSI trajectory information, the matching scores are calculated, and the problem that the IMSI data cannot obtain personnel information is solved, and the accurate matching between face and IMSI is achieved, activity data is enriched, and the prediction of activity rules and itinerary purposes is supported.
Patent Information
- Application Number
- CN202210382452.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-12
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2042-04-12
AI Technical Summary
In the prior art, IMSI data can only obtain mobile phone information at a specific time and place, but cannot obtain corresponding personnel-related information, and the data application value is limited.
By obtaining the trajectory information of the to-process data set, including multiple trajectory information of the faces to be matched and the IMSI, performing trajectory comparison and clustering, computing matching scores, and determining the matching relationship between the face and the IMSI.
It realizes the accurate matching of face and IMSI data, enriches the activity data of the same person, enhances the application value of the data, and supports the prediction of subsequent activity rules and itinerary purposes.
Smart Images

Figure CN114663960B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data analysis, and more particularly, to a method, apparatus, electronic device, and storage medium for matching a face with an IMSI. Background Art
[0002] An IMSI (International Mobile Subscriber Identification) is an identification code used to distinguish different users in a cellular network and is unique across all cellular networks.
[0003] In the field of public security, it is a very common and urgent business requirement to keep track of people's activities. However, in the prior art, the IMSI data collected can only provide information about mobile phones at specific times and locations, and no corresponding information about the people can be obtained, resulting in limited data application value. Summary of the Invention
[0004] In view of this, an object of the present invention is to provide a method, apparatus, electronic device, and storage medium for matching a face with an IMSI to achieve accurate matching of face data and IMSI data.
[0005] To achieve the above object, the technical solutions adopted in the embodiments of the present invention are as follows:
[0006] In a first aspect, the present invention provides a method for matching a face with an IMSI, the method comprising:
[0007] Obtaining a data set to be processed; the data set to be processed includes trajectory information corresponding to multiple faces to be matched and trajectory information corresponding to multiple IMSIs to be matched;
[0008] Performing trajectory comparison based on the trajectory information corresponding to the face to be matched and the trajectory information corresponding to the IMSI to be matched for the same object, to obtain the number of matching trajectories and the number of conflicting trajectories;
[0009] Performing trajectory clustering on the trajectory information corresponding to the face to be matched and the trajectory information corresponding to the IMSI to be matched for the same object respectively, and determining the number of non-daily activity trajectories based on the unclustered points obtained;
[0010] Calculating a matching score for each face to be matched and each IMSI to be matched for each object according to the number of matching trajectories, the number of non-daily activity trajectories, and the number of conflicting trajectories;
[0011] Determining whether each face to be matched and each IMSI to be matched for each object match according to the matching score.
[0012] In an alternative embodiment, the trajectory comparison based on the trajectory information corresponding to the face to be matched of the same object and the trajectory information corresponding to the same IMSI to be matched to obtain the number of matching trajectories and the number of conflicting trajectories includes:
[0013] Vectorize the trajectory information corresponding to the face to be matched of the same object and the trajectory information corresponding to the same IMSI to be matched respectively, to obtain a face trajectory array corresponding to each object and an IMSI trajectory array corresponding to each IMSI to be matched;
[0014] Compare each of the face trajectory arrays with each of the IMSI trajectory arrays to obtain the number of matching trajectories and the number of conflicting trajectories.
[0015] In an alternative embodiment, the vectorizing the trajectory information corresponding to the face to be matched of the same object and the trajectory information corresponding to the same IMSI to be matched respectively, to obtain a face trajectory array corresponding to each object and an IMSI trajectory array corresponding to each IMSI to be matched includes:
[0016] Convert the trajectory information corresponding to each face to be matched of the same object and the trajectory information corresponding to the same IMSI to be matched into corresponding position encodings;
[0017] Divide the time interval corresponding to the dataset to be processed into multiple time windows according to a preset time window length;
[0018] Write the position encoding corresponding to each face to be matched into the corresponding time window according to the acquisition time of the trajectory information corresponding to each face to be matched, to obtain a face trajectory array corresponding to each object;
[0019] Write the position encoding corresponding to each IMSI to be matched into the corresponding time window according to the acquisition time of the trajectory information corresponding to each IMSI to be matched, to obtain an IMSI trajectory array corresponding to each IMSI to be matched.
[0020] In an alternative embodiment, the comparing each of the face trajectory arrays with each of the IMSI trajectory arrays to obtain the number of matching trajectories and the number of conflicting trajectories includes:
[0021] Divide each of the face trajectory arrays and each of the IMSI trajectory arrays into multiple face trajectory sub-arrays and IMSI trajectory sub-arrays with different time segments respectively according to a preset time period;
[0022] For each of the face trajectory sub-arrays and each of the IMSI trajectory sub-arrays in the same time segment, compare the position encodings on the same vector positions;
[0023] Count the number of vector bits with the same position encoding to obtain the number of matching trajectories for each time segment;
[0024] For the target vector bits with different position encodings, degrade the position encodings on the target vector bits in the face trajectory sub-array. If the degraded position encoding is still different from the position encoding on the target vector bit in the IMSI trajectory sub-array, increment the count by one, and obtain the number of conflicting trajectories for each time segment according to the count result.
[0025] In an alternative embodiment, the step of counting the number of vector bits with the same position encoding to obtain the number of matching trajectories for each time segment includes:
[0026] Count the number of vector bits whose position encodings on the same vector bits are all the first preset value to obtain the first number of matching trajectories;
[0027] Count the number of vector bits whose position encodings on the same vector bits are all the second preset value to obtain the second number of matching trajectories; the second preset value is obtained by degrading the first preset value;
[0028] Obtain the number of matching trajectories for each time segment according to the first number of matching trajectories and the second number of matching trajectories.
[0029] In an alternative embodiment, the step of calculating the matching score between the face to be matched of each object and each IMSI to be matched according to the number of matching trajectories, the number of non-daily activity trajectories, and the number of conflicting trajectories includes:
[0030] Calculate the ratio of the number of matching trajectories to the target number of trajectories; the target number of trajectories is the minimum of the number of trajectory information corresponding to the face to be matched of the same object and the number of trajectory information corresponding to the IMSI to be matched;
[0031] Calculate the matching trajectory score according to the ratio and the weight value corresponding to the ratio;
[0032] Calculate the non-daily activity trajectory score according to the number of non-daily activity trajectories and the weight value corresponding to the number of non-daily activity trajectories;
[0033] Calculate the conflicting trajectory score according to the number of conflicting trajectories and the weight value corresponding to the number of conflicting trajectories;
[0034] Add the matching trajectory score and the non-daily activity trajectory score, and subtract the conflicting trajectory score to obtain the matching score between the face to be matched of each object and each IMSI to be matched.
[0035] In an alternative embodiment, the step of obtaining the dataset to be processed includes:
[0036] Perform a collision calculation on the face trajectory information collected by the face monitoring device and the IMSI trajectory information collected by the electric fence device to obtain pairs of face and IMSI trajectory information that meet the spatio-temporal collision conditions;
[0037] Summarize all pairs of face and IMSI trajectory information that meet the spatio-temporal collision conditions to obtain a dataset to be processed.
[0038] In a second aspect, the present invention provides a face and IMSI matching device, and the device includes:
[0039] A dataset acquisition module for acquiring a dataset to be processed; the dataset to be processed includes trajectory information corresponding to multiple faces to be matched and trajectory information corresponding to multiple IMSIs to be matched;
[0040] A trajectory comparison module for comparing the trajectory information corresponding to the faces to be matched of the same object and the trajectory information corresponding to the same IMSI to be matched to obtain the number of matching trajectories and the number of conflicting trajectories;
[0041] A non-daily activity trajectory acquisition module for respectively performing trajectory clustering on the trajectory information corresponding to the faces to be matched of the same object and the trajectory information corresponding to the same IMSI to be matched, and determining the number of non-daily activity trajectories according to the unclustered points obtained;
[0042] A score calculation module for calculating the matching scores of the faces to be matched and the IMSIs to be matched for each object according to the number of matching trajectories, the number of non-daily activity trajectories, and the number of conflicting trajectories;
[0043] A score processing module for determining whether the faces to be matched and the IMSIs to be matched for each object match according to the matching scores.
[0044] In a third aspect, the present invention provides an electronic device, including a processor, a memory, and a computer program stored on the memory and executable on the processor, and when the computer program is executed by the processor, the steps of the face and IMSI matching method described in any one of the foregoing embodiments are implemented.
[0045] In a fourth aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the face and IMSI matching method described in any one of the foregoing embodiments are implemented.
[0046] The face-IMSI matching method, device, electronic device, and storage medium provided by the embodiments of the present invention compare the trajectory information corresponding to the face to be matched of the same object and the trajectory information corresponding to the same IMSI to be matched to obtain the number of matching trajectories and the number of conflicting trajectories, and perform trajectory clustering on the trajectory information corresponding to the face to be matched of the same object and the trajectory information corresponding to the same IMSI to be matched respectively. Determine the number of non-daily activity trajectories according to the obtained unclustered points, and calculate the matching scores of the face to be matched of each object and each IMSI to be matched according to the number of matching trajectories, the number of non-daily activity trajectories, and the number of conflicting trajectories. Determine whether the face to be matched of each object and each IMSI to be matched match according to the matching scores. Since the calculation of the matching scores comprehensively considers the matching trajectories, non-daily activity trajectories, and conflicting trajectories, accurate matching of face and IMSI data can be achieved based on the matching scores, thus greatly enriching and supplementing the activity data of the same person to form a prediction of subsequent activity patterns and trip purposes, and greatly improving the application value of the data.
[0047] To make the above objects, features, and advantages of the present invention more obvious and understandable, the following specifically gives preferred embodiments and cooperates with the attached drawings for detailed description as follows. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] To more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for use in the embodiments. It should be understood that the following drawings only show some embodiments of the present invention, and therefore should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.
[0049] Figure 1 Shows a schematic flowchart of a face-IMSI matching method provided by an embodiment of the present invention;
[0050] Figure 2 Shows another schematic flowchart of a face-IMSI matching method provided by an embodiment of the present invention;
[0051] Figure 3 Shows a functional module diagram of a face-IMSI matching device provided by an embodiment of the present invention;
[0052] Figure 4 Shows a schematic block diagram of an electronic device provided by an embodiment of the present invention.
[0053] Icons: 600 - Face and IMSI Matching Device; 700 - Electronic Device; 610 - Dataset Acquisition Module; 620 - Trajectory Comparison Module; 630 - Abnormal Activity Trajectory Acquisition Module; 640 - Score Calculation Module; 650 - Score Processing Module; 710 - Memory; 720 - Processor; 730 - Communication Module. Detailed Implementation Manner
[0054] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Usually, the components of the embodiments of the present invention described and shown in the accompanying drawings here can be arranged and designed in various different configurations.
[0055] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed present invention, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present invention.
[0056] It should be noted that relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including the said element.
[0057] As a common intelligent perception data, IMSI provides important clues in scenarios such as querying user trajectories, analyzing real mobile phone numbers, locating user positions, and mining user drop-off points, and is an important supplementary data for user travel and behavior information. Therefore, being able to match and associate user data and IMSI data in a timely and accurate manner will greatly enrich and supplement the activity information of the same person object, so as to form a prediction of subsequent activity patterns and trip purposes, and provide better data support for the public security system or other information systems. Next, the face and IMSI matching method provided by the embodiments of the present invention will be described in detail.
[0058] Please refer to Figure 1, which is a schematic flowchart of a method for matching a face with an IMSI provided by an embodiment of the present invention. It should be noted that the method for matching a face with an IMSI in the embodiment of the present invention is not limited by Figure 1 the following specific order. It should be understood that in other embodiments, the order of some steps in the method for matching a face with an IMSI in the embodiment of the present invention can be interchanged according to actual needs, or some of the steps can also be omitted or deleted. This method for matching a face with an IMSI can be applied to an electronic device. The following will Figure 1 elaborate in detail on the specific process shown.
[0059] Step S101, obtain a dataset to be processed; the dataset to be processed includes trajectory information corresponding to multiple faces to be matched and trajectory information corresponding to multiple IMSIs to be matched.
[0060] In this embodiment, the trajectory information in the dataset to be processed can be collected by various collection devices. For example, the trajectory information corresponding to the face to be matched can be collected by a face monitoring device, and the trajectory information corresponding to the IMSI to be matched can be collected by an electric fence device.
[0061] Step S102, perform trajectory comparison based on the trajectory information corresponding to the face to be matched of the same object and the trajectory information corresponding to the same IMSI to be matched, and obtain the number of matching trajectories and the number of conflicting trajectories.
[0062] In this embodiment, since the IMSI is standard structured information, that is, the IMSI data collected by the collection device has a unique identifiable code; however, the face information is unstructured information and covers a very large amount of information. Therefore, the identification of the same face object is based on the prior "portrait filing" processing of the face of the same object, that is, the same personnel file number is given to different face images of the same person. Thus, the trajectory information corresponding to the same IMSI to be matched extracted from the dataset to be processed can represent the activity data of the user corresponding to the IMSI to be matched; the trajectory information corresponding to the face to be matched of the same object extracted from the dataset to be processed according to the personnel file number can represent the activity data of the user corresponding to the personnel file number. Through the comparison of the trajectory information, it can be determined which trajectories may be generated by the same personnel entity and which trajectories cannot be generated by the same personnel entity, thereby obtaining the number of matching trajectories and the number of conflicting trajectories.
[0063] Step S103, perform trajectory clustering on the trajectory information corresponding to the face to be matched of the same object and the trajectory information corresponding to the same IMSI to be matched respectively, and determine the number of non-daily activity trajectories according to the obtained unclustered points.
[0064] In this embodiment, the density clustering algorithm can be used to perform trajectory clustering on the trajectory information corresponding to the to-be-matched faces of the same object and the trajectory information corresponding to the same to-be-matched IMSI respectively. By performing trajectory clustering, the outliers (i.e., unclustered points) in the face trajectory information and the IMSI trajectory information are obtained, so as to obtain the abnormal trajectories in each object's trajectory and form the non-daily activity trajectories. Among them, the density clustering algorithm can adopt the DBSCAN (Density Based Spatial Clustering of Application with Noise) algorithm, or other density-based clustering algorithms, and this embodiment does not limit this.
[0065] For example, by using the density clustering algorithm (DBSCAN) to perform trajectory clustering on the trajectory information belonging to the same object in the trajectory information corresponding to the to-be-matched faces, the unclustered points in the trajectory information corresponding to the to-be-matched faces of each object can be obtained; by using the density clustering algorithm to perform trajectory clustering on the trajectory information belonging to the same object in the trajectory information corresponding to the to-be-matched IMSI, the unclustered points in the trajectory information corresponding to the to-be-matched IMSI of each object can be obtained. It should be understood that the unclustered points in the trajectory information are analyzed according to the actual clustering situation, and there may be no unclustered points in actual applications.
[0066] In one implementation manner, the number of non-daily activity trajectories can be determined according to the obtained unclustered points and the comparison result of the trajectory information in the foregoing step S102. For example, according to the comparison situation of the foregoing trajectory information, it can be determined which of the face trajectory information and the IMSI trajectory information of each object belong to the comparable trajectory information and which belong to the non-comparable trajectory information. Then, after obtaining the unclustered points in the trajectory information corresponding to the to-be-matched faces of each object and the unclustered points in the trajectory information corresponding to each to-be-matched IMSI, by counting the number of trajectory information that belongs to the unclustered points and is non-comparable, the number of non-daily activity trajectories is obtained.
[0067] Step S104, calculate the matching score between the to-be-matched face of each object and each to-be-matched IMSI according to the number of matched trajectories, the number of non-daily activity trajectories, and the number of contradictory trajectories.
[0068] In this embodiment, for the trajectory information corresponding to the to-be-matched face of each object and the trajectory information corresponding to each to-be-matched IMSI, after obtaining the number of matched trajectories, the number of non-daily activity trajectories, and the number of contradictory trajectories, the matching score is calculated according to the set score calculation mechanism.
[0069] Step S105, determine whether the to-be-matched face of each object matches each to-be-matched IMSI according to the matching score.
[0070] In this embodiment, the size of the matching score can represent the matching degree between the to-be-matched face and the to-be-matched IMSI. Therefore, according to the calculated matching score, it can be effectively judged whether the to-be-matched face of each object matches each to-be-matched IMSI.
[0071] It can be seen that the face and IMSI matching method provided by the embodiment of the present invention compares the trajectory information corresponding to the face to be matched of the same object and the trajectory information corresponding to the same IMSI to be matched, obtains the number of matching trajectories and the number of contradictory trajectories, and determines the number of non-daily activity trajectories according to the trajectory information corresponding to the face to be matched of the same object and the trajectory information corresponding to the same IMSI to be matched, calculates the matching score of the face to be matched of each object and each IMSI to be matched according to the number of matching trajectories, the number of non-daily activity trajectories and the number of contradictory trajectories, and determines whether the face to be matched of each object matches each IMSI to be matched according to the matching score. Since the calculation of the matching score comprehensively considers the matching trajectory, the non-daily activity trajectory and the contradictory trajectory, the accurate matching of the face and IMSI data can be achieved based on the matching score, thereby greatly enriching and supplementing the activity data of the same person, so as to form a prediction of the subsequent activity rules and the purpose of the trip, and greatly improving the application value of the data.
[0072] In actual applications, the collection of personnel information (face, IMSI data) depends on face monitoring equipment and electric fence equipment, so the location of the equipment is used as the location information of the personnel, but there will be a certain deviation between the location information and the actual location information of the person concerned. Therefore, it is necessary to perform collision calculation processing on the trajectory points to obtain which trajectory points are separated in time and space due to the distance between the equipment, but are actually generated by the same person. Based on this, the above step S101 can specifically include:
[0073] The face trajectory information collected by the face monitoring device and the IMSI trajectory information collected by the electric fence device are collided and calculated to obtain the face and IMSI trajectory information pairs that meet the time-space collision conditions; all the face and IMSI trajectory information pairs that meet the time-space collision conditions are aggregated to obtain the data set to be processed.
[0074] For example, assume that when it is obtained according to the actual device monitoring range that the same object can be collected by two types of devices at the same time, the distance length between the two types of devices is L1, and the time taken for the user to walk L1 at a normal walking speed is denoted as T1. Then, the spatio-temporal collision condition can be set as follows: the distance between the collection devices is less than L1, and the collection time interval is T1. After obtaining the face trajectory information collected by the face monitoring device and the IMSI trajectory information collected by the electric fence device, for each pair of face and IMSI trajectory information, if the distance between the collection devices is less than L1 and the collection time interval is T1, it is determined that the pair of face and IMSI trajectory information meets the spatio-temporal collision condition. Finally, all pairs of face and IMSI trajectory information that meet the spatio-temporal collision condition are summarized to obtain the dataset to be processed. It should be noted that after obtaining all pairs of face and IMSI trajectory information that meet the spatio-temporal collision condition, duplicate removal processing needs to be performed on the final result, that is, the same trajectory information pair and the collection time are also the same, only the order of appearance is different.
[0075] It can be seen that the face and IMSI matching method provided by the embodiment of the present invention takes into account that there is a certain deviation between the trajectory information collected by the device and the actual trajectory information of the user. Therefore, collision calculation processing is performed on the face trajectory information collected by the face monitoring device and the IMSI trajectory information collected by the electric fence device, and pairs of face and IMSI trajectory information that meet the spatio-temporal collision condition are screened out, so as to summarize the trajectory information corresponding to the face to be matched and the trajectory information corresponding to the IMSI to be matched to obtain the dataset to be processed.
[0076] In one implementation manner, in order to facilitate trajectory comparison, the trajectory information corresponding to the face to be matched of the same object and the trajectory information corresponding to the same IMSI to be matched can be vectorized. Based on this, please refer to Figure 2 , the above step S102 may include the following sub-steps:
[0077] Sub-step S1021, vectorize the trajectory information corresponding to the face to be matched of the same object and the trajectory information corresponding to the same IMSI to be matched respectively, to obtain a face trajectory array corresponding to each object and an IMSI trajectory array corresponding to each IMSI to be matched.
[0078] In this embodiment, the trajectory information can be segmented according to a specific time window, and the trajectory point information can be stored in the vector bit corresponding to the corresponding time window according to its acquisition time (generation time), so as to complete the vector normalization processing of the trajectory information, and finally obtain the face trajectory array corresponding to each object (that is, the face trajectory vector) and the IMSI trajectory array corresponding to each IMSI to be matched (that is, the IMSI trajectory vector). Among them, each vector bit in the face trajectory array corresponds to a trajectory information of the face to be matched; each vector bit in the IMSI trajectory array corresponds to a trajectory information of the IMSI to be matched.
[0079] Sub-step S1022, compare each face trajectory array with each IMSI trajectory array to obtain the number of matched trajectories and the number of conflicting trajectories.
[0080] In this embodiment, by vectorizing the trajectory information corresponding to the face to be matched of the same object and the trajectory information corresponding to the same IMSI to be matched, the trajectory comparison between the trajectory information corresponding to the face to be matched of the same object and the trajectory information corresponding to the same IMSI to be matched can be converted into a comparison of values on the same vector position between two arrays, so that the number of matched trajectories and the number of contradictory trajectories can be easily obtained.
[0081] In practical applications, considering that trajectory information is generally longitude and latitude information, which is two-dimensional information, it is not convenient to compare trajectories between arrays. Based on this, the embodiment of the present invention introduces the S2 geographic location coding mechanism, that is, the earth is divided into grids according to different range levels and a unique location code (place_id) is generated. Each location can take its place_id according to its specific location. For the same batch of data, the same range level is uniformly selected according to actual needs. Based on this, the above sub-step S1021 specifically includes:
[0082] The trajectory information corresponding to each to-be-matched face of the same object and the trajectory information corresponding to the same to-be-matched IMSI are converted into corresponding position codes; the time interval corresponding to the to-be-processed data set is divided into multiple time panes according to a preset time window length; according to the acquisition time of the trajectory information corresponding to each to-be-matched face, the position code corresponding to each to-be-matched face is written into the corresponding time pane to obtain the face trajectory array corresponding to each object; according to the acquisition time of the trajectory information corresponding to each to-be-matched IMSI, the position code corresponding to each to-be-matched IMSI is written into the corresponding time pane to obtain the IMSI trajectory array corresponding to each to-be-matched IMSI.
[0083] That is to say, the trajectory vectorization processing in this embodiment mainly includes two parts. One is to introduce the S2 geographical coding mechanism into the trajectory information to reduce the two-dimensional information to one-dimensional. S2 provides a very rich geographical range selection from level 1 to level 30 (corresponding side lengths from 74CM to 85011012KM), which can adapt to scenarios with different regional range controls. Therefore, different regional levels can be used to meet the data processing requirements of different range sizes. The other is that after converting the trajectory information into place_id, T1 can be used as the time window length to split the time interval corresponding to the dataset to be processed, and according to the collection time of the trajectory information corresponding to the face to be matched, the corresponding position code is written into the specific time window pane. Similarly, according to the collection time of the trajectory information corresponding to the IMSI to be matched, the corresponding position code is written into the specific time window pane, so as to complete the vector normalization processing of the trajectory information and form a standard and unified array.
[0084] In practical applications, for time periods with less generated trajectory information, the time window length can be extended, which can reduce the proportion of null value vectors in the trajectory vectorization process, save storage space, and improve calculation efficiency. In addition, for the case where multiple place_ids fall into the same time window pane, the place_id with a later time sequence is stored in the next time window pane. If there is still a conflict, it is discarded.
[0085] Optionally, for the case where the time interval corresponding to the actually selected dataset to be processed is relatively long, the face trajectory array and the IMSI trajectory array obtained by vectorization processing can be divided into datasets according to a certain time period. When performing trajectory comparison, the comparison results of each time segment are calculated respectively. Then, the above sub-step S1023 specifically includes:
[0086] According to the preset time period, each face trajectory array and each IMSI trajectory array are respectively divided into multiple face trajectory sub-arrays and IMSI trajectory sub-arrays with different time segments. For each face trajectory sub-array and each IMSI trajectory sub-array in the same time segment, the position codes on the same vector bit are compared; the number of vector bits with the same position code is counted to obtain the number of matching trajectories in each time segment; for the target vector bits with different position codes, the position codes on the target vector bits in the face trajectory sub-array are downgraded. If the downgraded position code is still different from the position code on the target vector bit in the IMSI trajectory sub-array, the count is incremented by one, and the number of conflicting trajectories in each time segment is obtained according to the count result.
[0087] In this embodiment, it is assumed that the time interval corresponding to the dataset to be processed is a preset time period. Then, the time intervals corresponding to each face trajectory array and each IMSI trajectory array are also the preset time period. By dividing the preset time period into multiple different time segments according to a preset time cycle, each face trajectory array can be correspondingly divided into multiple face trajectory sub-arrays of different time segments, and each IMSI trajectory array can be correspondingly divided into multiple IMSI trajectory sub-arrays of different time segments.
[0088] For example, if the preset time period is 8 weeks and the preset time cycle is one week, finally, the face trajectory sub-arrays and IMSI trajectory sub-arrays of each object for each week can be obtained.
[0089] When performing trajectory comparison, each face trajectory sub-array and each IMSI trajectory sub-array of the same time segment are compared to obtain the number of matching trajectories and the number of conflicting trajectories for each time segment.
[0090] For example, for any face trajectory sub-array face i (where i represents the personnel file number) and IMSI trajectory sub-array IMSI j (where j represents the unique identifiable code of the IMSI) of the same time segment, calculate whether the place_id on each vector bit of face i and IMSI j is the same. If it is the same, the comparison result on this vector bit is recorded as 1. Finally, the number of 1s in the obtained matching result set is the number of matching trajectories of face i and IMSI j in this time segment.
[0091] If the place_id on the same vector bit is different, it means that they do not match. For the vector bits that do not match (target vector bits), extract the place_id of the face trajectory sub-array face i on this target vector bit. After the comparison is completed, perform a downgrading process on the extracted place_id on the target vector bit, and then perform a comparison calculation on the downgraded place_id and the place_id on the target vector bit in the IMSI trajectory sub-array. If the place_ids on the same target vector bit are still different, the comparison result on this target vector bit is recorded as 1. Finally, the number of 1s in the obtained conflicting result set is the number of conflicting trajectories of face i and IMSI j in this time segment.
[0092] In practical applications, considering that the S2 position generation mechanism may cause the physical distance to be within the side length range but be logically divided into different place_ids, in order to better recall the comparable trajectories, this embodiment will perform a trajectory vector comparison calculation after downgrading the S2 level on the basis of the benchmark S2 level. Based on this, the above steps of counting the number of vector bits with the same position coding to obtain the number of matching trajectories for each time segment may specifically include:
[0093] Count the number of vector bits whose position encodings on the same vector bits are all the first preset value to obtain the number of first matching trajectories; count the number of vector bits whose position encodings on the same vector bits are all the second preset value to obtain the number of second matching trajectories; the second preset value is obtained by degrading the first preset value; according to the number of first matching trajectories and the number of second matching trajectories, obtain the number of matching trajectories for each time segment.
[0094] In this embodiment, the first preset value is the basic region level (for example, 16). After comparing the place_id on the same vector bits at the basic region level, perform trajectory vector comparison after degrading the basic region level (the specific number of degradations is not limited, for example, degrading one level to 15). Then the number of first matching trajectories represents the number of matching trajectories at the basic region level for each time segment, and the number of second matching trajectories represents the number of matching trajectories after degrading the basic region level for each time segment.
[0095] It can be seen that in this embodiment, for each face trajectory sub-array and each IMSI trajectory sub-array in the same time segment, when comparing the position encodings on the same vector bits, the following situations can be divided:
[0096] (1) Vector bit is not empty and comparable calculation: Assume that the face trajectory sub-array in a certain time segment is face i and the IMSI trajectory sub-array is IMSI j. Take S2 = 16 as the basic region level (the first preset value), and calculate whether the place_id on each vector bit is the same respectively. If it is the same, the result on this vector bit is recorded as 1, thereby generating a matching result set DF16ij. DF16 indicates that the S2 level corresponding to the current place_id is 16. In order to better recall the comparable trajectories, on the basis of the basic region level, perform another trajectory vector comparison calculation after degrading the S2 level, thereby generating a matching result set DF15ij. Based on the matching result set DF16ij, the number of first matching trajectories can be obtained, and based on the matching result set DF15ij, the number of second matching trajectories can be obtained.
[0097] (2) Vector bit is empty and non-comparable calculation: For face i and IMSI j, if the place_id of any vector bit on the same vector bit is empty, the vector bit space cannot be compared and no score is given.
[0098] (3) Calculation in the case where the vector bits are not empty and incomparable: For face i and IMSI j, if the place_id on the same vector bit is different, it means that they cannot be matched. Extract the place_id on this vector bit to form a DataFrame, denoted as df ij. After a certain face i has completed the comparison with all IMSI j, perform a downgrading process (for example, downgrade by 3 levels) on the place_id in df ij. Assume that the S2 level currently taken by this place_id is 16, then the S2 level taken by the processed place_id is 13. Then perform a comparison calculation with the place_id on the same vector bit in IMSI j again. If they are still different, mark the result of this vector bit as 1 to generate a trajectory contradiction result set NDF13 ij, and the number of its elements is denoted as |NDF13 ij|, that is, the number of contradictory trajectories.
[0099] It can be seen that in the face and IMSI matching method provided by the embodiment of the present invention, when performing trajectory comparison based on the trajectory information corresponding to the face to be matched and the trajectory information corresponding to the IMSI to be matched of the same object, the trajectory information corresponding to the face to be matched and the trajectory information corresponding to the IMSI to be matched of the same object are first vectorized respectively, and according to a preset time period, each face trajectory array and each IMSI trajectory array are respectively divided into multiple face trajectory sub-arrays and IMSI trajectory sub-arrays in different time segments. By comparing the trajectory information in each face trajectory sub-array and each IMSI trajectory sub-array in the same time segment, the number of matching trajectories and the number of contradictory trajectories in each time segment are obtained.
[0100] In one implementation manner, when calculating the matching score between the face to be matched and the IMSI to be matched for each object, it can be calculated based on the number of matching trajectories, the number of non-daily activity trajectories, the number of contradictory trajectories, and the corresponding weight values for each item. Then, the above step S104 may include the following sub-steps:
[0101] Calculate the proportion of the number of matching trajectories to the target number of trajectories; the target number of trajectories is the minimum of the number of trajectory information corresponding to the face to be matched and the number of trajectory information corresponding to the IMSI to be matched of the same object. Calculate the matching trajectory score according to the proportion and the weight value corresponding to the proportion; calculate the non-daily activity trajectory score according to the number of non-daily activity trajectories and the weight value corresponding to the number of non-daily activity trajectories; calculate the contradictory trajectory score according to the number of contradictory trajectories and the weight value corresponding to the number of contradictory trajectories; add the matching trajectory score and the non-daily activity trajectory score, and subtract the contradictory trajectory score to obtain the matching score between the face to be matched and the IMSI to be matched for each object.
[0102] During the process of trajectory comparison calculation, both the number of matching trajectories and the number of conflicting trajectories are absolute values. However, for faces or IMSIs with different numbers of generated trajectories, their proportions are quite different. To reflect the overall similarity of face and IMSI trajectory information, it is necessary to consider their similarity ratios, that is, the minimum value between the number of trajectory information corresponding to the face to be matched of the same object and the number of trajectory information corresponding to the same IMSI to be matched is determined as the target number of trajectories, and the proportion of the number of matching trajectories relative to the target number of trajectories (i.e., the matching trajectory proportion) is calculated. By setting corresponding weight values for the matching trajectory proportion, the number of non-daily activity trajectories, and the number of conflicting trajectories, the matching trajectory score, the non-daily activity trajectory score, and the conflicting trajectory score are calculated respectively, so as to obtain the matching score.
[0103] It should be understood that when each face trajectory array is correspondingly divided into multiple face trajectory sub-arrays of different time segments, and each IMSI trajectory array is correspondingly divided into multiple IMSI trajectory sub-arrays of different time segments, the number of matching trajectories obtained through trajectory comparison includes the number of matching trajectories in each time segment, and the number of conflicting trajectories includes the number of conflicting trajectories in each time segment. Then, the matching trajectory proportion corresponding to each time segment can be calculated based on the number of matching trajectories in each time segment. When calculating the number of non-daily activity trajectories, the data in the face trajectory sub-array of each object in each time segment and the IMSI trajectory sub-array in the same time segment are used as the target data set, and based on the density clustering algorithm, the corresponding non-daily activity trajectory set is determined. By counting the number of non-daily activity trajectories in the non-daily activity trajectory set, the number of non-daily activity trajectories corresponding to each time segment is obtained.
[0104] In this way, the matching trajectory score for each time segment is calculated according to the matching trajectory proportion corresponding to each time segment and the weight value corresponding to the proportion, the non-daily activity trajectory score for each time segment is calculated according to the number of non-daily activity trajectories corresponding to each time segment and the weight value corresponding to the number of non-daily activity trajectories, and the conflicting trajectory score for each time segment is calculated according to the number of conflicting trajectories corresponding to each time segment and the weight value corresponding to the number of conflicting trajectories. The matching trajectory score and the non-daily activity trajectory score in the same time segment are added, and then the conflicting trajectory score in this time segment is subtracted to obtain the matching score between the face to be matched and the IMSI to be matched for each object in each time segment.
[0105] Next, a specific example is given to illustrate the above face and IMSI matching method in detail.
[0106] First, taking the DBSCAN density clustering algorithm as an example, the discovery of non-daily activity trajectories is described. DBSCAN is a density-based clustering algorithm. Generally, this type of density clustering algorithm assumes that categories can be determined by the tightness of the sample distribution. Samples in the same category are closely connected. That is to say, there must be samples of the same category not far from any sample in this category. By classifying closely connected samples into one category, a clustering category is obtained in this way. By classifying all groups of closely connected samples into different categories, we finally get the results of all clustering categories. DBSCAN describes the tightness of a sample set based on a group of neighborhoods. The parameters (∈, MinPts) are used to describe the tightness of the sample distribution in the neighborhood. Among them, ∈ describes the neighborhood distance threshold of a certain sample, and MinPts describes the threshold of the number of samples in the neighborhood with a distance of ∈ from a certain sample.
[0107] In this embodiment, considering the certain sparsity of object sample collection, the data in the face trajectory sub-array and the IMSI trajectory sub-array of each object in the same time segment (such as one week) can be selected as the dataset D for trajectory clustering respectively. D = (x1, x2,..., xm), then the specific density description definition of DBSCAN is as follows:
[0108] 1) ∈-neighborhood: For xj ∈ D, its ∈-neighborhood contains the sub-sample set in the sample set D whose distance from xj is not greater than ∈, that is, N∈(xj) = {xi ∈ D|distance(xi, xj) ≤ ∈}, and the number of this sub-sample set is denoted as |N∈(xj)|;
[0109] 2) Core object: For any sample xj ∈ D, if the N∈(xj) corresponding to its ∈-neighborhood contains at least MinPts samples, that is, if |N∈(xj)| ≥ MinPts, then xj is a core object.
[0110] 3) Density direct reach: If xi is located in the ∈-neighborhood of xj and xj is a core object, then it is said that xi is density directly reachable from xj. Conversely, it does not necessarily hold. That is, at this time, it cannot be said that xj is density directly reachable from xi, unless xi is also a core object.
[0111] 4) Density reachable: For xi and xj, if there exists a sample sequence p1, p2,..., pT, satisfying p1 = xi, pT = xj, and p t+1 is density directly reachable from p t then it is said that xj is density reachable from xi. That is to say, density reachability satisfies transitivity. At this time, the transfer samples p1, p2,..., pT-1 in the sequence are all core objects, because only core objects can make other samples density directly reachable.
[0112] 5) Density-connected: For xi and xj, if there exists a core object sample xk such that both xi and xj are density-reachable from xk, then xi and xj are said to be density-connected.
[0113] 6) Non-daily activity trajectory: The set satisfying the ∈ domain in Dxj is defined above, N∈(xj) = {xi ∈ D|distance(xi, xj) ≤ ∈}. Correspondingly, the set of unclustered points is the set in Dxj that is not in the ∈ domain, i.e., N∈(xj)' = {xi ∈ D|distance(xi, xj) > ∈}. Based on the set of unclustered points corresponding to the face trajectory information of each object and the set of unclustered points corresponding to the IMSI trajectory information of each IMSI, the trajectory information that belongs to both the unclustered points and the incomparable ones is determined, and finally the non-daily activity trajectory set (e.g., defined as N∈(xj)″) is obtained, and the number of this sample set is denoted as |N∈(xj)″|, obtaining the number of non-daily activity trajectories.
[0114] Among them, the selection method of ∈ is to calculate the minimum value of the distances of the trajectory points in D of the same object. For example, the D of the same object involves a sample subset including the matched face i (such as i = 1) and the IMSI j (j = 1…m) that has a collision relationship with face i, then the data subset included in D is m + 1; for the m + 1 subsets, calculate the pairwise distances of the trajectory points in their internal data sets respectively, obtaining the median value ∈i of the distances, and finally take min(∈i) as ∈ in the D of face i. xj is the initial number of clusters to be set. Since the data set in this embodiment is trajectory data and the normal activity trajectory types are set as the living area and the working area, so xj = 2. In this embodiment, the distance between each trajectory point can be calculated using the Euclidean distance.
[0115] Assume that S2 = 16 is used as the basic geographical area level. The face trajectory sub-arrays of each object per week are compared with each IMSI trajectory sub-array to obtain the matching result set DF16ij at the S2 level of 16, the matching result set DF15ij at the S2 level of 15, and the trajectory contradiction result set NDF13ij. Correspondingly, the number of matching trajectories is denoted as Sum(DF16ij) and Sum(DF15ij) respectively, and the number of contradictory trajectories is denoted as |NDF13ij|. Then, the proportion of matching trajectories at the basic geographical area level DF16ij′ can be expressed as: DF16ij′ = Sum(DF16ij) / min(len(face i), len(IMSI j)); the proportion of matching trajectories at the next level of the basic geographical area level DF15ij′ can be expressed as: DF15ij′ = Sum(DF15ij) / min(len(face i), len(IMSI j)); where, len(face i) represents the length (number of trajectory information) of the face trajectory sub-array face i in this time segment, and len(IMSI j) represents the length (number of trajectory information) of the IMSI trajectory sub-array IMSI j in this time segment.
[0116] Set the time interval corresponding to the data set to be processed as 8 weeks. Then, the matching score of the face to be matched and the IMSI to be matched for each object per week can be expressed as: Weekly matching score = Weight 1 * [(Weight 11 * DF15ij′ + Weight 12 * DF15ij′ + Weight 21 * DF16ij′ + Weight 12 * DF16ij′] + Weight 2 * |N∈(xj)′| - Weight 3 * |NDF13ij|; where, Weight 11 and Weight 21 are set for selected devices (i.e., devices with better information collection conditions), Weight 12 is set for all electric fence devices, and the values of Weight 1, Weight 11, Weight 12, Weight 21, Weight 2, and Weight 3 can be continuously adjusted according to the results during the actual model operation process to determine the optimal parameter values; by continuously debugging the weight values and statistically analyzing the number of various result sets, finally ensure that the weekly score is a value in [0, 1].
[0117] In this way, the matching score of the face to be matched and the IMSI to be matched for each object obtained in this embodiment is composed of 4 scores, namely, the matching trajectory score at the basic geographical area level, the matching trajectory score at the next level of the basic geographical area level, the contradictory trajectory score, and the non-daily activity trajectory score. When performing face and IMSI matching according to the matching score, according to the calculated weekly matching score, the weekly TOP5 (only an example, can be selected according to actual needs) matching scores can be selected, and then the matching scores for 8 weeks are calculated (i.e., sum(matching scores of weekly TOP5 objects)), and then it is judged whether the face and the IMSI match based on the set threshold.
[0118] It should be noted that in practical applications, due to the certain sparsity in the deployment of face monitoring devices and electric fence devices, and this embodiment compares the similarity between faces and IMSI trajectories, the sparsity problem of single-type trajectories is more prominent. To solve the data sparsity problem, it is necessary to find a group of devices with better information collection conditions. This group of devices shows the characteristics of higher distribution density or forming a line shape, and the trajectory information collected by such devices is more available.
[0119] In one implementation, since the scope of "person clustering" is at the district or county level, the scope of the device group is also at the district or county level. Since the selection of the device group with better conditions is to solve the problem that trajectories cannot be formed due to sparsity, and it still involves the density problem, the DBSCAN algorithm can still be used to calculate the density clustering group of the corresponding devices. For example, first make a visual mark (implemented by calling the map interface with python) for the device points on the map and display them, then divide the basic device clusters according to the distribution of devices on the map, input the initial in-cluster set points and the ∈ value, and the ∈ values of different cluster sets should be different. In this way, the electric fence device and the face monitoring device group clusters can be obtained by using the DBSCAN algorithm. By marking the cluster devices with dgi, during the trajectory comparison process, the trajectory information collected by the devices with the mark dgi can be selected for comparison.
[0120] To execute the corresponding steps in the above embodiments and various possible ways, an implementation manner of a face and IMSI matching device is given below. Please refer to Figure 3 , which is a functional module diagram of the face and IMSI matching device 600 provided by the embodiment of the present invention. It should be noted that the basic principle and the technical effects generated by the face and IMSI matching device 600 provided in this embodiment are the same as those in the above embodiments. For a brief description, for the parts not mentioned in this embodiment, reference can be made to the corresponding content in the above embodiments. The face and IMSI matching device 600 includes a data set acquisition module 610, a trajectory comparison module 620, a non-daily activity trajectory acquisition module 630, a score calculation module 640, and a score processing module 650.
[0121] The data set acquisition module 610 is used to acquire a data set to be processed; the data set to be processed includes trajectory information corresponding to multiple faces to be matched and trajectory information corresponding to multiple IMSIs to be matched.
[0122] It can be understood that the data set acquisition module 610 can execute the above step S101.
[0123] A trajectory comparison module 620 is configured to perform trajectory comparison based on the trajectory information corresponding to the face to be matched of the same object and the trajectory information corresponding to the same IMSI to be matched, so as to obtain the number of matching trajectories and the number of conflicting trajectories.
[0124] It can be understood that the trajectory comparison module 620 can execute the above-mentioned step S102.
[0125] A non-daily activity trajectory acquisition module 630 is configured to perform trajectory clustering on the trajectory information corresponding to the face to be matched of the same object and the trajectory information corresponding to the same IMSI to be matched respectively, and determine the number of non-daily activity trajectories according to the unclustered points obtained.
[0126] It can be understood that the non-daily activity trajectory acquisition module 630 can execute the above-mentioned step S103.
[0127] A score calculation module 640 is configured to calculate the matching score between the face to be matched of each object and each IMSI to be matched according to the number of matching trajectories, the number of non-daily activity trajectories, and the number of conflicting trajectories.
[0128] It can be understood that the score calculation module 640 can execute the above-mentioned step S104.
[0129] A score processing module 650 is configured to determine whether the face to be matched of each object and each IMSI to be matched match according to the matching score.
[0130] It can be understood that the score processing module 650 can execute the above-mentioned step S105.
[0131] Optionally, the dataset acquisition module 610 is specifically configured to perform collision calculation on the face trajectory information collected by the face monitoring device and the IMSI trajectory information collected by the electric fence device to obtain pairs of face and IMSI trajectory information that meet the spatio-temporal collision conditions; summarize all pairs of face and IMSI trajectory information that meet the spatio-temporal collision conditions to obtain a dataset to be processed.
[0132] Optionally, the trajectory comparison module 620 is specifically configured to perform vectorization processing on the trajectory information corresponding to the face to be matched of the same object and the trajectory information corresponding to the same IMSI to be matched respectively, so as to obtain a face trajectory array corresponding to each object and an IMSI trajectory array corresponding to each IMSI to be matched; perform trajectory comparison between each face trajectory array and each IMSI trajectory array to obtain the number of matching trajectories and the number of conflicting trajectories.
[0133] It can be understood that the trajectory comparison module 620 can specifically execute the above-mentioned sub-steps S1021~S1022.
[0134] Optionally, the trajectory comparison module 620 is specifically configured to convert the trajectory information corresponding to each face to be matched of the same object and the trajectory information corresponding to the same IMSI to be matched into corresponding position encodings; divide the time interval corresponding to the data set to be processed into multiple time windows according to a preset time window length; write the position encoding corresponding to each face to be matched into the corresponding time window according to the acquisition time of the trajectory information corresponding to each face to be matched, so as to obtain a face trajectory array corresponding to each object; write the position encoding corresponding to each IMSI to be matched into the corresponding time window according to the acquisition time of the trajectory information corresponding to each IMSI to be matched, so as to obtain an IMSI trajectory array corresponding to each IMSI to be matched.
[0135] Optionally, the trajectory comparison module 620 is specifically configured to divide each face trajectory array and each IMSI trajectory array into multiple face trajectory sub-arrays and IMSI trajectory sub-arrays with different time segments according to a preset time period; for each face trajectory sub-array and each IMSI trajectory sub-array in the same time segment, compare the position encodings on the same vector bit; count the number of vector bits with the same position encoding to obtain the number of matching trajectories in each time segment; for the target vector bits with different position encodings, degrade the position encoding on the target vector bit in the face trajectory sub-array. If the degraded position encoding is still different from the position encoding on the target vector bit in the IMSI trajectory sub-array, increment the count by one, and obtain the number of contradictory trajectories in each time segment according to the count result.
[0136] Optionally, the trajectory comparison module 620 is specifically configured to count the number of vector bits whose position encodings on the same vector bit are all the first preset value to obtain the first number of matching trajectories; count the number of vector bits whose position encodings on the same vector bit are all the second preset value to obtain the second number of matching trajectories; the second preset value is obtained by degrading the first preset value; according to the first number of matching trajectories and the second number of matching trajectories, obtain the number of matching trajectories in each time segment.
[0137] Optionally, the score calculation module 640 is specifically configured to calculate the proportion of the number of matching trajectories relative to the target trajectory number; the target trajectory number is the minimum of the number of trajectory information corresponding to the face to be matched of the same object and the number of trajectory information corresponding to the same IMSI to be matched; calculate the matching trajectory score according to the proportion and the weight value corresponding to the proportion; calculate the non-daily activity trajectory score according to the number of non-daily activity trajectories and the weight value corresponding to the number of non-daily activity trajectories; calculate the contradictory trajectory score according to the number of contradictory trajectories and the weight value corresponding to the number of contradictory trajectories; add the matching trajectory score and the non-daily activity trajectory score, and subtract the contradictory trajectory score to obtain the matching score between the face to be matched of each object and each IMSI to be matched.
[0138] It can be understood that the score calculation module 640 can specifically execute the above sub-steps S1041 to S1045.
[0139] It can be seen that the face and IMSI matching device provided by the embodiment of the present invention includes a data set acquisition module, a trajectory comparison module, a non-daily activity trajectory acquisition module, a score calculation module, and a score processing module. The data set acquisition module acquires a data set to be processed; the data set to be processed includes trajectory information corresponding to multiple faces to be matched and trajectory information corresponding to multiple IMSIs to be matched; the trajectory comparison module performs trajectory comparison according to the trajectory information corresponding to the faces to be matched of the same object and the trajectory information corresponding to the same IMSI to be matched, and obtains the number of matching trajectories and the number of conflicting trajectories; the non-daily activity trajectory acquisition module respectively performs trajectory clustering on the trajectory information corresponding to the faces to be matched of the same object and the trajectory information corresponding to the same IMSI to be matched, and determines the number of non-daily activity trajectories according to the obtained unclustered points; the score calculation module calculates the matching score of the face to be matched and each IMSI to be matched for each object according to the number of matching trajectories, the number of non-daily activity trajectories, and the number of conflicting trajectories; the score processing module determines whether the face to be matched and each IMSI to be matched for each object are matched according to the matching score. Since the calculation of the matching score comprehensively considers the matching trajectories, non-daily activity trajectories, and conflicting trajectories, accurate matching of face and IMSI data can be achieved based on the matching score, thus greatly enriching and supplementing the activity data of the same person to form a prediction of subsequent activity patterns and travel purposes, and greatly improving the application value of the data.
[0140] Please refer to Figure 4 , which is a block diagram of an electronic device 700 provided by an embodiment of the present invention. The electronic device may be a device such as a PC (Personal Computer) or a server, and this embodiment does not limit this. The electronic device 700 includes a memory 710, a processor 720, and a communication module 730. The elements of the memory 710, the processor 720, and the communication module 730 are directly or indirectly electrically connected to each other to achieve data transmission or interaction. For example, these elements may be electrically connected to each other through one or more communication buses or signal lines.
[0141] Among them, the memory 710 is used to store programs or data. The memory 710 can be, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electric Erasable Programmable Read-Only Memory (EEPROM), etc.
[0142] The processor 720 is used to read / write the data or programs stored in the memory 710 and perform corresponding functions. For example, when the computer program stored in the memory 710 is executed by the processor 720, the face and IMSI matching methods disclosed in the above embodiments can be implemented.
[0143] The communication module 730 is used to establish a communication connection between the electronic device 700 and other communication terminals through the network and is used to send and receive data through the network.
[0144] It should be understood that Figure 4 The structure shown is only a schematic diagram of the structure of the electronic device 700, and the electronic device 700 may further include more or fewer components than those shown in Figure 4 or have a different configuration from that shown in Figure 4 The various components shown in can be implemented using hardware, software, or a combination thereof. Figure 4 The components shown in can be implemented using hardware, software, or a combination thereof.
[0145] The embodiments of the present invention also provide a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by the processor 720, the face and IMSI matching methods disclosed in the above embodiments are implemented.
[0146] In several embodiments provided by this application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions, and operations of devices, methods, and computer program products according to multiple embodiments of the present invention. In this regard, each block in the flowchart or block diagram can represent a module, a program segment, or a part of code, and the part of the module, program segment, or code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, as well as the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.
[0147] In addition, in each embodiment of the present invention, the various functional modules can be integrated together to form an independent part, or each module can exist alone, or two or more modules can be integrated to form an independent part.
[0148] If the described functions are implemented in the form of software functional modules and sold or used as an independent product, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program code.
[0149] The above are only the preferred embodiments of the present invention and are not used to limit the present invention. For those skilled in the art, the present invention can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for matching a face with an IMSI, characterized in that, The method includes: Obtaining a dataset to be processed; the dataset to be processed includes trajectory information corresponding to multiple faces to be matched and trajectory information corresponding to multiple IMSIs to be matched; Performing trajectory comparison based on the trajectory information corresponding to the faces to be matched of the same object and the trajectory information corresponding to the same IMSI to be matched, to obtain the number of matching trajectories and the number of conflicting trajectories; the number of matching trajectories represents the number of trajectories generated by the same person, and the number of conflicting trajectories represents the number of trajectories not generated by the same person; Performing trajectory clustering on the trajectory information corresponding to the faces to be matched of the same object and the trajectory information corresponding to the same IMSI to be matched respectively, and determining the number of non-daily activity trajectories according to the obtained unclustered points; Calculating the matching scores of the faces to be matched of each object and each IMSI to be matched according to the number of matching trajectories, the number of non-daily activity trajectories, and the number of conflicting trajectories; Determining whether the faces to be matched of each object and each IMSI to be matched match according to the matching scores.
2. The method according to claim 1, wherein The performing trajectory comparison based on the trajectory information corresponding to the faces to be matched of the same object and the trajectory information corresponding to the same IMSI to be matched, to obtain the number of matching trajectories and the number of conflicting trajectories, includes: Performing vectorization processing on the trajectory information corresponding to the faces to be matched of the same object and the trajectory information corresponding to the same IMSI to be matched respectively, to obtain a face trajectory array corresponding to each object and an IMSI trajectory array corresponding to each IMSI to be matched; Performing trajectory comparison between each face trajectory array and each IMSI trajectory array, to obtain the number of matching trajectories and the number of conflicting trajectories.
3. The method according to claim 2, characterized in that, The performing vectorization processing on the trajectory information corresponding to the faces to be matched of the same object and the trajectory information corresponding to the same IMSI to be matched respectively, to obtain a face trajectory array corresponding to each object and an IMSI trajectory array corresponding to each IMSI to be matched, includes: Converting the trajectory information corresponding to each face to be matched of the same object and the trajectory information corresponding to the same IMSI to be matched into corresponding position encodings; Dividing the time interval corresponding to the dataset to be processed into multiple time windows according to a preset time window length; Writing the position encodings corresponding to each face to be matched into the corresponding time windows according to the acquisition time of the trajectory information corresponding to each face to be matched, to obtain a face trajectory array corresponding to each object; Writing the position encodings corresponding to each IMSI to be matched into the corresponding time windows according to the acquisition time of the trajectory information corresponding to each IMSI to be matched, to obtain an IMSI trajectory array corresponding to each IMSI to be matched.
4. The method according to claim 3, characterized in that, The performing trajectory comparison between each face trajectory array and each IMSI trajectory array, to obtain the number of matching trajectories and the number of conflicting trajectories, includes: Dividing each face trajectory array and each IMSI trajectory array into multiple face trajectory sub-arrays and IMSI trajectory sub-arrays with different time segments respectively according to a preset time period; For each of the face trajectory sub-arrays and each of the IMSI trajectory sub-arrays for the same time segment, compare the position encodings at the same vector positions; Count the number of vector positions with the same position encoding to obtain the number of matching trajectories for each time segment; For the target vector positions with different position encodings, perform a downgrading process on the position encodings at the target vector positions in the face trajectory sub-array. If the downgraded position encoding is still different from the position encoding at the target vector position in the IMSI trajectory sub-array, increment the count. Obtain the number of conflicting trajectories for each time segment based on the count result.
5. The method according to claim 4, characterized in that The step of counting the number of vector positions with the same position encoding to obtain the number of matching trajectories for each time segment includes: Count the number of vector positions where the position encodings at the same vector positions are all the first preset value to obtain the first number of matching trajectories; Count the number of vector positions where the position encodings at the same vector positions are all the second preset value to obtain the second number of matching trajectories; the second preset value is obtained by downgrading the first preset value; Based on the first number of matching trajectories and the second number of matching trajectories, obtain the number of matching trajectories for each time segment.
6. The method according to claim 1, wherein The step of calculating the matching score between the face to be matched and the IMSI to be matched for each object based on the number of matching trajectories, the number of non-daily activity trajectories, and the number of conflicting trajectories includes: Calculate the ratio of the number of matching trajectories to the target number of trajectories; the target number of trajectories is the minimum of the number of trajectory information corresponding to the face to be matched and the number of trajectory information corresponding to the IMSI to be matched for the same object; Calculate the matching trajectory score based on the ratio and the weight value corresponding to the ratio; Calculate the non-daily activity trajectory score based on the number of non-daily activity trajectories and the weight value corresponding to the number of non-daily activity trajectories; Calculate the conflicting trajectory score based on the number of conflicting trajectories and the weight value corresponding to the number of conflicting trajectories; Add the matching trajectory score and the non-daily activity trajectory score, and subtract the conflicting trajectory score to obtain the matching score between the face to be matched and the IMSI to be matched for each object.
7. The method according to claim 1, wherein The step of obtaining the dataset to be processed includes: Perform a collision calculation on the face trajectory information collected by the face monitoring device and the IMSI trajectory information collected by the electric fence device to obtain pairs of face and IMSI trajectory information that meet the spatio-temporal collision conditions; Summarize all pairs of face and IMSI trajectory information that meet the spatio-temporal collision conditions to obtain the dataset to be processed.
8. A face and IMSI matching device, characterized in that, The device includes: A dataset acquisition module for acquiring the dataset to be processed; the dataset to be processed includes trajectory information corresponding to multiple faces to be matched and trajectory information corresponding to multiple IMSIs to be matched; A trajectory comparison module for comparing trajectories based on the trajectory information corresponding to the face to be matched and the IMSI to be matched for the same object to obtain the number of matching trajectories and the number of conflicting trajectories; the number of matching trajectories represents the number of trajectories generated by the same person, and the number of conflicting trajectories represents the number of trajectories not generated by the same person; The non-daily activity trajectory acquisition module is used to perform trajectory clustering on the trajectory information corresponding to the face to be matched of the same object and the trajectory information corresponding to the same IMSI to be matched respectively, and determine the number of non-daily activity trajectories according to the obtained unclustered points; The score calculation module is used to calculate the matching scores of the face to be matched and the IMSI to be matched for each object according to the number of trajectories in the ratio, the number of non-daily activity trajectories, and the number of conflicting trajectories; The score processing module is used to determine whether the face to be matched and the IMSI to be matched for each object match according to the matching scores.
9. An electronic device, characterized in that, It includes a processor, a memory, and a computer program stored on the memory and executable on the processor. When the computer program is executed by the processor, it implements the steps of the face and IMSI matching method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium. When the computer program is executed by the processor, it implements the steps of the face and IMSI matching method according to any one of claims 1-7.
Citation Information
Patent Citations
Method and device for generating track of specific suspect
CN110191424A
Pedestrian identity information acquisition method and system, server and storage medium
CN112770265A